Created
January 5, 2023 16:59
-
-
Save MasterTuto/356674e27bd8fe439f5422d21a1cce10 to your computer and use it in GitHub Desktop.
Runrun it, ir para issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name New script - runrun.it | |
// @namespace Violentmonkey Scripts | |
// @match https://runrun.it/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description 1/5/2023, 8:28:41 AM | |
// ==/UserScript== | |
let applied = false; | |
const addLinks = () => { | |
const links = document.querySelectorAll(".overlay-locker__container > div:nth-child(2) > div > div:nth-child(2) > div > div:nth-child(2) > div"); | |
console.log(links); | |
if (!links.length) applied = false; | |
if (applied) { | |
setTimeout(addLinks, 500); | |
return; | |
} | |
for (let link of links) { | |
const urlDiv = link.querySelector("div:nth-child(2)"); | |
const url = urlDiv.innerText.match(/(http[^ ]+)/)[0] | |
const anchor = document.createElement("a"); | |
anchor.id = "chanchor"; | |
anchor.innerText = "Ir para issue"; | |
anchor.target = "_blank"; | |
anchor.href = url; | |
link.appendChild(anchor) | |
applied = true; | |
} | |
setTimeout(addLinks, 500); | |
} | |
addLinks(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment