process password protected pdf files

This commit is contained in:
Alex Turchyn authored and Pete Matsyburka committed 2024-01-15 02:22:40 +02:00
1 parent a573545ead
commit e864e8a47f
9 files changed
+143 -14

No files matched your search

@@ -0,0 +1,19 @@
export default class extends HTMLElement {
connectedCallback () {
const input = document.createElement('input')
input.type = 'hidden'
input.name = 'password'
input.value = prompt('Enter PDF password')
this.form.append(input)
this.form.requestSubmit()
this.remove()
}
get form () {
return this.closest('form')
}
}