FluentReader/dist/article/article.js

10 lines
434 B
JavaScript
Raw Normal View History

2020-06-06 13:48:08 +02:00
function get(name) {
if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search))
return decodeURIComponent(name[1]);
}
let main = document.getElementById("main")
main.innerHTML = decodeURIComponent(window.atob(get("h")))
document.addEventListener("click", event => {
event.preventDefault()
if (event.target.href) ipcRenderer.sendToHost("request-navigation", event.target.href)
})