Celebrity-Block-List Install this to have an ever-growing list of celebrities to block

Load celebrities into the blockedPhrases variable.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Celebrity-Block-List Install this to have an ever-growing list of celebrities to block
// @namespace    https://github.com/def-initive/
// @version      1.1
// @description  Load celebrities into the blockedPhrases variable.
// @author       def-initive
// @match        *://*/*
// @exclude      *://github.com/*
// @exclude      *://greasyfork.org/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    // Function to update blockedPhrases in local storage
    function updateBlockedPhrases(newPhrases) {
        // Load existing phrases from local storage
        var storedPhrases = localStorage.getItem('blockedPhrases');
        var existingPhrases = storedPhrases ? JSON.parse(storedPhrases) : [];

        // Merge existing and new phrases, removing duplicates
        var updatedPhrases = Array.from(new Set(existingPhrases.concat(newPhrases)));

        // Save the updated phrases to local storage
        localStorage.setItem('blockedPhrases', JSON.stringify(updatedPhrases));
    }

    // Add your list of names and phrases here
    var customPhrases = [
        'taylor swift','taylorswift','taytay','swiftie','kanye','yeezy','kardashian',
        // Add more names and phrases as needed
    ];

    // Update blockedPhrases in local storage with the custom phrases
    updateBlockedPhrases(customPhrases);
})();