add warning message to not paste in dev console

This commit is contained in:
Mystikfluu 2022-06-16 16:15:46 +02:00
parent 58734901b1
commit 1b0a8fddfc
13 changed files with 24 additions and 2 deletions

10
js/warn_message.js Normal file
View File

@ -0,0 +1,10 @@
const warn_messages = [
["%cDo not paste any text in here","background: red; color: yellow; font-size: x-large"],
["Pasting anything in here may give others access to your account.",""]
]
function warnmessage() {
for (let message of warn_messages) {
console.log(message[0],message[1]);
}
}
setInterval(warnmessage,3000)

View File

@ -4,6 +4,7 @@
<meta charset="utf-8">
<title>IPost Privacy Policy</title>
<script src="/js/addnavbar.js" charset="utf-8"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
</head>
<body>
<h1>Privacy Policy for IPost</h1>

View File

@ -4,6 +4,7 @@
<meta charset="utf-8">
<title>IPost Terms of Service</title>
<script src="/js/addnavbar.js" charset="utf-8"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
</head>
<body>
<h1>Website Terms and Conditions of Use</h1>

View File

@ -9,6 +9,7 @@
<link rel="stylesheet" href="/css/global.css">
<script src="/js/addnavbar.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/httppost.js"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
</head>
<body>
<div>

View File

@ -9,6 +9,7 @@
<link rel="stylesheet" href="/css/global.css">
<script src="/js/addnavbar.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/httppost.js"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
</head>
<body>
<div>

View File

@ -5,6 +5,7 @@
<link rel="stylesheet" href="/css/global.css">
<script src="/js/index.js" charset="utf-8"></script>
<script src="/js/addnavbar.js" charset="utf-8"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
</head>
<body>

View File

@ -2,10 +2,11 @@
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="/css/logon.css">
<script src="/js/warn_message.js" charset="utf-8"></script>
<script type="text/javascript">
function login() {
const pw = document.getElementById("pass").value
localStorage.setItem("decryption_key",pw)
localStorage.setItem("decryption_key",pw)
//yes I know this is not secure, but at this point I think it'd be better to trust the client for end-to-end encryption
}
</script>

View File

@ -8,6 +8,7 @@
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/global.css">
<script src="/js/addnavbar.js" charset="utf-8"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
</head>
<body>
<header>

View File

@ -9,6 +9,7 @@
<script type="text/javascript" src="/js/htmlescape.js"></script>
<script type="text/javascript" src="/js/addnavbar.js"></script>
<script type="text/javascript" src="/js/markdown.js"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
</head>
<body>
<div id="loading" class="status">

View File

@ -2,6 +2,7 @@
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="/css/logon.css">
<script src="/js/warn_message.js" charset="utf-8"></script>
<script type="text/javascript">
function register() {
const pw = document.getElementById("pass").value

View File

@ -12,6 +12,7 @@
<script src="/js/addnavbar.js" charset="utf-8"></script>
<script src="/js/search.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/markdown.js"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
<style media="screen">
.result {
background-color: darkgray;

View File

@ -4,8 +4,9 @@
<meta charset="utf-8">
<title>IPost | User settings</title>
<link rel="stylesheet" href="/css/global.css">
<script src="/js/warn_message.js" charset="utf-8"></script>
</head>
<body>
</body>
</html>

View File

@ -8,6 +8,7 @@
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/global.css">
<script src="/js/addnavbar.js" charset="utf-8"></script>
<script src="/js/warn_message.js" charset="utf-8"></script>
<script src="/js/httppost.js" charset="utf-8"></script>
<script src="/js/user.js" charset="utf-8"></script>
</head>