From d75dbc1b3b7d080ac5712309af3a62dd7a8ac8b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20L=C3=BCftinger?= Date: Sat, 14 Jan 2023 17:28:13 +0100 Subject: [PATCH] fix linting issues --- src/plugins/bookPlayer/plugin.js | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/plugins/bookPlayer/plugin.js b/src/plugins/bookPlayer/plugin.js index 211c2cdea9..7e06a482a8 100644 --- a/src/plugins/bookPlayer/plugin.js +++ b/src/plugins/bookPlayer/plugin.js @@ -32,7 +32,7 @@ export class BookPlayer { 'dark': { 'body': { 'color': '#d8dadc', 'background': '#000', 'font-size': 'medium' } }, 'sepia': { 'body': { 'color': '#d8a262', 'background': '#000', 'font-size': 'medium' } }, 'light': { 'body': { 'color': '#000', 'background': '#fff', 'font-size': 'medium' } } - } + }; this.themeOrder = ['dark', 'sepia', 'light']; this.fontSize = 'medium'; @@ -242,27 +242,22 @@ export class BookPlayer { const newTheme = this.themeOrder[(this.themeOrder.indexOf(this.theme) + 1) % this.themeOrder.length]; this.rendition.themes.select(newTheme); this.theme = newTheme; - console.dir(this.rendition); } } increaseFontSize() { - if (this.loaded) { - if (this.fontSize !== this.fontSizeOrder[this.fontSizeOrder.length - 1]) { - const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) + 1)]; - this.rendition.themes.fontSize(newFontSize); - this.fontSize = newFontSize; - } + if (this.loaded && this.fontSize !== this.fontSizeOrder[this.fontSizeOrder.length - 1]) { + const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) + 1)]; + this.rendition.themes.fontSize(newFontSize); + this.fontSize = newFontSize; } } decreaseFontSize() { - if (this.loaded) { - if (this.fontSize !== this.fontSizeOrder[0]) { - const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) - 1)]; - this.rendition.themes.fontSize(newFontSize); - this.fontSize = newFontSize; - } + if (this.loaded && this.fontSize !== this.fontSizeOrder[0]) { + const newFontSize = this.fontSizeOrder[(this.fontSizeOrder.indexOf(this.fontSize) - 1)]; + this.rendition.themes.fontSize(newFontSize); + this.fontSize = newFontSize; } }