From: Pierre Ossman Date: Sun, 30 Oct 2016 20:36:54 +0000 (+0100) Subject: Remove alternative style sheets X-Git-Tag: v1.0.0~199^2~7 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=340d9d66cca2c1e5236ccf00006da9d9b32ae76d;p=mirror_novnc.git Remove alternative style sheets Anyone with basic knowledge of CSS will easily figure out how to customise the appearance of the UI, so remove the burden of having to maintain these extra style sheets. --- diff --git a/app/styles/black.css b/app/styles/black.css deleted file mode 100644 index 178fa10..0000000 --- a/app/styles/black.css +++ /dev/null @@ -1,21 +0,0 @@ -/* - * noVNC black CSS - * Copyright (C) 2012 Joel Martin - * Copyright (C) 2013 Samuel Mannehed for Cendio AB - * noVNC is licensed under the MPL 2.0 (see LICENSE.txt) - * This file is licensed under the 2-Clause BSD license (see LICENSE.txt). - */ - -.noVNC_panel { - border:2px solid #fff; - background:#000; - color:#fff; -} - -#noVNC_control_bar, #noVNC_control_bar_handle, .noVNC_panel .noVNC_heading { - background: #4c4c4c; -} - -.noVNC_button.noVNC_selected { - background: #9dd53a; -} diff --git a/app/styles/blue.css b/app/styles/blue.css deleted file mode 100644 index a38ede1..0000000 --- a/app/styles/blue.css +++ /dev/null @@ -1,17 +0,0 @@ -/* - * noVNC blue CSS - * Copyright (C) 2012 Joel Martin - * Copyright (C) 2013 Samuel Mannehed for Cendio AB - * noVNC is licensed under the MPL 2.0 (see LICENSE.txt) - * This file is licensed under the 2-Clause BSD license (see LICENSE.txt). - */ - -.noVNC_panel { - border:2px solid #fff; - background:#04073d; - color:#fff; -} - -#noVNC_control_bar, #noVNC_control_bar_handle, .noVNC_panel .noVNC_heading { - background: #080F80; -} diff --git a/app/ui.js b/app/ui.js index 28e2148..9ff2406 100644 --- a/app/ui.js +++ b/app/ui.js @@ -167,13 +167,7 @@ var UI; }, initSettings: function() { - // Stylesheet selection dropdown - var sheet = WebUtil.selectStylesheet(); - var sheets = WebUtil.getStylesheets(); var i; - for (i = 0; i < sheets.length; i += 1) { - UI.addOption(document.getElementById('noVNC_setting_stylesheet'),sheets[i].title, sheets[i].title); - } // Logging selection dropdown var llevels = ['error', 'warn', 'info', 'debug']; @@ -185,11 +179,6 @@ var UI; UI.initSetting('logging', 'warn'); WebUtil.init_logging(UI.getSetting('logging')); - UI.initSetting('stylesheet', 'default'); - WebUtil.selectStylesheet(null); - // call twice to get around webkit bug - WebUtil.selectStylesheet(UI.getSetting('stylesheet')); - // if port == 80 (or 443) then it won't be present and should be // set manually var port = window.location.port; @@ -838,11 +827,9 @@ var UI; UI.saveSetting('view_only'); UI.saveSetting('path'); UI.saveSetting('repeaterID'); - UI.saveSetting('stylesheet'); UI.saveSetting('logging'); // Settings with immediate (non-connected related) effect - WebUtil.selectStylesheet(UI.getSetting('stylesheet')); WebUtil.init_logging(UI.getSetting('logging')); UI.updateViewClip(); UI.updateViewDrag(); @@ -887,7 +874,6 @@ var UI; UI.updateSetting('view_only'); UI.updateSetting('path'); UI.updateSetting('repeaterID'); - UI.updateSetting('stylesheet'); UI.updateSetting('logging'); document.getElementById('noVNC_settings') diff --git a/app/webutil.js b/app/webutil.js index 90a0a53..6cacb93 100644 --- a/app/webutil.js +++ b/app/webutil.js @@ -209,45 +209,6 @@ WebUtil.eraseSetting = function (name) { } }; -/* - * Alternate stylesheet selection - */ -WebUtil.getStylesheets = function () { - "use strict"; - var links = document.getElementsByTagName("link"); - var sheets = []; - - for (var i = 0; i < links.length; i += 1) { - if (links[i].title && - links[i].rel.toUpperCase().indexOf("STYLESHEET") > -1) { - sheets.push(links[i]); - } - } - return sheets; -}; - -// No sheet means try and use value from cookie, null sheet used to -// clear all alternates. -WebUtil.selectStylesheet = function (sheet) { - "use strict"; - if (typeof sheet === 'undefined') { - sheet = 'default'; - } - - var sheets = WebUtil.getStylesheets(); - for (var i = 0; i < sheets.length; i += 1) { - var link = sheets[i]; - if (link.title === sheet) { - Util.Debug("Using stylesheet " + sheet); - link.disabled = false; - } else { - //Util.Debug("Skipping stylesheet " + link.title); - link.disabled = true; - } - } - return sheet; -}; - WebUtil.injectParamIfMissing = function (path, param, value) { // force pretend that we're dealing with a relative path // (assume that we wanted an extra if we pass one in) diff --git a/vnc.html b/vnc.html index 5d9331e..9d2240e 100644 --- a/vnc.html +++ b/vnc.html @@ -54,8 +54,6 @@ - - -
  • - -