Jump to content

User:Techie3/common.js: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
 
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
importScript('User:Wugapodes/Capricorn.js'); // Backlink: [[User:Wugapodes/Capricorn.js]]
var AutoEd_baseurl = 'http://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=Wikipedia:AutoEd/';
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]]
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 adjacentStation(str){
test = '$1\n{{subst:'+'#invoke:Adjacent stations|convert|$2}}';
pattern = /(\| *(?:services|other_services) *=)((?:\s*\{\{.+\}\})+)/;
str = str.replace(pattern,test);
return str;
}
function autoEdFunctions() { //Activates individual modules when "auto ed" tab is clicked
var $textbox = $( '#wpTextbox1' );
var txt = $textbox.textSelection('getContents');
txt = txt.replace(/\|\s*system\s*=\s*Victoria/g,"|system = V/Line")
txt=adjacentStation(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]]

Latest revision as of 15:27, 25 December 2024

importScript('User:Wugapodes/Capricorn.js'); // Backlink: [[User:Wugapodes/Capricorn.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]]