diff --git a/js/filters.js b/js/filters.js index e412cd2..00a867e 100644 --- a/js/filters.js +++ b/js/filters.js @@ -135,11 +135,13 @@ weechat.filter('DOMfilter', ['$filter', '$sce', function($filter, $sce) { }; }]); +// This is used by the cordova app to change link targets to "window.open(, '_system')" +// so that they're opened in a browser window and don't navigate away from Glowing Bear weechat.filter('linksForCordova', ['$sce', function($sce) { return function(text) { - // Cordova: need to use window.open instead of href // XXX TODO this needs to be improved - text = text.replace(/'; document.getElementById("soundNotification").innerHTML = soundHTML; diff --git a/js/utils.js b/js/utils.js index 350f5c0..854372b 100644 --- a/js/utils.js +++ b/js/utils.js @@ -21,6 +21,10 @@ weechat.factory('utils', function() { return (document.body.clientWidth < mobile_cutoff); }; + var isCordova = function() { + return window.cordova !== undefined; + }; + // Inject a javascript (used by KaTeX) var inject_script = function(script_url) { @@ -46,6 +50,7 @@ weechat.factory('utils', function() { changeClassStyle: changeClassStyle, getClassStyle: getClassStyle, isMobileUi: isMobileUi, + isCordova: isCordova, inject_script: inject_script, inject_css: inject_css, }; diff --git a/manifest.json b/manifest.json index fbe73c8..793e2fd 100644 --- a/manifest.json +++ b/manifest.json @@ -9,11 +9,11 @@ }, "app": { "urls": [ - "http://www.glowing-bear.org/" + "https://www.glowing-bear.org/" ], "launch": { "container": "panel", - "web_url": "http://www.glowing-bear.org/" + "web_url": "https://www.glowing-bear.org/" } }, "permissions": [