Jump to content

User:SporkBot/vector.js

From Wikipedia, the free encyclopedia
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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.
findargdupseditsummary = 'Repair [[:Category:Pages using duplicate arguments in template calls|duplicate template arguments]]';
findargdupsresultsbox = 'yes';
fbeditsummary = "Replace templates per [[Wikipedia:Templates_for_discussion/Log/2018_April_20#Mass_Fb_team_templates|Fb team TfD outcome]]"
	          + " and [[Wikipedia:Templates_for_discussion/Log/2018_April_27#Mass_Fb_competition_templates|Fb competition TfD outcome]]";
importScript('User:Frietjes/findargdups.js'); // [[User:Frietjes/findargdups]]

importScript('User:Frietjes/fb.js');
// Wikipedia:WikiProject_User_scripts/Scripts/Replace
// Adds a "Replace" tab which pops up two prompt boxes: 
//    one for a regexp and one for a replacement
function wpTextboxReplace()
{
 var s = prompt("Search regexp:");
 if(s){
  var r = prompt("Replace /"+s+"/ with:");
  if(!r && r != '') return;
  var txt = document.editform.wpTextbox1;
  txt.value = txt.value.replace(new RegExp(s, "mg"), r);
 }
}
addOnloadHook(function () {
 if (document.forms.editform) {
  mw.util.addPortletLink('p-cactions', 
   'javascript:wpTextboxReplace()',
   'Replace', 'ca-replace',
   'Regexp replace for the edit window', 
   'R', document.getElementById('ca-history'));
  }
});
// [[Category:Wikipedia scripts]]