Fixed handleGesture by moving it up, actually this time

This commit is contained in:
Tracker-Friendly 2024-07-02 18:25:23 +01:00
parent 1c0ccfc6bf
commit 95055cc857
1 changed files with 27 additions and 26 deletions

View File

@ -68,23 +68,8 @@ let indiv = false
let mobile = false let mobile = false
let selectLatestNote = false let selectLatestNote = false
// Init the note box
document.addEventListener("DOMContentLoaded", function() {
pell.init({
element: pellAttacher,
onChange: html => console.log(html),
defaultParagraphSeparator: 'br',
styleWithCSS: false,
classes: {
actionbar: 'pell-actionbar',
button: 'pell-button',
content: 'pell-content',
selected: 'pell-button-selected'
}
})
let noteBox = document.getElementsByClassName("pell-content")[0]
function handleGesture() { function handleGesture() {
if (indiv) { if (indiv) {
indiv = false indiv = false
notesBar.style.width = "100%"; notesBar.style.width = "100%";
@ -108,7 +93,23 @@ document.addEventListener("DOMContentLoaded", function() {
backButton.classList.remove("hidden") backButton.classList.remove("hidden")
newNote.classList.add("hidden") newNote.classList.add("hidden")
} }
}
// Init the note box
document.addEventListener("DOMContentLoaded", function() {
pell.init({
element: pellAttacher,
onChange: html => console.log(html),
defaultParagraphSeparator: 'br',
styleWithCSS: false,
classes: {
actionbar: 'pell-actionbar',
button: 'pell-button',
content: 'pell-content',
selected: 'pell-button-selected'
} }
})
let noteBox = document.getElementsByClassName("pell-content")[0]
if (/Android|iPhone|iPod/i.test(navigator.userAgent)) { if (/Android|iPhone|iPod/i.test(navigator.userAgent)) {
mobile = true mobile = true