// var _sc_SITES = { // "vimeo.com" : { // extraCss: [], // bannedCss: [], // nonfsPlayerMod: function(){ // // hack player to take all the width // $("head").append(''); // // var e = document.getElementsByClassName("player_outro_area")[0]; // e.classList.add("uw_forceFullWidth"); // e.classList.add("uw_forceCenter"); // e = document.getElementsByClassName("player_container")[0]; // e.classList.add("uw_forceFullWidth"); // e.classList.add("uw_forceCenter"); // // $("video")[0].style.display = "inline-block"; // }, // fsPlayerMod: function(){ // // hack player to take all the width // $("head").append(''); // // var e = document.getElementsByClassName("player_outro_area")[0]; // e.classList.add("uw_forceFullWidth"); // e.classList.add("uw_forceCenter"); // e = document.getElementsByClassName("player_container")[0]; // e.classList.add("uw_forceFullWidth"); // e.classList.add("uw_forceCenter"); // // $("video")[0].style.display = "inline-block"; // } // } // } var _sc_init(){ } var _sc_reload() { _sc_init(); } var _sc_save() { StorageManager.delopt("uw-siteopts"); StorageManager.setopt({"uw-siteopts": JSON.stringify(_sc_sites)}); } var _sc_createEmptySite() { return { status: "follow-global", arStatus: "follow-global", statusEmbedded: "follow-global", }; } var _sc_siteEnabled(site){ // če za stran nismo določili načina delovanja, potem storimo privzeto stvar // if we haven't defined options for a site, we do the default thing if( _sc_sites[site] == undefined || _sc_sites[site].status == "follow-global"){ if ( Settings.extensionMode == "blacklist" ){ return true; } return false; } if( _sc_sites[site].status == "whitelisted" ) return true; if( _sc_sites[site].status == "blacklisted" ) return false; // sem ne bi smeli priti, vendar pa za varnost naredimo en return // we shouldn't come here but let's do a safety return return false; } var _sc_arEnabled(site){ if( _sc_sites[site] == undefined || _sc_sites[site].arStatus == "follow-global" ){ if(Settings.arDetect.mode == "blacklist" ){ return true; } return false; } if( _sc_sites[site].arStatus == "whitelisted" ) return true; if( _sc_sites[site].arStatus == "blacklisted" ) return false; } var _sc_updateSiteStatus(site, status){ // status: {} // status.status - optional // status.arStatus - optional // status.statusEmbedded - optional // // <==[ Valid values for options: ]==> // // status, arStatus, statusEmbedded: // // * whitelisted — always allow // * follow-global — allow if default is to allow, block if default is to block // * blacklisted — never allow if( _sc_sites[site] == undefined ){ _sc_sites[site] = _sc_createEmptySite(); } if(status.status != undefined ){ _sc_sites[site].status = status.status; } if(status.arStatus != undefined ){ _sc_sites[site].arStatus = status.arStatus; } if(status.statusEmbedded != undefined ){ _sc_sites[site].statusEmbedded = status.statusEmbedded; } _sc_save(); } // Nastavitve za posamezno stran // Config for a given page: // // : { // status: