Compare commits
No commits in common. "7e23aad95fda2732dd8777207cb213705bbbac9e" and "4d94d2d2e6aa43cb478748aa093c9054de67914a" have entirely different histories.
7e23aad95f
...
4d94d2d2e6
4
config.h
4
config.h
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#define GTK "gtk-application-prefer-dark-theme", false, "gtk-enable-animations", false
|
#define GTK "gtk-application-prefer-dark-theme", false, "gtk-enable-animations", false
|
||||||
#define ROSE_HOMEPAGE false
|
#define ROSE_HOMEPAGE false
|
||||||
#define SEARCH "https://lite.duckduckgo.com/html/?q=%s" // "https://search.nunosempere.com/search?q=%s"
|
#define SEARCH "https://search.nunosempere.com/search?q=%s" // "https://lite.duckduckgo.com/html/?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 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"
|
#define CACHE_DIR "/home/loki/.cache/rose"
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
#define HEIGHT 1080
|
#define HEIGHT 1080
|
||||||
#define SEARCH_BAR_SIZE 1200
|
#define SEARCH_BAR_SIZE 1200
|
||||||
#define KEY(x) GDK_KEY_##x
|
#define KEY(x) GDK_KEY_##x
|
||||||
#define ZOOM 1.6 /* Starting zoom level.*/
|
#define ZOOM 1.6 /* Starting zoom level.*/
|
||||||
#define ZOOM_VAL .1 /* Zooming value in zoomin/zoomout functions */
|
#define ZOOM_VAL .1 /* Zooming value in zoomin/zoomout functions */
|
||||||
#define BG_COLOR "#FEFEFE" /* "FEFEFE", "#1E1E2E" */
|
#define BG_COLOR "#FEFEFE" /* "FEFEFE", "#1E1E2E" */
|
||||||
#define DEBUG false
|
#define DEBUG false
|
||||||
|
|
|
@ -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 6073 + 100
|
#define STYLE_N 4709 + 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 6073 + 100
|
#define STYLE_N 4709 + 100
|
||||||
|
|
||||||
void read_style_js(char* string);
|
void read_style_js(char* string);
|
||||||
|
|
||||||
|
|
|
@ -78,47 +78,7 @@ if (document.domain == "twitter.com") {
|
||||||
[data-testid^="sidebarColumn"] {
|
[data-testid^="sidebarColumn"] {
|
||||||
display: none;
|
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") {
|
if (document.domain == "reddit.com" || document.domain == "old.reddit.com") {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user