aboutsummaryrefslogtreecommitdiff
path: root/plugins/style/style.js
diff options
context:
space:
mode:
authorNunoSempere <nuno.sempere@protonmail.com>2023-11-09 10:13:11 +0000
committerNunoSempere <nuno.sempere@protonmail.com>2023-11-09 10:13:11 +0000
commit7e23aad95fda2732dd8777207cb213705bbbac9e (patch)
treee5583c5899f6d9794abc1a97b89c3c27d5b596a5 /plugins/style/style.js
parent0ba87b8cdc62d89e6ac10273dd43617ea80f062a (diff)
tweak: savepoint
Diffstat (limited to 'plugins/style/style.js')
-rw-r--r--plugins/style/style.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/style/style.js b/plugins/style/style.js
index 4c17f17..9457a7b 100644
--- a/plugins/style/style.js
+++ b/plugins/style/style.js
@@ -95,13 +95,10 @@ if (document.domain == "twitter.com") {
.querySelectorAll('[data-testid="videoPlayer"]')
.forEach(function (videoPlayer) {
var grandparentElement = videoPlayer.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
- // grandparentElement.style.display = "none";
- grandparentElement.innerHtml = "none";
- // Make sure not to replace the content if it's already been replaced
- if (grandparentElement.getAttribute('data-content-replaced') !== 'true') {
- grandparentElement.textContent = ' [twitter video]';
- grandparentElement.setAttribute('data-content-replaced', 'true');
- }
+ var newTextElement = document.createElement('div');
+ newTextElement.textContent = '[twitter video]';
+ newTextElement.style.borderWidth = '0px !important';
+ grandparentElement.replaceWith(newTextElement);
});
}