mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Understand a boolean true from elinks.goto_url_hook and
elinks.follow_url_hook to mean that the URI should be unchanged and that further hooks should be permitted to run.
This commit is contained in:
parent
76d9b9de91
commit
81be17108b
@ -34,9 +34,9 @@ script_hook_goto_url(va_list ap, void *data)
|
||||
|
||||
if (JS_TRUE == smjs_invoke_elinks_object_method("goto_url_hook",
|
||||
args, 1, &rval)) {
|
||||
if (JSVAL_IS_BOOLEAN(rval)
|
||||
&& JS_FALSE == JSVAL_TO_BOOLEAN(rval)) {
|
||||
ret = EVENT_HOOK_STATUS_LAST;
|
||||
if (JSVAL_IS_BOOLEAN(rval)) {
|
||||
if (JS_FALSE == JSVAL_TO_BOOLEAN(rval))
|
||||
ret = EVENT_HOOK_STATUS_LAST;
|
||||
} else {
|
||||
JSString *jsstr = JS_ValueToString(smjs_ctx, rval);
|
||||
unsigned char *str = JS_GetStringBytes(jsstr);
|
||||
@ -66,9 +66,9 @@ script_hook_follow_url(va_list ap, void *data)
|
||||
|
||||
if (JS_TRUE == smjs_invoke_elinks_object_method("follow_url_hook",
|
||||
args, 1, &rval)) {
|
||||
if (JSVAL_IS_BOOLEAN(rval)
|
||||
&& JS_FALSE == JSVAL_TO_BOOLEAN(rval)) {
|
||||
ret = EVENT_HOOK_STATUS_LAST;
|
||||
if (JSVAL_IS_BOOLEAN(rval)) {
|
||||
if (JS_FALSE == JSVAL_TO_BOOLEAN(rval))
|
||||
ret = EVENT_HOOK_STATUS_LAST;
|
||||
} else {
|
||||
JSString *jsstr = JS_ValueToString(smjs_ctx, rval);
|
||||
unsigned char *str = JS_GetStringBytes(jsstr);
|
||||
|
Loading…
Reference in New Issue
Block a user