From 32ad9420deb4fb06e7d7f6fcfbc3c6ab6100ba35 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/vapi-common.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/platform/chromium/vapi-common.js b/platform/chromium/vapi-common.js index e04b5d7..939c7ed 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;