mirror of
https://github.com/nextcloud/server.git
synced 2026-02-27 18:37:17 +01:00
29 lines
698 B
JavaScript
29 lines
698 B
JavaScript
/**
|
|
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
import { loadState } from '@nextcloud/initial-state'
|
|
|
|
/**
|
|
* Set the page heading
|
|
*
|
|
* @param {string} heading page title from the history api
|
|
* @since 27.0.0
|
|
*/
|
|
export function setPageHeading(heading) {
|
|
const headingEl = document.getElementById('page-heading-level-1')
|
|
if (headingEl) {
|
|
headingEl.textContent = heading
|
|
}
|
|
}
|
|
export default {
|
|
/**
|
|
* @return {boolean} Whether the user opted-out of shortcuts so that they should not be registered
|
|
*/
|
|
disableKeyboardShortcuts() {
|
|
return loadState('theming', 'shortcutsDisabled', false)
|
|
},
|
|
setPageHeading,
|
|
}
|