From 5b1aab5e0c6239547b02bbfcde9107e0885299fa Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Sat, 17 Jun 2023 00:40:05 -0600 Subject: [PATCH] time how long it takes to add the alert (negligible) + readme --- README.md | 2 ++ plugins/style/style.c | 2 +- plugins/style/style.h | 2 +- plugins/style/style.js | 4 ++-- rose | Bin 47896 -> 47896 bytes 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 171a89e..b600ef6 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,8 @@ I just found out that you can inspect a GTK application with the GTK explorer if #### Quality of life: - [ ] Add css for js alerts + - [x] Add custom alert whose css can be customized + - [ ] Debug problems, e.g., this version is non-blocking. - [ ] Figure out better way to have plugins - [ ] Double check newtab/next-tab behavior - [ ] Document creating new applications, e.g., as in [Asana for Linux](https://git.nunosempere.com/NunoSempere/asana-for-linux) diff --git a/plugins/style/style.c b/plugins/style/style.c index 7f0d3e4..97e5bf9 100644 --- a/plugins/style/style.c +++ b/plugins/style/style.c @@ -1,7 +1,7 @@ #include #include #include -#define STYLE_N 3858 + 1 +#define STYLE_N 3943 + 1 void read_style_js(char* string) { diff --git a/plugins/style/style.h b/plugins/style/style.h index 3a2cdc9..5238b47 100644 --- a/plugins/style/style.h +++ b/plugins/style/style.h @@ -1,7 +1,7 @@ #ifndef STYLE #define STYLE -#define STYLE_N 3858 + 1 +#define STYLE_N 3943 + 1 void read_style_js(char* string); diff --git a/plugins/style/style.js b/plugins/style/style.js index 4f917ad..876c345 100644 --- a/plugins/style/style.js +++ b/plugins/style/style.js @@ -127,7 +127,7 @@ window.alert = (message) => { document.getElementById('alertMessage').textContent = message; alertDiv.classList.add('visible'); } +// ^ takes 0.014ms to run, so performance is not the concern here. +// timed with console.time, console.timeEnd - -// alert("Hello world!") document.body.style.visibility = "visible" diff --git a/rose b/rose index 2a416716bbcf567806e7b1501b69055809510814..c29fd48141346f157d2b7e34d9a5fedd85496054 100755 GIT binary patch delta 55 zcmbR7jcLX=rVSa)B7MhB8S}g^zw=C?f%m}{x6ZzhnVg$zn1lQoGbf)9dcl~vc}MUT L79f=yu{sF=)YKUf delta 55 zcmbR7jcLX=rVSa)A_rm;@9`YEW1)DdOib%#$?7*IdYzkVn1lQoMJAsQdci2Nc}MUT L79f=yu{sF=w=NgH