User:Faster than Thunder/common.js

importScript( 'User:Ahecht/Scripts/pageswap.js' ); // Backlink: User:Ahecht/Scripts/pageswap // /* jshint esversion: 11, esnext: false */ /******/ ( => { // webpackBootstrap /******/ 	"use strict"; var __webpack_exports__ = {}; /* globals $, mw */

switch (mw.config.get('wgCanonicalSpecialPageName')) { case 'Blankpage': if (mw.config.get('wgPageName').match(/^[^/]+\/filterdebug(?:\/|$)/i)) { let supported = false, error;

try { supported = (new Function("return null?.x ?? (/(?<=\\p{L})a/u).test('ba')")); } catch (e) { error = e;		}

if (!supported) { $('#mw-content-text') .text(`Sorry, but your browser (${navigator.userAgent}) is too old to support FilterDebugger: ${error ? error : "unknown error"}`);

break; }

Promise.all([			 false ?				0 :				mw.loader.getScript("https://en.wikipedia.org/w/index.php?title=User:Suffusion_of_Yellow/fdb-core.js&action=raw&ctype=text/javascript"),			mw.loader.using([ 'mediawiki.util', 'mediawiki.api', 'mediawiki.language.months', 'ext.codeEditor.ace', 'ext.abuseFilter.ace', 'vue', ]),			$.ready		]).then(r => ( false ? 0 : window.FilterDebugger.setup)); }	break; case 'AbuseLog': $( => {		if ($('[name=wpSearchFilter]').length) {			let params = {				filter: $('[name=wpSearchFilter]').val,				user: $('[name=wpSearchUser]').val,				title: $('[name=wpSearchTitle]').val,				start: $('[name=wpSearchPeriodStart]').val,				end: $('[name=wpSearchPeriodEnd]').val			};			let url = "/wiki/Special:BlankPage/FilterDebug/mode/abuselog";

for (let [key, value] of Object.entries(params)) { if (typeof value == 'string' && value.trim.length) url += `/${key}/${mw.util.wikiUrlencode(value.trim)}`; }

mw.util.addPortletLink('p-cactions', url, "debug"); }

for (let link of $('a[href*="Special:AbuseFilter/examine/log"]')) { let id = link.href.match(/Special:AbuseFilter\/examine\/log\/(\d+)$/); if (id) { $(link).after(" | ", $("", { text: "debug", href: "/wiki/Special:BlankPage/FilterDebug/logid/" + id[1] }));			}		}	});	break; case 'AbuseFilter':	$( => { let id = mw.config.get('wgPageName').match(/\/(\d+)/); if (id) mw.util.addPortletLink(				'p-cactions',				"/wiki/Special:BlankPage/FilterDebug/filter/" + id[1],				"debug"			);

$(".mw-abusefilter-navigation a").last.after(" | ", $("", { text: "Debugging tools", href: "/wiki/Special:BlankPage/FilterDebug" }));	});	break; }

/******/ })