您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to open the classical music's door!
// ==UserScript== // @name 国家大剧院古典音乐频道下载 // @namespace http://tampermonkey.net/ // @version 0.1.2 // @description try to open the classical music's door! // @author williamslay // @match http://ncpa-classic.cntv.cn/* // @match http://www.ncpa-classic.com/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant GM_addStyle // @run-at document-end // ==/UserScript== window.onload=function(){ 'use strict'; let download=document.createElement("a"); download.setAttribute("class", "download"); download.setAttribute("download", true); //var audioplayer=document.getElementById("audioplayer"); //var url=audioplayer.src; //download.href=url; let myText = document.createTextNode("下载"); GM_addStyle ( ` .download { width: 38px; height: 18px; line-height: 18px; text-align: center; background-color: #577891; font-size: 14px; font-family: "宋体"; cursor: pointer; display:inline-block; position:absolute; left: 63%; top: 35%; }; ` ); download.onclick=function downloadUrlFile() { let tempForm = document.createElement('form') var audioplayer=document.getElementById("audioplayer"); var url=audioplayer.src; tempForm.action = url tempForm.method = 'get' tempForm.style.display = 'none' document.body.appendChild(tempForm) tempForm.submit() return tempForm } download.appendChild(myText); var parent=document.getElementsByClassName("nr_2"); var node=document.getElementById("audio_title_div"); parent[0].insertBefore(download,node); console.log("开发者williamslay,github:https://github.com/williamslay") }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址