{"id":"41b119b7-dbdd-4466-877c-3cdfa0b9b810","name":"油猴资源安装器(新版适用)","type":"content","programmingType":"text","description":"无脑快速安装油猴到脚本狗，如果导入失败，可以直接全复制代码，在脚本狗新建文本编程项目，全部覆盖粘贴即可，脚本猫资源：https://scriptcat.org/zh-CN/search ，油叉资源：https://greasyfork.org/zh-CN/scripts","matches":["https://scriptcat.org/*","https://greasyfork.org/*","https://gf.qytechs.cn/*"],"code":"setTimeout(() => {\n  if (location.hostname == 'greasyfork.org') {\n    initScriptFork()\n  } else if (location.hostname == 'scriptcat.org') {\n    initScriptCat()\n  }\n}, 300)\n\nfunction initScriptCat() {\n  const catLinks = document.querySelectorAll(\"a[href*='user.js']\");\n  if (!catLinks) {\n    return\n  }\n  catLinks.forEach(catLink => {\n    catLink.textContent = '安装到脚本狗';\n    catLink.style.backgroundColor = '#c7811e';\n    catLink.onclick = (e) => {\n      e.preventDefault();\n      window.postMessage({ type: 'installDogScript', data: encodeURIComponent(catLink.href) }, '*')\n    }\n  })\n\n}\n\nfunction initScriptFork() {\n  const btnGroup = document.querySelector('#install-area');\n  if (!btnGroup) {\n    return\n  }\n  const catLink = btnGroup.querySelector('.install-link');\n  const btn = document.createElement('a');\n  btn.href = 'javascript:void(0)';\n  btn.textContent = '安装到脚本狗';\n  btn.className = catLink.className;\n  btn.style.backgroundColor = '#c7811e';\n  btn.onclick = () => {\n    window.postMessage({ type: 'installDogScript', data: encodeURIComponent(catLink.href) }, '*')\n  }\n  btnGroup.insertBefore(btn, catLink);\n}","source":"","installTime":1751687098727,"author":"哈哈","version":"1.0.1","enabled":true,"runAt":"document_idle","showRunLogo":true,"useDog":true,"useGM":false,"templates":{},"requires":[],"size":1071,"updateTime":1791619832145,"url":"http://scriptdog.xyz/script/9xlsc6zhn7nqee5fi617d5xos3ppf83a/update","external":true,"lastTime":1791619834263,"loading":false}