Skip to content

Commit 495419d

Browse files
committed
update the plug-in
1 parent 7029f15 commit 495419d

File tree

4 files changed

+66
-10
lines changed

4 files changed

+66
-10
lines changed
Binary file not shown.

browser_plugin/mozilla/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"manifest_version": 3,
3-
"name": "Domain Safety Analyzer",
3+
"name": "FraudFree - Domain Safety Analyzer",
44
"version": "1.0",
55
"description": "Analyzes domain safety and scam probability.",
66
"permissions": [

browser_plugin/mozilla/popup.html

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,74 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en">
33
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
46
<style>
57
body {
68
font-family: Arial, sans-serif;
7-
width: 300px;
8-
padding: 10px;
9+
width: 320px; /* Increased width for more content space */
10+
padding: 20px;
11+
background-color: #f8f9fa; /* Light background color */
12+
border-radius: 8px; /* Rounded corners */
13+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
14+
margin: auto; /* Centering the container */
15+
margin-top: 30px; /* Top margin for spacing */
916
}
17+
18+
h3 {
19+
font-size: 18px;
20+
text-align: center; /* Center the heading */
21+
margin-bottom: 20px; /* Spacing below the heading */
22+
color: #333;
23+
}
24+
25+
#analyzeBtn {
26+
display: block; /* Makes the button block-level */
27+
width: 100%; /* Button fills the full width */
28+
padding: 12px; /* Added padding for larger button size */
29+
background-color: #007bff; /* Bootstrap-style primary blue */
30+
color: white; /* White text color */
31+
border: none; /* Removes default button borders */
32+
border-radius: 5px; /* Rounded corners */
33+
font-size: 16px; /* Increased font size */
34+
cursor: pointer; /* Pointer cursor on hover */
35+
transition: background-color 0.3s ease; /* Smooth color change */
36+
}
37+
38+
#analyzeBtn:hover {
39+
background-color: #0056b3; /* Darker blue on hover */
40+
}
41+
1042
#status {
1143
font-size: 18px;
1244
font-weight: bold;
13-
margin: 10px 0;
14-
padding: 10px;
45+
margin: 15px 0;
46+
padding: 12px;
1547
text-align: center;
48+
background-color: #e9ecef;
49+
border-radius: 4px;
1650
}
17-
#conclusion {
51+
52+
#conclusion, #details {
1853
font-size: 14px;
1954
color: #333;
2055
margin-top: 10px;
56+
text-align: center;
57+
}
58+
59+
#details {
60+
color: rgb(41, 41, 226);
2161
}
2262
</style>
2363
</head>
2464
<body>
25-
<h3>Domain Safety Analyzer</h3>
65+
<h3>FraudFree - Domain Safety Analyzer</h3>
2666
<button id="analyzeBtn">Analyze</button>
2767
<div id="results">
2868
<div id="status"></div>
2969
<div id="conclusion"></div>
70+
<div id="details"></div>
3071
</div>
3172
<script src="popup.js"></script>
3273
</body>
33-
</html>
74+
</html>

browser_plugin/mozilla/popup.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,32 @@ function extractRootDomain(hostname) {
3535
function displayResults(data) {
3636
let statusDiv = document.getElementById('status');
3737
let conclusionDiv = document.getElementById('conclusion');
38+
let detailsDiv = document.getElementById('details');
3839

3940
if (data.status === "Safe") {
4041
statusDiv.style.backgroundColor = "green";
4142
statusDiv.style.color = "white";
4243
statusDiv.textContent = `Status: ${data.status}`;
4344
conclusionDiv.textContent = data.conclusion;
45+
detailsDiv.innerHTML = `<a class="big-txt" href="https://fraud-free-webapp.vercel.app/detail/${data.url}" target="_blank">Details</a>`;
46+
} else if (data.status === "Ok") {
47+
statusDiv.style.backgroundColor = "blue";
48+
statusDiv.style.color = "white";
49+
statusDiv.textContent = `Status: ${data.status}`;
50+
conclusionDiv.textContent = "This website is safe, but some issues were reported. Please proceed with caution.";
51+
detailsDiv.innerHTML = `<a class="big-txt" href="https://fraud-free-webapp.vercel.app/detail/${data.url}" target="_blank">Details</a>`;
52+
} else if (data.status === "Warning") {
53+
statusDiv.style.backgroundColor = "blue";
54+
statusDiv.style.color = "white";
55+
statusDiv.textContent = `Status: ${data.status}`;
56+
conclusionDiv.textContent = "This website is not safe, issues were reported. Please proceed with caution.";
57+
detailsDiv.innerHTML = `<a class="big-txt" href="https://fraud-free-webapp.vercel.app/detail/${data.url}" target="_blank">Details</a>`;
4458
} else {
4559
statusDiv.style.backgroundColor = "red";
4660
statusDiv.style.color = "white";
4761
statusDiv.textContent = `Status: ${data.status}`;
48-
conclusionDiv.textContent = "This website may not be safe. Please proceed with caution.";
62+
conclusionDiv.textContent = "This website may not be safe. Avoid.";
63+
detailsDiv.innerHTML = `<a class="big-txt" href="https://fraud-free-webapp.vercel.app/detail/${data.url}" target="_blank">details</a>`;
4964
}
5065
}
5166

0 commit comments

Comments
 (0)