From 84f7c966f725ef0f5c62b4427857d112c0d1e828 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 14 Feb 2015 00:25:47 +0100 Subject: Moved ECIES to repo & added secondary title for webview * ECIES moved from obscuren to ethereum * Added html META[name=badge] to reflect menuItem.secondaryTitle --- cmd/mist/assets/examples/info.html | 4 ++-- cmd/mist/assets/qml/views/browser.qml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'cmd/mist/assets') diff --git a/cmd/mist/assets/examples/info.html b/cmd/mist/assets/examples/info.html index daad8c706..d8816b19f 100644 --- a/cmd/mist/assets/examples/info.html +++ b/cmd/mist/assets/examples/info.html @@ -1,8 +1,8 @@ - + @@ -60,7 +60,7 @@ var web3 = require('web3'); var eth = web3.eth; - web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8080')); + web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8545')); document.querySelector("#number").innerHTML = eth.number; document.querySelector("#coinbase").innerHTML = eth.coinbase diff --git a/cmd/mist/assets/qml/views/browser.qml b/cmd/mist/assets/qml/views/browser.qml index 04b2229ec..3cbabf0b6 100644 --- a/cmd/mist/assets/qml/views/browser.qml +++ b/cmd/mist/assets/qml/views/browser.qml @@ -333,6 +333,17 @@ Rectangle { top: navBar.bottom } z: 10 + + Timer { + interval: 500; running: true; repeat: true + onTriggered: { + webview.runJavaScript("document.querySelector('meta[name=badge]').getAttribute('content')", function(badge) { + if (badge) { + menuItem.secondaryTitle = badge; + } + }); + } + } onLoadingChanged: { if (loadRequest.status == WebEngineView.LoadSucceededStatus) { @@ -340,6 +351,7 @@ Rectangle { menuItem.title = pageTitle; }); + //var topBarStyle webView.runJavaScript("document.querySelector(\"meta[name='ethereum-dapp-url-bar-style']\").getAttribute(\"content\")", function(topBarStyle){ if (topBarStyle=="transparent") { -- cgit v1.2.3