From 643faa0097d4dd2490df6cf3a39983271751c4cc Mon Sep 17 00:00:00 2001 From: shibao Date: Thu, 20 Jan 2022 18:32:45 -0500 Subject: [PATCH] bypass sensitive tweets --- README.md | 3 ++- bypass-twitter-sensitive.user.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b2eb952..a8eb9eb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Bypass Twitter Sensitive 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 First, install Violentmonkey for diff --git a/bypass-twitter-sensitive.user.js b/bypass-twitter-sensitive.user.js index d911ada..5254279 100644 --- a/bypass-twitter-sensitive.user.js +++ b/bypass-twitter-sensitive.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name Bypass Twitter Sensitive // @namespace https://bubbletea.dev/ -// @version 1.0 -// @description Bypasses Twitter's "Caution: This profile may include potentially sensitive content" page +// @version 2.0 +// @description Bypasses Twitter's "Caution: This profile may include potentially sensitive content" page and "The following media includes potentially sensitive content" warnings. // @author shibao // @include https://twitter.com* // @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) { // recurses through all child nodes as well 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']"); if (viewProfileBtn) { viewProfileBtn.click(); } }