mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
plugin page can now use args
This commit is contained in:
parent
7a0f2f7f4f
commit
cc579736ce
1 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
|||
class SetupPlugin {
|
||||
constructor(data) {
|
||||
constructor(data, url = location.href) {
|
||||
this.url = url;
|
||||
// Set data defaults elements and variables
|
||||
// Key of this.data need to match key of fetch data json object to update values
|
||||
// type<str> : text (target el), list (el need to be first element of list)
|
||||
|
|
@ -44,7 +45,7 @@ class SetupPlugin {
|
|||
this.updateDataDOM();
|
||||
this.updateAlert("fetch");
|
||||
|
||||
fetch(location.href, {
|
||||
fetch(this.url, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"X-CSRFToken": document.querySelector('input[name="csrf_token"]')
|
||||
|
|
|
|||
Loading…
Reference in a new issue