diff options
author | Sam Potts <sam@potts.es> | 2019-04-30 23:44:05 +1000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2019-04-30 23:44:05 +1000 |
commit | 80aa6ffe435b170466838f977d52438a95e22186 (patch) | |
tree | 0243268c1dd2af2ded86c03f2ea222032cb58527 /src/js/utils | |
parent | 0694e586502f7ce85ce7858b67d515403b48c87e (diff) | |
download | plyr-80aa6ffe435b170466838f977d52438a95e22186.tar.lz plyr-80aa6ffe435b170466838f977d52438a95e22186.tar.xz plyr-80aa6ffe435b170466838f977d52438a95e22186.zip |
Linting changes
Diffstat (limited to 'src/js/utils')
-rw-r--r-- | src/js/utils/elements.js | 3 | ||||
-rw-r--r-- | src/js/utils/events.js | 1 | ||||
-rw-r--r-- | src/js/utils/loadSprite.js | 2 | ||||
-rw-r--r-- | src/js/utils/style.js | 1 | ||||
-rw-r--r-- | src/js/utils/time.js | 1 |
5 files changed, 0 insertions, 8 deletions
diff --git a/src/js/utils/elements.js b/src/js/utils/elements.js index 9c1ddebc..94744771 100644 --- a/src/js/utils/elements.js +++ b/src/js/utils/elements.js @@ -17,7 +17,6 @@ export function wrap(elements, wrapper) { .reverse() .forEach((element, index) => { const child = index > 0 ? wrapper.cloneNode(true) : wrapper; - // Cache the current parent and sibling. const parent = element.parentNode; const sibling = element.nextSibling; @@ -145,12 +144,10 @@ export function getAttributesFromSelector(sel, existingAttributes) { const selector = s.trim(); const className = selector.replace('.', ''); const stripped = selector.replace(/[[\]]/g, ''); - // Get the parts and value const parts = stripped.split('='); const [key] = parts; const value = parts.length > 1 ? parts[1].replace(/["']/g, '') : ''; - // Get the first character const start = selector.charAt(0); diff --git a/src/js/utils/events.js b/src/js/utils/events.js index d304c312..87c35d26 100644 --- a/src/js/utils/events.js +++ b/src/js/utils/events.js @@ -35,7 +35,6 @@ export function toggleListener(element, event, callback, toggle = false, passive // Allow multiple events const events = event.split(' '); - // Build options // Default to just the capture boolean for browsers with no passive listener support let options = capture; diff --git a/src/js/utils/loadSprite.js b/src/js/utils/loadSprite.js index 917bd6ac..092f9986 100644 --- a/src/js/utils/loadSprite.js +++ b/src/js/utils/loadSprite.js @@ -15,7 +15,6 @@ export default function loadSprite(url, id) { const prefix = 'cache'; const hasId = is.string(id); let isCached = false; - const exists = () => document.getElementById(id) !== null; const update = (container, data) => { @@ -33,7 +32,6 @@ export default function loadSprite(url, id) { // Only load once if ID set if (!hasId || !exists()) { const useStorage = Storage.supported; - // Create container const container = document.createElement('div'); container.setAttribute('hidden', ''); diff --git a/src/js/utils/style.js b/src/js/utils/style.js index e51892e5..6f3069c9 100644 --- a/src/js/utils/style.js +++ b/src/js/utils/style.js @@ -64,7 +64,6 @@ export function setAspectRatio(input) { } const ratio = getAspectRatio.call(this, input); - const [w, h] = is.array(ratio) ? ratio : [0, 0]; const padding = (100 / w) * h; diff --git a/src/js/utils/time.js b/src/js/utils/time.js index 2deccf65..ffca88b2 100644 --- a/src/js/utils/time.js +++ b/src/js/utils/time.js @@ -18,7 +18,6 @@ export function formatTime(time = 0, displayHours = false, inverted = false) { // Format time component to add leading zero const format = value => `0${value}`.slice(-2); - // Breakdown to hours, mins, secs let hours = getHours(time); const mins = getMinutes(time); |