try event listener (didn't work)
This commit is contained in:
parent
09c9c50406
commit
152445c6d7
|
@ -1,7 +1,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#define STYLE_N 4709 + 100
|
#define STYLE_N 5436 + 100
|
||||||
|
|
||||||
void read_style_js(char* string)
|
void read_style_js(char* string)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef STYLE
|
#ifndef STYLE
|
||||||
#define STYLE
|
#define STYLE
|
||||||
|
|
||||||
#define STYLE_N 4709 + 100
|
#define STYLE_N 5436 + 100
|
||||||
|
|
||||||
void read_style_js(char* string);
|
void read_style_js(char* string);
|
||||||
|
|
||||||
|
|
|
@ -82,12 +82,26 @@ if (document.domain == "twitter.com") {
|
||||||
/* hide video */
|
/* hide video */
|
||||||
|
|
||||||
[data-testid^="videoPlayer"] {
|
[data-testid^="videoPlayer"] {
|
||||||
display: none;
|
display: none !important;
|
||||||
}
|
}
|
||||||
[data-testid^="videoPlayer"]:before {
|
[data-testid^="videoPlayer"]:before {
|
||||||
content: '[twitter video]';
|
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") {
|
if (document.domain == "reddit.com" || document.domain == "old.reddit.com") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user