forked from cerc-io/plugeth
Fixed a few errors in the browser special meta tags objects
This commit is contained in:
parent
32c7ebc51d
commit
befb4bc1c1
@ -337,7 +337,7 @@ Rectangle {
|
||||
Timer {
|
||||
interval: 500; running: true; repeat: true
|
||||
onTriggered: {
|
||||
webview.runJavaScript("document.querySelector('meta[name=badge]').getAttribute('content')", function(badge) {
|
||||
webview.runJavaScript("try{document.querySelector('meta[name=badge]').getAttribute('content')}catch(e){}", function(badge) {
|
||||
if (badge) {
|
||||
menuItem.secondaryTitle = badge;
|
||||
}
|
||||
@ -351,11 +351,10 @@ Rectangle {
|
||||
menuItem.title = pageTitle;
|
||||
});
|
||||
|
||||
webView.runJavaScript("try{document.querySelector(\"meta[name='ethereum-dapp-url-bar-style']\").getAttribute(\"content\")}catch(e){}", function(topBarStyle){
|
||||
if (!topBarStyle) return;
|
||||
|
||||
//var topBarStyle
|
||||
webView.runJavaScript("document.querySelector(\"meta[name='ethereum-dapp-url-bar-style']\").getAttribute(\"content\")", function(topBarStyle){
|
||||
if (topBarStyle=="transparent") {
|
||||
|
||||
// Adjust for a transparent sidebar Dapp
|
||||
navBarBackground.visible = false;
|
||||
back.visible = false;
|
||||
@ -370,12 +369,9 @@ Rectangle {
|
||||
appInfoPane.anchors.leftMargin = 0;
|
||||
appInfoPaneShadow.anchors.leftMargin = 0;
|
||||
webview.anchors.topMargin = 0;
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
|
||||
webview.runJavaScript(eth.readFile("bignumber.min.js"));
|
||||
webview.runJavaScript(eth.readFile("ethereum.js/dist/ethereum.js"));
|
||||
|
||||
@ -383,7 +379,9 @@ Rectangle {
|
||||
var matches = cleanTitle.match(/^[a-z]*\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
|
||||
var domain = matches && matches[1];
|
||||
|
||||
if (domain)
|
||||
appDomain.text = domain //webview.url.replace("a", "z")
|
||||
if (webview.title)
|
||||
appTitle.text = webview.title
|
||||
|
||||
showFullUrlBar(false);
|
||||
|
Loading…
Reference in New Issue
Block a user