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

From Wikimedia Australia
Jump to navigation Jump to search
(Try a different approach)
m (Add a version check)
Line 2: Line 2:
  
 
addOnloadHook(function () {
 
addOnloadHook(function () {
   alert('Got here.');
+
   alert('Got here 1.');
 
   if(wgCanonicalSpecialPageName == 'ConfirmAccounts')
 
   if(wgCanonicalSpecialPageName == 'ConfirmAccounts')
 
   {
 
   {

Revision as of 17:53, 20 April 2013

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

addOnloadHook(function () {
   alert('Got here 1.');
   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();
        });
   };
 });