Jump to content

User:Fetchcomms/vector.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fetchcomms (talk | contribs) at 20:00, 16 April 2011 (test). 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.
addOnloadHook(function () {
    var changeCSDToHangon = document.getElementById('hangonbutton');
    if (changeCSDToHangon) {
        try {
            importScriptURI('https://secure.wikimedia.org/wikinews/en/w/index.php?title=user:Bawolff/mwapilib2.js&action=raw&ctype=text/javascript');
            var button = document.createElement('button');
            button.type = 'button';
            button.appendChild(changeCSDToHangon .firstChild.firstChild);
            changeCSDToHangon .replaceChild(button, changeCSDToHangon .firstChild);
            button.onclick = function () {
                var hangonReason = prompt("Why should this article not be deleted yet?", "");
                if(!hangonReason) return
                if (this && this.firstChild && this.firstChild.data) this.firstChild.data = "Loading ...";
                api(wgPageName).getPage().
                    setDefaultSummary("Please do not delete this article yet").
                    replace(/^/, "\{\{hangon|" + hangonReason +"}}\n").
                    savePage().
                    lift(function () {
                        alert("Tagging successful!");
                        location.reload();
                    }).
                    exec();
            }
        }
        catch (e) {}
    }
});

addOnloadHook(finishedLoading);
// Tasks to perform after everything else has finished loading
function finishedLoading()
{
	// Reload anchors
	var url = location.href.split('/');
	if (url[url.length - 1].indexOf('#') != -1) location.href = location.href;
}
// importScript('User:7/userhighlighter.js'); for ACE2010
importScript('User:GregU/dashes.js');
importScript('User:Gary King/show upload deletion logs.js');
importScript('User:Animum/massdelete.js');
importScript('User:Drilnoth/delresized.js');
importScript('User:Ale_jrb/Scripts/csdhelper.js');  //[[User:Ale_jrb/Scripts]]
importScript('User:SoWhy/csdreasons.js');
importScript('User:Tim Song/closeAFD.js');
importScript('User:Splarka/ajaxfilemove.js');
importScript('User:King of Hearts/closexfd.js');
importScript('User:AzaToth/twinkle.js');
if( typeof( TwinkleConfig ) == 'undefined' ) TwinkleConfig = {};
TwinkleConfig.portletId = 'p-cactions';
importScript('User:Dr_pda/prosesize.js'); //[[User:Dr_pda/prosesize.js]]
importScript('User:Mr.Z-man/refToolbar 2.0.js');
importScript('User:Intelligentsium/reftools.js');
importScript('User:AWeenieMan/furme.js');
importScript('User:Dapete/ImageMapEdit.js');
// importScript('User:TheJosh/Scripts/NewPagePatrol.js');
importScript('User:Tim Song/afchelper4.js');
// importScript('User:Ale_jrb/Scripts/igloo.js'); // [[User:Ale_jrb/Scripts/igloo]]
importScript('User:Fetchcomms/friendly.js');
if( typeof( FriendlyConfig ) == 'undefined' ) FriendlyConfig = {}; // DO NOT REMOVE THIS LINE - ALL FRIENDLY SETTINGS AFTER THIS
FriendlyConfig.clockStyle			=	"dynamic";
FriendlyConfig.enableClock			=	true;
FriendlyConfig.groupByDefault			=	true;
FriendlyConfig.idsToRename			=	[
		{ id: 'ca-nstab-main', name: 'Main', mainPageOnly: true },
		{ id: 'ca-nstab-help', name: 'Help' },
		{ id: 'ca-nstab-special', name: 'Special' },
		{ id: 'ca-nstab-project', name: 'Project' },
		{ id: 'ca-nstab-user', name: 'User' },
		{ id: 'ca-edit', name: 'Edit' },
		{ id: 'ca-viewsource', name: 'Source' },
		{ id: 'ca-talk', name: 'Talk' },
		{ id: 'ca-undelete', name: 'Undelete' },
		{ id: 'ca-addsection', name: '+' }
	];
