From 3bd14d8392a50580d44d04c6092b8cf2598baa0d Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Sun, 12 Feb 2006 21:05:35 +0000 Subject: [PATCH] SMJS: elinks.alert: drop the extra 'error' text Use info_box directly instead of via report_scripting_error by way of alert_smjs_error, thereby avoiding the addition of extra text saying that an error has occurred. --- src/scripting/smjs/elinks_object.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scripting/smjs/elinks_object.c b/src/scripting/smjs/elinks_object.c index b8f0a95ae..c0ecb6b9b 100644 --- a/src/scripting/smjs/elinks_object.c +++ b/src/scripting/smjs/elinks_object.c @@ -6,8 +6,10 @@ #include "elinks.h" +#include "bfu/msgbox.h" #include "config/home.h" #include "ecmascript/spidermonkey/util.h" +#include "intl/gettext/libintl.h" #include "protocol/uri.h" #include "scripting/scripting.h" #include "scripting/smjs/bookmarks.h" @@ -75,7 +77,8 @@ elinks_alert(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval if (!*string) return JS_TRUE; - alert_smjs_error(string); + info_box(smjs_ses->tab->term, MSGBOX_NO_TEXT_INTL, + N_("User script alert"), ALIGN_LEFT, string); undef_to_jsval(ctx, rval);