fix: v6 innerText→textContent (display:none元素兼容)
This commit is contained in:
@@ -51,13 +51,13 @@ function checkUpdate(){
|
|||||||
.then(function(r){if(!r.ok)throw Error('HTTP '+r.status);return r.json()})
|
.then(function(r){if(!r.ok)throw Error('HTTP '+r.status);return r.json()})
|
||||||
.then(function(j){log('latest: '+j.latest+' min: '+j.min_version);
|
.then(function(j){log('latest: '+j.latest+' min: '+j.min_version);
|
||||||
if(j.min_version){
|
if(j.min_version){
|
||||||
var v=j.min_version.replace(/[^0-9]/g,''),my=document.getElementById('ver').innerText.replace(/[^0-9]/g,'');
|
var v=j.min_version.replace(/[^0-9]/g,''),my=document.getElementById('ver').textContent.replace(/[^0-9]/g,'');
|
||||||
if(parseInt(my)<parseInt(v)){log('ERR: too old, need APK update');return}
|
if(parseInt(my)<parseInt(v)){log('ERR: too old, need APK update');return}
|
||||||
}
|
}
|
||||||
dlUrl=j.url;dlSha=j.sha256||'';
|
dlUrl=j.url;dlSha=j.sha256||'';
|
||||||
if(!dlSha||dlSha.startsWith('TBD')){log('ERR: channel no build');return}
|
if(!dlSha||dlSha.startsWith('TBD')){log('ERR: channel no build');return}
|
||||||
if(!dlUrl||dlUrl.indexOf(BASE)!==0){log('ERR: invalid url');return}
|
if(!dlUrl||dlUrl.indexOf(BASE)!==0){log('ERR: invalid url');return}
|
||||||
var myVer=document.getElementById('ver').innerText;
|
var myVer=document.getElementById('ver').textContent;
|
||||||
if(j.latest!==myVer&&j.latest!=='v'+myVer&&'v'+j.latest!==myVer){dlVer=j.latest;
|
if(j.latest!==myVer&&j.latest!=='v'+myVer&&'v'+j.latest!==myVer){dlVer=j.latest;
|
||||||
log('*** NEW VERSION ***');document.getElementById('btnApply').disabled=false}
|
log('*** NEW VERSION ***');document.getElementById('btnApply').disabled=false}
|
||||||
else log('up to date')})
|
else log('up to date')})
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html","min_version":"0.1.0-dav-android-5","latest":"0.1.0-dav-android-6","sha256":"04f10b8f0743bc98e4386686ed58a72e1aa8fe86835f7e838672bc9a29bc4480"}
|
{"url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html","min_version":"0.1.0-dav-android-5","latest":"0.1.0-dav-android-6","sha256":"33a16632c3ba23479104fe8a5f76e215ace2e7b3e35c9b58fac2244b7fdf047e"}
|
||||||
@@ -1 +1 @@
|
|||||||
{"url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html","min_version":"0.1.0-dav-android-5","latest":"0.1.0-dav-android-6","sha256":"04f10b8f0743bc98e4386686ed58a72e1aa8fe86835f7e838672bc9a29bc4480"}
|
{"url":"https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html","min_version":"0.1.0-dav-android-5","latest":"0.1.0-dav-android-6","sha256":"33a16632c3ba23479104fe8a5f76e215ace2e7b3e35c9b58fac2244b7fdf047e"}
|
||||||
@@ -1 +1 @@
|
|||||||
0.1.0-dav-android-6|https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html|04f10b8f0743bc98e4386686ed58a72e1aa8fe86835f7e838672bc9a29bc4480
|
0.1.0-dav-android-6|https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html|33a16632c3ba23479104fe8a5f76e215ace2e7b3e35c9b58fac2244b7fdf047e
|
||||||
Reference in New Issue
Block a user