summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-01-05 15:43:40 +0100
committerAndrea Diamantini <adjam7@gmail.com>2010-01-05 15:43:40 +0100
commitebccb5437807bbc08f25cb8352669e8ac10ba6ba (patch)
tree5616c6409fda98abeee362abff2cfda91f5e664f
parentChoose new tab start page (diff)
downloadrekonq-ebccb5437807bbc08f25cb8352669e8ac10ba6ba.tar.xz
javascript scheme support
-rw-r--r--src/protocolhandler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index 5b400582..602ac016 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -85,6 +85,14 @@ bool ProtocolHandler::handle(const QNetworkRequest &request, QWebFrame *frame)
if( _url.protocol() == QLatin1String("http") || _url.protocol() == QLatin1String("https") )
return false;
+ // javascript handling
+ if( _url.protocol() == QLatin1String("javascript") )
+ {
+ QString scriptSource = _url.authority();
+ QVariant result = frame->evaluateJavaScript(scriptSource);
+ return true;
+ }
+
// "mailto" handling
if ( _url.protocol() == QLatin1String("mailto") )
{