From ad6aa2f5c9ca896eee57e559b39b43d1a14484f1 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Thu, 9 Dec 2021 02:51:13 +0800 Subject: ... shit --- libs/music/player.d/main_static.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libs/music/player.d/main_static.js b/libs/music/player.d/main_static.js index 726b5cf..095f60c 100644 --- a/libs/music/player.d/main_static.js +++ b/libs/music/player.d/main_static.js @@ -767,25 +767,25 @@ function init() sh.elem('overlay').onclick=function(){ try{ NSAudio.audioInit();NSAudio.connect(); - if(window.location.hash.length) + }catch(e){return;} + if(window.location.hash.length) + { + let p=window.location.hash.substr(1).split('/'); + for(let i=0;i{sh.elem('overlay').style.display='none';}).catch(e=>{}); - else - //this browser is from an era before this autoplay policy mess, - //assume it succeeded - sh.elem('overlay').style.display='none'; - } + const p=NSUI.switch_track(id); + if(p!=undefined) + p.then(_=>{sh.elem('overlay').style.display='none';}).catch(e=>{}); + else + //this browser is from an era before this autoplay policy mess, + //assume it succeeded + sh.elem('overlay').style.display='none'; } - }catch(e){return;} + } } sh.elem('overlay').onclick(); }, -- cgit v1.2.3