1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -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:
Miciah Dashiel Butler Masters 2005-12-28 07:12:09 +00:00 committed by Miciah Dashiel Butler Masters
parent 76d9b9de91
commit 81be17108b

View File

@ -34,8 +34,8 @@ script_hook_goto_url(va_list ap, void *data)
if (JS_TRUE == smjs_invoke_elinks_object_method("goto_url_hook", if (JS_TRUE == smjs_invoke_elinks_object_method("goto_url_hook",
args, 1, &rval)) { args, 1, &rval)) {
if (JSVAL_IS_BOOLEAN(rval) if (JSVAL_IS_BOOLEAN(rval)) {
&& JS_FALSE == JSVAL_TO_BOOLEAN(rval)) { if (JS_FALSE == JSVAL_TO_BOOLEAN(rval))
ret = EVENT_HOOK_STATUS_LAST; ret = EVENT_HOOK_STATUS_LAST;
} else { } else {
JSString *jsstr = JS_ValueToString(smjs_ctx, rval); JSString *jsstr = JS_ValueToString(smjs_ctx, rval);
@ -66,8 +66,8 @@ script_hook_follow_url(va_list ap, void *data)
if (JS_TRUE == smjs_invoke_elinks_object_method("follow_url_hook", if (JS_TRUE == smjs_invoke_elinks_object_method("follow_url_hook",
args, 1, &rval)) { args, 1, &rval)) {
if (JSVAL_IS_BOOLEAN(rval) if (JSVAL_IS_BOOLEAN(rval)) {
&& JS_FALSE == JSVAL_TO_BOOLEAN(rval)) { if (JS_FALSE == JSVAL_TO_BOOLEAN(rval))
ret = EVENT_HOOK_STATUS_LAST; ret = EVENT_HOOK_STATUS_LAST;
} else { } else {
JSString *jsstr = JS_ValueToString(smjs_ctx, rval); JSString *jsstr = JS_ValueToString(smjs_ctx, rval);