mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-06-26 12:31:47 +02:00
[feature] change search placeholder when bookmarks are not shown
This commit is contained in:
parent
1317f9a902
commit
8694cb2fc2
@ -192,7 +192,7 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render();
|
render();
|
||||||
dependents();
|
dependents();
|
||||||
search.update();
|
search.render();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
element: helper.e(".control-header-search-engine-duckduckgo"),
|
element: helper.e(".control-header-search-engine-duckduckgo"),
|
||||||
@ -201,7 +201,7 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render();
|
render();
|
||||||
dependents();
|
dependents();
|
||||||
search.update();
|
search.render();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
element: helper.e(".control-header-search-engine-giphy"),
|
element: helper.e(".control-header-search-engine-giphy"),
|
||||||
@ -210,7 +210,7 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render();
|
render();
|
||||||
dependents();
|
dependents();
|
||||||
search.update();
|
search.render();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
element: helper.e(".control-header-search-engine-custom"),
|
element: helper.e(".control-header-search-engine-custom"),
|
||||||
@ -219,14 +219,14 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render();
|
render();
|
||||||
dependents();
|
dependents();
|
||||||
search.update();
|
search.render();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
element: helper.e(".control-header-search-engine-custom-url"),
|
element: helper.e(".control-header-search-engine-custom-url"),
|
||||||
path: "header.search.engine.custom.url",
|
path: "header.search.engine.custom.url",
|
||||||
type: "text",
|
type: "text",
|
||||||
func: function() {
|
func: function() {
|
||||||
search.update();
|
search.render();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
element: helper.e(".control-header-edit-add-show"),
|
element: helper.e(".control-header-edit-add-show"),
|
||||||
@ -361,6 +361,7 @@ var control = (function() {
|
|||||||
render();
|
render();
|
||||||
dependents();
|
dependents();
|
||||||
header.render();
|
header.render();
|
||||||
|
search.render();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
element: helper.e(".control-bookmarks-name-show"),
|
element: helper.e(".control-bookmarks-name-show"),
|
||||||
|
12
js/search.js
12
js/search.js
@ -60,8 +60,14 @@ var search = (function() {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
var update = function() {
|
var render = function() {
|
||||||
var search = helper.e(".search");
|
var search = helper.e(".search");
|
||||||
|
var searchInput = helper.e(".search-input");
|
||||||
|
if (state.get().bookmarks.link.show) {
|
||||||
|
searchInput.setAttribute("placeholder", "Find or Search");
|
||||||
|
} else {
|
||||||
|
searchInput.setAttribute("placeholder", "Search");
|
||||||
|
};
|
||||||
search.setAttribute("action", state.get().header.search.engine[state.get().header.search.engine.selected].url);
|
search.setAttribute("action", state.get().header.search.engine[state.get().header.search.engine.selected].url);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -83,7 +89,7 @@ var search = (function() {
|
|||||||
|
|
||||||
var init = function() {
|
var init = function() {
|
||||||
bind();
|
bind();
|
||||||
update();
|
render();
|
||||||
_focus();
|
_focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -91,7 +97,7 @@ var search = (function() {
|
|||||||
return {
|
return {
|
||||||
init: init,
|
init: init,
|
||||||
get: get,
|
get: get,
|
||||||
update: update,
|
render: render,
|
||||||
clear: clear
|
clear: clear
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
var version = (function() {
|
var version = (function() {
|
||||||
|
|
||||||
// version is normally bumped when the state needs changing or any new functionality is added
|
// version is normally bumped when the state needs changing or any new functionality is added
|
||||||
var current = "2.14.0";
|
var current = "2.15.0";
|
||||||
|
|
||||||
var compare = function(a, b) {
|
var compare = function(a, b) {
|
||||||
var pa = a.split(".");
|
var pa = a.split(".");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user