Commit 8ee99621 authored by karol@jagiello.it's avatar karol@jagiello.it
Browse files

1.9.0 - fixes for manager. (import/export for groups and sessions)

parent 9db4d8c1
......@@ -330,6 +330,9 @@ function StartBackgroundListeners() {
return;
}
});
// WebChromeClient.onConsoleMessage(ConsoleMessage consoleMessage)
}
// NEW TAB
......
......@@ -36,7 +36,6 @@ function QuantumStart() {
if (opt.debug == true) {
if (storage.debug_log != undefined) b.debug = storage.debug_log;
// if (retry == 0) pushlog("TreeTabs background start");
}
for (let win of w) {
......@@ -53,12 +52,6 @@ function QuantumStart() {
if (opt.skip_load == false && tabs_data[tab.id] != undefined) {
b.tabs[tab.id] = Object.assign({}, tabs_data[tab.id]);
tabs_matched++;
if (tabs_data[tab.id].parent_ttid != undefined && tabs_data[tab.id].parent_ttid != "") { // legacy
b.tabs[tab.id].parent = tabs_data[tab.id].parent_ttid; // legacy
delete b.tabs[tab.id].parent_ttid; // legacy
} // legacy
} else {
QuantumAppendTabTTId(tab);
}
......
......@@ -16,6 +16,7 @@ function VivaldiStart() {
chrome.storage.local.get(null, function(storage) {
// LOAD PREFERENCES
Preferences_GetCurrentPreferences(storage);
// LEGACY START TO CONVERT DATA
if ((storage.data_version == undefined && storage.tabs != undefined && storage.tabs.length) || (storage.data_version != undefined && storage.data_version < 2)) {
b.safe_mode = true;
......@@ -188,7 +189,7 @@ function VivaldiStart() {
chrome.storage.local.remove("recovered_BAK");
}
if (opt.debug) pushlog("VivaldiStart, Current windows count is: " + w.length + "Saved windows count is: " + LoadedWindows.length + "Loaded tabs count is: " + LoadedTabs.length + "Matching tabs: " + tabs_matched);
if (opt.debug) pushlog("VivaldiStart, Current windows count is: " + w.length + ", Saved windows count is: " + Object.keys(LoadedWindows).length + ", Loaded tabs count is: " + Object.keys(LoadedTabs).length + ", Matching tabs: " + tabs_matched);
}
}
......
......@@ -48,5 +48,5 @@
"page": "options/options.html",
"open_in_tab": true
},
"version": "1.8.9"
"version": "1.9.0"
}
\ No newline at end of file
This diff is collapsed.
......@@ -470,6 +470,7 @@ async function Tabs_LoadFavicon(tabId, Img, TryUrls, TabHeaderNode, i) {
async function Tabs_SaveTabs() {
setInterval(function() {
if (opt.debug) Utils_log("f: Tabs_SaveTabs");
if (tt.schedule_update_data > 1) tt.schedule_update_data = 1;
if (tt.schedule_update_data > 0) {
let pins_data = [];
......@@ -490,6 +491,7 @@ async function Tabs_SaveTabs() {
}
async function Tabs_RearrangeBrowserTabs() {
if (opt.debug) Utils_log("f: Tabs_RearrangeBrowserTabs");
setInterval(function() {
if (tt.schedule_rearrange_tabs > 0) {
tt.schedule_rearrange_tabs--;
......@@ -514,6 +516,7 @@ async function Tabs_RearrangeBrowserTabsLoop(ttTabIds, tabIds, tabIndex) {
}
function Tabs_RearrangeTree(TTtabs, TTfolders, show_finish_in_status) {
if (opt.debug) Utils_log("f: Tabs_RearrangeTree");
Manager_ShowStatusBar({show: true, spinner: true, message: chrome.i18n.getMessage("status_bar_rearranging_tabs")});
let Nodes = document.querySelectorAll(".pin, .tab, .folder");
for (let Node of Nodes) {
......
......@@ -56,7 +56,7 @@ function StartSidebarListeners() {
});
chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
if (message.command == "bg_started") {
window.location.reload();
sendResponse();
return;
}
if (message.command == "backup_available") {
......@@ -127,6 +127,10 @@ function StartSidebarListeners() {
return;
}
if (message.windowId == tt.CurrentWindowId) {
if (message.command == "sidebar_started") {
sendResponse(true);
return;
}
if (message.command == "tab_created") {
if (message.InsertAfterId && document.querySelectorAll("#" + tt.active_group + " .tab").length == 0) {
message.InsertAfterId = undefined;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment