Hopefully fix history state.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
814b43e43d
commit
489ec3a7df
10
index.js
10
index.js
@ -9,6 +9,7 @@ var SortOrderBStateI = true
|
||||
var SortOrderEnabled = false
|
||||
var SortValue = ""
|
||||
var OrderValue = ""
|
||||
var ReplaceNeeded = true
|
||||
function SetupJS() {
|
||||
SetupIndexArray()
|
||||
SetupJSTheme()
|
||||
@ -78,11 +79,16 @@ function PushHistory(url) {
|
||||
var s = true
|
||||
if (window.history) {
|
||||
if (window.history.pushState) {
|
||||
window.history.pushState({
|
||||
var objectData = {
|
||||
light: !!document.getElementById("so-theme"),
|
||||
order: document.getElementById("so-order").value,
|
||||
sort: document.getElementById("so-sort").value
|
||||
}, "", url);
|
||||
};
|
||||
if (ReplaceNeeded) {
|
||||
window.history.replaceState(objectData, "", url);
|
||||
ReplaceNeeded = false
|
||||
}
|
||||
window.history.pushState( objectData, "", url);
|
||||
s = false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user