User: Markhurd/common.js

< User:Markhurd
(Use https and new mw api.)
(Remove legacy code.)
 
Line 6: Line 6:


// [[User:Markhurd/hidetopcontrib.js]]
// [[User:Markhurd/hidetopcontrib.js]]
document.write('<script type="text/javascript" src="'
importScript('User:Markhurd/hidetopcontrib.js');
            + 'https://wikimedia.org.au/w/index.php?title=User:Markhurd/hidetopcontrib.js'
            + '&action=raw&ctype=text/javascript"></script>');


// when id="submitSpam" onclick="document.getElementById('wpComment').style.display='none';form.elements[11].focus()"
// when id="submitSpam" onclick="document.getElementById('wpComment').style.display='none';form.elements[11].focus()"


addOnloadHook(function () {
jQuery( function( $ ) {
   if(wgCanonicalSpecialPageName == 'ConfirmAccounts')
   if ( mw.config.get( 'wgCanonicalSpecialPageName' ) == 'ConfirmAccounts')
   {
   {
     $('#submitSpam').click(function() {
     $('#submitSpam').click(function() {

Latest revision as of 14:33, 9 February 2016

// [[Wikipedia:Tools/Navigation popups]]
mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-navpop.css&action=raw&ctype=text/css', 'text/css');

userHideAllSubsequent=true;

// [[User:Markhurd/hidetopcontrib.js]]
importScript('User:Markhurd/hidetopcontrib.js');

// when id="submitSpam" onclick="document.getElementById('wpComment').style.display='none';form.elements[11].focus()"

jQuery( function( $ ) {
   if ( mw.config.get( 'wgCanonicalSpecialPageName' ) == 'ConfirmAccounts')
   {
     $('#submitSpam').click(function() {
            document.getElementById('wpComment').style.display='none';
            this.form.elements[11].focus();
        });
   };
 });
Discuss this page