dms/user -> ejs pages

This commit is contained in:
Mystikfluu 2022-09-10 13:39:29 +02:00
parent 381c50adf0
commit cf9a819a55
3 changed files with 24 additions and 17 deletions

View File

@ -898,6 +898,8 @@ function get_channels(){
}) })
} }
import { web_version } from "unsafe_encrypt";
let global_page_variables = { let global_page_variables = {
globalcss: load_var("./css/global.css"), globalcss: load_var("./css/global.css"),
httppostjs: load_var("./js/httppost.js"), httppostjs: load_var("./js/httppost.js"),
@ -909,7 +911,8 @@ let global_page_variables = {
getChannels: get_channels, getChannels: get_channels,
getPID: get_pid, getPID: get_pid,
getDMPID: get_dmpid, getDMPID: get_dmpid,
cookiebanner: `<script id="cookieyes" type="text/javascript" src="https://cdn-cookieyes.com/client_data/3cf33f6b631f3587bf83813b/script.js"></script>` encryptJS: min_js(web_version().toString()).code,
cookiebanner: `<script id="cookieyes" type="text/javascript" src="https://cdn-cookieyes.com/client_data/3cf33f6b631f3587bf83813b/script.js" async></script>`
} }
function handleUserFiles(request, response, overrideurl) { function handleUserFiles(request, response, overrideurl) {

View File

@ -5,18 +5,17 @@
<title>DMs</title> <title>DMs</title>
<style> <style>
<%- globalcss %> <%- globalcss %>
</style>
<style>
<%- loadfile("./css/posts.css") %> <%- loadfile("./css/posts.css") %>
</style> </style>
<script type="text/javascript"><%- httppostjs %></script> <script>
<script type="text/javascript"><%- htmlescapejs %></script> <%- httppostjs %>
<script type="text/javascript"><%- markdownjs %></script> <%- htmlescapejs %>
<script type="text/javascript"><%- warnmessagejs %></script> <%- markdownjs %>
<script><%- loadfile("./js/extend_key.js") %></script> <%- warnmessagejs %>
<script type="text/javascript" src="/api/dms/encrypt.js"></script> <%- loadfile("./js/extend_key.js") %>
<script type="text/javascript">let user = <%- JSON.stringify(user) %></script> <%- encryptJS %>
<script type="text/javascript">var posting_id = "<%- getDMPID() %>"</script> let user = <%- JSON.stringify(user) %>, posting_id = "<%- getDMPID() %>"
</script>
</head> </head>
<body> <body>
<%- navbar %> <%- navbar %>

View File

@ -5,14 +5,19 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Logged In</title> <title>Logged In</title>
<link rel="stylesheet" href="/css/style.css"> <style>
<link rel="stylesheet" href="/css/global.css"> <%- globalcss %>
<script src="/js/addnavbar.js" charset="utf-8"></script> <%- loadfile("./css/style.css") %>
<script src="/js/warn_message.js" charset="utf-8"></script> </style>
<script src="/js/httppost.js" charset="utf-8"></script> <script type="text/javascript" async>
<script src="/js/user.js" charset="utf-8"></script> <%- httppostjs %>
<%- warnmessagejs %>
<%- loadfile("./js/user.js") %>
</script>
<%- cookiebanner %>
</head> </head>
<body onload="setuser()" class="bg-dark"> <body onload="setuser()" class="bg-dark">
<%- navbar %>
<header> <header>
<h1>Welcome Back!</h1> <h1>Welcome Back!</h1>
</header> </header>