mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 12:27:58 +01:00
Fix :bmark!.
--HG-- extra : rebase_source : 0a2fca19627555ada35aa580e58bc5e0e608a756
This commit is contained in:
@@ -34,17 +34,16 @@ const Bookmarks = Module("bookmarks", {
|
||||
add: function add(starOnly, title, url, keyword, tags, force) {
|
||||
try {
|
||||
let uri = util.createURI(url);
|
||||
if (!force && bookmarks.isBookmarked(uri.spec)) {
|
||||
if (force && bookmarks.isBookmarked(uri.spec))
|
||||
// WTF? This seems wrong... --Kris
|
||||
for (let bmark in bookmarkcache) {
|
||||
for (let bmark in bookmarkcache)
|
||||
if (bmark[0] == uri.spec) {
|
||||
var id = bmark[5];
|
||||
if (title)
|
||||
services.get("bookmarks").setItemTitle(id, title);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (id == undefined)
|
||||
id = services.get("bookmarks").insertBookmark(
|
||||
services.get("bookmarks")[starOnly ? "unfiledBookmarksFolder" : "bookmarksMenuFolder"],
|
||||
|
||||
@@ -914,6 +914,7 @@ const Commands = Module("commands", {
|
||||
// dynamically get completions as specified with the command's completer function
|
||||
let command = cmd && commands.get(cmd);
|
||||
if (!command) {
|
||||
context.highlight();
|
||||
context.highlight(0, cmd && cmd.length, "SPELLCHECK");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -266,6 +266,7 @@ const Hints = Module("hints", {
|
||||
|
||||
hint.span = baseNodeAbsolute.cloneNode(true);
|
||||
|
||||
rect = elem.getClientRects()[0] || rect;
|
||||
let leftPos = Math.max((rect.left + offsetX), offsetX);
|
||||
let topPos = Math.max((rect.top + offsetY), offsetY);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ const BookmarkCache = Module("BookmarkCache", {
|
||||
bookmarks.addObserver(this, false);
|
||||
},
|
||||
|
||||
__iterator__: function () (val for ([, val] in Iterator(this.bookmarks))),
|
||||
__iterator__: function () (val for ([, val] in Iterator(bookmarkcache.bookmarks))),
|
||||
|
||||
get bookmarks() Class.replaceProperty(this, "bookmarks", this.load()),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user