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:
@@ -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
|
||||
|
Reference in New Issue
Block a user