Remove HAVE_JSCORE so javascripts work again
This commit is contained in:
parent
42f9a72360
commit
9f4976b168
2 changed files with 0 additions and 14 deletions
|
@ -1335,7 +1335,6 @@ midori_load_session (gpointer data)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_JSCORE
|
|
||||||
static gint
|
static gint
|
||||||
midori_run_script (const gchar* filename)
|
midori_run_script (const gchar* filename)
|
||||||
{
|
{
|
||||||
|
@ -1373,7 +1372,6 @@ midori_run_script (const gchar* filename)
|
||||||
g_print ("%s - Exception: %s\n", filename, exception);
|
g_print ("%s - Exception: %s\n", filename, exception);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if WEBKIT_CHECK_VERSION (1, 1, 6)
|
#if WEBKIT_CHECK_VERSION (1, 1, 6)
|
||||||
static void
|
static void
|
||||||
|
@ -1435,10 +1433,8 @@ main (int argc,
|
||||||
N_("Run ADDRESS as a web application"), N_("ADDRESS") },
|
N_("Run ADDRESS as a web application"), N_("ADDRESS") },
|
||||||
{ "config", 'c', 0, G_OPTION_ARG_FILENAME, &config,
|
{ "config", 'c', 0, G_OPTION_ARG_FILENAME, &config,
|
||||||
N_("Use FOLDER as configuration folder"), N_("FOLDER") },
|
N_("Use FOLDER as configuration folder"), N_("FOLDER") },
|
||||||
#ifdef HAVE_JSCORE
|
|
||||||
{ "run", 'r', 0, G_OPTION_ARG_NONE, &run,
|
{ "run", 'r', 0, G_OPTION_ARG_NONE, &run,
|
||||||
N_("Run the specified filename as javascript"), NULL },
|
N_("Run the specified filename as javascript"), NULL },
|
||||||
#endif
|
|
||||||
#if WEBKIT_CHECK_VERSION (1, 1, 6)
|
#if WEBKIT_CHECK_VERSION (1, 1, 6)
|
||||||
{ "snapshot", 's', 0, G_OPTION_ARG_STRING, &snapshot,
|
{ "snapshot", 's', 0, G_OPTION_ARG_STRING, &snapshot,
|
||||||
N_("Take a snapshot of the specified URI"), NULL },
|
N_("Take a snapshot of the specified URI"), NULL },
|
||||||
|
@ -1589,11 +1585,9 @@ main (int argc,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_JSCORE
|
|
||||||
/* Standalone javascript support */
|
/* Standalone javascript support */
|
||||||
if (run)
|
if (run)
|
||||||
return midori_run_script (uris ? *uris : NULL);
|
return midori_run_script (uris ? *uris : NULL);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_HILDON
|
#if HAVE_HILDON
|
||||||
osso_context = osso_initialize (PACKAGE_NAME, PACKAGE_VERSION, FALSE, NULL);
|
osso_context = osso_initialize (PACKAGE_NAME, PACKAGE_VERSION, FALSE, NULL);
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include <idna.h>
|
#include <idna.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_JSCORE
|
|
||||||
static gchar*
|
static gchar*
|
||||||
sokoke_js_string_utf8 (JSStringRef js_string)
|
sokoke_js_string_utf8 (JSStringRef js_string)
|
||||||
{
|
{
|
||||||
|
@ -50,22 +49,18 @@ sokoke_js_string_utf8 (JSStringRef js_string)
|
||||||
JSStringGetUTF8CString (js_string, string_utf8, size_utf8);
|
JSStringGetUTF8CString (js_string, string_utf8, size_utf8);
|
||||||
return string_utf8;
|
return string_utf8;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
gchar*
|
gchar*
|
||||||
sokoke_js_script_eval (JSContextRef js_context,
|
sokoke_js_script_eval (JSContextRef js_context,
|
||||||
const gchar* script,
|
const gchar* script,
|
||||||
gchar** exception)
|
gchar** exception)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_JSCORE
|
|
||||||
gchar* value;
|
gchar* value;
|
||||||
JSStringRef js_value_string;
|
JSStringRef js_value_string;
|
||||||
#endif
|
|
||||||
|
|
||||||
g_return_val_if_fail (js_context, FALSE);
|
g_return_val_if_fail (js_context, FALSE);
|
||||||
g_return_val_if_fail (script, FALSE);
|
g_return_val_if_fail (script, FALSE);
|
||||||
|
|
||||||
#ifdef HAVE_JSCORE
|
|
||||||
JSStringRef js_script = JSStringCreateWithUTF8CString (script);
|
JSStringRef js_script = JSStringCreateWithUTF8CString (script);
|
||||||
JSValueRef js_exception = NULL;
|
JSValueRef js_exception = NULL;
|
||||||
JSValueRef js_value = JSEvaluateScript (js_context, js_script,
|
JSValueRef js_value = JSEvaluateScript (js_context, js_script,
|
||||||
|
@ -84,9 +79,6 @@ sokoke_js_script_eval (JSContextRef js_context,
|
||||||
value = sokoke_js_string_utf8 (js_value_string);
|
value = sokoke_js_string_utf8 (js_value_string);
|
||||||
JSStringRelease (js_value_string);
|
JSStringRelease (js_value_string);
|
||||||
return value;
|
return value;
|
||||||
#else
|
|
||||||
return g_strdup ("");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue