From 18c9697287a4b697496113818e9a432307e2bcdb Mon Sep 17 00:00:00 2001 From: Alfred Egger Date: Fri, 2 Apr 2021 17:37:26 +0200 Subject: [PATCH] Fix deprecated Javascript calls --- js/personal.js | 3 +-- js/plugin.js | 2 +- js/settings.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/js/personal.js b/js/personal.js index f1ec245..a59a3be 100644 --- a/js/personal.js +++ b/js/personal.js @@ -1,4 +1,4 @@ -$(document).ready(function(){ +window.addEventListener('DOMContentLoaded', function () { // save settings var readerSettings = { save : function() { @@ -19,4 +19,3 @@ $(document).ready(function(){ $('#PdfEnable').on("change", readerSettings.save); $('#CbxEnable').on("change", readerSettings.save); }); - diff --git a/js/plugin.js b/js/plugin.js index 2334d20..189a9d1 100644 --- a/js/plugin.js +++ b/js/plugin.js @@ -143,7 +143,7 @@ OC.Plugins.register('OCA.Files.FileList', OCA.Epubreader.Plugin); // FIXME: Hack for single public file view since it is not attached to the fileslist -$(document).ready(function(){ +window.addEventListener('DOMContentLoaded', function () { if ($('#isPublic').val() && ($('#mimetype').val() === 'application/epub+zip' || $('#mimetype').val() === 'application/pdf' diff --git a/js/settings.js b/js/settings.js index 6f77393..92f0a82 100644 --- a/js/settings.js +++ b/js/settings.js @@ -1,4 +1,4 @@ -$(document).ready(function(){ +window.addEventListener('DOMContentLoaded', function () { // save settings var readerSettings = { save : function() {