hugo-sandstorm/plugins/sandstorm.js

8 lines
236 B
JavaScript
Raw Permalink Normal View History

import router from "~router"
if(process.BROWSER_BUILD)
router.afterEach(() => {
window.parent.postMessage({"setTitle": document.title}, "*")
window.parent.postMessage({"setPath": location.pathname + location.hash}, "*")
})