Signals for khtmlpart and weird javascript

Riccardo Pelizzi r.pelizzi at gmail.com
Wed Sep 10 00:45:53 BST 2008


Hi,

i'm using kwebdesktop to make screenshot of urls but some of the urls
are spam urls which implement obfuscated redirection techniques.
Kwebdesktop by itself has a nice 'htmlPart->setJScriptEnabled(false)'
hardcoded which makes it impossible to follow any redirection. I tried
by patching the kwebdesktop binary to execute
'setJScriptEnabled(true)' (just because i was too lazy to set up a kde
dev environment :D). That worked for simple javascripts, but the spam
page screenshot is still the blank page before the redirection. I
haven't confirmed this, but my hypothesis is that the signal
'completed()' is sent before the whole js evaluation and redirection
is made, and the app has a slot connected to it which saves the image
and quits.
Is there any way to understand which 'completed()' signal is, let's
say, 'definitive'? It doesn't have to be a binary patch, i can setup
the environment :-)

Thanks
Riccardo




More information about the kfm-devel mailing list