usercss install: reuse current tab for editor when possible

This commit is contained in:
tophf 2017-11-29 00:05:52 +03:00
parent cbe90272b9
commit b762f48135

View File

@ -198,10 +198,13 @@
updateMeta(style);
sendMessage({method: 'openEditor', id: style.id});
if (!liveReload) {
chrome.runtime.sendMessage({method: 'closeTab'});
if (!liveReload && !prefs.get('openEditInWindow')) {
chrome.tabs.update({url: '/edit.html?id=' + style.id});
} else {
BG.openEditor(style.id);
if (!liveReload) {
closeCurrentTab();
}
}
window.dispatchEvent(new CustomEvent('installed'));