diff --git a/scripts/esbuild.js b/scripts/esbuild.js index 9846422d..aa753d76 100644 --- a/scripts/esbuild.js +++ b/scripts/esbuild.js @@ -1,6 +1,6 @@ const esbuild = require('esbuild') -for (let f of ["content", "background", "help", "newtab", "commandline_frame"]) { +for (let f of ["content", "background", "help", "newtab", "reader", "commandline_frame"]) { esbuild.build({ entryPoints: [`src/${f}.ts`], bundle: true, diff --git a/src/reader.ts b/src/reader.ts new file mode 100644 index 00000000..461dcbeb --- /dev/null +++ b/src/reader.ts @@ -0,0 +1,9 @@ +// import * as config from "@src/lib/config" + +function updatePage(){ + const dodgyhtml = atob(window.location.hash.substr(1)) + document.body.innerHTML = dodgyhtml +} + +window.addEventListener("load", updatePage) +window.addEventListener("hashchange", updatePage) diff --git a/src/static/reader.html b/src/static/reader.html new file mode 100644 index 00000000..5f97c7dd --- /dev/null +++ b/src/static/reader.html @@ -0,0 +1,15 @@ + + + + +   + + + + + + + + + +