User:Pachu Kannan/common.js

mw.loader.load( '/w/index.php?title=User:RedWarn/.js&action=raw&ctype=text/javascript' ); // Backlink: User:RedWarn/.js importScript( 'User:Enterprisey/reply-link.js' ); // Backlink: User:Enterprisey/reply-link.js // $(function {   var nighttime = 'on' === mw.storage.get('nightpedia'),        cssLoaded = nighttime ? lightsOff : false;

mw.util.addPortletLink('p-personal', '#', nighttime ? 'Daypedia' : 'Nightpedia', 'pt-nightpedia', '', 'np', '#pt-watchlist');

$('#pt-nightpedia').on('click', function(e) {       e.preventDefault;        nighttime = !nighttime;        if (nighttime) {            lightsOff;        } else {            lightsOn;        }    });

function lightsOn { $('html').removeClass('nighttime'); $('#pt-nightpedia a').text('Nightpedia'); mw.storage.set('nightpedia', 'off'); }   function lightsOff { if(!cssLoaded) { $('head').append(mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:MusikAnimal/nightpedia.css&action=raw&ctype=text/css', 'text/css')); }       $('html').addClass('nighttime'); $('#pt-nightpedia a').text('Daypedia'); mw.storage.set('nightpedia', 'on'); return true; } }); // mw.loader.load( '/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript' ); // Backlink: User:Evad37/rater.js importScript('User:Ohconfucius/script/MOSNUM dates.js'); // User:Ohconfucius/script/MOSNUM dates.js importScript('User:Kephir/gadgets/rater.js'); // User:Kephir/gadgets/rater