diff --git a/js/uw.js b/js/uw.js index 665defe..5f7b7fc 100644 --- a/js/uw.js +++ b/js/uw.js @@ -208,6 +208,8 @@ if(usebrowser == "chrome"){ var UW_SITES = { youtube: { + enabled: true, + type: "official", urlRules: ["youtu"], player: { name: "movie_player", @@ -219,10 +221,23 @@ var UW_SITES = { name: "ytp-right-controls", isClass: true, insertStrat: "prepend", - } + }, + autoar_imdb: false }, netflix: { - urlRules: ["netflix"] + enabled: true, + type: "official", + urlRules: ["netflix"], + player: { + name: "placeholder", + isClass: true, + }, + uiParent: { + name: "placeholder", + isClass: true, + insertStrat: "append" + }, + autoar_imdb: true } } @@ -390,7 +405,7 @@ function init(force_reload){ // after messing with CSS. var ui_anchor = document.getElementById("uw_ui_anchor"); // if(force_reload && ui_anchor) -// ui_anchor.parentNode.remove(ui_anchor);uf +// ui_anchor.parentNode.remove(ui_anchor); var uwcss = document.getElementsByClassName("uw_css"); while(uwcss && uwcss.length > 0) uwcss[0].parentNode.removeChild(uwcss[0]); @@ -883,14 +898,14 @@ function extsetup_siterules(opt){ // else // var obj = opt[0]; -// if(obj.ultrawidify_siterules === undefined){ -// if(debugmsg) -// console.log("uw::extsetup_siterules | site url rules missing from storage. Setting defaults."); -// browser.storage.local.set({ultrawidify_siterules: UW_SITES}); -// } -// else{ -// UW_SITES = obj.ultrawidify_siterules; -// } + if(obj.ultrawidify_siterules === undefined){ + if(debugmsg) + console.log("uw::extsetup_siterules | site url rules missing from storage. Setting defaults."); + browser.storage.local.set({ultrawidify_siterules: UW_SITES}); + } + else{ + UW_SITES = obj.ultrawidify_siterules; + } if(debugmsg) console.log("uw::extsetup_siterules | UW_SITES:",UW_SITES,"current site:",SITE); diff --git a/res/settings.html b/res/settings.html index 9c18d3d..d034f7b 100644 --- a/res/settings.html +++ b/res/settings.html @@ -52,6 +52,10 @@ h2{ font-size: 2.2em; } + .sites_header{ + font-size: 1.6em; + color: #ff9; + } .content{ display: inline-block; width: 52em; @@ -162,6 +166,50 @@ background-color: rgba(0,0,0,0.66); color: #ffc; height: 1.7em; + }optionsoptions + Shortcuts + About + Official + Shortcuts + About + Official + + /** site options css **/ + .site_name { + padding-left: 1em; + padding-bottom: 0.3em; + color: #fff; + font-size: 1.1em; + height: 13em !important; + + } + .site_details { + font-size: 0.8em; + } + .site_title_ebox { + width: 10em !important; + font-size: 1.5em !important; + background-color: rgba(0,0,0,0) !important; + margin-left: 0px !important; + border: 0px !important; + color: #ffc !important; + } + .details_ebox { + width: 12em !important; + background-color: rgba(0,0,0,0) !important; + border: 0px !important; + color: #ffc !important; + margin-left: 0em !important; + } + .details_ebox:disabled { + color: #aaa !important; + } + .inline_button { + display: inline-block; + margin-top: -1.42em; + } + .inline_button:hover { + color: #fff; } @@ -177,11 +225,15 @@