let myhistory = [];
-const app = new App({
+const app = new App({ // eslint-disable-line no-unused-vars
target: document.body
});
document.addEventListener('click', function (e) {
// loop parent nodes from the target to the delegation node
- for (var target = e.target; target && target != this; target = target.parentNode) {
+ for (var target = e.target; target && target !== this; target = target.parentNode) {
if (target.matches('a')) {
var target_url = target.href;
}
}
});
-
-// deal with back-button and other user action
-window.onpopstate = function () {
- refresh_page();
-};