User:KurwaAntics/global.js

/* ********** Load scripts ********** */ importArticles({   type: "script",    articles: [        "u:dev:Wikimarks/code.js",        "u:dev:View Source/code.js",        "u:dev:DisplayClock/code.js",        "u:dev:QuickDiff/code.js",    ] });

var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split('&'), sParameterName, i;

for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split('=');

if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : sParameterName[1]; }   } };

if ( getUrlParameter('loadjs').length > 0 ) { importArticles({ type: "script", articles: [ getUrlParameter('loadjs').split('|') ] }); }

if ( getUrlParameter('loadcss').length > 0 ) { importArticles({ type: "style", articles: [ getUrlParameter('loadcss').split('|') ] }); }