User:Eejit43/common.js

/* Enable caching for resource loads, see User:SD0001/Making user scripts load faster, @revision 6 */ if(!/\bnocache=\b/.test(location.href)){let e=(e,t,n)=>(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((r=>{let o=r.query.pages[0];if(o.missing)return;let a=o.revisions[0].content;if(n&&"text/javascript"!==n||"javascript"!==o.contentmodel){if("text/css"!==n||"css"!==o.contentmodel)return $.Deferred.reject('Refused to load "'+e+'"@'+t+": content type mismatch");mw.loader.addStyleTag(a)}else{let e=document.createElement("script");e.innerHTML=a,document.head.appendChild(e)}}))),t=e=>{let t=/^(?:(?:https:)?\/\/(.*))?\/w\/index.php/.exec(e),n=/\btitle=([^=?&]*)/.exec(e);return t&&n&&/\baction=raw\b/.test(e)&&/\bctype=/.test(e)?[n[1],t[1]||mw.config.get("wgServerName")]:null};window.importScript=t=>{e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/javascript")},window.importStyleSheet=t=>{e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/css")};let n=mw.loader.load;mw.loader.load=function(r,o){let a=t(r);a?e(a[0],a[1],o):n.apply(mw.loader,[...arguments])};let r=mw.loader.getScript;mw.loader.getScript=function(n){let o=t(n);return o?e(o[0],o[1],"text/javascript"):r.apply(mw.loader,[...arguments])}}

/* Prevent confirmation dialog on script install */ window.sciNoConfirm = true;

/* Insert draft cleaner link to tools menu */ window.draftCleanerPutInMoreMenu = true;

/* Script imports */ importScript('User:10nm/beta.js'); // Backlink: User:10nm/beta.js importScript('User:Ahecht/Scripts/pageswap.js'); // Backlink: User:Ahecht/Scripts/pageswap.js importScript('User:Ahecht/Scripts/refresh.js'); // Backlink: User:Ahecht/Scripts/refresh.js importScript('User:Amorymeltzer/userinfo.js'); // Backlink: User:Amorymeltzer/userinfo.js importScript('User:BrandonXLF/NoRedirect.js'); // Backlink: User:BrandonXLF/NoRedirect.js importScript('User:Chlod/Scripts/UserHighlighter.js'); // Backlink: User:Chlod/Scripts/UserHighlighter.js importScript('User:DannyS712/copyvio-check.js'); // Backlink: User:DannyS712/copyvio-check.js importScript('User:Eejit43/scripts/afcrc-helper.js'); // Backlink: User:Eejit43/scripts/afcrc-helper.js importScript('User:Eejit43/scripts/ajax-undo.js'); // Backlink: User:Eejit43/scripts/ajax-undo.js importScript('User:Eejit43/scripts/aligner.js'); // Backlink: User:Eejit43/scripts/aligner.js importScript('User:Eejit43/scripts/copy-search-results.js'); // Backlink: User:Eejit43/scripts/copy-search-results.js importScript('User:Eejit43/scripts/deletion-finder.js'); // Backlink: User:Eejit43/scripts/deletion-finder.js //importScript('User:Eejit43/scripts/displaytitle-editor.js'); // Backlink: User:Eejit43/scripts/displaytitle-editor.js importScript('User:Eejit43/scripts/highlight-homographs.js'); // Backlink: User:Eejit43/scripts/highlight-homographs.js importScript('User:Eejit43/scripts/null-edit.js'); // Backlink: User:Eejit43/scripts/null-edit.js // importScript('User:Eejit43/scripts/pageswap.js'); // Backlink: User:Eejit43/scripts/pageswap.js importScript('User:Eejit43/scripts/redirect-helper.js'); // Backlink: User:Eejit43/scripts/redirect-helper.js importScript('User:Eejit43/scripts/rmtr-helper.js'); // Backlink: User:Eejit43/scripts/rmtr-helper.js importScript('User:Eejit43/scripts/script-updater.js'); // Backlink: User:Eejit43/scripts/script-updater.js importScript('User:Eejit43/scripts/search-links.js'); // Backlink: User:Eejit43/scripts/search-links.js importScript('User:Eejit43/scripts/to-monitor-list.js'); // Backlink: User:Eejit43/scripts/to-monitor-list.js importScript('User:Enterprisey/cv-revdel.js'); // Backlink: User:Enterprisey/cv-revdel.js importScript('User:Enterprisey/easy-brfa.js'); // Backlink: User:Enterprisey/easy-brfa.js importScript('User:Evad37/rater.js'); // Backlink: User:Evad37/rater.js // importScript('User:Frietjes/masspurge.js'); // Backlink: User:Frietjes/masspurge.js importScript('User:Fuddle/Cold Default Sort.js'); // Backlink: User:Fuddle/Cold Default Sort.js importScript('User:Jackmcbarn/editProtectedHelper.js'); // Backlink: User:Jackmcbarn/editProtectedHelper.js importScript('User:Joeytje50/JWB.js/load.js'); // Backlink: User:Joeytje50/JWB.js/load.js importScript('User:MPGuy2824/MoveToDraft.js'); // Backlink: User:MPGuy2824/MoveToDraft.js importScript('User:Nardog/CodeEditorAssist.js'); // Backlink: User:Nardog/CodeEditorAssist.js importScript('User:Nardog/MoveHistory.js'); // Backlink: User:Nardog/MoveHistory.js importScript('User:Nardog/RefRenamer.js'); // Backlink: User:Nardog/RefRenamer.js importScript('User:Nardog/SmartDiff.js'); // Backlink: User:Nardog/SmartDiff.js importScript('User:NguoiDungKhongDinhDanh/FormattedEditRequest.js'); // Backlink: User:NguoiDungKhongDinhDanh/FormattedEditRequest.js importScript('User:Novem Linguae/Scripts/CiteHighlighter.js'); // Backlink: User:Novem Linguae/Scripts/CiteHighlighter.js importScript('User:Novem Linguae/Scripts/DraftCleaner.js'); // Backlink: User:Novem Linguae/Scripts/DraftCleaner.js importScript('User:Novem Linguae/Scripts/NotSoFast.js'); // Backlink: User:Novem Linguae/Scripts/NotSoFast.js importScript('User:SD0001/hide-reverted-edits.js'); // Backlink: User:SD0001/hide-reverted-edits.js importScript('User:SD0001/shortdescs-in-category.js'); // Backlink: User:SD0001/shortdescs-in-category.js importScript('User:SD0001/StubSorter.js'); // Backlink: User:SD0001/StubSorter.js importScript('User:The Earwig/permalink.js'); // Backlink: User:The Earwig/permalink.js importScript('User:Þjarkur/CleanDiffURLs.js'); // Backlink: User:Þjarkur/CleanDiffURLs.js importScript('User:Aaron_Liu/MoveTop.js'); // Backlink: User:Aaron_Liu/MoveTop.js