Thread:Dragon Rainbow/@comment-5276708-20160724231754/@comment-24531999-20160729145724

Ah, I forgot. You will also need to add this to Common.js. The Protection script relies on it. /** Test if an element has a certain class ************************************** * * Description: Uses regular expressions and caching for better performance. * Maintainers: User:Mike Dillon, User:R. Koot, User:SG * * Element.prototypes added based on code by Om Shankar via StackOverflow. */ var hasClass = (function {   var reCache = {};    return function(element, className) {        return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp( "(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);       }; }); Element.prototype.hasClassName = function(name) { return hasClass(this, name); }; Element.prototype.addClassName = function(name) { if (!this.hasClassName(name)) { this.className = this.className ? [this.className, name].join(' ') : name; } }; Element.prototype.removeClassName = function(name) { if (this.hasClassName(name)) { var c = this.className; this.className = c.replace(new RegExp("(?:^|\\s+)" + name + "(?:\\s+|$)", "g"), "").trim; } }; /* For internal compatibility -- older defined method, now uses new method */ function hasClassTest(element, className) { return hasClass(element, className); }