科学上网,ss/ssr/v2ray/clash分享,不需要注册,直连facebook/google/youtube,免费梯子,免费机场,免费节点一键获取。

免费节点一键获取,ss/ssr/v2ray/clash分享,免费节点,科学上网,免费梯子,免费机场,不需要注册,直连facebook/google/youtube,尽情看视频网站,流量用不玩。

// ==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


// ==/UserScript==
(function() {
    'use strict';
    // Your code here...
	let freenodehtml = `
    <div id="cnqj" style="display:none;height:${window.screen.height}px;top:0px;left:0px;background-color:#fafafa;  position:fixed;z-index:1001;" >
        <div class="gsnm" style="position:fixed;top:30px;left:10px;width:97%; border:2px solid #eee;border-radius:5px;padding:10px;background-color:#fcfcfc; box-shadow: 1px 1px 1px #eee;ont-size:12px;">
            <h1><b>免费节点分享</b></h1>
            <br/>
            <p>关注「<a href="https://t.me/s/v2raydailyupdate" target="_blank">免费节点每日更新 – Telegram</a>」,第一时间获得新鲜节点。</p>
            <br/>
            <p>免费节点来源:<br/>
            <a href="https://clashgithub.com/" target="_blank">https://clashgithub.com/</a><br/>
            <a href="https://github.com/aiboboxx/v2rayfree" target="_blank">https://github.com/aiboboxx/v2rayfree</a><br/>
            </p><br/>
            <p>性价比机场推荐:<br/>
            快帆云:「<a href="https://kfyun.uk/" target="_blank" >(点击注册)」</a>
            </p><br/>
            <p>免费节点分享:<button class="btn">点击复制</button><br/>
			<pre id="freenode">
			</pre>		
            </p>
        </div>
		<div style="position:fixed;right:0px;"><button id="btnClose" style="width: 30px;height: 30px;">X</button></div>
    </div>`
    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",'<p id="triggerBtn" style="position:fixed;top:100px;right:20px;z-index:1000">免费节点分享</p>');
		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').innerHTML.replaceAll('<br>','\n'))
			  .then(() => {
				console.log('复制成功')
			  })
			  .catch(() => {
				console.log('复制失败')
			  })
		})
		fetch("https://clashgithub.com/node/index.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);})
		}
})();