projects
/
vimb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
798aa1b
)
Don't warn about missing scripts file.
author
Daniel Carl
<danielcarl@gmx.de>
Fri, 21 Apr 2017 21:16:46 +0000
(23:16 +0200)
committer
Daniel Carl
<danielcarl@gmx.de>
Fri, 21 Apr 2017 21:18:08 +0000
(23:18 +0200)
It's not required that the user has a scripts file. So don't attempt to
inject it if it is not present.
src/setting.c
patch
|
blob
|
history
diff --git
a/src/setting.c
b/src/setting.c
index
6e1fcde
..
f0752e8
100644
(file)
--- a/
src/setting.c
+++ b/
src/setting.c
@@
-593,7
+593,9
@@
static int user_scripts(Client *c, const char *name, DataType type, void *value,
ucm = webkit_web_view_get_user_content_manager(c->webview);
if (enabled) {
- if (g_file_get_contents(vb.files[FILES_SCRIPT], &source, NULL, NULL)) {
+ if (vb.files[FILES_SCRIPT]
+ && g_file_get_contents(vb.files[FILES_SCRIPT], &source, NULL, NULL)) {
+
script = webkit_user_script_new(
source, WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES,
WEBKIT_USER_SCRIPT_INJECT_AT_DOCUMENT_END, NULL, NULL