diff --git a/js/defaults.js b/js/defaults.js index 58e930a38d..434b80a22a 100644 --- a/js/defaults.js +++ b/js/defaults.js @@ -9,7 +9,6 @@ const defaults = { address: address, port: port, basePath: "/", - kioskmode: false, electronOptions: {}, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], diff --git a/js/deprecated.js b/js/deprecated.js index 10cf7ae044..8c8ef3fc54 100644 --- a/js/deprecated.js +++ b/js/deprecated.js @@ -1,4 +1,4 @@ module.exports = { - configs: ["kioskmode"], + configs: [], clock: ["secondsColor"] }; diff --git a/js/electron.js b/js/electron.js index 1d767a68c8..9b4465a1b9 100644 --- a/js/electron.js +++ b/js/electron.js @@ -60,19 +60,11 @@ function createWindow () { backgroundColor: "#000000" }; - /* - * DEPRECATED: "kioskmode" backwards compatibility, to be removed - * settings these options directly instead provides cleaner interface - */ - if (config.kioskmode) { - electronOptionsDefaults.kiosk = true; - } else { - electronOptionsDefaults.show = false; - electronOptionsDefaults.frame = false; - electronOptionsDefaults.transparent = true; - electronOptionsDefaults.hasShadow = false; - electronOptionsDefaults.fullscreen = true; - } + electronOptionsDefaults.show = false; + electronOptionsDefaults.frame = false; + electronOptionsDefaults.transparent = true; + electronOptionsDefaults.hasShadow = false; + electronOptionsDefaults.fullscreen = true; const electronOptions = Object.assign({}, electronOptionsDefaults, config.electronOptions); @@ -132,22 +124,6 @@ function createWindow () { mainWindow = null; }); - if (config.kioskmode) { - mainWindow.on("blur", function () { - mainWindow.focus(); - }); - - mainWindow.on("leave-full-screen", function () { - mainWindow.setFullScreen(true); - }); - - mainWindow.on("resize", function () { - setTimeout(function () { - mainWindow.reload(); - }, 1000); - }); - } - //remove response headers that prevent sites of being embedded into iframes if configured mainWindow.webContents.session.webRequest.onHeadersReceived((details, callback) => { let curHeaders = details.responseHeaders; diff --git a/tests/unit/classes/deprecated_spec.js b/tests/unit/classes/deprecated_spec.js index ef78db911d..b1e6aa631d 100644 --- a/tests/unit/classes/deprecated_spec.js +++ b/tests/unit/classes/deprecated_spec.js @@ -5,11 +5,11 @@ describe("Deprecated", () => { expect(typeof deprecated).toBe("object"); }); - it("should contain configs array with deprecated options as strings", () => { - expect(Array.isArray(["deprecated.configs"])).toBe(true); + it("should contain clock array with deprecated options as strings", () => { + expect(Array.isArray(["deprecated.clock"])).toBe(true); for (let option of deprecated.configs) { expect(typeof option).toBe("string"); } - expect(deprecated.configs).toEqual(expect.arrayContaining(["kioskmode"])); + expect(deprecated.clock).toEqual(expect.arrayContaining(["secondsColor"])); }); });