diff --git a/content/bookmarks.js b/content/bookmarks.js index 7fd381bc..fc7c1fd9 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -152,15 +152,15 @@ liberator.Bookmarks = function () //{{{ }, onItemChanged: function (itemId, property, isAnnotation, value) { - if(isAnnotation) + if (isAnnotation) return; // liberator.dump("onItemChanged(" + itemId + ", " + property + ", " + value + ")\n"); var bookmark = bookmarks.filter(function (item) item[properties.id] == itemId)[0]; - if(bookmark) + if (bookmark) { - if(property == "tags") + if (property == "tags") value = taggingService.getTagsForURI(ioService.newURI(bookmark[properties.uri], null, null), {}); - if(property in properties) + if (property in properties) bookmark[properties[property]] = value; liberator.storage.fireEvent(name, "change", itemId); } @@ -175,10 +175,10 @@ liberator.Bookmarks = function () //{{{ bookmarksService.addObserver(observer, false); } - var cache = liberator.storage.newObject("bookmark-cache", Cache, false); + var cache = liberator.storage.newObject("bookmark-cache", Cache, false); liberator.storage.addObserver("bookmark-cache", function (key, event, arg) { - if(event == "add") + if (event == "add") liberator.autocommands.trigger("BookmarkAdd", ""); liberator.statusline.updateUrl(); }); @@ -956,7 +956,7 @@ liberator.QuickMarks = function () //{{{ list: function (filter) { - var marks = [key for ([key,val] in qmarks)]; + var marks = [key for ([key, val] in qmarks)]; // This was a lot nicer without the lambda... var lowercaseMarks = marks.filter(function (x) /[a-z]/.test(x)).sort(); var uppercaseMarks = marks.filter(function (x) /[A-Z]/.test(x)).sort(); diff --git a/content/completion.js b/content/completion.js index cd5dcd37..b10c2c6e 100644 --- a/content/completion.js +++ b/content/completion.js @@ -549,7 +549,7 @@ liberator.Completion = function () //{{{ } // filter on tags - if(filterTags.some(function (tag) tag && tags.indexOf(tag) == -1)) + if (filterTags.some(function (tag) tag && tags.indexOf(tag) == -1)) continue; if (url.indexOf(filter) == -1) diff --git a/content/editor.js b/content/editor.js index 4d660b0a..afbab047 100644 --- a/content/editor.js +++ b/content/editor.js @@ -883,9 +883,9 @@ liberator.Editor = function () //{{{ { var timeout = 100; var colors = [tmpBg, oldBg, tmpBg, oldBg]; - (function() { + (function () { textBox.style.backgroundColor = colors.shift(); - if(colors.length > 0) + if (colors.length > 0) setTimeout(arguments.callee, timeout) })(); }