User:MorbidEntree/common.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin is at User:MorbidEntree/common.css. |
//Admin Highlighter
mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3ATheopolisme%2FScripts%2Fadminhighlighter.js&action=raw&ctype=text/javascript'); // [[User:Theopolisme/Scripts/adminhighlighter.js]]
//MfD close
importScript('User:Doug/closemfd.js');
//Rater
importScript('User:Kephir/gadgets/rater.js'); // [[User:Kephir/gadgets/rater]]
//AFD buttons
importScript('User:DavidWS/afdvote.js');
//User identifier
importScript( 'User:Anomie/useridentifier.js' ); // Backlink: [[User:Anomie/useridentifier.js]]
//Redirect editor
importScript('User:Kephir/gadgets/sagittarius.js'); // [[User:Kephir/gadgets/sagittarius]]
//Advisor
importScript( 'User:Cameltrader/Advisor.js' ); // Backlink: [[User:Cameltrader/Advisor.js]]
//Template parameter wizard
importScript( 'User:קיפודנחש/TemplateParamWizard.js' ); // Backlink: [[User:קיפודנחש/TemplateParamWizard.js]]
//Save and edit button
importScript( 'User:Mabdul/saveandedit.js' ); // Backlink: [[User:Mabdul/saveandedit.js]]
//Draftify
importScript( 'User:Mr. Stradivarius/gadgets/Draftify.js' ); // Backlink: [[User:Mr. Stradivarius/gadgets/Draftify.js]]
//Delink common terms
importScript( 'User:Ohconfucius/script/Common Terms.js' ); // Backlink: [[User:Ohconfucius/script/Common Terms.js]]
//Citations formatter
importScript( 'User:Meteor sandwich yum/Tidy citations.js' ); // Backlink: [[User:Meteor sandwich yum/Tidy citations.js]]
//General fixer
importScript( 'User:Ohconfucius/script/formatgeneral.js' ); // Backlink: [[User:Ohconfucius/script/formatgeneral.js]]
//IP labeler
importScript( 'User:Cumbril/IPLabeller.js' ); // Backlink: [[User:Cumbril/IPLabeller.js]]
//Status changer
importScript( 'User:APerson/StatusChanger.js' ); // Backlink: [[User:APerson/StatusChanger.js]]
// [[User:TMg/cleanDiff.js]]
mw.loader.load ( '//de.wikipedia.org/w/index.php?title=Benutzer:TMg/cleanDiff.js&action=raw&ctype=text/javascript' );
//Delsort
importScript('User:Fox Wilson/delsort.js'); // Deletion sorting script [[WP:FWDS]]
//Sources
importScript('User:Ohconfucius/script/Sources.js'); // [[User:Ohconfucius/script/Sources.js]]
//autocomplete
mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3ATheopolisme%2FScripts%2Fautocompleter.js&action=raw&ctype=text/javascript'); // [[User:Theopolisme/Scripts/autocompleter.js]]
///////////////////
//Teahouse stuff//
/////////////////
importScript("User:Writ Keeper/Scripts/teahouseUtility.js"); // Gives one-click option to add Teahouse invitation or talkback to a user
importScript("User:Writ Keeper/Scripts/teahouseTalkback.js"); // Adds Talkback reminder when you save an edit at the Teahouse
importScript("User:Writ Keeper/Scripts/teahouseTalkbackLink.js"); // Adds a talkback link to signatures on the Teahouse
importScript("User:Ocaasi/WikiLoveinstallscript.js");// Adds Teahouse Badges to WikiLove
/////////////////////////
//MANUAL CODING BELLOW//
///////////////////////
///Cutom links
//Link to dashboard
$( document ).ready( function() {
mw.util.addPortletLink(
'p-personal',
mw.util.getUrl( 'Special:MyPage/dashboard' ),
'Dashboard',
'l-dash',
'View your dashboard!',
null,
'#pt-preferences'
);
});
//Toolbar customisations
var customizeToolbar = function() {
//Strikethrough button
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'main',
group: 'format',
tools: {
"strikethrough": {
label: 'Strike',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/3/30/Btn_toolbar_rayer.png',
action: {
type: 'encapsulate',
options: {
pre: "<s>",
post: "</s>"
}
}
}
}
});
};
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {
mw.loader.using( 'user.options', function () {
// This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
$.when(
mw.loader.using( 'ext.wikiEditor' ), $.ready
).then( customizeToolbar );
}
} );
}
// Add the customizations to LiquidThreads' edit toolbar, if available
mw.hook( 'ext.lqt.textareaCreated' ).add( customizeToolbar );