您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Obtain direct, clickable AceStream links on PlatinSport, bypassing url shorteners.
当前为
// ==UserScript== // @name PlatinSport direct AceStream links // @description Obtain direct, clickable AceStream links on PlatinSport, bypassing url shorteners. // @namespace StephenP // @author StephenP // @grant GM.registerMenuCommand // @grant GM.setValue // @grant GM.getValue // @version 1.3 // @match https://www.platinsport.com/* // @contributionURL https://nowpayments.io/donation/stephenpgreasyfork // @license AGPL-3.0-or-later // ==/UserScript== getAdultContentVisible(); async function getAdultContentVisible(){ var x=await GM.getValue("adultContentEnabled"); if(x=="yes"){ GM.registerMenuCommand("Hide the lists of adult contents on Platinsport", hideAdultContent, "H"); } else{ GM.registerMenuCommand("Show the lists of adult contents on Platinsport", showAdultContent, "S"); removeAdultLinks(); } createLinks(); } function hideAdultContent(){ GM.setValue("adultContentEnabled","no"); location.reload(); } function showAdultContent(){ GM.setValue("adultContentEnabled","yes"); location.reload(); } function removeAdultLinks(){ var b=document.getElementsByClassName("fa-mars-double"); if(b.length==1){ b[0].parentNode.parentNode.remove(); } } function createLinks(){ if(!document.location.href.includes("/link/")){ var links=document.getElementsByTagName("A"); var bcvclinks=0; for(let link of links){ if(link.href.includes("bc.vc")){ bcvclinks++; let pos=link.href.indexOf("https://www.p"); link.href=link.href.slice(pos); } } if(bcvclinks==0){ links=document.getElementsByClassName("entry")[0].getElementsByTagName("a"); for(var i=1;i<=links.length;i++){ if(i<10){ links[i-1].href="https://www.platinsport.com/link/0"+i+".php"; } else{ links[i-1].href="https://www.platinsport.com/link/"+i+".php"; } } } } else{ var texts=document.getElementsByTagName("STRONG"); for(let t of texts){ var link=null; var regexpLinks=/acestream:\/\/[a-f0-9]{40}/g t.innerHTML=t.innerHTML.replace(regexpLinks,replacerLinks); if(location.href.includes("/link")){ var regexpLangs=/[\[]([A-Z][A-Z])[\]]/g t.innerHTML=t.innerHTML.replace(regexpLangs,replacerLangs); } } } } function replacerLinks(match, offset, string) { return "<a style=\"color: yellow; line-height: normal\" href=\""+match+"\">"+match.replace("acestream://","")+"</a>"; } function replacerLangs(match, p1, offset, string) { return getFlagEmoji(p1); } //Following function taken mostly from https://dev.to/jorik/country-code-to-flag-emoji-a21 function getFlagEmoji(countryCode) { if(countryCode==="UK"){ countryCode="GB" } const codePoints = countryCode .toUpperCase() .split('') .map(char => 127397 + char.charCodeAt()); return String.fromCodePoint(...codePoints); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址