Greasy Fork

Greasy Fork is available in English.

QQ 空间好友热播移除

try to take over the world!

当前为 2019-06-06 提交的版本,查看 最新版本

// ==UserScript==
// @name         QQ 空间好友热播移除
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       Nyan Kusanagi <[email protected]>
// @match        *://user.qzone.qq.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const feedFriendList = document.querySelector('#feed_friend_list');

    feedFriendList.addEventListener("DOMSubtreeModified", () => {
        const foolishHotFlags = feedFriendList.querySelectorAll('.f-single-top');

        if (!foolishHotFlags.length) return;

        foolishHotFlags.forEach(foolishHotFlag => {
            const foolishHot = foolishHotFlag.parentNode;
            foolishHot.parentNode.removeChild(foolishHot);

            console.info('A foolish hot video has removed.', foolishHot);
        });
    }, false);

})();