Change panel references to popup
Panels have been deprecated for a long time, and when creating them a
popup is created instead, so this change introduces the following:
- Instead of trying to create a panel, create a popup directly
- Change all i18n strings so "popups" are mentioned instead of "panels"
- Change the |uniquetab| option so it is now set to "popup" instead of
"panel", while being backwards-compatible with the "panel" value.
- Change the default |uniquetab| option to "popup", because users seem
to like this option the most (impression from the CWS reviews).
Fixes: #13
Change-Id: I67aea8168013dd4b77d4ea4229179bcd5145cb6d
diff --git a/src/background.js b/src/background.js
index 8fed6f6..7058875 100644
--- a/src/background.js
+++ b/src/background.js
@@ -39,10 +39,10 @@
});
});
});
- } else if (items.uniquetab == 'panel') {
+ } else if (items.uniquetab == 'panel' || items.uniquetab == 'popup') {
chrome.windows.create(
{
- type: 'panel',
+ type: 'popup',
url,
width: 1000,
height: 382,
@@ -163,7 +163,7 @@
chrome.storage.sync.get(null, function(items) {
if (details.reason == 'install') {
if (isEmpty(items)) {
- var settings = {'translateinto': {}, 'uniquetab': ''},
+ var settings = {'translateinto': {}, 'uniquetab': 'popup'},
default_language_1 =
chrome.i18n.getMessage('@@ui_locale').replace('_', '-'),
default_language_2 =