// ==UserScript== // @name mb. REVIVE DELETED EDITORS // @version 2014.0413.2044 // @description musicbrainz.org: reveal deleted editors’ names and emphasizes your own name to standout in MB pages // @namespace https://github.com/jesus2099/konami-command // @author PATATE12 aka. jesus2099/shamo // @licence CC BY-NC-SA 3.0 (https://creativecommons.org/licenses/by-nc-sa/3.0/) // @grant none // @include http*://*musicbrainz.org/*edits* // @include http*://*musicbrainz.org/artist/* // @include http*://*musicbrainz.org/edit/* // @include http*://*musicbrainz.org/election* // @include http*://*musicbrainz.org/label/* // @include http*://*musicbrainz.org/recording/* // @include http*://*musicbrainz.org/release/* // @include http*://*musicbrainz.org/release-group/* // @include http*://*musicbrainz.org/search*type=editor* // @include http*://*musicbrainz.org/statistics/editors* // @include http*://*musicbrainz.org/user/* // @include http*://*musicbrainz.org/work/* // @run-at document-end // @downloadURL none // ==/UserScript== (function(){"use strict"; /* - --- - --- - --- - START OF CONFIGURATION - --- - --- http://musicbrainz.org/user/Deleted%20Editor%20%2332978- --- - */ var regrets = { "Deleted Editor #32978": "tenebrous", /*2003-12-13 - 2005-12-16*/ "Deleted Editor #93418": "Rhymeless", /*2005-02-08 - 2013-03-05*/ "Deleted Editor #95678": "brianfreud", /*2005-02-18 - 2012-09-24*/ "Deleted Editor #129671": "Shlublu", /*2005-06-30 - 2009-02-02*/ "Deleted Editor #157767": "michael", /*2005-10-20 - 2010-01-05*/ "Deleted Editor #163497": "RedHotHeat", /*2005-11-09 - 2012-07-12*/ "Deleted Editor #186010": "robojock", /*2005-12-30 - 2012-11-29*/ "Deleted Editor #193948": "syserror", /*2006-01-20 - 2008-01-27*/ "Deleted Editor #240330": "theirfour", /*2006-07-03 - 2012-11-27*/ "Deleted Editor #313128": "mistoffeles", /*2007-03-31 - 2009-02-06*/ "Deleted Editor #346478": "neothe0ne", /*2007-08-31 - 2011-05-28*/ "Deleted Editor #386354": "grosnombril", /*2008-03-04 - 2008-04-03*/ "Deleted Editor #457889": "deivsonscherzinger",/*2009-04-12 - 2014-01-12*/ "Deleted Editor #629372": "nightspirit", /*2012-04-04 - 2014-04-08*/ "Deleted Editor #701715": "remdia", /*2013-01-07 - 2013-01-30*/ "jesus2099": "GOLD MASTER KING", "%you%": "PROPHET PRINCE CHAMPION", }; var mark /*of the life again*/ = "★"; var standout /*from the crowd*/ = true; /* - --- - --- - --- - END OF CONFIGURATION - --- - --- - --- - */ var MBS = self.location.protocol+"//"+self.location.host; var you = document.querySelector("div#header li.account a[href^='"+MBS+"/user/']"); if (document.querySelector("div#header li.account a[href='"+MBS+"/logout'], div#page") == null) { return; } if (you) { if (regrets["%you%"]) { if (!regrets[you.textContent]) { regrets[you.textContent] = regrets["%you%"]; } delete regrets["%you%"]; } if (standout) { var ys = document.querySelectorAll("div#page a[href='"+you.getAttribute("href")+"']"); for (var y=0; y dt"); for (var dt=0; dt max) { if (id > nmax) { nmax = id; } editors[ed].style.setProperty("font-weight", "bold"); } } if (nmax > max && confirm("store new max?")) { localStorage.setItem(lsmax, nmax); } } function removeChildren(p) { while (p && p.hasChildNodes()) { p.removeChild(p.firstChild); } } function getSibling(obj, tag, cls, prev) { var cur = obj; if (cur = prev?cur.previousSibling:cur.nextSibling) { if (cur.tagName == tag.toUpperCase() && (!cls || cls && cur.className.match(new RegExp("\\W*"+cls+"\\W*")))) { return cur; } else { return getSibling(cur, tag, cls, prev); } } else { return null; } } function addAfter(n, e) { if (n && e && e.parentNode) { if (e.nextSibling) { return e.parentNode.insertBefore(n, e.nextSibling); } else { return e.parentNode.appendChild(n); } } else { return null; } } })();