From 182bf1d688a6bcf32776b3e40749085d61c1146e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 20 Jan 2018 16:43:39 +0100 Subject: [PATCH] Simplify platform handling --- qutebrowser/javascript/caret.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/qutebrowser/javascript/caret.js b/qutebrowser/javascript/caret.js index eed5aaa1f..3a7bb5bde 100644 --- a/qutebrowser/javascript/caret.js +++ b/qutebrowser/javascript/caret.js @@ -781,12 +781,6 @@ window._qutebrowser.caret = (function() { */ CaretBrowsing.blinkFlag = true; - /** - * The os that user is using. - * @type {boolean} - */ - CaretBrowsing.platform = null; - /** * Check if a node is a control that normally allows the user to interact * with it using arrow keys. We won't override the arrow keys when such a @@ -879,9 +873,6 @@ window._qutebrowser.caret = (function() { * first text character in the document. */ CaretBrowsing.setInitialCursor = function() { - if (CaretBrowsing.platform) { - CaretBrowsing.isWindows = CaretBrowsing.platform.startsWith("win"); - } const selectionRange = window.getSelection().toString().length; if (selectionRange === 0) { positionCaret(); @@ -1289,7 +1280,7 @@ window._qutebrowser.caret = (function() { }; funcs.setPlatform = (platform) => { - CaretBrowsing.platform = platform; + CaretBrowsing.isWindows = platform.startsWith("win"); }; funcs.disableCaret = () => {