Compare commits
5 Commits
4d94d2d2e6
...
7e23aad95f
Author | SHA1 | Date | |
---|---|---|---|
7e23aad95f | |||
0ba87b8cdc | |||
a7c1f8f57e | |||
152445c6d7 | |||
09c9c50406 |
2
config.h
2
config.h
|
@ -12,7 +12,7 @@
|
|||
|
||||
#define GTK "gtk-application-prefer-dark-theme", false, "gtk-enable-animations", false
|
||||
#define ROSE_HOMEPAGE false
|
||||
#define SEARCH "https://search.nunosempere.com/search?q=%s" // "https://lite.duckduckgo.com/html/?q=%s"
|
||||
#define SEARCH "https://lite.duckduckgo.com/html/?q=%s" // "https://search.nunosempere.com/search?q=%s"
|
||||
#define HOME ROSE_HOMEPAGE ? "file:///home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot/user-scripts/ubuntu-20.04/rose-images/rose-homepage.png" : "https://search.nunosempere.com/"
|
||||
// #define HOME ROSE_HOMEPAGE ? "file:///home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot/user-scripts/ubuntu-20.04/rose-images/rose-homepage.png" : "https://search.nunosempere.com/"
|
||||
#define CACHE_DIR "/home/loki/.cache/rose"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define STYLE_N 4709 + 100
|
||||
#define STYLE_N 6073 + 100
|
||||
|
||||
void read_style_js(char* string)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef STYLE
|
||||
#define STYLE
|
||||
|
||||
#define STYLE_N 4709 + 100
|
||||
#define STYLE_N 6073 + 100
|
||||
|
||||
void read_style_js(char* string);
|
||||
|
||||
|
|
|
@ -78,7 +78,47 @@ if (document.domain == "twitter.com") {
|
|||
[data-testid^="sidebarColumn"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* hide video */
|
||||
|
||||
[data-testid^="videoPlayer"] {
|
||||
display: none !important;
|
||||
}
|
||||
[data-testid^="videoPlayer"]:before {
|
||||
content: '[twitter video]';
|
||||
}
|
||||
`;
|
||||
|
||||
// Function to hide the grandparent of video players
|
||||
function hideVideoPlayerGrandparent() {
|
||||
document
|
||||
.querySelectorAll('[data-testid="videoPlayer"]')
|
||||
.forEach(function (videoPlayer) {
|
||||
var grandparentElement = videoPlayer.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
|
||||
var newTextElement = document.createElement('div');
|
||||
newTextElement.textContent = '[twitter video]';
|
||||
newTextElement.style.borderWidth = '0px !important';
|
||||
grandparentElement.replaceWith(newTextElement);
|
||||
});
|
||||
}
|
||||
|
||||
// Create a new MutationObserver instance
|
||||
var observer = new MutationObserver(function (mutations) {
|
||||
mutations.forEach(function (mutation) {
|
||||
if (mutation.addedNodes.length) {
|
||||
hideVideoPlayerGrandparent(); // Call the function to hide video players
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Options for the observer (which mutations to observe)
|
||||
var config = { childList: true, subtree: true };
|
||||
|
||||
// Start observing the target node for configured mutations
|
||||
observer.observe(document.body, config);
|
||||
|
||||
// Call the function initially to hide any video players on initial load
|
||||
hideVideoPlayerGrandparent();
|
||||
}
|
||||
|
||||
if (document.domain == "reddit.com" || document.domain == "old.reddit.com") {
|
||||
|
|
Loading…
Reference in New Issue
Block a user