From: Peter Hofmann Date: Sat, 14 Mar 2020 10:36:34 +0000 (+0100) Subject: Move user scripts X-Git-Tag: v1.0.0~104 X-Git-Url: https://git.armaanb.net/?p=chorizo.git;a=commitdiff_plain;h=50c9da15380a4771eb18500238446001611097ad Move user scripts This is a more meaningful path. --- diff --git a/CHANGES b/CHANGES index 890ea44..8dabf2e 100644 --- a/CHANGES +++ b/CHANGES @@ -10,7 +10,7 @@ next [Added] - User-supplied JavaScript files can be put into - ~/.config/lariza/scripts. "hints.js" is one such script, it's + ~/.config/lariza/user-scripts. "hints.js" is one such script, it's bundled with the main application, but must be activated manually. v19.05 2019-05-05 diff --git a/browser.c b/browser.c index 120078b..11e34da 100644 --- a/browser.c +++ b/browser.c @@ -1131,7 +1131,7 @@ run_user_scripts(WebKitWebView *web_view) const gchar *entry = NULL; GDir *scriptdir = NULL; - base = g_build_filename(g_get_user_config_dir(), __NAME__, "scripts", NULL); + base = g_build_filename(g_get_user_config_dir(), __NAME__, "user-scripts", NULL); scriptdir = g_dir_open(base, 0, NULL); if (scriptdir != NULL) { diff --git a/man1/lariza.usage.1 b/man1/lariza.usage.1 index 5e34a20..5cb5ab1 100644 --- a/man1/lariza.usage.1 +++ b/man1/lariza.usage.1 @@ -126,9 +126,9 @@ Lines starting with \fB#\fP are ignored. .\" -------------------------------------------------------------------- .SH "USER-SUPPLIED JAVASCRIPT FILES" After a page has been successfully loaded, the directory -\fI~/.config\:/lariza\:/scripts\fP will be scanned and each file in it -ending with \fB.js\fP will be run as a JavaScript file in the context of -said page. +\fI~/.config\:/lariza\:/user-scripts\fP will be scanned and each file in +it ending with \fB.js\fP will be run as a JavaScript file in the context +of said page. .P During development, you will most likely want to run \fBlariza\fP with $\fBLARIZA_ENABLE_CONSOLE_TO_STDOUT\fP enabled.