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,21 +68,6 @@ 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) {
@ -110,6 +95,22 @@ document.addEventListener("DOMContentLoaded", function() {
} }
} }
// 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
noteBoxDiv.classList.add("mobile") noteBoxDiv.classList.add("mobile")