From 6a3581b7e0928a0df7b5bd8ec850f12101509b23 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Mon, 20 Nov 2023 10:54:40 +0000 Subject: tweak: more twitter tweaks --- plugins/style/recompute_STYLE_N.sh | 2 +- plugins/style/style.c | 2 +- plugins/style/style.h | 2 +- plugins/style/style.js | 18 ++++++++++-------- 4 files changed, 13 insertions(+), 11 deletions(-) (limited to 'plugins') diff --git a/plugins/style/recompute_STYLE_N.sh b/plugins/style/recompute_STYLE_N.sh index 9202894..3e0f30a 100755 --- a/plugins/style/recompute_STYLE_N.sh +++ b/plugins/style/recompute_STYLE_N.sh @@ -5,5 +5,5 @@ sed_wrapper() } ## e.g., sedr "s/target/replacement/g" STYLE_N=`wc -c style.js | cut -d " " -f 1` -sed_wrapper "s/^#define STYLE_N .*/#define STYLE_N $STYLE_N + 100/g" +sed_wrapper "s/^#define STYLE_N .*/#define STYLE_N $STYLE_N + 1000/g" diff --git a/plugins/style/style.c b/plugins/style/style.c index 650c735..147cd11 100644 --- a/plugins/style/style.c +++ b/plugins/style/style.c @@ -1,7 +1,7 @@ #include #include #include -#define STYLE_N 6657 + 100 +#define STYLE_N 6765 + 100 void read_style_js(char* string) { diff --git a/plugins/style/style.h b/plugins/style/style.h index a0bb3b8..0a3978d 100644 --- a/plugins/style/style.h +++ b/plugins/style/style.h @@ -1,7 +1,7 @@ #ifndef STYLE #define STYLE -#define STYLE_N 6657 + 100 +#define STYLE_N 6765 + 100 void read_style_js(char* string); diff --git a/plugins/style/style.js b/plugins/style/style.js index e8c585d..4b42fe3 100644 --- a/plugins/style/style.js +++ b/plugins/style/style.js @@ -89,6 +89,13 @@ if (document.domain == "twitter.com") { min-width: 900px; max-width: 900px; } + [data-testid^="cellInnerDiv"] { + min-width: 700px; + max-width: 700px; + } + [aria-label^="Timeline: Conversation"]{ + margin-left: 145px; + } /* Delete a few unused or annoying elements */ [aria-label^="Verified Orgs"] { @@ -110,19 +117,12 @@ if (document.domain == "twitter.com") { display: none; } - .r-ymttw5 { - display: none; - } - /* hide video */ - [data-testid^="videoPlayer"] { display: none !important; } [data-testid^="videoPlayer"]:before { content: '
[twitter video]'; - margin: 5px; - border: 10px; } `; @@ -134,7 +134,9 @@ if (document.domain == "twitter.com") { var grandparentElement = videoPlayer.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; var newTextElement = document.createElement('div'); newTextElement.textContent = ' [ twitter video ] '; - newTextElement.style["margin"] = "10px"; + newTextElement.style["margin-top"] = "10px"; + newTextElement.style["margin-left"] = "10px"; + newTextElement.style["margin-bottom"] = "10px"; grandparentElement.replaceWith(newTextElement); }); } -- cgit v1.2.3