User: Markhurd/common.js

m (Not quite so bad an error...)
(Remove legacy code.)
 
(6 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 3.');
   if ( mw.config.get( 'wgCanonicalSpecialPageName' ) == 'ConfirmAccounts')
  if(wgCanonicalSpecialPageName == 'ConfirmAccounts')
   {
   {
     alert('and here 3.');
     $('#submitSpam').click(function() {
    debug.breaker();
    var ss = $('submitSpam');
    alert(ss);
    alert(ss.id);
    alert(ss());
    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