You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nextcloud-server/apps/settings/src/main-nextcloud-pdf.js

20 lines
573 B

/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { loadState } from '@nextcloud/initial-state'
const hasPdf = loadState('settings', 'has-reasons-use-nextcloud-pdf') === true
window.addEventListener('DOMContentLoaded', function() {
const link = document.getElementById('open-reasons-use-nextcloud-pdf')
if (link && hasPdf) {
link.addEventListener('click', function(event) {
event.preventDefault()
OCA.Viewer.open({
path: '/Reasons to use Nextcloud.pdf',
})
})
}
})