Jump to content

User:SilverLocust/common.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// Note: //// = moved to scriptManager, /// = moved to a different .js page

// 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])}}

//   == Page moves ==   //

importScript( 'User:Ahecht/Scripts/pageswap.js' ); 
// Backlink: [[User:Ahecht/Scripts/pageswap]]

importScript('User:TheTVExpert/rmCloser.js');
// Backlink: [[User:TheTVExpert/rmCloser.js]]

// importScript('User:BilledMammal/MovePlus.js'); 
// Backlink: [[User:BilledMammal/MovePlus.js]]

importScript('User:Eejit43/scripts/rmtr-helper.js'); 
// Backlink: [[User:Eejit43/scripts/rmtr-helper.js]]

////importScript('User:MPGuy2824/MoveToDraft.js');
// Backlink: [[User:MPGuy2824/MoveToDraft.js]]

importScript('User:Nardog/MoveHistory.js'); 
// Backlink: [[User:Nardog/MoveHistory.js]]

importScript('User:Alexis Jazz/RemoveDoubleNamespace.js'); 
// Backlink: [[User:Alexis Jazz/RemoveDoubleNamespace.js]]

importScript('User:SilverLocust/CombineMovePrefix.js'); 
// Backlink: [[User:SilverLocust/CombineMovePrefix.js]]

// importScript('User:Ahecht/Scripts/massmove.js'); 
// Backlink: [[User:Ahecht/Scripts/massmove.js]]


//   == Template editing ==   //

importScript('User:PerfektesChaos/js/lintHint/r.js'); 
// Backlink: [[User:PerfektesChaos/js/lintHint/r.js]]

importScript('User:Frietjes/infoboxgap.js'); 
// Backlink: [[User:Frietjes/infoboxgap.js]]

importScript('User:BrandonXLF/WatchDoc.js'); 
// Backlink: [[User:BrandonXLF/WatchDoc.js]]

importScript('User:BrandonXLF/ShowTemplates.js'); 
// Backlink: [[User:BrandonXLF/ShowTemplates.js]]


//   == New-page patrol ==   //

//importScript('User:DannyS712/copyvio-check.js'); 
// Backlink: [[User:DannyS712/copyvio-check.js]]

importScript('User:The Earwig/copyvios.js'); 
// Backlink: [[User:The Earwig/copyvios.js]]

importScript('User:Sohom_Datta/fastreview.js'); 
// Backlink: [[User:Sohom_Datta/fastreview.js]]


//   == Anti-vandalism ==   //

//importScript('User:RedWarn/.js'); 
// Backlink: [[User:RedWarn/.js]]

//importScript('User:10nm/beta.js'); 
// Backlink: [[User:10nm/beta.js]]

importScript('User:MusikAnimal/confirmationRollback.js'); 
// Backlink: [[User:MusikAnimal/confirmationRollback.js]]

////importScript('User:Ingenuity/AntiVandal.js'); 
// Backlink: [[User:Ingenuity/AntiVandal.js]]


//   == Javascript Wiki Browser ==   //

mw.loader.load( '/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript' ); 
// Backlink: [[User:Joeytje50/JWB.js/load.js]]


//   == Page utilities ==   //

/// (moved to [[meta:User:SilverLocust/global.js]]) importScript('User:Enterprisey/diff-permalink.js'); 
// Backlink: [[User:Enterprisey/diff-permalink.js]]

/// (moved to [[meta:User:SilverLocust/global.js]]) importScript('User:Bellezzasolo/Scripts/subpages.js'); 
// Backlink: [[User:Bellezzasolo/Scripts/subpages.js]]

mw.loader.load('/w/index.php?title=User:BrandonXLF/EasySummary.js&action=raw&ctype=text/javascript'); 
// [[User:BrandonXLF/EasySummary.js]]

// importScript('meta:User:ESanders_(WMF)/commentlinks.js'); 
// Backlink: [[meta:User:ESanders_(WMF)/commentlinks.js]]

importScript("User:The Transhumanist/SearchSuite.js");
// [[User:The Transhumanist/SearchSuite.js]]

////importScript('user:Qwertyytrewqqwerty/DisamAssist.js'); 
// Backlink: [[user:Qwertyytrewqqwerty/DisamAssist.js]]

mw.loader.load( '/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript' ); 
// Backlink: [[User:Evad37/rater.js]]

importScript('User:SD0001/deleted-metadata-link.js'); 
// [[User:SD0001/deleted-metadata-link.js]]

importScript('User:PrimeHunter/Pageviews.js'); 
// Backlink: [[User:PrimeHunter/Pageviews.js]]

////importScript('User:BrandonXLF/NullEdit.js'); 
// Backlink: [[User:BrandonXLF/NullEdit.js]]


//   == User utilities ==   //

/// (moved to [[meta:User:SilverLocust/global.js]]) mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:SMcCandlish/userinfo.js&action=raw&ctype=text/javascript');

