Skip to content

Commit

Permalink
Display Message Feature
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyAaron committed Sep 14, 2023
1 parent 5e5eada commit 51abae6
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
30 changes: 30 additions & 0 deletions message.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="./messageData.js"></script>
<title>App Dev Scan Data</title>

<link rel="stylesheet" href="mainStyle.css">
<link rel="stylesheet" href="navbar.css">
<link rel="stylesheet" href="home.css">


</head>
<body>
<div id="homeContent">
<div id="homeEntranceContent">
<nav id="navbar">
<ul id="navbarList">
<li class="navbarButton logo">App Development Team</li>
</ul>
</nav>
<div style="padding: 32px;">
<h1 id="msg">Scans failed: </h1>
</div>
</div>
</div>
</body>
</html>
28 changes: 28 additions & 0 deletions messageData.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

var msgText = 0
var msg = 0

var count = 0

window.onload = () => {
msgText = document.getElementById("msg")
var url = window.location.search
var urlParams = new URLSearchParams(url);
msg = urlParams.get("msg")


console.log(url)
updateView()
}


function updateView() {
msgText.textContent = msg.substring(0, count)

count++

if(count <= msg.length) {
setTimeout(updateView, 500)
}
}

0 comments on commit 51abae6

Please sign in to comment.