Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
befb4bc1
Commit
befb4bc1
authored
Feb 14, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a few errors in the browser special meta tags objects
parent
32c7ebc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
30 deletions
+28
-30
browser.qml
cmd/mist/assets/qml/views/browser.qml
+28
-30
No files found.
cmd/mist/assets/qml/views/browser.qml
View file @
befb4bc1
...
...
@@ -334,16 +334,16 @@ Rectangle {
}
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
;
}
});
}
}
Timer
{
interval
:
500
;
running
:
true
;
repeat
:
true
onTriggered
:
{
webview
.
runJavaScript
(
"try{document.querySelector('meta[name=badge]').getAttribute('content')}catch(e){}
"
,
function
(
badge
)
{
if
(
badge
)
{
menuItem
.
secondaryTitle
=
badge
;
}
});
}
}
onLoadingChanged
:
{
if
(
loadRequest
.
status
==
WebEngineView
.
LoadSucceededStatus
)
{
...
...
@@ -351,31 +351,27 @@ 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
;
appInfoPane
.
anchors
.
leftMargin
=
-
16
;
appInfoPaneShadow
.
anchors
.
leftMargin
=
-
16
;
webview
.
anchors
.
topMargin
=
-
74
;
navBarBackground
.
visible
=
false
;
back
.
visible
=
false
;
appInfoPane
.
anchors
.
leftMargin
=
-
16
;
appInfoPaneShadow
.
anchors
.
leftMargin
=
-
16
;
webview
.
anchors
.
topMargin
=
-
74
;
webview
.
runJavaScript
(
"document.querySelector('body').classList.add('ethereum-dapp-url-bar-style-transparent')"
)
}
else
{
navBarBackground
.
visible
=
true
;
back
.
visible
=
true
;
appInfoPane
.
anchors
.
leftMargin
=
0
;
appInfoPaneShadow
.
anchors
.
leftMargin
=
0
;
webview
.
anchors
.
topMargin
=
0
;
};
navBarBackground
.
visible
=
true
;
back
.
visible
=
true
;
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,10 +379,12 @@ Rectangle {
var
matches
=
cleanTitle
.
match
(
/^
[
a-z
]
*
\:\/\/([^\/
?#
]
+
)(?:[\/
?#
]
|$
)
/i
);
var
domain
=
matches
&&
matches
[
1
];
appDomain
.
text
=
domain
//webview.url.replace("a", "z")
appTitle
.
text
=
webview
.
title
if
(
domain
)
appDomain
.
text
=
domain
//webview.url.replace("a", "z")
if
(
webview
.
title
)
appTitle
.
text
=
webview
.
title
showFullUrlBar
(
false
);
showFullUrlBar
(
false
);
}
}
onJavaScriptConsoleMessage
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment