Re: [hackers] [surf] [PATCH] Introduce JavaScriptMarkup option (limit site JS w/o user JS)

2025-04-20 Thread Artyom Bologov
Quentin, >> > I think that's fine, as this was kind of happening before anyway, >> > and if we can remove that IPC between main and ext through >> > ugly glib, the better. >> >> Not sure I get this one. Why glib? > > Because of the need for integrating into the main gtk loop, > look at the whol

Re: [hackers] [surf] [PATCH] Introduce JavaScriptMarkup option (limit site JS w/o user JS)

2025-04-20 Thread Artyom Bologov
Quentin, >>> > I think that's fine, as this was kind of happening before anyway, >>> > and if we can remove that IPC between main and ext through >>> > ugly glib, the better. >>> >>> Not sure I get this one. Why glib? >> >> Because of the need for integrating into the main gtk loop, >> look at

Re: [hackers] [sbase] cp: add -i flag || Thibaut Aubin

2025-04-20 Thread Roberto E. Vargas Caballero
Hi, ` On Sun, Apr 20, 2025 at 07:47:49AM +, NRK wrote: > On Sun, Apr 20, 2025 at 09:22:10AM +0200, g...@suckless.org wrote: > > + if (!confirm("overwrite '%s'? ", s2)) { > > + cp_status = 1; > > I missed it when reviewing the fist time, but this, I'm pretty sure is

[hackers] [surf] [PATCH] Support user scripts and user styles.

2025-04-20 Thread Artyom Bologov
Hi y'all, The attached patch adds support for user styles and scripts, two WebKit APIs for URL-based style/script injection. Mostly just parsing and injection of those here, but also a new structure (UserContent) and a bug: When applying styles (old SiteSpecific ones, from styledir), current impl

Re: [hackers] [sbase][PATCH] cp: add -i flag

2025-04-20 Thread Roberto E. Vargas Caballero
On Sun, Apr 20, 2025 at 01:25:33AM +0200, THIBAUT AUBIN wrote: > Thank you Quentin for raising the POSIX issue. > > I corrected the code to address this, the behavior is now: > ^[yY] -> affirmative > ^[^yY] -> negative > e.g: cp -i: If the response from the standard input is affirmative, the > co

Re: [hackers] [sbase] cp: add -i flag || Thibaut Aubin

2025-04-20 Thread NRK
On Sun, Apr 20, 2025 at 09:22:10AM +0200, g...@suckless.org wrote: > + if (!confirm("overwrite '%s'? ", s2)) { > + cp_status = 1; I missed it when reviewing the fist time, but this, I'm pretty sure is not correct. According to POSIX: https://pubs.opengroup

[hackers] [surf] [PATCH] Introduce JavaScriptMarkup option (limit site JS w/o user JS)

2025-04-20 Thread Artyom Bologov
Hi y'all, This patch introduces JavaScriptMarkup option to make sites JS-clean without compromizing user/browser running JS for useful things. >From f2e4f6847698feda4eadcd30dd89c30af56a4d2d Mon Sep 17 00:00:00 2001 From: Artyom Bologov Date: Sun, 20 Apr 2025 17:54:34 +0400 Subject: [PATCH] Intro

Re: [hackers] [surf] [PATCH] Introduce JavaScriptMarkup option (limit site JS w/o user JS)

2025-04-20 Thread Quentin Rameau
Hey Artyom, > What does it do exactly? I couldn't find a precise description, > > https://webkitgtk.org/reference/webkit2gtk/2.36.5/WebKitSettings.html#WebKitSettings--enable-javascript-markup I had kind of the same question, but rather if you have more details about the execution limit/domain b

[hackers] [PATCH] Scroll window directly in surf, and not in webext.

2025-04-20 Thread Artyom Bologov
Hi y'all, This patch moves away from webext scrolling to Surf-internal JS to scroll. See patch for more involved description and downsides. >From 36711a5d4c7cd95d4157acba4f35ee2ac6e6a71e Mon Sep 17 00:00:00 2001 From: Artyom Bologov Date: Sun, 20 Apr 2025 17:48:44 +0400 Subject: [PATCH] Scroll w

Re: [hackers] [surf] [PATCH] Introduce JavaScriptMarkup option (limit site JS w/o user JS)

2025-04-20 Thread Hiltjo Posthuma
On Sun, Apr 20, 2025 at 06:02:05PM +0400, Artyom Bologov wrote: > Hi y'all, > > This patch introduces JavaScriptMarkup option to make sites JS-clean > without compromizing user/browser running JS for useful things. > > From f2e4f6847698feda4eadcd30dd89c30af56a4d2d Mon Sep 17 00:00:00 2001 > From

Re: [hackers] [surf] [PATCH] Introduce JavaScriptMarkup option (limit site JS w/o user JS)

2025-04-20 Thread Hiltjo Posthuma
On Sun, Apr 20, 2025 at 04:44:32PM +0200, Quentin Rameau wrote: > Hey Artyom, > > > What does it do exactly? I couldn't find a precise description, > > > > https://webkitgtk.org/reference/webkit2gtk/2.36.5/WebKitSettings.html#WebKitSettings--enable-javascript-markup > > I had kind of the same qu

Re: [hackers] [surf] [PATCH] Introduce JavaScriptMarkup option (limit site JS w/o user JS)

2025-04-20 Thread Artyom Bologov
Hi Hiltjo, > What does it do exactly? I couldn't find a precise description, So it purges the page from everything JS-related:

Re: [hackers] [surf] [PATCH] Introduce JavaScriptMarkup option (limit site JS w/o user JS)

2025-04-20 Thread Quentin Rameau
> tags (ugh, this one bites,) That sounds meh indeed. > > I think that's fine, as this was kind of happening before anyway, > > and if we can remove that IPC between main and ext through > > ugly glib, the better. > > Not sure I get this one. Why glib? Because of the need for integrating int

Re: [hackers] [sbase][PATCH] cp: add -i flag

2025-04-20 Thread Roberto E. Vargas Caballero
Hi, On Sat, Apr 19, 2025 at 11:25:15AM +, NRK wrote: > At a glance this looks okay, aside from what Quentin mentioned about > POSIX disallowing trimming leading chars. > > Also it seems like your mail client is messing up the indentation. It's > better to just attach the patch as a file. But