import QtQuick 2.0
import com.canonical.Oxide 1.0 as Oxide
Oxide.WebView {
id: webview
Component.onCompleted: {
url = "http://daker.me"
}
function navigationRequestedDelegate(request) {
console.log(request);
var url = request.url.toString()
/*if (url == "http://daker.me/2014/08/everything-you-need-to-know-about-html5-video.html") {
request.action = Oxide.NavigationRequest.ActionReject
Qt.openUrlExternally(url)
return
}*/
console.log('Link Traped');
request.action = Oxide.NavigationRequest.ActionReject
Qt.openUrlExternally(url)
return
}
onNavigationRequested: navigationRequestedDelegate(request)
}