Spectral/js/util.js

13 lines
257 B
JavaScript
Raw Normal View History

2018-09-10 00:06:32 +00:00
.pragma library
function pushToStack(stack, page) {
if(page && stack.currentItem !== page) {
if(stack.depth === 1) {
stack.replace(page)
} else {
2018-09-13 03:58:02 +00:00
stack.pop(null)
stack.replace(page)
2018-09-10 00:06:32 +00:00
}
}
}