NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name RT - Custom actions // @namespace https://rtpowered.com/ // @include https://rtpowered.com/Ticket/Display.html?id=* // @description Днищевы радости // @author Derry // @version 1.1 // @license MIT // ==/UserScript== var tt = document.getElementsByName("id").item(0).value; // кнопка спам var a1 = document.createElement("a"); a1.id = "newID1"; a1.className = "menu-item"; a1.href = "Display.html?id=" + tt + "&Status=rejected&Owner=spamuser"; var linkText1 = document.createTextNode("SPAM"); a1.appendChild(linkText1); var newLink1 = document.createElement("li"); newLink1.id = "li-custom1"; newLink1.appendChild(a1); // кнопка on-site-nl var a2 = document.createElement("a"); a2.id = "newID2"; a2.className = "menu-item"; a2.href = "Create.html?Queue=on-site-nl&Status=new&Owner=Nobody&Requestors=&Cc=&CloneTicket=" + tt + "&DependsOn-new=" + tt; var linkText2 = document.createTextNode("NL"); a2.appendChild(linkText2); var newLink2 = document.createElement("li"); newLink2.id = "li-custom2"; newLink2.appendChild(a2); // кнопка on-site-us var a3 = document.createElement("a"); a3.id = "newID3"; a3.className = "menu-item"; a3.href = "Create.html?Queue=on-site-us&Status=new&Owner=Nobody&Requestors=&Cc=&CloneTicket=" + tt + "&DependsOn-new=" + tt; var linkText3 = document.createTextNode("US"); a3.appendChild(linkText3); var newLink3 = document.createElement("li"); newLink3.id = "li-custom3"; newLink3.appendChild(a3); // кнопка networking var a4 = document.createElement("a"); a4.id = "newID4"; a4.className = "menu-item"; a4.href = "Create.html?Queue=networking&Status=new&Owner=Nobody&Requestors=&Cc=&CloneTicket=" + tt + "&DependsOn-new=" + tt; var linkText4 = document.createTextNode("Networking"); a4.appendChild(linkText4); var newLink4 = document.createElement("li"); newLink4.id = "li-custom4"; newLink4.appendChild(a4); // кнопка NOC var a5 = document.createElement("a"); a5.id = "newID5"; a5.className = "menu-item"; a5.href = "Create.html?Queue=noc&Status=new&Owner=Nobody&Requestors=&Cc=&CloneTicket=" + tt + "&DependsOn-new=" + tt; var linkText5 = document.createTextNode("NOC"); a5.appendChild(linkText5); var newLink5 = document.createElement("li"); newLink5.id = "li-custom5"; newLink5.appendChild(a5); // кнопка on-site-ams01 var a6 = document.createElement("a"); a6.id = "newID6"; a6.className = "menu-item"; a6.href = "Create.html?Queue=on-site-ams01&Status=new&Owner=Nobody&Requestors=&Cc=&CloneTicket=" + tt + "&DependsOn-new=" + tt; var linkText6 = document.createTextNode("AMS01"); a6.appendChild(linkText6); var newLink6 = document.createElement("li"); newLink6.id = "li-custom6"; newLink6.appendChild(a6); var pageBasic = document.getElementById("li-page-bookmark"); var placeHolder = document.getElementById("page-menu"); placeHolder.insertBefore(newLink2, pageBasic); placeHolder.insertBefore(newLink3, pageBasic); placeHolder.insertBefore(newLink6, pageBasic); placeHolder.insertBefore(newLink4, pageBasic); placeHolder.insertBefore(newLink5, pageBasic); placeHolder.insertBefore(newLink1, pageBasic); console.log(tt);