User: Markhurd/common.js

< User:Markhurd
m (Debugging...)
(Remove legacy code.)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
// [[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()"
// when id="submitSpam" onclick="document.getElementById('wpComment').style.display='none';form.elements[11].focus()"


addOnloadHook(function () {
jQuery( function( $ ) {
   alert('Got here 4.');
   if ( mw.config.get( 'wgCanonicalSpecialPageName' ) == 'ConfirmAccounts')
  if(wgCanonicalSpecialPageName == 'ConfirmAccounts')
   {
   {
     alert('and here 4.');
     $('#submitSpam').click(function() {
    var si = $('.submitSpam');
    var ss = $('submitSpam');
    alert(ss);
    alert(ss.id);
    alert(ss());
    alert(si());
    addClickHandler(ss, function() {
            alert('here too.');
             document.getElementById('wpComment').style.display='none';
             document.getElementById('wpComment').style.display='none';
             form.elements[11].focus();
             this.form.elements[11].focus();
         });
         });
   };
   };
  });
  });

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