0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-09-21 19:46:23 -04:00

[ecmascript] Allow ecmascript scripts only for given urls prefixes.

In ~/.elinks/allowed_ecmascript_url_prefixes.txt you must enter list
of urls. For example:
file://
https://buildlogs.pld-linux.org/
http://example

If url of document starts with one of given prefixes, then given url is
allowed to execute ecmascript. Start from most often used first.
This commit is contained in:
Witold Filipczyk
2020-12-07 22:36:24 +01:00
parent 672c5fce52
commit f617256ecc
3 changed files with 85 additions and 5 deletions

View File

@@ -23,7 +23,6 @@ struct terminal;
struct uri;
struct view_state;
#define get_ecmascript_enable() get_opt_bool("ecmascript.enable", NULL)
struct ecmascript_interpreter {
struct view_state *vs;
@@ -108,6 +107,8 @@ void ecmascript_set_timeout(struct ecmascript_interpreter *interpreter, unsigned
void ecmascript_set_timeout2(struct ecmascript_interpreter *interpreter, JS::HandleValue f, int timeout);
int get_ecmascript_enable(struct ecmascript_interpreter *interpreter);
extern struct module ecmascript_module;
#endif