mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Add dedicated reader page
This commit is contained in:
parent
569b01a607
commit
5bec833bb6
3 changed files with 25 additions and 1 deletions
|
@ -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,
|
||||
|
|
9
src/reader.ts
Normal file
9
src/reader.ts
Normal file
|
@ -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)
|
15
src/static/reader.html
Normal file
15
src/static/reader.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<html lang="en" class="TridactylOwnNamespace">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title> </title>
|
||||
<link rel="stylesheet" href="css/reader.css">
|
||||
<link rel="stylesheet" href="css/content.css">
|
||||
<link rel="stylesheet" href="css/hint.css">
|
||||
<link rel="stylesheet" href="css/viewsource.css">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
<script src="../content.js"></script>
|
||||
<script src="../reader.js"></script>
|
||||
</html>
|
Loading…
Add table
Reference in a new issue