// ==UserScript== // @name 科学上网,ss/ssr/v2ray/clash分享,不需要注册,直连facebook/google/youtube,免费梯子,免费机场,免费节点一键获取。 // @name:en onekeygetfreenode // @name:zh-TW 科学上网,ss/ssr/v2ray/clash分享,不需要注册,直连facebook/google/youtube,免费梯子,免费机场,免费节点一键获取。 // @name:zh-HK 科学上网,ss/ssr/v2ray/clash分享,不需要注册,直连facebook/google/youtube,免费梯子,免费机场,免费节点一键获取。 // @namespace http://tampermonkey.net/ // @version 1.0.99 // @description 免费节点一键获取,ss/ssr/v2ray/clash分享,免费节点,科学上网,免费梯子,免费机场,不需要注册,直连facebook/google/youtube,尽情看视频网站,流量用不玩。 // @description:en Free node one-click access, scientific Internet access, free ladder, ssr/v2ray/clash free node real-time sharing, enjoy watching video sites, no longer have to worry about no traffic. // @description:zh-TW 免费节点一键获取,科学上网,免费梯子,免费机场,ss/ssr/v2ray/clash分享,不需要注册,直连facebook/google/youtube,尽情看视频网站,流量用不玩。 // @description:zh-HK 免费节点一键获取,科学上网,免费梯子,免费机场,ss/ssr/v2ray/clash分享,不需要注册,直连facebook/google/youtube,尽情看视频网站,流量用不玩。 // @author clashgithub // @match * // @match *://* // @match *://*/* // @run-at document-body // @license MIT // @icon https://clashgithub.com/wp-content/themes/modown/static/img/favicon.ico // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Your code here... let freenodehtml = `
` function toggle(){ if(document.getElementById('cnqj').style.display=="none"){ document.getElementById('cnqj').style.display="block"; }else{ document.getElementById('cnqj').style.display="none"; } } function btnClose(){ document.getElementById('cnqj').style.display="none"; } if (window.location.href.includes("bing.com") || window.location.href.includes("www.baidu.com")){ document.body.insertAdjacentHTML("afterbegin",'免费节点分享
'); document.body.insertAdjacentHTML("afterbegin",freenodehtml); document.getElementById("triggerBtn").addEventListener("click",toggle); document.getElementById("btnClose").addEventListener("click",btnClose); document.querySelector('.btn').addEventListener('click', () => { navigator.clipboard .writeText(document.querySelector('#freenode').textContent) .then(() => { console.log('复制成功') }) .catch(() => { console.log('复制失败') }) }) fetch("https://clashgithub.com/node/getnode.php") .then((response) => response.text()) .then((res) => { const dom = document.getElementById("freenode"); //console.log(dom.innerText,res) dom.innerText = res; }) .catch((error)=>{console.log('error: ', error.message);}) } })();