diff options
author | Sam Potts <sam@potts.es> | 2020-10-19 22:25:46 +1100 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2020-10-19 22:25:46 +1100 |
commit | fa653a8859a4191d30d90f0b560bbb4c5c3b83ac (patch) | |
tree | a86b1f5f860350470b602e3c5a8663b4fd095735 /demo/src | |
parent | b6b7db73277184d472c03bfde9eab2fdfe21dd1a (diff) | |
download | plyr-fa653a8859a4191d30d90f0b560bbb4c5c3b83ac.tar.lz plyr-fa653a8859a4191d30d90f0b560bbb4c5c3b83ac.tar.xz plyr-fa653a8859a4191d30d90f0b560bbb4c5c3b83ac.zip |
chore: linting
Diffstat (limited to 'demo/src')
-rw-r--r-- | demo/src/js/demo.js | 10 | ||||
-rw-r--r-- | demo/src/js/tab-focus.js | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/demo/src/js/demo.js b/demo/src/js/demo.js index 6c5f7eb8..1101fd97 100644 --- a/demo/src/js/demo.js +++ b/demo/src/js/demo.js @@ -22,7 +22,7 @@ import toggleClass from './toggle-class'; if (window.location.host === production) { Sentry.init({ dsn: 'https://d4ad9866ad834437a4754e23937071e4@sentry.io/305555', - whitelistUrls: [production].map(d => new RegExp(`https://(([a-z0-9])+(.))*${d}`)), + whitelistUrls: [production].map((d) => new RegExp(`https://(([a-z0-9])+(.))*${d}`)), }); } @@ -79,13 +79,13 @@ import toggleClass from './toggle-class'; function render(type) { // Remove active classes - Array.from(buttons).forEach(button => toggleClass(button.parentElement, 'active', false)); + Array.from(buttons).forEach((button) => toggleClass(button.parentElement, 'active', false)); // Set active on parent toggleClass(document.querySelector(`[data-source="${type}"]`), 'active', true); // Show cite - Array.from(document.querySelectorAll('.plyr__cite')).forEach(cite => { + Array.from(document.querySelectorAll('.plyr__cite')).forEach((cite) => { // eslint-disable-next-line no-param-reassign cite.hidden = true; }); @@ -110,7 +110,7 @@ import toggleClass from './toggle-class'; } // Bind to each button - Array.from(buttons).forEach(button => { + Array.from(buttons).forEach((button) => { button.addEventListener('click', () => { const type = button.getAttribute('data-source'); @@ -123,7 +123,7 @@ import toggleClass from './toggle-class'; }); // List for backwards/forwards - window.addEventListener('popstate', event => { + window.addEventListener('popstate', (event) => { if (event.state && Object.keys(event.state).includes('type')) { setSource(event.state.type); } diff --git a/demo/src/js/tab-focus.js b/demo/src/js/tab-focus.js index b13049bc..935a3c42 100644 --- a/demo/src/js/tab-focus.js +++ b/demo/src/js/tab-focus.js @@ -3,7 +3,7 @@ const container = document.getElementById('container'); const tabClassName = 'tab-focus'; // Remove class on blur -document.addEventListener('focusout', event => { +document.addEventListener('focusout', (event) => { if (!event.target.classList || container.contains(event.target)) { return; } @@ -12,7 +12,7 @@ document.addEventListener('focusout', event => { }); // Add classname to tabbed elements -document.addEventListener('keydown', event => { +document.addEventListener('keydown', (event) => { if (event.keyCode !== 9) { return; } |