diff --git a/package.json b/package.json index ebc16fef..881f2bb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nighttab", - "version": "4.3.0", + "version": "4.4.1", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", "main": "index.js", "scripts": { diff --git a/src/js/init.js b/src/js/init.js index 24d9f5bb..8d36f554 100644 --- a/src/js/init.js +++ b/src/js/init.js @@ -5,6 +5,7 @@ state.init(); bookmarks.init(); theme.init(); menu.init(); +search.init(); link.init(); control.init(); greeting.init(); @@ -14,7 +15,6 @@ clock.init(); keyboard.init(); layout.init(); background.init(); -search.init(); header.init(); modal.init(); shade.init(); diff --git a/src/js/link.js b/src/js/link.js index eb0c7503..4d8d6f71 100644 --- a/src/js/link.js +++ b/src/js/link.js @@ -1744,10 +1744,10 @@ var link = (function() { render.clear.item(); render.clear.group(); render.all(); - bind.sort.group(); - bind.sort.item(); render.group.tabindex(); render.item.tabindex(); + bind.sort.group(); + bind.sort.item(); }; var init = function() { diff --git a/src/js/search.js b/src/js/search.js index 00c88b14..fab2cb8d 100644 --- a/src/js/search.js +++ b/src/js/search.js @@ -5,7 +5,7 @@ var search = (function() { bind.input = function() { var searchInput = helper.e(".search-input"); searchInput.addEventListener("input", function() { - mod.searching.set(); + mod.searching.open(); render.clear.button(); render.searching(); link.groupAndItems(); @@ -16,7 +16,7 @@ var search = (function() { var searchClear = helper.e(".search-clear"); searchClear.addEventListener("click", function() { render.clear.input(); - mod.searching.set(); + mod.searching.close(); render.clear.button(); render.searching(); link.groupAndItems(); @@ -26,11 +26,18 @@ var search = (function() { var mod = {}; mod.searching = { - set: function() { + open: function() { helper.setObject({ object: state.get.current(), path: "search", - newValue: helper.e(".search-input").value != "" + newValue: true + }); + }, + close: function() { + helper.setObject({ + object: state.get.current(), + path: "search", + newValue: false }); } }; @@ -123,7 +130,7 @@ var search = (function() { var init = function() { bind.input(); bind.clear(); - mod.searching.set(); + mod.searching.close(); render.engine(); render.focus(); render.searching(); diff --git a/src/js/version.js b/src/js/version.js index 9c74c1c3..f5a9c8ef 100644 --- a/src/js/version.js +++ b/src/js/version.js @@ -1,6 +1,6 @@ var version = (function() { - var current = "4.4.0"; + var current = "4.4.1"; var name = "Enchanting Aardvark"; diff --git a/src/manifest.json b/src/manifest.json index 7360c2c4..381a3e82 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "name": "nightTab", "short_name": "nightTab", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", - "version": "4.4.0", + "version": "4.4.1", "manifest_version": 2, "chrome_url_overrides": { "newtab": "index.html"