File indexing completed on 2025-01-05 04:35:04
0001 function GM_deleteValue(a){localStorage.removeItem("%1"+a)}function GM_getValue(a,b){var c=localStorage.getItem("%1"+a);return null===c?b:c}function GM_listValues(){for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b);0===c.indexOf("%1")&&a.push(c.replace("%1",""))}return a}function GM_setValue(a,b){localStorage.setItem("%1"+a,b)} 0002 var asyncCall=function(a){window._falkon_external?a():document.addEventListener("_falkon_external_created",a)},decode=function(a){a=String(a);if(!a.length)return a;var b=a.substr(1);if("b"==a[0])return"true"==b?!0:!1;if("i"==a[0])return Number(b);if("s"==a[0])return b},encode=function(a){return"boolean"==typeof a?"b"+(a?"true":"false"):"number"==typeof a?"i"+String(a):"string"==typeof a?"s"+a:""}; 0003 GM.deleteValue=function(a){return new Promise(function(b,c){asyncCall(function(){external.extra.greasemonkey.deleteValue("%1",a,function(a){a?b():c()})})})};GM.getValue=function(a,b){return new Promise(function(c){asyncCall(function(){external.extra.greasemonkey.getValue("%1",a,encode(b),function(a){c(decode(a))})})})};GM.setValue=function(a,b){return new Promise(function(c,d){asyncCall(function(){external.extra.greasemonkey.setValue("%1",a,encode(b),function(a){a?c():d()})})})}; 0004 GM.listValues=function(){return new Promise(function(a){asyncCall(function(){external.extra.greasemonkey.listValues("%1",a)})})};