diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-01-05 15:43:40 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-01-05 15:43:40 +0100 |
commit | ebccb5437807bbc08f25cb8352669e8ac10ba6ba (patch) | |
tree | 5616c6409fda98abeee362abff2cfda91f5e664f /src/protocolhandler.cpp | |
parent | Choose new tab start page (diff) | |
download | rekonq-ebccb5437807bbc08f25cb8352669e8ac10ba6ba.tar.xz |
javascript scheme support
Diffstat (limited to 'src/protocolhandler.cpp')
-rw-r--r-- | src/protocolhandler.cpp | 8 |
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") ) { |