hugo-sandstorm/plugins/sandstorm.js
2017-03-19 12:04:38 -05:00

8 lines
236 B
JavaScript

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