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

From Wikimedia Australia
Jump to navigation Jump to search
m (Add a version check)
(Ensure error to load script...)
Line 2: Line 2:
  
 
addOnloadHook(function () {
 
addOnloadHook(function () {
   alert('Got here 1.');
+
   alert('Got here 2.');
 
   if(wgCanonicalSpecialPageName == 'ConfirmAccounts')
 
   if(wgCanonicalSpecialPageName == 'ConfirmAccounts')
 
   {
 
   {
     alert('and here.');
+
     alert('and here 2.');
     var ss = $('.submitSpam');
+
    debug.break();
 +
     var ss = $('submitSpam');
 
     alert(ss);
 
     alert(ss);
 
     alert(ss.id);
 
     alert(ss.id);
 +
    alert(ss());
 
     addClickHandler(ss,function() {
 
     addClickHandler(ss,function() {
 
             alert('here too.');
 
             alert('here too.');

Revision as of 16:59, 20 April 2013

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

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