eslint: no-trailing-spaces; minor style

This commit is contained in:
DIYgod
2017-08-19 01:37:19 +08:00
parent 4339338d30
commit cdb534b8b9
8 changed files with 20 additions and 18 deletions
+2 -1
View File
@@ -48,7 +48,8 @@
"no-duplicate-imports": 1,
"no-useless-computed-key": 1,
"no-useless-rename": 1,
"rest-spread-spacing": 1
"rest-spread-spacing": 1,
"no-trailing-spaces": 1
},
"globals": {
"require": false,
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+12 -12
View File
@@ -95,7 +95,7 @@ class DPlayer {
user: this.option.danmaku.user,
}
});
}
}
// arrow style
@@ -605,18 +605,18 @@ class DPlayer {
*/
this.element.addEventListener('fullscreenchange', () => {
if (this.danmaku) {
this.danmaku.resize();
this.danmaku.resize();
}
});
this.element.addEventListener('mozfullscreenchange', () => {
if (this.danmaku) {
this.danmaku.resize();
}
}
});
this.element.addEventListener('webkitfullscreenchange', () => {
if (this.danmaku) {
this.danmaku.resize();
}
}
});
// browser full screen
this.element.getElementsByClassName('dplayer-full-icon')[0].addEventListener('click', () => {
@@ -647,7 +647,7 @@ class DPlayer {
}
if (this.danmaku) {
this.danmaku.resize();
}
}
});
// web full screen
this.element.getElementsByClassName('dplayer-full-in-icon')[0].addEventListener('click', () => {
@@ -658,7 +658,7 @@ class DPlayer {
this.element.classList.add('dplayer-fulled');
if (this.danmaku) {
this.danmaku.resize();
}
}
}
});
@@ -708,7 +708,7 @@ class DPlayer {
this.element.classList.remove('dplayer-fulled');
if (this.danmaku) {
this.danmaku.resize();
}
}
}
break;
}
@@ -787,14 +787,14 @@ class DPlayer {
seek (time) {
time = Math.max(time, 0);
if (this.video.duration) {
time = Math.min(time, this.video.duration);
time = Math.min(time, this.video.duration);
}
this.video.currentTime = time;
if (this.danmaku) {
this.danmaku.seek();
}
}
this.updateBar('played', time / this.video.duration, 'width');
}
@@ -903,7 +903,7 @@ class DPlayer {
addition: danmakuAPI.addition,
user: danmakuAPI.user,
});
}
}
}
}
@@ -987,7 +987,7 @@ class DPlayer {
this.video.play();
}
if (this.danmaku) {
this.danmaku.danIndex = 0;
this.danmaku.danIndex = 0;
}
});
@@ -1038,7 +1038,7 @@ class DPlayer {
parent.removeChild(this.prevVideo);
this.video.classList.add('dplayer-video-current');
if (!paused) {
this.video.play();
this.video.play();
}
this.prevVideo = null;
this.notice(`${this.tran('Switched to')} ${this.quality.name} ${this.tran('quality')}`);
+1
View File
@@ -391,6 +391,7 @@
opacity: 1;
transition: opacity .1s ease-in-out;
word-wrap: normal;
word-break: normal;
}
.dplayer-bar {
+1 -1
View File
@@ -283,7 +283,7 @@ class Danmaku {
replace(/'/g, "'").
replace(/\//g, "/");
}
resize () {
const danWidth = this.container.offsetWidth;
const items = this.container.getElementsByClassName('dplayer-danmaku-item');
+1 -1
View File
@@ -243,7 +243,7 @@ const html = {
<div class="dplayer-setting-speed-item" data-speed="2">
<span class="dplayer-label">2</span>
</div>`
})
})
};
module.exports = html;