<div dir="ltr">Hi,<div><br></div><div>I've been scouring the web for a solution to this issue, but so far I've been unsuccessful. I want to completely disable the loading of third-party plugins like Java and Flash when using a WebKitGTK+ WebView. The project I'm trying to get this to work on is wkline: <a href="https://github.com/Lokaltog/wkline">https://github.com/Lokaltog/wkline</a><div>
<br></div><div>I suspect that some users may experience crashes due to malfunctioning third-party plugins. The project also aims to be as lightweight as possible (while still providing most of the functionality in WebKit), so disabling plugin loading completely is desirable as this functionality will never be used.</div>
<div><br></div><div>I'm using the following code to attempt to disable all plugins:</div><div><br></div><div><div> g_object_set(G_OBJECT(web_view_settings),</div><div>...</div><div> "enable-java-applet", FALSE,<br>
</div><div> "enable-plugins", FALSE,</div><div>...</div><div> NULL);<br></div><div><br></div><div> web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());</div><div> webkit_web_view_set_settings(web_view, web_view_settings);</div>
<div><br></div><div>The enable-java-applet and enable-plugins settings are the only ones I've found that are related to enabling and disabling plugins, but neither are successful in disabling plugin loading. This is shown in the stdout output when running my application:</div>
<div><br></div><div><div>[11:40:07] INFO wkline beta-git-351.0ddc716 (Apr 28 2014 08:19:49)</div><div>[11:40:07] INFO using config file '/home/kim/.config/wkline/config.json'</div><div>[11:40:07] INFO loading theme 'file:///home/kim/projects/wkline-theme-default/webroot/index.html'</div>
<div>[11:40:07] DEBUG webkit: window object cleared</div><div>java version "1.7.0_55"<br></div><div>OpenJDK Runtime Environment (IcedTea 2.4.7) (ArchLinux build 7.u55_2.4.7-1-x86_64)</div><div>OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)</div>
</div><div>...</div><div><br></div><div>As you can see, OpenJDK/IcedTea is being loaded by the web view regardless of the web view settings.</div><div><br></div><div>I've been looking through the docs, stack overflow, etc., but haven't been able to find another way of disabling plugin loading. Can anyone please clarify this issue, or possibly point me in the direction of a solution?</div>
<div><br></div><div>Thanks,</div><div><br></div>Kim Silkebækken
</div></div></div>