diff --git a/blocks/schedule/schedule.js b/blocks/schedule/schedule.js index 89328b7..916bd68 100644 --- a/blocks/schedule/schedule.js +++ b/blocks/schedule/schedule.js @@ -183,7 +183,7 @@ async function renderSchedule(block, activeDay, forceReload) { /** * Enabled an auto-refresh of the schedule data once each minute (if fullscreen mode is active). - * @param {Element} block + * @param {Element} block */ function enableAutoRefresh(block) { window.setInterval(() => { @@ -197,7 +197,6 @@ function enableAutoRefresh(block) { * @param {Element} block */ export default async function decorate(block) { - // detect active day let activeDay = getActiveDayFromHash(); if (!activeDay) { diff --git a/scripts/utils/fetch.js b/scripts/utils/fetch.js index 71171d7..36f4eba 100644 --- a/scripts/utils/fetch.js +++ b/scripts/utils/fetch.js @@ -1,10 +1,17 @@ +/** + * Returns Fetch API cache options that force a reload. + * @returns Force reload cache options. + */ +export function getFetchCacheOptionsForceReload() { + return { cache: 'reload' }; +} + /** * Detects the navigation type of the current page in browser. * If the current page was reloaded (e.g. by user), force a cache reload of items * fetched via Fetch API as well (e.g. footer, header, Query Index). * @returns Options for Fetch API. */ -// eslint-disable-next-line import/prefer-default-export export function getFetchCacheOptions() { const navigationType = window.performance.getEntriesByType('navigation')[0]?.type; if (navigationType === 'reload') { @@ -12,11 +19,3 @@ export function getFetchCacheOptions() { } return {}; } - -/** - * Returns Fetch API cache options that force a reload. - * @returns Force reload cache options. - */ -export function getFetchCacheOptionsForceReload() { - return { cache: 'reload' }; -} \ No newline at end of file diff --git a/scripts/utils/fullscreen.js b/scripts/utils/fullscreen.js index 1d82d5a..bff21f7 100644 --- a/scripts/utils/fullscreen.js +++ b/scripts/utils/fullscreen.js @@ -4,6 +4,7 @@ import { getMetadata } from '../lib-franklin.js'; * Checks fullscreen mode. * @returns true if fullscreen template is set. */ +// eslint-disable-next-line import/prefer-default-export export function isFullscreen() { return getMetadata('template') === 'fullscreen'; }