Pārlūkot izejas kodu

eslint: no-trailing-spaces; minor style

DIYgod 7 gadi atpakaļ
vecāks
revīzija
cdb534b8b9
8 mainītis faili ar 17 papildinājumiem un 15 dzēšanām
  1. 2 1
      .eslintrc
  2. 0 0
      dist/DPlayer.min.css
  3. 0 0
      dist/DPlayer.min.css.map
  4. 0 0
      dist/DPlayer.min.js.map
  5. 12 12
      src/DPlayer.js
  6. 1 0
      src/DPlayer.scss
  7. 1 1
      src/danmaku.js
  8. 1 1
      src/html.js

+ 2 - 1
.eslintrc

@@ -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,

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/DPlayer.min.css


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/DPlayer.min.css.map


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/DPlayer.min.js.map


+ 12 - 12
src/DPlayer.js

@@ -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 - 0
src/DPlayer.scss

@@ -391,6 +391,7 @@
                 opacity: 1;
                 transition: opacity .1s ease-in-out;
                 word-wrap: normal;
+                word-break: normal;
             }
 
             .dplayer-bar {

+ 1 - 1
src/danmaku.js

@@ -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
src/html.js

@@ -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;

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels