javascript:var aElements = document.getElementsByTagName("a"); for (var i = 0; i < aElements.length; i++) { var href = aElements[i].getAttribute("href"); var regex = /https:\/\/scratch\.mit\.edu\/projects\/(\d+)\/?$/; var match = regex.exec(href); if (match) { var projectID = match[1]; if (!aElements[i].hasAttribute("checked")) { var aElm = document.createElement("a"); aElm.setAttribute("href", "https://uploads.scratch.mit.edu/get_image/project/" + projectID + "_5000x5000.png"); aElements[i].appendChild(aElm); var img = document.createElement("img"); img.setAttribute("src", "https://scratch.mit.edu/images/download/icon.png"); img.setAttribute("width", "15px"); aElm.appendChild(img); var bElm = document.createElement("a"); bElm.setAttribute("href", "https://turbowarp.org/" + projectID); aElements[i].appendChild(bElm); var bimg = document.createElement("img"); bimg.setAttribute("src", "https://desktop.turbowarp.org/favicon.ico"); bimg.setAttribute("width", "15px"); bElm.appendChild(bimg); aElements[i].setAttribute("checked", true); } } }
プロジェクトリンクの隣に サムネイルリンクと ターボワープリンクを設置するブクマ