diff --git a/install-usercss/install-usercss.js b/install-usercss/install-usercss.js index ee958a4d..c11bb6fd 100644 --- a/install-usercss/install-usercss.js +++ b/install-usercss/install-usercss.js @@ -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'));