User:Zippybonzo (alt)/common.js

// Enable caching for resource loads, see User:SD0001/Making_user_scripts_load_faster, @revision 5 if(!/\bnocache=\b/.test(location.href)){var e=function(e,t,r){return e=e.replace(/special:mypage/i,"User:"+mw.config.get("wgUserName")),$.get("https://"+t+"/w/api.php?titles="+e+"&origin=*&format=json&formatversion=2&uselang=content&maxage=86400&smaxage=86400&action=query&prop=revisions|info&rvprop=content&rvlimit=1").then((function(n){var o=n.query.pages[0];if(!o.missing){var a=o.revisions[0].content;if(r&&"text/javascript"!==r||"javascript"!==o.contentmodel){if("text/css"!==r||"css"!==o.contentmodel)return $.Deferred.reject('Refused to load "'+e+'"@'+t+": content type mismatch");mw.loader.addStyleTag(a)}else{if(2!==o.ns&&8!==o.ns)return $.Deferred.reject('Refused to load "'+e+'"@'+t+": outside User and MediaWiki space");var i=document.createElement("script");i.innerHTML=a,document.head.appendChild(i)}}}))},t=function(e){var t=/^(?:(?:https:)?\/\/(.*))?\/w\/index.php/.exec(e),r=/\btitle=([^=?&]*)/.exec(e);return t&&r&&/\baction=raw\b/.test(e)&&/\bctype=/.test(e)?[r[1],t[1]||mw.config.get("wgServerName")]:null};window.importScript=function(t){e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/javascript")},window.importStyleSheet=function(t){e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/css")};var r=mw.loader.load;mw.loader.load=function(n,o){var a=t(n);a?e(a[0],a[1],o):r.apply(mw.loader,Array.prototype.slice.call(arguments))};var n=mw.loader.getScript;mw.loader.getScript=function(r){var o=t(r);return o?e(o[0],o[1],"text/javascript"):n.apply(mw.loader,Array.prototype.slice.call(arguments))}} importScript( 'User:Ingenuity/AntiVandal.js' ); // Backlink: User:Ingenuity/AntiVandal.js importScript( 'User:10nm/beta.js' ); // Backlink: User:10nm/Beta.js importScript('User:Novem Linguae/Scripts/CiteHighlighter.js'); // Backlink: User:Novem Linguae/Scripts/CiteHighlighter.js importScript('User:Novem Linguae/Scripts/VisualEditorEverywhere.js'); // Backlink: User:Novem Linguae/Scripts/VisualEditorEverywhere.js importScript('User:Novem Linguae/Scripts/UserHighlighterSimple.js'); // Backlink: User:Novem Linguae/Scripts/UserHighlighterSimple.js importScript('User:Chlod/Scripts/Deputy.js'); // Backlink: User:Chlod/Scripts/Deputy.js