Created
August 23, 2022 01:25
-
-
Save greatghoul/0a64c0391d1a83aacfd7541839b782e7 to your computer and use it in GitHub Desktop.
下载九酷音乐 mp3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 九酷音乐网mp3下载 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.9ku.com/play/* | |
// @grant GM_addStyle | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let timer = null; | |
function checkAudio () { | |
window.clearTimeout(timer); | |
const audio = document.querySelector('audio'); | |
if (audio && audio.src) { | |
console.log('url is', audio.src); | |
document.querySelector('a.down').setAttribute('href', audio.src); | |
} else { | |
timer = window.setTimeout(checkAudio, 200); | |
} | |
} | |
checkAudio(); | |
GM_addStyle(` | |
iframe { display: none; } | |
.xxl { display: none; } | |
div[onclick*=none] { display: none; } | |
`) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment