您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
显示听哇网站文件的url以便快速下载。
当前为
// ==UserScript== // @name itingwa_download // @version 0.5 // @namespace [url=mailto:[email protected]]mailto:[email protected][/url] // @require http://code.jquery.com/jquery-1.11.0.min.js // @match https://www.itingwa.com/listen/* // @match https://www.itingwa.com/article/* // @match https://www.itingwa.com/radio/* // @match https://www.itingwa.com/?c=player* // @grant none // @run-at document-end // @description 显示听哇网站文件的url以便快速下载。 // ==/UserScript== function itingwa_add_src(){ var newNode_div = document.createElement("div"); var itingwa_src = $("#jp_audio_0").get(0).src; var newNode = document.createElement("a"); newNode.setAttribute("href",itingwa_src); newNode.innerHTML = "右键另存本歌曲"; var url=/^https:\/\/www.itingwa.com\/article\/*/; console.log(window.location.href); if(url.test(window.location.href)){ console.log("test"); $('.top_15.font_14.color2').append(newNode_div); $('.top_15.font_14.color2 div').append(newNode); } else{ var object = listen_channel.appendChild(newNode); } } function top_select() { var new_click_li = document.createElement("li"); var new_click_a = document.createElement("a"); new_click_a.setAttribute("name","player_nav"); new_click_a.setAttribute("href","javascript:void(0)"); new_click_a.innerHTML="获取此歌地址"; $("a:contains(播放列表)").parent().parent().append(new_click_li); $("#player_music_list > div.wrap_960 > div.music_wrap.clearfix > ul > li:last ").append(new_click_a); } (function () { 'use strict'; var player_zj=/^https:\/\/www.itingwa.com\/\?c=player*/; window.addEventListener('load', (event) => { if(player_zj.test(window.location.href)===true) { top_select(); var show_download_src = $("#player_music_list > div.wrap_960 > div.music_wrap.clearfix > ul > li:last > a"); show_download_src.bind('click', function(e) { var test_node=/右键另存本歌曲/; if (test_node.test($("#listen_channel > a:last").get(0).innerHTML) === false) { itingwa_add_src(); } }); } else { itingwa_add_src(); } }); })();