User:Techie3/common.js: Difference between revisions
Appearance
Content deleted Content added
Installing User:Awesome Aasim/oneclickdelete.js (script-installer) |
No edit summary |
||
(24 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
var AutoEd_baseurl = 'http://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=Wikipedia:AutoEd/'; |
|||
if (location.protocol === 'https:') { |
|||
AutoEd_baseurl = 'https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=Wikipedia:AutoEd/'; |
|||
} |
|||
autoEdMinor = false; |
|||
autoEdClick = false; |
|||
//Sets variable configuration |
|||
autoEdTag = "Adjacent Stations using [[WP:AutoEd|AutoEd]]"; //Tweaks edit summary |
|||
//autoEdTag = "Automatically Fixing Archive using [[WP:AutoEd|AutoEd]]"; |
|||
autoEdLinkName = "Adjacent Stations"; //Changes the link name at the top of the page |
|||
function adjacentStationsServices(str){ |
|||
pattern = /(\| *(?:services|other_services) *=)((?:\s*\{\{.+\}\})+)/; |
|||
replace = '$1\n{{subst:'+'#invoke:Adjacent stations|convert|$2}}'; |
|||
str = str.replace(pattern,replace); |
|||
return str; |
|||
} |
|||
function autoEdFunctions() { //Activates individual modules when "auto ed" tab is clicked |
|||
var $textbox = $( '#wpTextbox1' ); |
|||
var txt = $textbox.textSelection('getContents'); |
|||
txt=adjacentStationsServices(txt); |
|||
txt=adjacentStationsServices(txt); |
|||
$textbox.textSelection('setContents', txt); |
|||
} |
|||
function afcHelp(txt){ |
|||
var pattern = /(\[\[Wikipedia:WikiProject Articles for creation\/Help desk\/Archives\/\d*) (.*?)\|.*>]]/g; |
|||
txt = txt.replace(pattern,"$1 $2|$2]]"); |
|||
} |
|||
$.when( $.ready, mw.loader.using( 'jquery.textSelection' ) ).then(function() { |
|||
importScriptURI(AutoEd_baseurl + 'core.js'); //Imports the "framework" script needed to make this function |
|||
}); |
|||
importScript('User:Jackmcbarn/advancedtemplatesandbox.js'); // Backlink: [[User:Jackmcbarn/advancedtemplatesandbox.js]] |
|||
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]] |
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]] |
||
importScript('User:Enterprisey/reply-link.js'); // Backlink: [[User:Enterprisey/reply-link.js]] |
|||
⚫ | |||
importScript('User:Awesome Aasim/oneclickdelete.js'); // Backlink: [[User:Awesome Aasim/oneclickdelete.js]] |