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

From Wikimedia Australia
Jump to navigation Jump to search
m (Debugging...)
(Now actually RTFM...)
Line 6: Line 6:
 
   {
 
   {
 
     alert('and here 4.');
 
     alert('and here 4.');
    var si = $('.submitSpam');
+
     var ss = $('#submitSpam');
     var ss = $('submitSpam');
+
     ss.click(function() {
     alert(ss);
 
    alert(ss.id);
 
    alert(ss());
 
    alert(si());
 
    addClickHandler(ss, function() {
 
 
             alert('here too.');
 
             alert('here too.');
 
             document.getElementById('wpComment').style.display='none';
 
             document.getElementById('wpComment').style.display='none';

Revision as of 18:22, 20 April 2013

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

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