Discussions » Creation Requests

求大佬写个脚本,酷狗音乐网页版查看专辑页的 “下一页” 按钮被代码屏蔽了

§
Posted: 2021-11-01

https://www.kugou.com/yy/singer/home/6105.html

QQ音乐的查看专辑页面也是,控制台查看不到屏蔽的代码,估计搞不下来

§
Posted: 2021-11-13
// ==UserScript==
// @name         album show more
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       cw2012
// @match        https://www.kugou.com/yy/singer/home/*
// @icon         https://www.google.com/s2/favicons?domain=kugou.com
// @grant        none
// run-at         document-end
// ==/UserScript==

(function() {
    'use strict';

    const display2show = ['#song_nvg'];
    const visibility2show = ['#page_first', '.NextPageSpan', '.PrePageSpan', '#page_last_'];
    const display2hide = ['.download'];

    updateUi();

    function updateUi(){
        for(let item of display2show){
            document.querySelector(item).style.display = 'block';
        }

        for(let item of visibility2show){
            document.querySelector(item).style.visibility = 'visible';
        }

        for(let item of display2hide){
            const list = document.querySelectorAll(item);
            for(let li of list){
                li.style.display = 'none';
            }
        }
    }

})();

Post reply

Sign in to post a reply.