Jump to content

User:Robert Skyhawk/vector.js

From Wikipedia, the free encyclopedia
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.
importScript('User:Misza13/watchlistSorter.js');
importScript('User:Henrik/js/automod.js');
importScript('User:Digitalme/aiv.js');
importScript('Wikipedia:WikiProject User scripts/Scripts/Easy db');
importScript('User:Ais523/stubtagtab.js');
// [[User:Krimpet/CH2.js]]
importScript('User:Krimpet/CH2.js');
/* <pre> */
 
function welcome() {
 
    // Find the edit box
    var txt = document.editform.wpTextbox1;
 
    //The welcome template you are wanting to use
    var welcome_msg = 'User:Robert Skyhawk/Welcome'
 
    // The code to be added to the page
    var tag = '{{'+'subst'+':'+ welcome_msg +'}}';
 
    // If the edit box doesn't already have this tag...
    if (txt.value.indexOf(tag) == -1) {
 
        // Append the tag
        txt.value += tag;
 
        // Add an edit summary
        document.editform.wpSummary.value = 'Welcome to Wikipedia!';    
 
        // Press the Save page button
        document.editform.submit();
    } 
 
    // If the tag was already there, turn the tab background red to indicate 
    // that the script is functioning properly, but that there is no action 
    // to do.  This doesn't interrupt the user's work like an alert() would.
    else {
        document.getElementById('ca-unverified').firstChild.style.backgroundColor = "#ff4444";
        document.getElementById('ca-unverified').style.backgroundColor = "#ff4444";
    }
}
 
// Create a tab that calls this function when pressed
addOnloadHook(function () {
    if(document.title.indexOf("Editing User talk:") == 0) {
        mw.util.addPortletLink('p-cactions', 'javascript:welcome()', 'welcome', 'ca-welcome', 'Adds a welcome note to a new user', '', '');
    }
});
 
/* This is to keep track of who is using this extension: [[User:Nmajdan/welcome_newuser.js]] */
 
/* </pre> */

var book_source_URL = "http://ucsd.worldcat.org/search?qt=wc_org_ucsd&q=MAGICNUMBER&scope=1&oldscope=&wcsbtn2w=Search&dblist=1708%2C1875%2C1483%2C143%2C2237%2C2259%2C2260%2C2261%2C2262%2C2264%2C2267%2C2214%2C1834%2C1847%2C2270%2C1271%2C2130%2C1476%2C1487%2C1525%2C1953%2C217%2C219%2C1925%2C221%2C229%2C2233%2C2005%2C2148%2C1479%2C2277%2C1941%2C1540%2C2158%2C239%2C2038%2C2007%2C2006%2C2221%2C2162%2C2164%2C2236%2C287%2C283%2C285%2C638";
importScript('User:Lunchboxhero/externISBN.js');