User:CrafterNova/common.js: Difference between revisions

Content deleted Content added
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 20:
importScript('User:EnterpriseyBot/delsort.js'); // Backlink: [[User:EnterpriseyBot/delsort.js]]
importScript('User:Enterprisey/delsort.js'); // Backlink: [[User:Enterprisey/delsort.js]]
importScript('User:Evad37/XFDcloser/v3.js'); // Backlink: [[User:Evad37/XFDcloser/v3.js]]
importScript('User:GeneralNotability/spihelper.js'); // Backlink: [[User:GeneralNotability/spihelper.js]]
importScript('User:Kephir/gadgets/rater.js'); // Backlink: [[User:Kephir/gadgets/rater.js]]
Line 61 ⟶ 60:
importScript('User:Enterprisey/StatusChanger.js'); // Backlink: [[User:Enterprisey/StatusChanger.js]]
importScript('User:Awesome Aasim/noeditredlinks.js'); // Backlink: [[User:Awesome Aasim/noeditredlinks.js]]
//importScript('User:Volker E. (WMF)/dark-mode.js'); // Backlink: [[User:Volker E. (WMF)/dark-mode.js]]
window.wpDarkModeAutoToggle = true;
importScript('User:Volker E. (WMF)/dark-mode.js'); // Backlink: [[User:Volker E. (WMF)/dark-mode.js]]
// Load dependencies (remove when loading through ResourceLoader).
mw.loader.load( 'https://en.wikipedia.org/w/index.php?title=User:Volker_E._(WMF)/dark-mode.js&action=raw&ctype=text/javascript', 'text/css' );
// User has dark color scheme preference set in operating system.
if ( window.matchMedia( '( prefers-color-scheme: dark )' ).matches || mw.storage.get( 'client-dark-mode-toggle' ) === '1' ) {
document.documentElement.className = 'client-dark-mode';
}
 
$( function () {
// Fix logos.
$( '#p-logo' ).clone().addClass( 'mw-no-invert' ).insertAfter( '#p-logo' );
mw.util.addPortletLink( 'p-personal', '#', 'Dark mode', 'pt-darkmode', '', 'np', '#pt-watchlist' );
 
$( '#pt-darkmode' ).on( 'click', function( e ) {
var $html = $( 'html' );
e.preventDefault();
$html.toggleClass( 'client-dark-mode' );
mw.storage.set(
'client-dark-mode-toggle',
String( Number( $html.hasClass( 'client-dark-mode' ) ) )
);
} );
} );
 
mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3AUziel302%2Ftypo.js&action=raw&ctype=text/javascript');
Line 151 ⟶ 125:
importScript('User:DannyS712/SectionRemover.js'); // Backlink: [[User:DannyS712/SectionRemover.js]]
importScript('User:DannyS712/DiscussionCloser.js'); // Backlink: [[User:DannyS712/DiscussionCloser.js]]
importScript('User:Evad37MPGuy2824/XFDcloser/v3MoveToDraft.js'); // Backlink: [[User:Evad37/XFDcloserUser:MPGuy2824/v3MoveToDraft.js]]
importScript('User:Amalthea/culoghelper.js'); // Backlink: [[User:Amalthea/culoghelper.js]]
// Adds a link to the CU log for the date/time that the check was executed