Twitter Auto Show NSFW

Twitter Auto Show NSFW, You Don't Have To Click "Show" Button Anymore When Reading NSFW Tweets With Blur Alert. 推特自动显示色情暴力内容,自动显示NSFW内容,不再被模糊化。

目前為 2024-01-21 提交的版本,檢視 最新版本

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Twitter Auto Show NSFW
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Twitter Auto Show NSFW, You Don't Have To Click "Show" Button Anymore When Reading NSFW Tweets With Blur Alert. 推特自动显示色情暴力内容,自动显示NSFW内容,不再被模糊化。
// @author       Martin______X
// @match        https://twitter.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant        none
// @license      MIT
// ==/UserScript==

async function showNsfwDivClick(showNsfwDiv) {
    showNsfwDiv.click();
}

const nfswClickInterval = setInterval(() => {

    var showNsfwDiv = document.getElementsByClassName("css-175oi2r r-sdzlij r-1phboty r-rs99b7 r-lrvibr r-173mn98 r-1s2bzr4 r-15ysp7h r-4wgw6l r-ymttw5 r-1loqt21 r-o7ynqc r-6416eg r-1ny4l3l");
    var showNsfwDiv_2 = document.getElementsByClassName("css-1rynq56 r-bcqeeo r-qvutc0 r-37j5jr r-a023e6 r-rjixqe r-16dba41 r-1loqt21");

    for(var i=0;i<showNsfwDiv.length;i++){
        var attr_role_1 = showNsfwDiv[i].getAttribute("role");
        var attr_tableindex_1 = showNsfwDiv[i].getAttribute("tabindex");
        if(attr_role_1 == "button" & attr_tableindex_1 == "0"){
           showNsfwDivClick(showNsfwDiv[i]);
        }
    }
    for(i=0;i<showNsfwDiv_2.length;i++){
        var attr_role_2 = showNsfwDiv_2[i].getAttribute("role");
        var attr_dir = showNsfwDiv_2[i].getAttribute("dir");
        var attr_tableindex_2 = showNsfwDiv_2[i].getAttribute("tabindex");
        if(attr_role_2 == "button" & attr_dir == "ltr" & attr_tableindex_2 == "0"){
           showNsfwDivClick(showNsfwDiv_2[i]);
        }
    }
}, 100);