FriendlyConfig.insertHeadings			=	false;
FriendlyConfig.insertSignature			=	false;
FriendlyConfig.insertUsername			=	true;
FriendlyConfig.markSharedIPAsMinor		=	true;
FriendlyConfig.markTaggedPagesAsMinor		=	true;
FriendlyConfig.markTaggedPagesAsPatrolled	=	true;
FriendlyConfig.markTalkbackAsMinor		=	true;
FriendlyConfig.markWelcomesAsMinor		=	true;
FriendlyConfig.maskTemplateInSummary		=	true;
FriendlyConfig.quickWelcomeMode		=	"auto";
FriendlyConfig.quickWelcomeTemplate		=	"Welcome";
FriendlyConfig.summaryAd			=	" using [[WP:FRIENDLY|Friendly]]";
FriendlyConfig.talkbackHeading			=	"== Talkback ==";
FriendlyConfig.topWelcomes			=	false;
FriendlyConfig.watchTaggedPages		=	false;
FriendlyConfig.watchWelcomes			=	false;
FriendlyConfig.welcomeHeading			=	"==Just a note==";
FriendlyConfig.customWelcomeList	=	[
	/*	{
			label: '{{User:Fetchcomms/m/1}}: Christmas 1',
			value: 'User:Fetchcomms/m/1' },
		{
			label: '{{User:Fetchcomms/m/2}}: Christmas 2',
			value: 'User:Fetchcomms/m/2' },
		{
			label: '{{User:Fetchcomms/m/3}}: Christmas 3',
			value: 'User:Fetchcomms/m/3' },
		{
			label: '{{User talk:Fetchcomms/m}}: Christmas 4',
			value: 'User talk:Fetchcomms/m' },
	*/	{
			label: '{{User:Fetchcomms/tb3}}: Talkback 3',
			value: 'User:Fetchcomms/tb3|User talk:Fetchcomms' },
		{
			label: '{{User:Fetchcomms/tb2}}: Talkback 2',
			value: 'User:Fetchcomms/tb2|Fetchcomms|20:41, 19 April 2010 (UTC)' },
		{
			label: '{{User:Fetchcomms/w}}: Welcome 2',
			value: 'User:Fetchcomms/w' },
		{
			label: '{{User:Fetchcomms/MO}}: MO default',
			value: 'User:Fetchcomms/MO' },
		{
			label: '{{User:Fetchcomms/MO}}: MO listed',
			value: 'User:Fetchcomms/MO|list' },
		{
			label: '{{User:Fetchcomms/MO}}: MO living',
			value: 'User:Fetchcomms/MO|live' },
		{
			label: '{{User:Fetchcomms/Christmas}}: Christmas',
			value: 'User:Fetchcomms/Christmas' },
		{
			label: '{{User:Fetchcomms/Thanks}}: Thanks',
			value: 'User:Fetchcomms/Thanks' },
		{
			label: '{{User:Fetchcomms/Thankyou}}: Thank you',
			value: 'User:Fetchcomms/Thankyou' },
		{
			label: '{{User:Fetchcomms/Goodwork}}: Good work',
			value: 'User:Fetchcomms/Goodwork' },
		{
			label: '{{User:Fetchcomms/Welcome}}: Welcome',
			value: 'User:Fetchcomms/Welcome' },
		{
			label: '{{User:Fetchcomms/Welcome}}: Welcome IP',
			value: 'User:Fetchcomms/Welcome|a' },
		{
			label: '{{User:Fetchcomms/tb}}: tb',
			value: 'User:Fetchcomms/tb' },
		{
			label: '{{User:Fetchcomms/Message}}: Message',
			value: 'User:Fetchcomms/Message' },
		{
			label: '{{User:Fetchcomms/t}}: Various',
			value: 'User:Fetchcomms/t' }
	];