The field separator is "|||" */
const gchar* script = "function dumpForm (inputs) {"
" var out = '';"
- " for (i=0;i<inputs.length;i++) {"
+ " for (var i = 0; i < inputs.length; i++) {"
" if (inputs[i].getAttribute('autocomplete') == 'off' && "
" inputs[i].type == 'text')"
" continue;"
g_string_append_len (script, json_content, json_length);
g_string_append (script, "); "
"var keyfile = '';"
- "for (i in json['shortcuts']) {"
+ "for (var i in json['shortcuts']) {"
"var tile = json['shortcuts'][i];"
"keyfile += '[Dial ' + tile['id'].substring (1) + ']\\n'"
" + 'uri=' + tile['href'] + '\\n'"
JSContextRef js_context = webkit_web_frame_get_global_context (web_frame);
/* Icon: URI, News Feed: $URI|title */
gchar* value = sokoke_js_script_eval (js_context,
- "(function (l) { var f = new Array (); for (i in l) "
+ "(function (l) { var f = new Array (); for (var i in l) "
"{ var t = l[i].type; var r = l[i].rel; "
"if (t && (t.indexOf ('rss') != -1 || t.indexOf ('atom') != -1)) "
"f.push ('$' + l[i].href + '|' + l[i].title);"
" border:1px solid gray; padding:0 0.1em 0.2em 0.1em !important;"
" position:absolute; display:inline !important; }');"
" var label_count = 0;"
- " for (i in document.links) {"
+ " for (var i in document.links) {"
" if (document.links[i].href && document.links[i].insertBefore) {"
" var child = document.createElement ('span');"
" if (document.links[i].accessKey && isNaN (document.links[i].accessKey)) {"
JSContextRef js_context = webkit_web_frame_get_global_context (web_frame);
/* Joins available plugins like this: URI1|title1,URI2|title2 */
gchar* value = sokoke_js_script_eval (js_context,
- "function plugins (l) { var f = new Array (); for (i in l) "
+ "function plugins (l) { var f = new Array (); for (var i in l) "
"{ var p = l[i].name + '|' + l[i].filename; "
"if (f.indexOf (p) == -1) f.push (p); } return f; }"
"plugins (navigator.plugins)", NULL);