拒絕爛新聞

再見!爛新聞

目前为 2019-03-30 提交的版本。查看 最新版本

// ==UserScript==
// @name         拒絕爛新聞
// @namespace    https://example.com
// @version      1.1
// @description  再見!爛新聞
// @author       威爾斯
// @match        *://tw.news.yahoo.com/*
// @match        *://*.setn.com/*
// @match        *://*.udn.com/news/*
// @match        *://*.ettoday.net/*
// @match        *://*.appledaily.com/*
// @match        *://*.chinatimes.com/*
// @match        *://news.pchome.com.tw/*
// @match        *://today.line.me/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var keyWord=['三立','性侵','性騷擾','小模','上床','淫辱','嘿咻','姓男','姓女','性行為','禽獸','人妻','激戰'];
    var killWord=['化名','非當事人','示意圖'];
    var count=0;
    var html=document.documentElement.innerText.trim();

    killWord.forEach(function(e) {
        if(html.indexOf(e)!==-1)close();
    });

    keyWord.forEach(function(e) {
        if(html.indexOf(e)!==-1)count++;
        if(count>=3)close();
    });
})();