зеркало из https://github.com/mozilla/gecko-dev.git
Bug 532770 - Allow tab sync's filtered urls to be set by pref
Expose engine.tabs.filteredUrls as a string to be used as regex and filter case insensitively.
This commit is contained in:
Родитель
6302f7e50b
Коммит
a27daaaec5
|
@ -49,8 +49,6 @@ Cu.import("resource://weave/trackers.js");
|
||||||
Cu.import("resource://weave/type_records/tabs.js");
|
Cu.import("resource://weave/type_records/tabs.js");
|
||||||
Cu.import("resource://weave/engines/clientData.js");
|
Cu.import("resource://weave/engines/clientData.js");
|
||||||
|
|
||||||
const filteredUrls = /^(about:blank|chrome:\/\/weave\/.*)$/i;
|
|
||||||
|
|
||||||
function TabEngine() {
|
function TabEngine() {
|
||||||
this._init();
|
this._init();
|
||||||
}
|
}
|
||||||
|
@ -132,6 +130,8 @@ TabStore.prototype = {
|
||||||
|
|
||||||
|
|
||||||
getAllTabs: function getAllTabs(filter) {
|
getAllTabs: function getAllTabs(filter) {
|
||||||
|
let filteredUrls = new RegExp(Svc.Prefs.get("engine.tabs.filteredUrls"), "i");
|
||||||
|
|
||||||
// Iterate through each tab of each window
|
// Iterate through each tab of each window
|
||||||
let allTabs = [];
|
let allTabs = [];
|
||||||
let wins = Svc.WinMediator.getEnumerator("navigator:browser");
|
let wins = Svc.WinMediator.getEnumerator("navigator:browser");
|
||||||
|
|
|
@ -15,6 +15,7 @@ pref("extensions.weave.engine.passwords", true);
|
||||||
pref("extensions.weave.engine.prefs", true);
|
pref("extensions.weave.engine.prefs", true);
|
||||||
pref("extensions.weave.engine.tabs", true);
|
pref("extensions.weave.engine.tabs", true);
|
||||||
pref("extensions.weave.engine.tabs.backup", true);
|
pref("extensions.weave.engine.tabs.backup", true);
|
||||||
|
pref("extensions.weave.engine.tabs.filteredUrls", "^(about:blank|chrome://weave/.*)$");
|
||||||
|
|
||||||
pref("extensions.weave.log.appender.console", "Warn");
|
pref("extensions.weave.log.appender.console", "Warn");
|
||||||
pref("extensions.weave.log.appender.dump", "Error");
|
pref("extensions.weave.log.appender.dump", "Error");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче