mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 18:41:20 -08:00
删除多余字符
This commit is contained in:
1 parent
2cf7905d58
commit
14701f2141
3 files changed
+6
-5
No files matched your search
@@ -13,6 +13,7 @@ export default class Notice {
|
|||||||
addClass($player, 'art-notice-show');
|
addClass($player, 'art-notice-show');
|
||||||
clearTimeout(this.timer);
|
clearTimeout(this.timer);
|
||||||
this.timer = setTimeout(() => {
|
this.timer = setTimeout(() => {
|
||||||
|
$noticeInner.innerText = '';
|
||||||
removeClass($player, 'art-notice-show');
|
removeClass($player, 'art-notice-show');
|
||||||
}, this.time);
|
}, this.time);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ export default class Template {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (art.whitelist.state) {
|
if (art.whitelist.state) {
|
||||||
this.initDesktop();
|
this.desktop();
|
||||||
} else {
|
} else {
|
||||||
this.initMobile();
|
this.mobile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ export default class Template {
|
|||||||
return query(className, this.$container);
|
return query(className, this.$container);
|
||||||
}
|
}
|
||||||
|
|
||||||
initDesktop() {
|
desktop() {
|
||||||
this.$container.innerHTML = `
|
this.$container.innerHTML = `
|
||||||
<div class="art-video-player art-subtitle-show art-layer-show" style="--theme: ${this.art.option.theme}">
|
<div class="art-video-player art-subtitle-show art-layer-show" style="--theme: ${this.art.option.theme}">
|
||||||
<video class="art-video">
|
<video class="art-video">
|
||||||
@@ -126,7 +126,7 @@ export default class Template {
|
|||||||
this.$contextmenu = this.query('.art-contextmenus');
|
this.$contextmenu = this.query('.art-contextmenus');
|
||||||
}
|
}
|
||||||
|
|
||||||
initMobile() {
|
mobile() {
|
||||||
this.$container.innerHTML = `
|
this.$container.innerHTML = `
|
||||||
<div class="art-video-player">
|
<div class="art-video-player">
|
||||||
<video class="art-video"></video>
|
<video class="art-video"></video>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export default class Whitelist {
|
|||||||
constructor: { kindOf },
|
constructor: { kindOf },
|
||||||
option: { whitelist },
|
option: { whitelist },
|
||||||
} = art;
|
} = art;
|
||||||
this.ua = window.navigator.userAgent;
|
this.ua = navigator.userAgent;
|
||||||
this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(this.ua);
|
this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(this.ua);
|
||||||
this.state =
|
this.state =
|
||||||
!this.isMobile ||
|
!this.isMobile ||
|
||||||
|
|||||||
Reference in new issue
Block a user