/// (moved to [[User:SilverLocust/vector.js]]) importScript('User:SilverLocust/UserUnderline.js');
// Backlink: [[User:SilverLocust/UserUnderline.js]]

/// (moved to [[User:SilverLocust/minerva.js]]) importScript('User:SilverLocust/UserUnderline2.js');
// Backlink: [[User:SilverLocust/UserUnderline.js]]

//importScript('User:Novem Linguae/Scripts/UserHighlighterSimple.js'); 
// Backlink: [[User:Novem Linguae/Scripts/UserHighlighterSimple.js]]

//mw.loader.load( '/w/index.php?title=User:Pythoncoder/Scripts/userHighlighter.js&action=raw&ctype=text/javascript' ); 
// Backlink: [[User:Pythoncoder/Scripts/userHighlighter.js]]


//   == Personalized ==   //

importScript('User:BrandonXLF/PortletLinks.js'); 
// Backlink: [[User:BrandonXLF/PortletLinks.js]]

mw.util.addPortletLink ('p-tb', '/wiki/User:SilverLocust/Instructions', 'Instructions');

////importScript('User:SilverLocust/editnotices.js'); 
// Backlink: [[User:SilverLocust/editnotices.js]]

/// (moved to [[meta:User:SilverLocust/global.js]]) mw.util.addPortletLink ('p-tb', '/w/index.php?title=Special:Log&page=' + encodeURIComponent(mw.config.get('wgPageName')), 'Logs');
// Log link


//   == Redirects and categories ==   //

////importScript('User:Wugapodes/Capricorn.js'); 
// Backlink: [[User:Wugapodes/Capricorn.js]]

////importScript('User:Eejit43/scripts/redirect-helper.js'); 
// Backlink: [[User:Eejit43/scripts/redirect-helper.js]]

importScript('User:Nux/CategorySortKeys.js'); 
// Backlink: [[User:Nux/CategorySortKeys.js]]

////importScript('User:Qwerfjkl/scripts/massCFDS.js'); 
// Backlink: [[User:Qwerfjkl/scripts/massCFDS.js]]


//   == Miscellaneous ==   //

importScript('User:Awesome Aasim/noeditredlinks.js'); 
// Backlink: [[User:Awesome Aasim/noeditredlinks.js]]

importScript('User:SilverLocust+/sandbox.js'); 
// Backlink: [[User:SilverLocust/sandbox.js]]

////importScript('User:MusikAnimal/customWatchlists.js'); 
// Backlink: [[User:MusikAnimal/customWatchlists.js]]

importScript('User:Danski454/w2wFinder.js'); 
// Backlink: [[User:Danski454/w2wFinder.js]]


scriptsToManage = {
//"pageswap": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Ahecht/Scripts/pageswap.js",
//"rmCloser": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:TheTVExpert/rmCloser.js",
//"rmtr-helper": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Eejit43/scripts/rmtr-helper.js",
"MoveToDraft": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:MPGuy2824/MoveToDraft.js",
//"MoveHistory": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Nardog/MoveHistory.js",
//"JWB": "//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript",
//"diff-permalinK": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Enterprisey/diff-permalink.js",
//"subpages": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Bellezzasolo/Scripts/subpages.js",
//"EasySummary": "//en.wikipedia.org/w/index.php?title=User:BrandonXLF/EasySummary.js&action=raw&ctype=text/javascript",
"DisamAssist": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=user:Qwertyytrewqqwerty/DisamAssist.js",
//"rater": "//en.wikipedia.org/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript",
//"userinfo": "//meta.wikimedia.org/w/index.php?title=User:SMcCandlish/userinfo.js&action=raw&ctype=text/javascript",
//"UserUnderline": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:SilverLocust/UserUnderline.js",
//"confirmationRollback": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:MusikAnimal/confirmationRollback.js",
"AntiVandal": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Ingenuity/AntiVandal.js",
"Editnotices": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:SilverLocust/editnotices.js",
"Capricorn": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Wugapodes/Capricorn.js",
"Custom watchlists": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:MusikAnimal/customWatchlists.js",
"Redirect helper": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Eejit43/scripts/redirect-helper.js",
"massCFDS": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Qwerfjkl/scripts/massCFDS.js",
"NullEdit": "//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:BrandonXLF/NullEdit.js",
}

importScript('User:Hilst/Scripts/scriptManager.js'); 
// Backlink: [[User:Hilst/Scripts/scriptManager.js]]
importScript('User:MusikAnimal/responseHelper.js'); // Backlink: [[User:MusikAnimal/responseHelper.js]]
importScript('User:GeneralNotability/spihelper.js'); // Backlink: [[User:GeneralNotability/spihelper.js]]
importScript('User:MusikAnimal/userRightsManager.js'); // Backlink: [[User:MusikAnimal/userRightsManager.js]]