// ==UserScript==
// @name ymail-basic. DIRECT LINKS TO MUSICBRAINZ
// @version 2016.6.15
// @changelog https://github.com/jesus2099/konami-command/commits/master/ymail-basic_DIRECT-LINKS-TO-MUSICBRAINZ.user.js
// @description BASIC Yahoo! Mail only (/neo/b/). Adds links to MusicBrainz edits directly in mail.yahoo.com folders view (including "no votes" and "subscription" emails). No need to open all those e-mails any more. Only one link per edit ID, duplicate ID are coloured and e-mail(s) marked for deletion. Once clicked, the link is faded, to keep trace of already browsed edits. Limitations : only Opera(maybe) and y!mail BASIC I guess.
// @homepage http://userscripts-mirror.org/scripts/show/80308
// @supportURL https://github.com/jesus2099/konami-command/labels/ymail-basic_DIRECT-LINKS-TO-MUSICBRAINZ
// @compatible opera(12.18.1872)+violentmonkey my setup
// @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 2010-06-28
// @icon data:image/gif;base64,R0lGODlhEAAQAKEDAP+/3/9/vwAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh/glqZXN1czIwOTkAIfkEAQACAwAsAAAAABAAEAAAAkCcL5nHlgFiWE3AiMFkNnvBed42CCJgmlsnplhyonIEZ8ElQY8U66X+oZF2ogkIYcFpKI6b4uls3pyKqfGJzRYAACH5BAEIAAMALAgABQAFAAMAAAIFhI8ioAUAIfkEAQgAAwAsCAAGAAUAAgAAAgSEDHgFADs=
// @grant none
// @match *://*.mail.yahoo.com/neo/b/*
// @exclude *mail.yahoo.com/mc/md.php*
// @run-at document-end
// @downloadURL https://update.greasyfork.org/scripts/2333/ymail-basic%20DIRECT%20LINKS%20TO%20MUSICBRAINZ.user.js
// @updateURL https://update.greasyfork.org/scripts/2333/ymail-basic%20DIRECT%20LINKS%20TO%20MUSICBRAINZ.meta.js
// ==/UserScript==
/* - --- - --- - --- - START OF CONFIGURATION - --- - --- - --- - */
var colour = "yellow";
var colourclicked = "pink";
var colourdupe = "mistyrose";
var colourno = "yellow";
var colournobg = "red";
var colourloading = "gold";
var loadingtxt = "⌛ loading…";
var edittypes = {deleted: "×", merged: "+"};
var markReadEditsForDeletion = true;
var preferredProtocol = "http:";/* "https:", "http:" (including “:”) or "" (empty string) if you prefer using the same current protocol as Yahoo! Mail*/
/* - --- - --- - --- - END OF CONFIGURATION - --- - --- - --- - */
var userjs = "jesus2099userjs80308";
var edits = [];
var editTrigger = /^(?:Note added to|Someone has voted against)( your)? edit #([0-9]+)$/;
var editNoteExtractor = /'[^']+' has added the following note to(?: your)? edit #\d+: -{72} (.+) -{72} If you would like to reply to this note, please add your note at: /;
var jiraTrigger = /^\[jira\](?: \w+){1,3}: \(([A-Z][A-Z\d]*-\d+)\)/;
var triggerno = /^Someone has voted against your edit(?: #[0-9]+)?$/;
var triggernoextractorz = /