Jump to content

User:Trần Nguyễn Minh Huy/global.js

From Meta, a Wikimedia project coordination wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// Gives some useful links on user, user talk and user contribution pages
// by [[m:user:Hoo man]] <http://meta.wikimedia.org/wiki/User:Hoo_man/Scripts/Useful_links>
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Hoo_man/useful_links.js&action=raw&ctype=text/javascript');

/**
 * Add "Purge" content action link.
 *
 * Dependencies: mediawiki.util, mediawiki.api
 *
 * @source https://www.mediawiki.org/wiki/Snippets/Purge_action
 * @revision 2016-05-22
 */
$.when(mw.loader.using(['mediawiki.util', 'mediawiki.api']), $.ready).then(function () {
	if ( $( '#ca-purge' ).length || mw.config.get( 'wgNamespaceNumber' ) < 0 ) return;
	var node = mw.util.addPortletLink(
		'p-cactions',
		mw.util.getUrl( null, { action: 'purge' } ),
		'Purge',
		'ca-purge',
		'Purge the server cache of this page'
	);
	$(node).on( 'click', function (e) {
		new mw.Api().post( { action: 'purge', titles: mw.config.get( 'wgPageName' ) } ).then(function () {
			location.reload();
		}, function () {
			mw.notify( 'Purge failed', { type: 'error' } );
		});
		e.preventDefault();
	});
});

/**
 * Extra buttons in toolbar
 * @stats [[File:Krinkle_InsertWikiEditorButton.js]]
 */
$.ajax({
	dataType: 'script',
	cache: true,
	url: '//meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/InsertWikiEditorButton.js&action=raw&ctype=text/javascript'
}).done(function () {

krInsertWikiEditorButton({
	id: 'mw-customeditbutton-myspecialbutton',
	icon: '//upload.wikimedia.org/wikipedia/commons/a/a8/Gnome-format-text-direction-ltr.svg',
	label: 'Add customize signature',
	insertBefore: '',
	insertAfter: '',
	sampleText: '--[[User:Trần Nguyễn Minh Huy|<font color="green"><b>minhhuy</b></font>]] <sup>([[m:User talk:Trần Nguyễn Minh Huy|talk]])</sup>'
	});
 
});

// [[File:Krinkle_RTRC.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/RTRC.js&action=raw&ctype=text/javascript');

// [[File:Krinkle_CVNSimpleOverlay_wiki.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/CVNSimpleOverlay_wiki.js&action=raw&ctype=text/javascript');

// [[File:Krinkle_WhatLeavesHere.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/Tools/WhatLeavesHere.js&action=raw&ctype=text/javascript');

// [[File:Krinkle_TinEye.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/TinEye.js&action=raw&ctype=text/javascript');

// [[File:Krinkle_OneClickCommoniser.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/OneClickCommoniser.js&action=raw&ctype=text/javascript');

// [[File:Krinkle_AjaxPatrolLinks.js]]
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Krinkle/Scripts/AjaxPatrolLinks.js&action=raw&ctype=text/javascript');

/* Cat-a-lot - changes category of multiple files */
mw.loader.using(['jquery.ui', 'mediawiki.util'], function(){
	mw.loader.load('//commons.wikimedia.org/w/load.php?modules=ext.gadget.Cat-a-lot');
});
////////// Cat-a-lot user preferences //////////
window.catALotPrefs = {"watchlist":"preferences","minor":true,"editpages":true,"docleanup":false,"subcatcount":10};
////////////////////////////////////catALotEnd//

// [[en:User:Evad37/ToDoLister]]
mw.loader.load('//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Trần_Nguyễn_Minh_Huy/ToDoLister.js');

// Ctrl-click (PC) and Command-click (Mac) to open search in new tab.
// The Command key is the Apple key on Apple keyboards.
// commons.wikimedia.org/wiki/MediaWiki_talk:Gadget-search-new-tab.js
// On the Commons enable the gadget in your preferences. On other wikis...
// Add line below to Special:MyPage/common.js (User:YOUR-USER-NAME/common.js)

mw.loader.load('//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-search-new-tab.js&action=raw&ctype=text/javascript');

// topedit 
mw.loader.load('//vi.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=MediaWiki:Gadget-edittop.js');
mw.loader.load('//vi.wikipedia.org/w/index.php?action=raw&ctype=text/css&title=MediaWiki:Gadget-edittop.css', 'text/css');

// [[en:User:Ucucha/duplinks]]
mw.loader.load('//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Ucucha/duplinks.js');

// [[en:Meteor sandwich yum/dabfinder.js]]
mw.loader.load('//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Meteor_sandwich_yum/dabfinder.js');

// [[en:User:GregU/dashes.js]]
mw.loader.load('//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:GregU/dashes.js');

// Wiki-Labels [[File:User:EpochFail/WikiLabels.js]] (workaround for [[phab:T35355]])
mw.loader.load('//meta.wikimedia.org/w/index.php?title=MediaWiki:Gadget-WikiLabels-loader.js&action=raw&ctype=text/javascript');

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Indic-TechCom/Tools/FileLinkTool.js&action=raw&ctype=text/javascript');

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Nadzik/GRQ.js&action=raw&ctype=text/javascript');

mw.loader.load('//commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript');

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:BrandonXLF/Restorer.js&action=raw&ctype=text/javascript');

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:DannyS712/SectionMover.js&action=raw&ctype=text/javascript');

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Awesome_Aasim/rcpatrol.js&action=raw&ctype=text/javascript');

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Writ_Keeper/Scripts/massRollback.js&action=raw&ctype=text/javascript');

mw.loader.load('//vi.wikipedia.org/w/index.php?title=Thành_viên:NguoiDungKhongDinhDanh/script-imageres.js&action=raw&ctype=text/javascript');