try event listener (didn't work)

This commit is contained in:
NunoSempere 2023-11-08 23:18:10 +00:00
parent 09c9c50406
commit 152445c6d7
4 changed files with 17 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define STYLE_N 4709 + 100
#define STYLE_N 5436 + 100
void read_style_js(char* string)
{

View File

@ -1,7 +1,7 @@
#ifndef STYLE
#define STYLE
#define STYLE_N 4709 + 100
#define STYLE_N 5436 + 100
void read_style_js(char* string);

View File

@ -82,12 +82,26 @@ if (document.domain == "twitter.com") {
/* hide video */
[data-testid^="videoPlayer"] {
display: none;
display: none !important;
}
[data-testid^="videoPlayer"]:before {
content: '[twitter video]';
}
`;
document.addEventListener('DOMContentLoaded', function() {
// Select all the videoPlayer elements
var videoPlayers = document.querySelectorAll('[data-testid="videoPlayer"]');
// Loop through the NodeList
videoPlayers.forEach(function(videoPlayer) {
// Traverse two levels up the DOM tree
var grandparentElement = videoPlayer.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
// Hide the grandparent element
grandparentElement.style.display = 'none';
});
});
}
if (document.domain == "reddit.com" || document.domain == "old.reddit.com") {

BIN
rose

Binary file not shown.