aboutsummaryrefslogtreecommitdiffstats
path: root/demo/src
diff options
context:
space:
mode:
Diffstat (limited to 'demo/src')
-rw-r--r--demo/src/js/demo.js10
-rw-r--r--demo/src/js/tab-focus.js4
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;
}