MediaWiki:Group-sysop.js: Difference between revisions

From :: ChromeRivals Wiki ::
Jump to navigation Jump to search
Ranzu (talk | contribs)
No edit summary
Tag: Reverted
Ranzu (talk | contribs)
No edit summary
Tags: Manual revert Reverted
Line 4: Line 4:
for(var i = 0; i < lines.length; i++) {     
for(var i = 0; i < lines.length; i++) {     
         lines[i].addEventListener('click', function() {
         lines[i].addEventListener('click', function() {
             if (this.dataset.url !== null) {
             if (this.querySelector('a') !== null) {
                 window.location = this.dataset.url;
                 window.location = this.querySelector('a').href;
             }
             }
         });
         });
}
}

Revision as of 15:13, 3 November 2022

/* Any JavaScript here will be loaded for sysops only */

var lines = document.querySelector('.TableShops').querySelectorAll('tr');
for(var i = 0; i < lines.length; i++) {    
        lines[i].addEventListener('click', function() {
            if (this.querySelector('a') !== null) {
                window.location = this.querySelector('a').href;
            }
        });
}