diff --git a/js/conf/Keybinds.js b/js/conf/Keybinds.js index 438155d..1dd072d 100644 --- a/js/conf/Keybinds.js +++ b/js/conf/Keybinds.js @@ -137,16 +137,14 @@ var _kbd_process = function (event) { // Tukaj ugotovimo, katero tipko } } - -var _kbd_setup = async function() { - +var _kbd_load = async function() { if(Debug.debug) console.log("[Keybinds::_kbd_setup_init] Setting up keybinds"); var ret = await StorageManager.getopt_async("keybinds"); var keybinds = ret.keybinds; - + if(Array.isArray(keybinds)){ StorageManager.delopt("keybinds"); keybinds = DEFAULT_KEYBINDINGS; @@ -165,11 +163,24 @@ var _kbd_setup = async function() { } _kbd_keybinds = keybinds; +} +var _kbd_setup = async function() { + await _kbd_load(); + $(document).keydown(_kbd_process); } +var _kbd_fetch = async function(){ + if($.isEmptyObject(_kbd_keybinds)){ + await _kbd_load(); + } + + return _kbd_keybinds; +} var Keybinds = { - init: _kbd_setup + init: _kbd_setup, + fetch: _kbd_fetch, + mods: _kbd_ModKeys } diff --git a/js/uw.js b/js/uw.js index 185c290..202e091 100644 --- a/js/uw.js +++ b/js/uw.js @@ -51,8 +51,8 @@ async function main(){ - - ArDetect.arSetup(); + if(Settings.arDetect.enable == "global") + ArDetect.arSetup(); document.addEventListener("mozfullscreenchange", function( event ) { if(Debug.debug){ diff --git a/manifest.json b/manifest.json index f65e378..48c8161 100644 --- a/manifest.json +++ b/manifest.json @@ -77,7 +77,7 @@ ], "options_ui" : { - "page": "res/settings.html", + "page": "res/settings/settings.html", "open_in_tab": true } } diff --git a/res/popup/js/popup.js b/res/popup/js/popup.js index 658944a..fff1997 100644 --- a/res/popup/js/popup.js +++ b/res/popup/js/popup.js @@ -33,7 +33,7 @@ var hasVideos = false; var _config; -function check4videos(){ +async function check4videos(){ var command = {}; command.cmd = "has-videos"; command.sender = "popup"; @@ -57,7 +57,7 @@ function check4videos(){ }); } -function check4conf(){ +async function check4conf(){ var command = {}; command.cmd = "get-config"; command.sender = "popup"; diff --git a/res/popup/popup.html b/res/popup/popup.html index a75848c..5936fdf 100644 --- a/res/popup/popup.html +++ b/res/popup/popup.html @@ -80,7 +80,9 @@ .suboption { display: block; padding-left: 15px; + padding-right: 15px; padding-top: 5px; + padding-bottom: 20px; min-height: 250px; } @@ -112,8 +114,12 @@ } #no-videos-display { height: 100%; - padding-top: 120px; + padding-top: 50px; +/* text-align: center; */ + } + .center{ text-align: center; + width: 100%; } @@ -137,7 +143,10 @@
No videos have been found on this page.
If there is a video on this page, then you're seeing this message for one of these reasons:
+this is the future lol. (at least as far as autodetection goes, keybinds need to make a comeback)
This extension uses font Oxygen.
-Special thanks to CD Project Red (The Witcher 2), Anet (Guild Wars 2), and Valve (CS:GO), which made it possible for me to untrigger myself after seeing so many improperly encoded videos.
+Special thanks to CD Project Red (The Witcher 2), Cyanide Studios (Styx, Of Orcs and Men), and Valve (CS:GO), which made it possible for me to untrigger myself after seeing so many improperly encoded videos.
More or less.
Special one-finger salute to all incompetent people who don't know how to properly encode videos and upload them to youtube (to word it most nicely).
@@ -391,6 +366,14 @@