google drive file picker

This commit is contained in:
Alex Turchyn
2025-10-09 16:43:11 +03:00
committed by GitHub
parent b99235397a
commit 9e8e1996e8
19 changed files with 608 additions and 87 deletions
+16
View File
@@ -0,0 +1,16 @@
export default class extends HTMLElement {
connectedCallback () {
const src = this.getAttribute('src')
const link = document.createElement('a')
link.href = src
link.setAttribute('data-turbo-frame', 'modal')
link.style.display = 'none'
this.appendChild(link)
link.click()
window.history.replaceState({}, document.title, window.location.pathname)
}
}