删除多余字符

This commit is contained in:
Harvey committed 2019-11-27 17:11:42 +08:00
1 parent 2cf7905d58
commit 14701f2141
3 files changed
+7 -6

No files matched your search

+1
View File
@@ -13,6 +13,7 @@ export default class Notice {
addClass($player, 'art-notice-show');
clearTimeout(this.timer);
this.timer = setTimeout(() => {
$noticeInner.innerText = '';
removeClass($player, 'art-notice-show');
}, this.time);
}
+5 -5
View File
@@ -3,7 +3,7 @@ import { errorHandle, query, addClass } from './utils';
export default class Template {
constructor(art) {
this.art = art;
if (art.option.container instanceof Element) {
this.$container = art.option.container;
} else {
@@ -22,9 +22,9 @@ export default class Template {
);
if (art.whitelist.state) {
this.initDesktop();
this.desktop();
} else {
this.initMobile();
this.mobile();
}
}
@@ -32,7 +32,7 @@ export default class Template {
return query(className, this.$container);
}
initDesktop() {
desktop() {
this.$container.innerHTML = `
<div class="art-video-player art-subtitle-show art-layer-show" style="--theme: ${this.art.option.theme}">
<video class="art-video">
@@ -126,7 +126,7 @@ export default class Template {
this.$contextmenu = this.query('.art-contextmenus');
}
initMobile() {
mobile() {
this.$container.innerHTML = `
<div class="art-video-player">
<video class="art-video"></video>
+1 -1
View File
@@ -4,7 +4,7 @@ export default class Whitelist {
constructor: { kindOf },
option: { whitelist },
} = 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.state =
!this.isMobile ||