restore the page title after escaping out of a search
This commit is contained in:
parent
d767ee1161
commit
207550981f
1 changed files with 3 additions and 0 deletions
|
@ -52,6 +52,8 @@
|
||||||
|
|
||||||
var themesWidth = null;
|
var themesWidth = null;
|
||||||
|
|
||||||
|
var titleBeforeSearch = document.title;
|
||||||
|
|
||||||
if (!String.prototype.startsWith) {
|
if (!String.prototype.startsWith) {
|
||||||
String.prototype.startsWith = function(searchString, position) {
|
String.prototype.startsWith = function(searchString, position) {
|
||||||
position = position || 0;
|
position = position || 0;
|
||||||
|
@ -267,6 +269,7 @@
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
addClass(search, "hidden");
|
addClass(search, "hidden");
|
||||||
removeClass(document.getElementById("main"), "hidden");
|
removeClass(document.getElementById("main"), "hidden");
|
||||||
|
document.title = titleBeforeSearch;
|
||||||
}
|
}
|
||||||
defocusSearchBar();
|
defocusSearchBar();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue