User:Moony/common.js: Difference between revisions
From Space Station 14 Wiki
(Created page with "// The user script that runs on the client side - this was thrown together in a couple hours // Apache 2.0/CC-BY-SA // (c) 2021 User:Ed6767 - full attributions https://github.com/wikimedia-gadgets/EasyWikiDev/commits/main/.wikidev/wikiscript.js let hasRecievedFirstMessage = false; const currentSkin = mw.config.get("skin"); const portletLinkSelector = { 'vector': 'a > span', 'monobook': 'a', 'timeless': 'a' } const currentPortletLinkSelector = portletLinkSelector[c...") |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
var loadedScripts={}; | |||
function importScript(page){var uri=mw.config.get('wgScript')+'?title='+page+'&action=raw&ctype=text/javascript';return importScriptURI(uri);} | |||
function importScriptURI(url){var s;if(loadedScripts[url]){return null;}loadedScripts[url]=true;s=document.createElement('script');s.setAttribute('src',url);document.head.appendChild(s);return s;} | |||
importScript("User:Moony/devel.js"); | |||
function | |||
} | |||
Latest revision as of 23:19, 21 December 2021
var loadedScripts={};
function importScript(page){var uri=mw.config.get('wgScript')+'?title='+page+'&action=raw&ctype=text/javascript';return importScriptURI(uri);}
function importScriptURI(url){var s;if(loadedScripts[url]){return null;}loadedScripts[url]=true;s=document.createElement('script');s.setAttribute('src',url);document.head.appendChild(s);return s;}
importScript("User:Moony/devel.js");