mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-05 08:15:48 +01:00
Fix bookmarks.isBookmark yet again. Check manually, this time.
This commit is contained in:
@@ -124,7 +124,7 @@ function Bookmarks() //{{{
|
||||
return bookmarks.length < length;
|
||||
}
|
||||
|
||||
function findRoot(id)
|
||||
this.findRoot = function findRoot(id)
|
||||
{
|
||||
do
|
||||
{
|
||||
@@ -134,6 +134,8 @@ function Bookmarks() //{{{
|
||||
return root;
|
||||
}
|
||||
|
||||
this.isBookmark = function (id) rootFolders.indexOf(self.findRoot(id)) >= 0;
|
||||
|
||||
// since we don't use a threaded bookmark loading (by set preload)
|
||||
// anymore, is this loading synchronization still needed? --mst
|
||||
let loading = false;
|
||||
@@ -189,7 +191,7 @@ function Bookmarks() //{{{
|
||||
// liberator.dump("onItemAdded(" + itemId + ", " + folder + ", " + index + ")\n");
|
||||
if (bookmarksService.getItemType(itemId) == bookmarksService.TYPE_BOOKMARK)
|
||||
{
|
||||
if (rootFolders.indexOf(findRoot(itemId)) >= 0)
|
||||
if (self.isBookmark(itemId))
|
||||
{
|
||||
let bmark = loadBookmark(readBookmark(itemId));
|
||||
storage.fireEvent(name, "add", bmark);
|
||||
@@ -606,7 +608,8 @@ function Bookmarks() //{{{
|
||||
{
|
||||
try
|
||||
{
|
||||
return bookmarksService.isBookmarked(util.newURI(url));
|
||||
return bookmarksService.getBookmarkIdsForURI(makeURI(url), {})
|
||||
.some(cache.isBookmark);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
||||
@@ -173,7 +173,7 @@ function Tabs() //{{{
|
||||
setter: function (value)
|
||||
{
|
||||
let [open, restriction] = [1, 0];
|
||||
for (let [, opt] in Iterator(this.parseValue(value)))
|
||||
for (let [, opt] in Iterator(this.parseValues(value)))
|
||||
{
|
||||
if (opt == "tab")
|
||||
open = 3;
|
||||
|
||||
@@ -305,7 +305,7 @@ var observers = {};
|
||||
var timers = {};
|
||||
|
||||
var storage = {
|
||||
alwaysReload: [],
|
||||
alwaysReload: {},
|
||||
newObject: function newObject(key, constructor, store, type, options, reload)
|
||||
{
|
||||
if (!(key in keys) || reload || key in this.alwaysReload)
|
||||
|
||||
Reference in New Issue
Block a user