// ==UserScript==
// @name Maddonz - Test 4.6
// @version 4.6
// @description Zbiór dodatków do Margonem
// @author Barlag
// @match http*://*.margonem.pl/
// @match http*://*.margonem.com/
// @exclude http*://margonem.*/*
// @exclude http*://www.margonem.*/*
// @exclude http*://new.margonem.*/*
// @exclude http*://forum.margonem.*/*
// @exclude http*://commons.margonem.*/*
// @exclude http*://dev-commons.margonem.*/*
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_xmlhttpRequest
// @connect margonem.pl
// @connect margonem.com
// @run-at document-body
// ==/UserScript==
(function() {
const GLOBAL = true;
const style = document.createElement('link');
style.rel = 'stylesheet';
style.type = 'text/css';
const script = document.createElement('script');
script.type = 'module';
const maddonz = {};
document.maddonz = maddonz;
if (GLOBAL && typeof GM_setValue !== 'undefined') {
maddonz.GM_getValue = GM_getValue;
maddonz.GM_setValue = GM_setValue;
} else {
maddonz.GM_getValue = function(key) {
return JSON.parse(localStorage.getItem(key));
};
maddonz.GM_setValue = function(key, value) {
localStorage.setItem(key, JSON.stringify(value));
};
}
maddonz.GM_xmlhttpRequest = GM_xmlhttpRequest;
maddonz.GM_info = GM_info;
let cacheToken = maddonz.GM_getValue('mz_cache_token');
if (!cacheToken) {
cacheToken = Math.random()
.toString(36)
.substring(2);
maddonz.GM_setValue('mz_cache_token', cacheToken);
}
function getResourceUrl(resource) {
return `https://test.barlag.pl/${resource}?c=${cacheToken}`;
}
script.src = getResourceUrl('maddonz.js');
document.head.appendChild(script);
style.href = getResourceUrl('maddonz.css');
document.head.appendChild(style);
})();
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}