username
diff --git a/src/js/glowingbear.js b/src/js/glowingbear.js
index 1ab8cc0..f9eaf9e 100644
--- a/src/js/glowingbear.js
+++ b/src/js/glowingbear.js
@@ -131,7 +131,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// Show a TLS warning if GB was loaded over an unencrypted connection,
// except for local instances (local files, testing)
$scope.show_tls_warning = (["https:", "file:"].indexOf(window.location.protocol) === -1) &&
- (["localhost", "127.0.0.1", "::1"].indexOf(window.location.hostname) === -1)
+ (["localhost", "127.0.0.1", "::1"].indexOf(window.location.hostname) === -1);
$rootScope.isWindowFocused = function() {
if (typeof $scope.documentHidden === "undefined") {
diff --git a/src/js/plugins.js b/src/js/plugins.js
index ffd4ab2..a6e7412 100644
--- a/src/js/plugins.js
+++ b/src/js/plugins.js
@@ -239,34 +239,35 @@ plugins.factory('userPlugins', function() {
var twitchPlugin = new UrlPlugin('Twitch video', function(url) {
var regex = /(?:https?:\/\/)?clips\.twitch\.tv\/([^\?\&\/\s]+)/i,
- match = url.match(regex);
+ match = url.match(regex),
+ embedurl,
+ element;
- if (match){
+ if (match) {
var clipId = match[1];
- var embedurl = "https://clips.twitch.tv/embed?clip=" + clipId + "&parent=" + window.location.hostname;
-
- var element = angular.element('')
- .attr('src', embedurl)
- .attr('width', '560')
- .attr('height', '315')
- .attr('allowfullscreen', 'true');
+ embedurl = "https://clips.twitch.tv/embed?clip=" + clipId + "&parent=" + window.location.hostname;
+ element = angular.element('')
+ .attr('src', embedurl)
+ .attr('width', '560')
+ .attr('height', '315')
+ .attr('allowfullscreen', 'true');
return element.prop('outerHTML');
}
-
- var regex = /(?:https?:(?:\/\/www\.)?)?twitch\.tv\/(?:videos\/(\d+)|(\w+))/i,
- match = url.match(regex);
+
+ regex = /(?:https?:(?:\/\/www\.)?)?twitch\.tv\/(?:videos\/(\d+)|(\w+))/i;
+ match = url.match(regex);
if (match) {
- var mediaType = "video";
- if(match[1] === undefined) {
- mediaType = "channel";
- }
- var mediaId = match[1] === undefined ? match[2] : match[1];
- var embedurl = "https://player.twitch.tv/?" + mediaType + "=" + mediaId + "&parent=" + window.location.hostname + "&autoplay=false&muted=true";
- var element = angular.element('')
- .attr('src', embedurl)
- .attr('width', '560')
- .attr('height', '315')
- .attr('allowfullscreen', 'true');
+ var mediaType = "video";
+ if (match[1] === undefined) {
+ mediaType = "channel";
+ }
+ var mediaId = match[1] === undefined ? match[2] : match[1];
+ embedurl = "https://player.twitch.tv/?" + mediaType + "=" + mediaId + "&parent=" + window.location.hostname + "&autoplay=false&muted=true";
+ element = angular.element('')
+ .attr('src', embedurl)
+ .attr('width', '560')
+ .attr('height', '315')
+ .attr('allowfullscreen', 'true');
return element.prop('outerHTML');
}
});
diff --git a/src/js/utils.js b/src/js/utils.js
index ac5dde0..dfa4e0a 100644
--- a/src/js/utils.js
+++ b/src/js/utils.js
@@ -27,7 +27,7 @@ weechat.factory('utils', function() {
const _isTauri = window.__TAURI__ !== undefined;
var isTauri = function() {
return _isTauri;
- }
+ };
// Inject a javascript (used by KaTeX)
var inject_script = function(script_url) {
diff --git a/src/manifest.json b/src/manifest.json
index c7dc41e..f651645 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -1,7 +1,7 @@
{
"name": "Glowing Bear",
"description": "WeeChat Web frontend",
- "version": "0.10.0",
+ "version": "0.11.0",
"manifest_version": 2,
"icons": {
"32": "assets/img/favicon.png",
diff --git a/src/manifest.webapp b/src/manifest.webapp
index 246406a..5d26c1e 100644
--- a/src/manifest.webapp
+++ b/src/manifest.webapp
@@ -25,5 +25,5 @@
"desktop-notification":{}
},
"default_locale": "en",
- "version": "0.10.0"
+ "version": "0.11.0"
}
diff --git a/test/karma.conf.js b/test/karma.conf.js
index 4594f05..8bf6825 100644
--- a/test/karma.conf.js
+++ b/test/karma.conf.js
@@ -7,7 +7,7 @@ module.exports = function (config) {
files: [
'node_modules/linkifyjs/dist/linkify.js',
- 'node_modules/linkifyjs/dist/linkify-string.js',
+ 'node_modules/linkify-string/dist/linkify-string.js',
'test/unit/main.test.js'
],
diff --git a/webpack.config.js b/webpack.config.js
index f871e54..300dfc7 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -51,7 +51,7 @@ module.exports = {
},
{ from: "../node_modules/emojione/lib/js/emojione.min.js" },
{ from: "../node_modules/linkifyjs/dist/linkify.min.js" },
- { from: "../node_modules/linkifyjs/dist/linkify-string.min.js" },
+ { from: "../node_modules/linkify-string/dist/linkify-string.min.js" },
]
}),
],