User:Arashiryuu0/global.js

/** * Global code - affects all wikias/fandoms I use. * @namespace Global.js */ var has = Object.prototype.hasOwnProperty; importArticles({       type: 'script',        articles: [            'u:bloodborne:MediaWiki:JSHighlightFixes.js',            'u:dev:RelatedDiscussionsModule/code.js',            'u:bloodborne:MediaWiki:DOMTools.js',            'u:dev:CodeblockLineNumbers/code.js',            'u:dev:DifferentSkinEditor/code.js',            'u:dev:YoutubeModal/code.js',            'u:dev:PurgeButton/code.js',            'u:dev:View_Source/code.js',            'u:dev:UTCClock/code.js',            'u:dev:Message/code.js',            'u:dev:AjaxRC/code.js'        ]    }); function wait { if (!has.call(window, 'DOMTools')) return setTimeout(wait, 1000); run; }   function run { /**        * Purge Button */       window.PurgeButtonText = 'Purge'; /**        * Auto Refresh */       window.AjaxRCRefreshText = 'Auto-refresh'; window.AjaxRCRefreshHoverText = 'Automatically refresh the page'; window.ajaxPages = [ 'Special:RecentChanges', 'Special:WikiActivity', 'Special:AllPages', 'Special:UncategorizedPages' ];       /**         * Remove featured videos */       ;(function {            var filter = Array.prototype.filter;            function hasChild(target) {                return has.call(target.attributes, 'itemprop');            }            function removeChild(child) {                return child.parentElement.removeChild(child);            }            var videos = document.querySelectorAll('div[itemprop="video"]');            var len = videos.length;            if (!len) return;            for (var i = 0; i < len; i++) {                var children = filter.call(videos[i].parentElement.children, hasChild);                if (!children.length) continue;                removeChild(children[i]);            }        }); /**        * LineNumbers on Codeblocks * Moved to: https://dev.wikia.com/wiki/CodeblockLineNumbers */   }    wait; });
 * (function {

/** * Cookies */ function getCookies { if (!window.cookies) { Object.defineProperty(window, 'cookies', {           get: function {                return document.cookie.split(';').reduce(function(cookies, cookie) { cookies[cookie.split('=')[0].trim] = unescape(cookie.split('=')[1]); return cookies; }, {});           }        });        return window.cookies; }   return window.cookies; }

/*@end@*/