Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

remove arrow function usage

ammarahm-ede5873964eab5
diff --git a/apps/mobile/html/Web.bundle/site/index.html b/apps/mobile/html/Web.bundle/site/index.html
index 984fc7c4a..f6f7923b9 100644
--- a/apps/mobile/html/Web.bundle/site/index.html
+++ b/apps/mobile/html/Web.bundle/site/index.html
@@ -128,7 +128,6 @@
if (value === "show" && node.classList.contains('hidden')) {
node.classList.remove('hidden');
}
-
}
</script>
diff --git a/apps/mobile/html/Web.bundle/site/init.js b/apps/mobile/html/Web.bundle/site/init.js
index a4c7687d9..9ba211c44 100755
--- a/apps/mobile/html/Web.bundle/site/init.js
+++ b/apps/mobile/html/Web.bundle/site/init.js
@@ -29,7 +29,12 @@ function loadSettings() {
function changeDirection(rtl) {
loadSettings();
- EDITOR_SETTINGS.directionality = rtl ? 'rtl' : 'ltr';
+ EDITOR_SETTINGS.directionality = 'ltr';
+
+ if (rtl) {
+ EDITOR_SETTINGS.directionality = 'rtl';
+ }
+
localStorage.setItem('editorSettings', JSON.stringify(EDITOR_SETTINGS));
if (rtl) {
tinymce.activeEditor.execCommand('mceDirectionRTL');
@@ -224,7 +229,7 @@ function init_callback(_editor) {
});
editor.on('input ExecCommand ObjectResized Redo Undo', onChange);
- editor.on('keyup', e => {
+ editor.on('keyup', function (e) {
console.log('keyup: ', e);
if (e.key !== 'Backspace') return;
onChange(e);
@@ -239,16 +244,18 @@ const plugins = [
let isSafari = navigator.vendor.match(/apple/i);
+let margins = '';
+
+if (isSafari) {
+ margins = `margin-left:12px !important;
+margin-right:12px !important;`;
+}
+
const content_style = `
body {
font-family:"Open Sans";
overflow-x: hidden !important;
- ${
- isSafari
- ? `margin-left:12px !important;
-margin-right:12px !important;`
- : ''
- }
+ ${margins}
}
.mce-content-body h2::before,
@@ -381,7 +388,7 @@ function init_tiny(size) {
directionality: EDITOR_SETTINGS.directionality,
skin_url: 'dist/skins/notesnook',
content_css: 'dist/skins/notesnook',
- attachmenthandler_download_attachment: hash => {
+ attachmenthandler_download_attachment: function (hash) {
reactNativeEventHandler('attachment_download', hash);
},
custom_undo_redo_levels: 10,
diff --git a/apps/mobile/html/Web.bundle/site/listeners.js b/apps/mobile/html/Web.bundle/site/listeners.js
index f45e5c2d1..8396f2956 100755
--- a/apps/mobile/html/Web.bundle/site/listeners.js
+++ b/apps/mobile/html/Web.bundle/site/listeners.js
@@ -120,7 +120,7 @@ function isInvalidValue(value) {
function updateInfoBar() {
let ids = ['infodate', 'infosaved'];
- ids.forEach(id => {
+ ids.forEach(function(id) {
let element = document.getElementById(id);
if (!element) return;
if (element.textContent && element.textContent !== '') {