bypass sensitive tweets

This commit is contained in:
shibao 2022-01-20 18:32:45 -05:00
parent e6231f6ace
commit 643faa0097
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
# Bypass Twitter Sensitive # Bypass Twitter Sensitive
This userscript bypasses Twitter's "Caution: This profile may include This userscript bypasses Twitter's "Caution: This profile may include
potentially sensitive content" screen. potentially sensitive content" screen for profiles and "The following media
includes potentially sensitive content" warnings for tweets. Use with caution!
## Installation ## Installation
First, install Violentmonkey for First, install Violentmonkey for

View File

@ -1,8 +1,8 @@
// ==UserScript== // ==UserScript==
// @name Bypass Twitter Sensitive // @name Bypass Twitter Sensitive
// @namespace https://bubbletea.dev/ // @namespace https://bubbletea.dev/
// @version 1.0 // @version 2.0
// @description Bypasses Twitter's "Caution: This profile may include potentially sensitive content" page // @description Bypasses Twitter's "Caution: This profile may include potentially sensitive content" page and "The following media includes potentially sensitive content" warnings.
// @author shibao // @author shibao
// @include https://twitter.com* // @include https://twitter.com*
// @downloadURL https://gitea.bubbletea.dev/shibao/bypass-twitter-sensitive/raw/branch/stable/bypass-twitter-sensitive.user.js // @downloadURL https://gitea.bubbletea.dev/shibao/bypass-twitter-sensitive/raw/branch/stable/bypass-twitter-sensitive.user.js
@ -42,7 +42,7 @@ function eachNode(rootNode, callback) {
for (const addedNode of mutation.addedNodes) { for (const addedNode of mutation.addedNodes) {
// recurses through all child nodes as well // recurses through all child nodes as well
eachNode(addedNode, function (node) { eachNode(addedNode, function (node) {
if (node.nodeName == 'SPAN' && node.innerHTML == 'Yes, view profile') { if (node.nodeName == 'SPAN' && (node.innerHTML == 'Yes, view profile' || node.innerHTML == 'View')) {
const viewProfileBtn = node.closest("div[role='button']"); const viewProfileBtn = node.closest("div[role='button']");
if (viewProfileBtn) { viewProfileBtn.click(); } if (viewProfileBtn) { viewProfileBtn.click(); }
} }