[go: up one dir, main page]

Jump to content

User:Nux/common.js: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
mNo edit summary
Line 7: Line 7:


// Example gadget with [[Wikipedia:Wikiploy]]
// Example gadget with [[Wikipedia:Wikiploy]]
if (mw.config.get('wgNamespaceNumber') == 2 && mw.config.get('wgTitle', '-').startsWith('Nux')) {
// if (mw.config.get('wgNamespaceNumber') == 2 && mw.config.get('wgTitle', '-').startsWith('Nux')) {
importScript('User:Nux/yourGadgetName-dev.js');
// importScript('User:Nux/yourGadgetName-dev.js');
}
// }


// custom VE sequences (triggers)
// custom VE sequences (triggers)
Line 26: Line 26:
importScript('User:Nux/replylinks.js');
importScript('User:Nux/replylinks.js');


// Show sort keys for articles in a category

// category sort keys
importScript('User:Nux/CategorySortKeys.js');
importScript('User:Nux/CategorySortKeys.js');



Revision as of 22:08, 25 February 2024

/**
See also:
* https://pl.wikipedia.org/wiki/Wikipedysta:Nux/common.js
* https://meta.wikimedia.org/wiki/User:Nux/global.css
* https://meta.wikimedia.org/wiki/User:Nux/global.js
*/

// Example gadget with [[Wikipedia:Wikiploy]]
// if (mw.config.get('wgNamespaceNumber') == 2 && mw.config.get('wgTitle', '-').startsWith('Nux')) {
// 	importScript('User:Nux/yourGadgetName-dev.js');
// }

// custom VE sequences (triggers)
importScript('User:Nux/veAutocorrect.js');

// [[User:Nux/WikilinQs.js]]
importScript('User:Nux/WikilinQs.js');

// translate link
//importScript('User:Nux/content-translate-helper.js');

// edit 0-section
mw.loader.load('https://pl.wikipedia.org/wiki/MediaWiki:Gadget-edit-first-section.js?action=raw&ctype=text/javascript');

// replay links
importScript('User:Nux/replylinks.js');

// Show sort keys for articles in a category
importScript('User:Nux/CategorySortKeys.js');

// popups
// only on devices that can hover (not on touch-only)
if (!window.matchMedia("(hover: none)").matches) {
	importStylesheet('MediaWiki:Gadget-navpop.css');
	// [[MediaWiki:Gadgets-definition#browsing]]
	mw.loader.using( "mediawiki.api,mediawiki.user,mediawiki.util,user.options,mediawiki.jqueryMsg".split(',') , function() {
		window.popupMaxPreviewCharacters = 12000;
		//importScript('MediaWiki:Gadget-popups.js');
		importScript('User:Nux/popups-dev.js');
	});
}