Jump to content

User:The Anonymouse/vector.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by The Anonymouse (talk | contribs) at 06:27, 6 February 2013 (hmm). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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:TheDJ/qui.js');
importScript("User:Writ Keeper/Scripts/teahouseUtility.js"); // Gives one-click option to add Teahouse invitation or talkback to a user
importScript('User:Shubinator/DYKcheck.js');
window.popupOnEditSelection = false;
importScript('User:Mabdul/afc beta.js'); // Yet another AfC helper script (beta)

                var conf, title, url;
 
                // Customize/Translate this to your needs
                conf = {
                        subpageName: 'sandbox',
                        portletLabel: 'Sandbox',
                        portletTooltip: 'Go to your sandbox',
                        editintroPagename: 'Template:User_sandbox',
                        preloadPagename: 'Template:User_sandbox/preload'
                };
                // Don't alter the code below
 
                // Use Special:MyPage (as opposed to mw.user.getName()) so that it
                // works for logged-out users as well.
                title = new mw.Title( 'Special:MyPage/' + conf.subpageName );
 
                url = new mw.Uri( title.getUrl() );
                url.extend({
                        action: 'edit',
                        redlink: 1,
                        editintro: new mw.Title( conf.editintroPagename ),
                        preload: new mw.Title( conf.preloadPagename )
                });
 
                mw.util.addPortletLink(
                        'p-personal',
                        url,
                        conf.portletLabel,
                        'pt-sandbox',
                        conf.portletTooltip,
                        null,
                        '#pt-preferences'
                );