Difference between revisions of "User:Markhurd/common.js"

From Wikimedia Australia
Jump to navigation Jump to search
(More debugging...)
(Try a different approach)
Line 8: Line 8:
 
     var ss = $('.submitSpam');
 
     var ss = $('.submitSpam');
 
     alert(ss);
 
     alert(ss);
     ss.click(function() {
+
     alert(ss.id);
 +
    addClickHandler(ss,function() {
 
             alert('here too.');
 
             alert('here too.');
 
             document.getElementById('wpComment').style.display='none';
 
             document.getElementById('wpComment').style.display='none';

Revision as of 17:52, 20 April 2013

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

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