mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-30 12:14:06 +01:00
Add:OPML Export #1260
This commit is contained in:
1 parent
019063e6f4
commit
15aaf2863c
16 files changed
+124
-40
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user