#include "main.h"
#include "map.h"
#include "normal.h"
-#include "scripts/scripts.h"
#include "setting.h"
#include "shortcut.h"
#include "util.h"
{
WebKitWebView *new;
WebKitUserContentManager *ucm;
- WebKitUserScript *script;
/* create a new webview */
if (webview) {
g_signal_connect(webkit_web_context_get_default(), "download-started", G_CALLBACK(on_webctx_download_started), c);
- /* Inject the global hints script. */
- script = webkit_user_script_new(HINTS,
- WEBKIT_USER_CONTENT_INJECT_TOP_FRAME,
- WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END, NULL, NULL);
- webkit_user_content_manager_add_script(ucm, script);
- webkit_user_script_unref(script);
-
/* Setup script message handlers. */
webkit_user_content_manager_register_script_message_handler(ucm, "focus");
g_signal_connect(ucm, "script-message-received::focus", G_CALLBACK(on_script_message_focus), c);
#include "ext-proxy.h"
#include "main.h"
#include "setting.h"
+#include "scripts/scripts.h"
#include "shortcut.h"
typedef enum {
webkit_user_content_manager_remove_all_scripts(ucm);
}
+ /* Inject the global hints script. */
+ script = webkit_user_script_new(HINTS,
+ WEBKIT_USER_CONTENT_INJECT_TOP_FRAME,
+ WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END, NULL, NULL);
+ webkit_user_content_manager_add_script(ucm, script);
+ webkit_user_script_unref(script);
+
return CMD_SUCCESS;
}