Editor: don't save window size after browser restart

Because if an edit style window was the only window open when closing the browser it'll become the main browser window after restart and is likely to be resized differently.
This commit is contained in:
tophf 2015-06-15 18:56:48 +03:00
parent 67fe43e9a9
commit 8b890e8652

View File

@ -409,8 +409,12 @@ chrome.tabs.query({currentWindow: true}, function(tabs) {
var windowId = tabs[0].windowId;
if (prefs.getPref("openEditInWindow")) {
if (tabs.length == 1 && window.history.length == 1) {
chrome.windows.getAll(function(windows) {
if (windows.length > 1) {
sessionStorageHash("saveSizeOnClose").set(windowId, true);
saveSizeOnClose = true;
}
});
} else {
saveSizeOnClose = sessionStorageHash("saveSizeOnClose").value[windowId];
}