User:PassionFruitMaster/global.js

/** * This file loads for myself. * For skin specific variants see User:PassionFruitMaster/monobook.js and User:PassionFruitMaster/wikia.js * for monobook and oasis respectively * * Please test any changes made to this file. * Jshint  can catch syntax errors to help testing. * Alternatively, Wikia's code editor has jshint embedded to make life extra simple. * * The scripts here follow Wikia JS guidelines or MediaWiki coding standards where the Wikia * guidelines do not specify: * -  * -  * * The scripts have extremely high usage across Wikia, please do not deploy without * extensive testing. Be aware that these scripts must be ES3 compliant due to the * minifier used by ResourceLoader. * * The majority of the scripts here are for personal use as they modify parts of the Oasis/Monobook skin violating Wikia's Terms of Use. * * Some of the scripts here were taken from: Iynque, Dorumin, Slyst and Cqm, alongside GitHub and the Dev Wiki. */ /* global mw, wgServer, wgScriptPath, wgPageName, wgArticleId, wgAction, importArticles:true, href:true, link:true, specialpage /* %/jshint\% bitwise:true, browser:true, camelcase:true, curly:false, devel:true, eqeqeq:true, es5:true, forin:true, immed:true, jquery:true, latedef:true, newcap:true, noarg:true, noempty:true, nonew:true, onevar:false, plusplus:true, quotmark:single, undef:true, unused:false, strict:true, trailing:true asi:true, boss:true, debug:true, eqnull:true, evil:true, expr:true, lastsemic:true, loopfunc:true, moz:true, proto:true, scripturl:true

/////////////////////////////////////////////////////////////////////////////// //———————————————————————————————————————————————————————————————————————————— // Script Configurations /* All of the confgurations below contribute to how the JavaScript imports function. It only works with imports like this, not direct JavaScript code, hence why it is in between here and the mentioned section above. */ //———————————————————————————————————————————————————————————————————————————— /////////////////////////////////////////////////////////////////////////////// /* again, header credit goes to Cheeseskates */ /* Auto updating recent changes opt-in. * Something I found on Dorumin's global.js.  * See w:c:dev:AjaxRC for info & attribution. */ window.ajaxIndicator = 'http://vignette2.wikia.nocookie.net/dev/images/8/82/Facebook_throbber.gif'; window.ajaxRefresh = 1E3; window.AjaxRCRefreshText = 'Auto-refresh'; window.AjaxRCRefreshHoverText = 'Automatically refresh the page'; window.ajaxPages = [ /// // ——————————————————— Temporary Watchlist (for vandals) ———————————————————— / /// //Add below when necessary. /*———————————————————————————————————————————————————————————————————————————————— ———————————————————————————————————————————————————————————————————————————————— /* ////* English (en) *//// "Special:WikiActivity", "Special:RecentChanges", "Special:Watchlist", "Special:AbuseLog", "Special:Log", "Special:Log/upload", "Special:Images", "Special:Videos", "Special:Newwikis", "Report:Vandalism", "Report:Spam", "Report:User profile headers", "Report:Users and IPs needing checked", ////* German (Deutsch) (de) *//// "Spezial:WikiActivity", "Spezial:Letzte_Änderungen", "Spezial:Logbuch", ////* Spanish (Español) (es) *//// "Especial:WikiActivity", "Especial:CambiosRecientes", "Especial:Registro", ////* Suomi (Finnish) (fi) *//// "Toiminnot:WikiActivity", "Toiminnot:Tuoreet_muutokset", "Toiminnot:Loki", ////* French (Français) (fr) *//// "Spécial:WikiActivity", "Spécial:Modifications_récentes", "Spécial:Journal", ////* Italian (Italiano) (it) *//// "Speciale:WikiActivity", "Speciale:UltimeModifiche", "Speciale:Registri", ////* Japanese (日本語) (ja) *//// "特別:WikiActivity", "特別:最近の更新", "特別:ログ", ////* Korean (한국어) (ko) *//// "특수기능:위키활동내역", "특수기능:최근바뀜", "특수기능:기록", ////* Nederlands (nl) *//// "Speciaal:WikiActivity", "Speciaal:RecenteWijzigingen", "Speciaal:Logboeken", ////* Polish (Polski) (pl) *//// "Specjalna:Aktywność_na_wiki", "Specjalna:Ostatnie_zmiany", "Specjalna:Rejestr", ////* Brazilian Portuguese (Português do Brasil) (pt-br) *//// "Especial:Mudanças_recentes", ////* Russian (Русский) (ru) *//// "Служебная:WikiActivity", "Служебная:RecentChanges", "Служебная:Log", ////* Vietnamese (Tiếng Việt) (vi) *//// "Đặc_biệt:Hoạt_động_wiki", "Đặc_biệt:Thay_đổi_gần_đây", "Đặc_biệt:Nhật_trình", ////* Chinese (中文) (zh) *//// "Special:最近更改", "Special:日志", ////* Chinese (Taiwan) ( 中文(台灣) ) (zh-tw) *//// "特殊:WikiActivity", "特殊:近期變動", "特殊:日誌", ////* Afrikaans (af) *//// "Spesiaal:WikiActivity", "Spesiaal:Onlangse_wysigings", "Spesiaal:Logboek", ////* Arabic (العرب) (ar) *//// "خاص:WikiActivity", "خاص:أحدث_التغييرات", "خاص:سجل", ////* Belorussian (Беларуская) (be) *//// "Адмысловае:WikiActivity", "Адмысловае:RecentChanges", "Адмысловае:Log", ////* Bulgarian (Български) (bg) *//// "Специални:WikiActivity", "Специални:Последни_промени", "Специални:Дневници", ////* Catalan (Català) (ca) *//// "Especial:Canvis_recents", "Especial:Registre", ////* Greek (Ελληνικά) (el) *//// "Ειδικό:WikiActivity", "Ειδικό:ΠρόσφατεςΑλλαγές", "Ειδικό:Μητρώο", ////* Estonia (Eesti) (et) *//// "Eri:WikiActivity", "Eri:Viimased_muudatused", "Eri:Logid", ////* Farsi (فارسی) (fa) *//// "ویژه:WikiActivity", "ویژه:تغییرات_اخیر", "ویژه:سیاهه‌ها", ////* Galician (Galego) (gl) *//// "Especial:Cambios_recentes", "Especial:Rexistros", ////* Hungarian (Magyar) (hu) *//// "Speciális:WikiActivity", "Speciális:Friss_változtatások", "Speciális:Rendszernaplók", ////* Indonesian (Bahasa Indonesia) (id) *//// "Istimewa:WikiActivity", "Istimewa:Perubahan_terbaru", "Istimewa:Catatan", ////* Limburg (Limburgs in Dutch) (li) *//// /* Note: Wikiactivity is the same as the Nederlands' WikiActivity page, so it is not included. */ "Speciaal:Lètste_verangeringe", "Speciaal:Logbeuk", ////* Lithuanian (Lietuvių) (lt) *//// "Specialus:WikiActivity", "Specialus:Naujausi_keitimai", "Specialus:Sąrašas", ////* Norwegian Bokmål ( ‪Norsk (bokmål) ‬) (no) *//// "Spesial:WikiActivity", "Spesial:Siste_endringer", "Spesial:Logg", ////* Occitan (oc) *//// "Especial:Darrièrs_cambiaments", "Especial:Jornal", ////* Romanian (Română) (ro) *//// "Special:Schimbări_recente", "Special:Jurnal", ////* Serbian / serbian (Српски / Srpski) (sr) *//// "Посебно:WikiActivity", "Посебно:СкорашњеИзмене", "Посебно:Извештај", ////* Ukrainian (Українська) (uk) *//// "Спеціальна:WikiActivity", "Спеціальна:RecentChanges", "Спеціальна:Log" //// // —————————————————————————— End AjaxRC Section ———————————————————————————— // //// ];
 * // Interlanguage Wiki Pages //                           |
 * Note 1: The order is according to the Language Brigade Wiki.                    |
 * Note 2: The first language name is the English word. The second language        |
 * name is the language's word/original word. The two letters after are the        |
 * abbreviations for the second language names.                                    |
 * 1. Always add the language names in this order: English word -> Original ↓      |
 * -> Abbreviation (e.g. fr for french)                                            |
 * 2. Always add the page names in this order: WikiActivity -> RecentChanges -> Log |
 * Note 3: The Chinese and Romanian's WikiActivity are the same as the English     |
 * WikiActivity page, and the Brazilian Portuguese (including their Log page),     |
 * Catalan, Galician, and occitan's WikiActivity are the same as the Spanish       |
 * WikiActivity page. Because of this, They are not added to prevent duplication.  |
 * WikiActivity page, and the Brazilian Portuguese (including their Log page),     |
 * Catalan, Galician, and occitan's WikiActivity are the same as the Spanish       |
 * WikiActivity page. Because of this, They are not added to prevent duplication.  |

