Compare commits

...

3 commits

4 changed files with 148 additions and 38 deletions

87
package-lock.json generated
View file

@ -9,13 +9,14 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"axios": "^1.6.8",
"axios": "^1.7.6",
"ejs": "^3.1.10",
"express": "^4.19.2",
"ua-parser-js": "^1.0.37"
"Package": "^0.0.1",
"ua-parser-js": "^1.0.38"
},
"devDependencies": {
"nodemon": "^3.1.0"
"nodemon": "^3.1.4"
}
},
"node_modules/abbrev": {
@ -79,9 +80,9 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"node_modules/axios": {
"version": "1.6.8",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz",
"integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==",
"version": "1.7.6",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.6.tgz",
"integrity": "sha512-Ekur6XDwhnJ5RgOCaxFnXyqlPALI3rVeukZMwOdfghW7/wGz784BYKiQq+QD8NPcr91KRo30KfHOchyijwWw7g==",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
@ -135,12 +136,12 @@
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"dependencies": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@ -455,9 +456,9 @@
}
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
@ -826,9 +827,9 @@
}
},
"node_modules/nodemon": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.0.tgz",
"integrity": "sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==",
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.4.tgz",
"integrity": "sha512-wjPBbFhtpJwmIeY2yP7QF+UKzPfltVGtfce1g/bB15/8vCGZj8uxD62b/b9M9/WVgme0NZudpownKN+c0plXlQ==",
"dev": true,
"dependencies": {
"chokidar": "^3.5.2",
@ -937,6 +938,17 @@
"node": ">= 0.8"
}
},
"node_modules/Package": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/Package/-/Package-0.0.1.tgz",
"integrity": "sha512-k3XuxxO/7V+TqJEDiFayf5Wo8D043B6iJcW5oj1jj8SdB0mq2V/QBtkzw3vAHO9+9m7HwNXgjarzr3aLofLUZQ==",
"engines": [
{
"name": "cordova",
"version": ">=3.0.0"
}
]
},
"node_modules/parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@ -1225,9 +1237,9 @@
}
},
"node_modules/ua-parser-js": {
"version": "1.0.37",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz",
"integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==",
"version": "1.0.38",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.38.tgz",
"integrity": "sha512-Aq5ppTOfvrCMgAPneW1HfWj66Xi7XL+/mIy996R1/CLS/rcyJQm6QZdsKrUeivDFQ+Oc9Wyuwor8Ze8peEoUoQ==",
"funding": [
{
"type": "opencollective",
@ -1327,9 +1339,9 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"axios": {
"version": "1.6.8",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz",
"integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==",
"version": "1.7.6",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.6.tgz",
"integrity": "sha512-Ekur6XDwhnJ5RgOCaxFnXyqlPALI3rVeukZMwOdfghW7/wGz784BYKiQq+QD8NPcr91KRo30KfHOchyijwWw7g==",
"requires": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
@ -1376,12 +1388,12 @@
}
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"requires": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
}
},
"bytes": {
@ -1614,9 +1626,9 @@
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"requires": {
"to-regex-range": "^5.0.1"
@ -1862,9 +1874,9 @@
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
},
"nodemon": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.0.tgz",
"integrity": "sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==",
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.4.tgz",
"integrity": "sha512-wjPBbFhtpJwmIeY2yP7QF+UKzPfltVGtfce1g/bB15/8vCGZj8uxD62b/b9M9/WVgme0NZudpownKN+c0plXlQ==",
"dev": true,
"requires": {
"chokidar": "^3.5.2",
@ -1939,6 +1951,11 @@
"ee-first": "1.1.1"
}
},
"Package": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/Package/-/Package-0.0.1.tgz",
"integrity": "sha512-k3XuxxO/7V+TqJEDiFayf5Wo8D043B6iJcW5oj1jj8SdB0mq2V/QBtkzw3vAHO9+9m7HwNXgjarzr3aLofLUZQ=="
},
"parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@ -2146,9 +2163,9 @@
}
},
"ua-parser-js": {
"version": "1.0.37",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.37.tgz",
"integrity": "sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ=="
"version": "1.0.38",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.38.tgz",
"integrity": "sha512-Aq5ppTOfvrCMgAPneW1HfWj66Xi7XL+/mIy996R1/CLS/rcyJQm6QZdsKrUeivDFQ+Oc9Wyuwor8Ze8peEoUoQ=="
},
"undefsafe": {
"version": "2.0.5",

View file

@ -12,12 +12,13 @@
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^1.6.8",
"axios": "^1.7.6",
"ejs": "^3.1.10",
"express": "^4.19.2",
"ua-parser-js": "^1.0.37"
"Package": "^0.0.1",
"ua-parser-js": "^1.0.38"
},
"devDependencies": {
"nodemon": "^3.1.0"
"nodemon": "^3.1.4"
}
}

View file

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>FP650 - Calculator</title>
<link href="/style.css" rel="stylesheet" type="text/css" />
<link href="/styles/bounce.css" rel="stylesheet" type="text/css" />
<!-- <script async src="https://api.countapi.xyz/hit/firepup650.repl.co/visits"></script> -->
<!-- <script async src="https://api.countapi.xyz/hit/firepup650.repl.co/construction"></script> -->
</head>
<body>
<h5 hidden id='Maintenance' class="center"></h5>
<span class="center">
<h3 class="force-color">Calculator</h3>
<button class="cyan run-button" onclick="calc()">Run Calculator</button><br/>
<span class="force-color">Bookmarklet: </span><span id="access" class="force-color">javascript:x=prompt('Equation?');x=eval(x);alert(`The solution is: ${x}`)</span> <button class="cyan copy-button" onclick="copy('access')">Copy</button><br/>
</span>
<script src="/script.js"></script>
<!-- Modified from https://www.geeksforgeeks.org/how-to-create-copy-to-clipboard-button/ /!-->
<script>
function copy(element) {
const elemText = document.getElementById(element).innerText;
navigator.clipboard.writeText(elemText);
}
// <!-- End Modified GeeksforGeeks code /!-->
function calc() {
let x = prompt('Equation?');
x = eval(x);
alert(`The solution is: ${x}`);
}
</script>
<!-- Modified from https://codepen.io/nrrrdcore/pen/XbZBpq /!-->
<style>
.copy-button {
cursor: pointer;
&:before {
content: '';
display: none;
position: absolute;
z-index: 9998;
top: 35px;
left: 15px;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid rgba(0,0,0,.72);
}
&:after {
content: 'Copy to Clipboard';
display: none;
position: absolute;
z-index: 9999;
top: 30px;
left: 0px;
width: 114px;
height: 36px;
color: #fff;
font-size: 10px;
line-height: 36px;
text-align: center;
border-radius: 3px;
}
&:hover {
&:before, &:after {
display: block;
}
}
&:active, &:focus {
&:after {
content: 'Copied!';
}
}
}
</style>
<!-- End Modified codepen code (Julie Horvath) /!-->
</body>
</html>

View file

@ -34,6 +34,10 @@
<a href="/services" class="cyan">Go to the Services page</a>
<br/>
<a href="/error-debug" class="cyan">Go to the Error debugging page</a>
<br/>
<a href="/quotes" class="cyan">Go to the Quotes page</a>
<br/>
<a href="/calculator" class="cyan">Go to the Calculator page</a>
</span>
<script src="/script.js"></script>
</body>