// ==UserScript== // @name mb. REVIVE DELETED EDITORS // @version 2015.2.18.15.16 // @description musicbrainz.org: reveal deleted editors’ names and emphasizes your own name to standout in MB pages // @homepage http://userscripts-mirror.org/scripts/show/152545 // @supportURL https://github.com/jesus2099/konami-command/issues // @namespace https://github.com/jesus2099/konami-command // @author PATATE12 // @licence CC BY-NC-SA 3.0 (https://creativecommons.org/licenses/by-nc-sa/3.0/) // @since 2012-11-16 // @icon data:image/gif;base64,R0lGODlhEAAQAKEDAP+/3/9/vwAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh/glqZXN1czIwOTkAIfkEAQACAwAsAAAAABAAEAAAAkCcL5nHlgFiWE3AiMFkNnvBed42CCJgmlsnplhyonIEZ8ElQY8U66X+oZF2ogkIYcFpKI6b4uls3pyKqfGJzRYAACH5BAEIAAMALAgABQAFAAMAAAIFhI8ioAUAIfkEAQgAAwAsCAAGAAUAAgAAAgSEDHgFADs= // @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 - --- - --- - --- - */ var editors = { "32978": ["2003-12-13", "2005-12-16", "tenebrous"], "93418": ["2005-02-08", "2013-03-05", "Rhymeless"], "95678": ["2005-02-18", "2012-09-24", "brianfreud"], "129671": ["2005-06-30", "2009-02-02", "Shlublu"], "157767": ["2005-10-20", "2010-01-05", "michael"], "163497": ["2005-11-09", "2012-07-12", "RedHotHeat"], "186010": ["2005-12-30", "2012-11-29", "robojock"], "193948": ["2006-01-20", "2008-01-27", "syserror"], "240330": ["2006-07-03", "2012-11-27", "theirfour"], "273412": ["2006-10-28", "2011-02-25", "Sturla"], "313128": ["2007-03-31", "2009-02-06", "mistoffeles"], "346478": ["2007-08-31", "2011-05-28", "neothe0ne"], "386354": ["2008-03-04", "2008-04-03", "grosnombril"], "420821": ["2008-09-10", "2014-07-19", "kaik"], /*jozo / 54b97c60-f768-42fa-a5ff-d4e7c173910e*/ "450522": ["2009-02-21", "2011-05-24", "dr_zepsuj"], "457889": ["2009-04-12", "2014-01-12", "deivsonscherzinger"], "629372": ["2012-04-04", "2014-04-08", "nightspirit"], "638936": ["2012-07-07", "2014-12-21", "betegouveia"], "639228": ["2012-07-08", "2014-12-21", "ritaavenida"], "639231": ["2012-07-08", "2014-12-21", "harrystykes"], "639236": ["2012-07-08", "2014-12-21", "niallhoran"], "701715": ["2013-01-07", "2013-01-30", "remdia"], "774387": ["2013-06-06", "2014-12-21", "Wanddis"], "791672": ["2013-06-14", "2013-12-08", "georg187"], "800638": ["2013-06-19", "2014-12-21", "nicolebahls"], "809366": ["2013-06-23", "2014-12-21", "xoxtina"], "1024627": ["2013-10-04", "2014-12-21", "bvlgari"], "1288668": ["2014-06-29", "2014-12-21", "khaleesi"], "jesus2099": "GOLD MASTER KING", "%you%": "PROPHET PRINCE CHAMPION", }; var standout /*from the crowd*/ = true; /* - --- - --- - --- - END OF CONFIGURATION - --- - --- - --- - */ var MBS = location.protocol+"//"+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 (editors["%you%"]) { if (!editors[you.textContent]) { editors[you.textContent] = editors["%you%"]; } delete editors["%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; } } })();