您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Downloads Steam Workshop items that really works, replacing the deprecated or free space left from steamworkshop.download
当前为
// ==UserScript== // @name Steamworkshop downloader // @namespace Violentmonkey Scripts // @match *://steamcommunity.com/workshop/filedetails/?id=* // @match *://steamcommunity.com/sharedfiles/filedetails/?id=* // @version 1.0 // @author https://github.com/InsightiousCoven // @include *steamcommunity.com/sharedfiles/filedetails/?id=* // @include *steamcommunity.com/workshop/filedetails/?id=* // @grant GM_xmlhttpRequest // @icon https://www.google.com/s2/favicons?sz=64&domain=steamcommunity.com // @description Downloads Steam Workshop items that really works, replacing the deprecated or free space left from steamworkshop.download // @license GPL-3.0 // ==/UserScript== var patt = new RegExp("[0-9]{2,15}"); var id = patt.exec(document.URL)[0]; var baseUrl = "https://steamcommunity.com/sharedfiles/filedetails/?id=" if (document.URL.indexOf("steamcommunity.com") != -1) { if (document.URL.indexOf("workshop") != -1 || document.URL.indexOf("filedetails") != -1) { if(!id) alert("CANNOT GET ID!") addMeta(); addWorkshopBtn(id); } } function addMeta() { var meta = document.querySelector('meta[http-equiv="Content-Security-Policy"]'); var allowedUrls = "https://api.ggntw.com https://api.ggntw.com/steam.request" if (meta) { meta.content += " " + allowedUrls; } else { meta = document.createElement('meta'); meta.httpEquiv = "Content-Security-Policy"; meta.content = "connect-src 'self' " + allowedUrls; document.getElementsByTagName('head')[0].appendChild(meta); } } function SBS_NW(url) { console.log("DOWNLOADING: "+url) GM_xmlhttpRequest({ anonymous: true, method: "POST", url: "https://api.ggntw.com/steam.request", data: JSON.stringify({url}), headers: { "Content-Type": "application/json", "User-Agent":"insomnia/2023.5.8" }, onprogress: () => {}, responseType: "json", onload: response => { console.log("success!", {response}) window.open(response.response.url,"_blank") }, onerror: reponse => { alert('error') } }); } function addWorkshopBtn(id) { var element = document.getElementById("AddToCollectionBtn"); var button = document.createElement('span'); button.setAttribute('class', 'general_btn share tooltip'); button.innerHTML = '<span id="SUBS_TO_ITEM"><span>Download this ⬇️</span></span>'; button.onclick = function() { SBS_NW(baseUrl+id); } if (element.nextSibling) { element.parentNode.insertBefore(button, element.nextSibling); } else { element.parentNode.appendChild(button); } document.querySelectorAll(".game_area_purchase_game")[0].getElementsByTagName('h1')[0].setAttribute('style', 'width: 300px;'); }