Greasy Fork is available in English.

苹果日报订阅破解脚本

在苹果日报网站,允许不订阅阅读新闻。

// ==UserScript==
// @name         苹果日报订阅破解脚本
// @namespace    gqqnbig.me
// @version      0.2.1
// @description  在苹果日报网站,允许不订阅阅读新闻。
// @author       gqqnbig
// @match        https://tw.appledaily.com/new/realtime/*
// @match        https://tw.entertainment.appledaily.com/realtime/*
// @grant        none
// @run-at       document-start
// @noframes
// ==/UserScript==

(function() {
    'use strict';

    function hookRemove() {
        if (typeof(jQuery)!="undefined") {
            (function ($)
             {
                $.fn.trueRemove = $.fn.remove;

                $.fn.remove = function ()
                {

                    //var ret = oldRemove.apply(this, arguments);

                    return this;
                };
            })(jQuery);
            clearInterval(handle);

            $(() => {
                $(".ndPaywall").trueRemove();
                $(".ndArticle_margin").show().css("visibility","visible");
            });
        }
    }

    let handle = setInterval(hookRemove, 10);
})();