aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/assets/qml/views/catalog.qml
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mist/assets/qml/views/catalog.qml')
-rw-r--r--cmd/mist/assets/qml/views/catalog.qml28
1 files changed, 7 insertions, 21 deletions
diff --git a/cmd/mist/assets/qml/views/catalog.qml b/cmd/mist/assets/qml/views/catalog.qml
index a7832e9fa..18a835ad2 100644
--- a/cmd/mist/assets/qml/views/catalog.qml
+++ b/cmd/mist/assets/qml/views/catalog.qml
@@ -85,35 +85,21 @@ Rectangle {
property var domain: "ethereum-dapp-catalog.meteor.com"
url: protocol + domain
- //navigationRequest: WebEngineView.IgnoreRequest
- // onLoadingChanged: {
- // if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
- // webview.runJavaScript(eth.readFile("bignumber.min.js"));
- // webview.runJavaScript(eth.readFile("ethereum.js/dist/ethereum.js"));
- // }
- // }
-
- //onNavigationRequested: {
- // detect URL scheme prefix, most likely an external link
- //var schemaRE = /^\w+:/;
- //if (schemaRE.test(request.url)) {
- // request.action = WebView.AcceptRequest;
- //} else {
- //request.action = WebView.IgnoreRequest;
- // delegate request.url here
- //}
- //}
+
+
onJavaScriptConsoleMessage: {
console.log(sourceID + ":" + lineNumber + ":" + JSON.stringify(message));
}
- onNavigationRequested: {
+ onNavigationRequested: {
+ // this checks if the domain of the requested link is the same as the catalog's
+ // If it is, it opens on the same window, if it's not it opens a new tab
+
var cleanTitle = request.url.toString()
var matches = cleanTitle.match(/^[a-z]*\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
var requestedDomain = matches && matches[1];
- console.debug ("NavigationRequested: " + request.url + " navigationType=" + request.navigationType)
if(request.navigationType==0){
@@ -137,7 +123,7 @@ Rectangle {
anchors {
left: root.left
right: root.right
- top: sizeGrip.bottom
+ top: root.top
bottom: root.bottom
}