MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 3: Line 3:
class ColorContent {
class ColorContent {
     constructor(text, color) {
     constructor(text, color) {
         this.text = text
         this.text = text;
         this.color = color
         this.color = color;
     }
     }
     get xpath() {
     get xpath() {
         return "//td[contains(text(),'" + this.text + "')]"
         return "//td[contains(text(),'" + this.text + "')]";
     }
     }
}
}
Line 15: Line 15:
     var colorList = [
     var colorList = [
         new ColorContent('Super High Tensile Steel', '#7b9095')
         new ColorContent('Super High Tensile Steel', '#7b9095')
     ]
     ];


     colorList.forEach((colorElement) => {
     colorList.forEach((colorElement) => {
Line 29: Line 29:
         for (var J = 0; J < numLinks; ++J) {
         for (var J = 0; J < numLinks; ++J) {
             var x = y.snapshotItem(J);
             var x = y.snapshotItem(J);
             x.style.color = colorElement.color
             x.style.color = colorElement.color;
         }
         }
     })
     });
}
}
EFF, ZEON, approveduser, Bureaucrats, Interface administrators, Administrators, uploadaccess
843

edits

Navigation menu