always prettify edit cp by default
This commit is contained in:
parent
5ef6a9c5a7
commit
43ff4dff97
15
main.js
15
main.js
@ -68,16 +68,11 @@
|
||||
PREV_CREATED: "prevCreated",
|
||||
LATTITUDE: "lattitude",
|
||||
LONGITUDE: "longitude",
|
||||
ALWAYS_PRETTIFY: "always",
|
||||
NOT_PRETTIFY_EDIT_CP: "notPrettifyEditCp",
|
||||
REDIRECT_EXIT: "redirectExit",
|
||||
DISABLED_PAGES: "disabledPages"
|
||||
}
|
||||
|
||||
const prettifyTypes = {
|
||||
ALWAYS: "always",
|
||||
ONCE: "once"
|
||||
}
|
||||
|
||||
const ZOOM = 17
|
||||
const METERS = 510
|
||||
|
||||
@ -727,9 +722,9 @@
|
||||
}
|
||||
}
|
||||
if (this.checked)
|
||||
localStorage.setItem(localStorageItems.ALWAYS_PRETTIFY, "+")
|
||||
localStorage.removeItem(localStorageItems.NOT_PRETTIFY_EDIT_CP)
|
||||
else
|
||||
localStorage.removeItem(localStorageItems.ALWAYS_PRETTIFY)
|
||||
localStorage.setItem(localStorageItems.NOT_PRETTIFY_EDIT_CP, "+")
|
||||
})
|
||||
|
||||
alwaysPrettify.appendChild(alwaysPrettifyCheckbox)
|
||||
@ -1387,9 +1382,9 @@
|
||||
}
|
||||
|
||||
function checkIfAlwaysPrettify(form, oldTable, container, insertedFileRows) {
|
||||
if (localStorage.getItem(localStorageItems.ALWAYS_PRETTIFY)) {
|
||||
if (localStorage.getItem(localStorageItems.NOT_PRETTIFY_EDIT_CP) === null) {
|
||||
document.querySelector(`input[name^="always-prettify-0"]`).click()
|
||||
prettify(form, oldTable, container, insertedFileRows)
|
||||
prettifyEditCpForm(form, oldTable, container, insertedFileRows)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user