Compare commits

..

9 Commits

7 changed files with 42 additions and 19 deletions

View File

@ -19,7 +19,7 @@
#define WIDTH 1920 // 960 for half-width, 1920 for full width #define WIDTH 1920 // 960 for half-width, 1920 for full width
#define HEIGHT 1080 #define HEIGHT 1080
#define SEARCH_BAR_SIZE 500 #define SEARCH_BAR_SIZE 1000
#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 */

View File

@ -5,5 +5,5 @@ sed_wrapper()
} ## e.g., sedr "s/target/replacement/g" } ## e.g., sedr "s/target/replacement/g"
STYLE_N=`wc -c style.js | cut -d " " -f 1` 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"

View File

@ -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 6657 + 100 #define STYLE_N 7127 + 1000
void read_style_js(char* string) void read_style_js(char* string)
{ {

View File

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

View File

@ -89,6 +89,16 @@ if (document.domain == "twitter.com") {
min-width: 900px; min-width: 900px;
max-width: 900px; max-width: 900px;
} }
[data-testid^="cellInnerDiv"] {
min-width: 700px;
max-width: 700px;
}
[aria-label^="Timeline: Conversation"]{
margin-left: 145px;
}
[data-testid^="DMDrawer"]{
display: none;
}
/* Delete a few unused or annoying elements */ /* Delete a few unused or annoying elements */
[aria-label^="Verified Orgs"] { [aria-label^="Verified Orgs"] {
@ -106,24 +116,27 @@ if (document.domain == "twitter.com") {
[role^="progressbar"]{ [role^="progressbar"]{
display: none; display: none;
} }
.r-1h8ys4a {
display: none;
}
.r-ymttw5 {
display: none;
}
/* hide video */ /* hide video */
[data-testid^="videoPlayer"] { [data-testid^="videoPlayer"] {
display: none !important; display: none !important;
} }
[data-testid^="videoPlayer"]:before {
content: '<br>[twitter video]'; /* No change of colors in hover */
margin: 5px; *:hover {
border: 10px; background-color: inherit !important;
transition: none !important;
} }
/* Hide go to top button */
[aria-label^="New posts are available. Push the period key to go to the them."]{
display: none;
}
/* No transparency at the top */
[aria-live^="polite"]{
background: white !important;
}
`; `;
// Function to hide the grandparent of video players // Function to hide the grandparent of video players
@ -134,7 +147,9 @@ if (document.domain == "twitter.com") {
var grandparentElement = videoPlayer.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; var grandparentElement = videoPlayer.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
var newTextElement = document.createElement('div'); var newTextElement = document.createElement('div');
newTextElement.textContent = ' [ twitter video ] '; 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); grandparentElement.replaceWith(newTextElement);
}); });
} }

BIN
rose

Binary file not shown.

12
rose.c
View File

@ -412,9 +412,17 @@ int keypress(void* self, GdkEvent* e, GtkNotebook* notebook)
(void)self; (void)self;
for (int i = 0; i < sizeof(keys) / sizeof(keys[0]); i++) for (int i = 0; i < sizeof(keys) / sizeof(keys[0]); i++)
if (e->key.keyval == keys[i].key && e->key.state == keys[i].mod) if ((e->key.state == keys[i].mod || keys[i].mod == 0x0) && e->key.keyval == keys[i].key)
return handle_key(keys[i].id, notebook); return handle_key(keys[i].id, notebook);
/*
printf("Event type: %d\n", e->type);
printf("Keyval: %d\n", e->key.keyval);
// Note: if I wanted to bind button presses, like the extra button in the mouse,
// I would have to bind the button-press-event signal instead.
// Some links in case I go down that road: <https://docs.gtk.org/gtk3/signal.Widget.button-press-event.html>
// https://docs.gtk.org/gdk3/union.Event.html
// https://docs.gtk.org/gdk3/struct.EventButton.html
*/
return 0; return 0;
} }