mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-22 08:53:41 +02:00
Add:OPML Export #1260
This commit is contained in:
parent
019063e6f4
commit
15aaf2863c
16 changed files with 124 additions and 40 deletions
|
@ -145,6 +145,25 @@ Vue.prototype.$getNextScheduledDate = (expression) => {
|
|||
return interval.next().toDate()
|
||||
}
|
||||
|
||||
Vue.prototype.$downloadFile = (url, filename = null, openInNewTab = false) => {
|
||||
const a = document.createElement('a')
|
||||
a.style.display = 'none'
|
||||
a.href = url
|
||||
|
||||
if (filename) {
|
||||
a.download = filename
|
||||
}
|
||||
if (openInNewTab) {
|
||||
a.target = '_blank'
|
||||
}
|
||||
|
||||
document.body.appendChild(a)
|
||||
a.click()
|
||||
setTimeout(() => {
|
||||
a.remove()
|
||||
})
|
||||
}
|
||||
|
||||
export function supplant(str, subs) {
|
||||
// source: http://crockford.com/javascript/remedial.html
|
||||
return str.replace(/{([^{}]*)}/g,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue