// ==UserScript== // @name mozillaZine Forums - inserts titles to bug links // @namespace rikkie // @description Inserts titles to bug links that are plain URLs, in forums.mozillazine.org // @include http://forums.mozillazine.org/viewtopic.php* // @version 1.1 // @grant GM_xmlhttpRequest // @downloadURL none // ==/UserScript== var items = []; var links = document.getElementsByClassName('postlink'); for (i = 0; i < links.length; i++) { if (links[i].innerHTML.match(/https:\/\/bugzilla\.mozilla\.org\/show_bug\.cgi\?id=*/)) { var elem = document.createElement("img"); elem.setAttribute("src", "http://i.imgur.com/3Y8dqYZ.gif"); links[i].parentNode.insertBefore(elem, links[i].nextSibling); insertTitle(links[i]); }; }; function insertTitle(x) { var details = GM_xmlhttpRequest({ method: 'GET', url: x.innerHTML, synchronous: false, // Asynchronous request onload: function (response) { var matches = response.responseText.match(/