sync: sync upstream code

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2019-07-20 22:19:06 +08:00
parent b05a00f87d
commit a981ccbcae
7 changed files with 126 additions and 42 deletions

View File

@@ -1035,7 +1035,7 @@ function RetHistoryAccount(Item,Name)
if(Num < 1)
return "" + Num;
var Str;
if(IsLocalClient())
if(UseInnerPage())
Str = "<a class='olink' target='_blank' onclick='OpenHistoryPage(" + Num + ")'>" + Num + "</a>";
else
Str = "<a class='olink' target='_blank' href='./history.html#" + Num + "'>" + Num + "</a>";
@@ -1052,7 +1052,7 @@ function RetBaseAccount(Item)
function ViewTransaction(BlockNum)
{
if(IsLocalClient())
if(UseInnerPage())
OpenBlockViewerPage(BlockNum);
else
window.Open('./blockviewer.html#' + BlockNum, 'viewer', 800, 800);
@@ -1966,3 +1966,20 @@ function Right(Str,count)
else
return Str.substr(0, Str.length);
};
function UseInnerPage()
{
if(isMobile() && !IsLocalClient())
return 1;
else
return 0;
};
function isMobile()
{
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
{
return true;
}
return false;
};