toggle fullscreen
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 32s

This commit is contained in:
Flummi
2023-05-06 06:54:09 +02:00
parent a753a3f27d
commit 84104b58bc
7 changed files with 57 additions and 3 deletions

View File

@ -12,5 +12,19 @@ export default (router, tpl) => {
"Location": req.headers.referer ?? "/"
}).end();
});
router.get(/^\/tfull\//, async (req, res) => {
let full = req.session.fullscreen;
if(full == 1)
full = 0;
else
full = 1;
return res.writeHead(301, {
"Cache-Control": "no-cache, public",
"Set-Cookie": `theme=${full}; Path=/`,
"Location": req.headers.referer ?? "/"
}).end();
});
return router;
};