/* Vector skin configuration. * See w:c:dev:Pseudo-Vector JS for info & attribution. */ window.pseudoVector = { loadCss: true, addReadTab: true, addContributionsTab: true, disableWatchIcon: false, newDiffStyle: true }; /* Removes backlinks from pages. * See w:c:dev:Linksweeper for info & attirbution. */ window.linkSweepConfirmation = true; window.LinkSweeperDelay = 1000; /* Places "QuickToolsv2" button on the "My Tools" section. * Something I found on Zmario's global.js.  * See w:c:dev:QuickToolsv2 for info & attribution. */ window.QuickToolsAdvancedtop = false; /////////////////////////////////////////////////////////////////////////////// //———————————————————————————————————————————————————————————————————————————— // Imports /* Imports minify the rest of the JavaScript or CSS code and combines multiple HTTP requests into a single data transfer, making it save space and load faster than direct code. It is recommended to import this way. */ //———————————————————————————————————————————————————————————————————————————— /////////////////////////////////////////////////////////////////////////////// /* again, header credit goes to Cheeseskates */ //--- /* importscriptURL */ //--- // Advisor - Helps with editing suggestions such as whitespace removal, headings nest, etc. importScriptURI("https://en.wikipedia.org/w/index.php?title=User:Cameltrader/Advisor.js&action=raw&ctype=text/javascript"); // AutoFormatter - Formats a page automatically to fix common mistakes in wiki-markup importScriptURI("https://de.wikipedia.org/w/index.php?title=Benutzer:TMg/autoFormatter.js&action=raw&ctype=text/javascript"); // AutoLink - Parses wikilinks, [external links], {templates}, and URLs into clickable links importScriptURI("https://en.wikipedia.org/w/index.php?title=User:Lenore/autolink.js&action=raw&ctype=text/javascript"); //--- /* importArticles */ //--- $(function {   importArticles({ type: 'script', articles: [ // ...          'u:dev:MediaWiki:AjaxRC/code.js', // Special:RecentChanges live update 'u:dev:MediaWiki:AjaxBlock/code.js', // Blocks users quickly 'u:dev:MediaWiki:AjaxDelete/code.js', 'u:dev:MediaWiki:AjaxPatrol/code.js', 'u:dev:MediaWiki:AjaxUndo/code.js', 'u:dev:MediaWiki:Linksweeper/code.js', 'u:dev:MediaWiki:MassBlock/code.js', 'u:dev:MediaWiki:MassCategorization/code.js', 'u:dev:MediaWiki:MassUserRights/code.js', 'u:dev:MediaWiki:Pseudo-Vector.js', 'u:dev:MediaWiki:QuickCreateUserPage/code.js', 'u:dev:Mediawiki:QuickToolsv2/code.js', // Quick tools 'u:dev:MediaWiki:UTCClock/code.js', // Show UTC clock 'u:monchbox:MediaWiki:Torus.js' // ...       ]	}); });