Spectral/js/util.js
2018-09-16 16:09:36 +08:00

13 lines
257 B
JavaScript

.pragma library
function pushToStack(stack, page) {
if(page && stack.currentItem !== page) {
if(stack.depth === 1) {
stack.replace(page)
} else {
stack.pop(null)
stack.replace(page)
}
}
}