From bc7434cf5c1e53b3cdc1ceb37614cafd5a12df26 Mon Sep 17 00:00:00 2001 From: Deathamns Date: Thu, 12 Feb 2015 16:50:40 +0100 Subject: [PATCH] Chrome: bypass options_ui --- platform/chromium/manifest.json | 1 - platform/chromium/options_ui.html | 22 +--------------------- platform/chromium/vapi-common.js | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index 10fcb7e5d..5a93e349e 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -41,7 +41,6 @@ "minimum_chrome_version": "22.0", "options_page": "dashboard.html", "options_ui": { - "chrome_style": true, "page": "options_ui.html" }, "permissions": [ diff --git a/platform/chromium/options_ui.html b/platform/chromium/options_ui.html index c62a69388..365ca87e9 100644 --- a/platform/chromium/options_ui.html +++ b/platform/chromium/options_ui.html @@ -1,23 +1,3 @@ - - - - - - - - - + - - - - - diff --git a/platform/chromium/vapi-common.js b/platform/chromium/vapi-common.js index e04b5d779..939c7eda1 100644 --- a/platform/chromium/vapi-common.js +++ b/platform/chromium/vapi-common.js @@ -29,6 +29,29 @@ 'use strict'; +var fileName = 'options_ui.html'; + +if ( location.pathname.slice(-fileName.length) === fileName ) { + var messager = vAPI.messaging.channel('_open'); + messager.send({ + what: 'gotoURL', + details: { + url: 'dashboard.html', + index: -1 + } + }); + window.close(); +} + +})(); + +/******************************************************************************/ +/******************************************************************************/ + +(function() { + +'use strict'; + self.vAPI = self.vAPI || {}; var chrome = self.chrome;