wykopDeSpoilerator2

Odkrywa spoilery na wykopie

当前为 2017-04-10 提交的版本,查看 最新版本

// ==UserScript==
// @name            wykopDeSpoilerator2
// @description     Odkrywa spoilery na wykopie
// @version         2017.04.11.0146
// @author          opsomh
// @namespace       https://gf.qytechs.cn/users/30-opsomh
// @grant           none
// @include         http://www.wykop.pl/*
// ==/UserScript==

(function(){
    "use strict";


    function showSpoiler(context){
        $('.showSpoiler', context).each(function(){
            $(this).hide().next("code").show().addClass('spoilerBody');
        });
    }

    var observer = new MutationObserver(function(mutations){
        mutations.forEach(function(mutation){
            $(mutation.addedNodes).each(function(){
                showSpoiler(this);
            });
        });
    });

    var target = $('#itemsStream, #owncontent').get(0);

    showSpoiler(target);

    observer.observe(target, {'childList': true, 'subtree': true});
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址