FluentReader/dist/article/article.js

11 lines
474 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]);
}
2020-06-07 07:03:19 +02:00
document.documentElement.style.fontSize = get("s") + "px"
2020-06-06 13:48:08 +02:00
let main = document.getElementById("main")
main.innerHTML = decodeURIComponent(window.atob(get("h")))
document.addEventListener("click", event => {
event.preventDefault()
2020-06-07 07:03:19 +02:00
if (event.target.href) post("request-navigation", event.target.href)
2020-06-06 13:48:08 +02:00
})