您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
虫虫钢琴铺面查看工具,可点击下载,全屏,打印等功能。
当前为
// ==UserScript== // @name 虫虫钢琴铺面查看脚本 // @namespace TesterNaN.github.io // @version 1.6 // @description 虫虫钢琴铺面查看工具,可点击下载,全屏,打印等功能。 // @author TesterNaN // @license GPLv3 // @match *://www.gangqinpu.com/jianpu/* // @match *://www.gangqinpu.com/cchtml/* // @match *://www.gangqinpu.com/sheetplayer/web.html?* // @icon https://www.gangqinpu.com/favicon.ico // @grant none // ==/UserScript== function CrackMain(){ const jp_icon = "https://s201.lzjoy.com/public/web_static/images/score_details/jianpu-icon.png"; const wxp_icon = "https://s201.lzjoy.com/public/web_static/images/score_details/qupu-icon.png"; try{ var kj=document.getElementById("ai-score"); }catch(e){ alert("抱歉,您当前查看的谱面暂时无法读取"); return -1; }; var btn1=document.querySelector(".down.download"); var btn2=document.getElementById("s_d_fullBtn"); var btn3=document.querySelector(".print.Printing"); var tojp=document.querySelector(".jianpu-btn"); setTimeout(function(){ try{ document.querySelector("#line-spectrum-box > div.ai > div").style.visibility="hidden"; }catch(e){} try{ document.querySelector(".s-d-m-b-buy").style.visibility="hidden"; }catch(e){} try{ //document.querySelector(".no-buy.active > div.img-mask").style.visibility="hidden"; document.querySelector("#line-spectrum-box > div.defalut.no-buy.active > div.img-mask").style.visibility="hidden"; }catch(e){} try{ document.querySelector("#line-spectrum-box > div.ai").style.display='block'; }catch(e){} try{ document.querySelector("#line-spectrum-box > div.defalut.no-buy.active").style.display="none"; }catch(e){} try{ document.querySelector("#siwper1-middle-play").style.display="none"; }catch(e){} try{ document.querySelector("#ai-score").scrolling="yes"; }catch(e){} try{ document.querySelector("#header > div.content-box-0").style.display="none"; document.querySelector("body > section").style=""; }catch(e){} }, 1000); btn1.addEventListener("click",function(){ let gdd = document.querySelector("#ai-score").contentWindow.Player.getJianpuMode() window.open(kj.src+"&gdd="+gdd); event.stopImmediatePropagation(); },true); btn2.addEventListener("click",function(){ window.open(kj.src); event.stopImmediatePropagation(); },true); btn3.addEventListener("click",function(){ //window.open(kj.src); document.getElementById('ai-score').contentWindow.window.print(); event.stopImmediatePropagation(); },true); try{ tojp.addEventListener("click",function(){ //卡顿一下是正常的 const Player = document.querySelector("#ai-score").contentWindow.Player if(Player.getJianpuMode()==0){ tojp.src = wxp_icon Player.setJianpuMode(1) }else{ tojp.src = jp_icon Player.setJianpuMode(0) } //沟槽的虫虫钢琴给/jianpu/做了跳转 //所以旧的简铺切换不能用了 //目前已经定位造成跳转的脚本是jpu_detail.js //位于该脚本的第2124行 //if (!info.play_json) { // var tmp_url = window.location.href; // tmp_url = tmp_url.replace('jianpu', 'cchtml'); // window.location.href = tmp_url; // return; //} //我搞了一下午都没能成功用油猴篡改掉这个函数 //望有识之士能助我一臂之力,打败这个可恶的函数 //原本代码: //var str = window.location.pathname; //if(str.includes("/jianpu/")){ // window.open("https://www.gangqinpu.com/cchtml"+str.substring(7)); //}else{ // window.open("https://www.gangqinpu.com/jianpu"+str.substring(7)); //} event.stopImmediatePropagation(); },true); }catch(e){}; console.log("破解全屏和下载完毕"); return 0; } (function() { 'use strict'; var str = window.location.pathname; if(str.includes("/jianpu/") || str.includes("/cchtml/")){ CrackMain(); }else{ !document.referrer&&(location.href+=""); setTimeout(function(){ try{ const url = new URL(window.location.href); const gdd = url.searchParams.get('gdd'); console.log("固定调模式:"+gdd) if(gdd == "2"){ window.Player.setJianpuMode(2) } }catch(e){} document.querySelector("#page_0 > g.qrcode.print").style.visibility="hidden"; document.querySelector("#page_0 > g:nth-child(1) > image").style.visibility="hidden"; document.querySelector("#page_0 > g.footer > text.print").style.visibility="hidden"; for(var i=1;i<=document.querySelector("#svg").children.length-3;i++){ document.querySelector("#page_"+i+" > g.print > image").style.visibility="hidden"; document.querySelector("#page_"+i+" > g.footer > text.print").style.visibility="hidden"; } console.log("去除水印完毕"); }, 3000); } })();