GreaseMonkey_SuperValues-minified

Extends the GM_setValue and GM_getValue functions for any javascript variable type.

Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greatest.deepsurf.us/scripts/19190/122474/GreaseMonkey_SuperValues-minified.js

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

var GM_SuperValue=new function(){function ReportError(e){if(!console||!console.error)throw new Error(e);console.error(e)}var JSON_MarkerStr="json_val: ",FunctionMarker="function_code: ";"function"!=typeof GM_setValue&&ReportError("This library requires Greasemonkey! GM_setValue is missing."),"function"!=typeof GM_getValue&&ReportError("This library requires Greasemonkey! GM_getValue is missing."),this.set=function(e,r){if("string"!=typeof e)return void ReportError("Illegal varName sent to GM_SuperValue.set(). Name: "+e+" Value: "+r);switch(/[^\w _-]/.test(e)&&ReportError("Suspect, probably illegal, varName sent to GM_SuperValue.set().  Name: "+e+" Value: "+r),typeof r){case"undefined":ReportError("Illegal varValue sent to GM_SuperValue.set().  Name: "+e+" Value: "+r);break;case"boolean":case"string":GM_setValue(e,r);break;case"number":r===parseInt(r)&&Math.abs(r)<2147483647?GM_setValue(e,r):ReportError("Illegal varValue sent to GM_SuperValue.set().  Name: "+e+" Value: "+r);break;case"object":var a=JSON_MarkerStr+JSON.stringify(r);GM_setValue(e,a);break;case"function":var t=FunctionMarker+r.toString();GM_setValue(e,t);break;default:ReportError("Unknown type in GM_SuperValue.set()! Name: "+e+" DefaultValue: "+r)}},this.get=function(varName,defaultValue){if("string"!=typeof varName)return void ReportError("Illegal varName sent to GM_SuperValue.get(). Name: "+varName+" DefaultValue: "+defaultValue);/[^\w _-]/.test(varName)&&ReportError("Suspect, probably illegal, varName sent to GM_SuperValue.get(). Name: "+varName+" DefaultValue: "+defaultValue);var varValue=GM_getValue(varName);if("undefined"==typeof varValue)return defaultValue;if("string"==typeof varValue){var regxp=new RegExp("^"+JSON_MarkerStr+"(.+)$"),m=varValue.match(regxp);if(m&&m.length>1)return varValue=JSON.parse(m[1]);if(regxp=new RegExp("^"+FunctionMarker+"((?:.|\n|\r)+)$"),m=varValue.match(regxp),m&&m.length>1)return varValue=eval("("+m[1]+")")}return varValue}};