- Implement manifest.json for Chrome extension with necessary permissions and background scripts. - Create options.html for user settings including Google Safe Browsing API key, domains database URL, update interval, and warning message template. - Develop options.js to handle loading and saving settings using Chrome storage. - Design popup.html to display suspicious links and provide options to update the database and manage domains. - Implement popup.js to manage interactions in the popup, including updating the database and resetting the suspicious links counter. - Add testsite.html for dynamic testing of the extension with both official and fake links.
205 lines
5.3 KiB
HTML
205 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Enterprise App Protection - Domain Management</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
background-color: #f8f9fa;
|
|
margin: 0;
|
|
padding: 20px;
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
.container {
|
|
max-width: 600px;
|
|
width: 100%;
|
|
background: #fff;
|
|
padding: 20px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
h1 {
|
|
font-size: 24px;
|
|
color: #333;
|
|
text-align: center;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 18px;
|
|
color: #555;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
p {
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
|
|
textarea {
|
|
width: 100%;
|
|
padding: 10px;
|
|
margin-top: 5px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 5px;
|
|
font-size: 14px;
|
|
height: 120px;
|
|
resize: vertical;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
pre {
|
|
background: #f4f4f4;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
font-size: 14px;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.button-container {
|
|
text-align: center;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
button {
|
|
background-color: #007bff;
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 20px;
|
|
font-size: 16px;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
transition: background 0.3s;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: #0056b3;
|
|
}
|
|
|
|
/* Styled Popup */
|
|
.popup {
|
|
display: none;
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
background: white;
|
|
padding: 20px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
|
z-index: 1000;
|
|
width: 300px;
|
|
text-align: center;
|
|
}
|
|
|
|
.popup-content {
|
|
font-size: 16px;
|
|
color: #333;
|
|
}
|
|
|
|
.popup button {
|
|
background-color: #007bff;
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 16px;
|
|
font-size: 14px;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.popup button:hover {
|
|
background-color: #0056b3;
|
|
}
|
|
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.visible {
|
|
display: block;
|
|
}
|
|
|
|
/* Style the placeholder text to make it look distinct from user input */
|
|
input::placeholder,
|
|
textarea::placeholder {
|
|
color: #aaa;
|
|
/* Lighter gray color */
|
|
font-style: italic;
|
|
/* Makes it look like a hint */
|
|
opacity: 1;
|
|
/* Ensures it's fully visible */
|
|
}
|
|
|
|
/* Ensure actual input text is clear */
|
|
input,
|
|
textarea {
|
|
color: #333;
|
|
/* Dark text for actual input */
|
|
}
|
|
|
|
pre {
|
|
background: #f4f4f4;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
font-size: 14px;
|
|
overflow-x: auto;
|
|
font-style: italic;
|
|
color: #333;
|
|
/* Make text italic */
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<h1>Enterprise App Protection - Domain Management</h1>
|
|
|
|
<!-- Restored Instructions -->
|
|
<h3>✅ How to Use</h3>
|
|
<ul>
|
|
<li>✅ Enter <strong>one domain per line</strong> (no commas or spaces).</li>
|
|
<li>✅ <strong>Do not include</strong> <code>https://</code> or <code>www.</code> (only enter the domain
|
|
name).</li>
|
|
<li>✅ You can add subdomains if needed (e.g., <code>sub.example.com</code>).</li>
|
|
<li>✅ <strong>Trusted Domains:</strong> These sites will <u>not</u> be flagged as unsafe.</li>
|
|
<li>✅ <strong>Blocked Domains:</strong> These sites will <u>always</u> be flagged, even if Google Safe
|
|
Browsing does not detect them.</li>
|
|
<li>🚨 <strong>Example Entries:</strong></li>
|
|
</ul>
|
|
<pre><em>
|
|
example.com
|
|
secure-site.org
|
|
sub.example.com
|
|
malicious-site.net
|
|
</em></pre>
|
|
|
|
<h3>✅ Trusted Domains (Safe List)</h3>
|
|
<textarea id="trusted" placeholder="Enter trusted domains here..."></textarea>
|
|
|
|
<h3>❌ Blocked Domains (Unsafe List)</h3>
|
|
<textarea id="blocked" placeholder="Enter blocked domains here..."></textarea>
|
|
|
|
<div class="button-container">
|
|
<button id="save">💾 Save Domains</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Styled Popup -->
|
|
<div id="popupMessage" class="popup hidden">
|
|
<div class="popup-content">
|
|
<p id="popupText">Changes saved successfully!</p>
|
|
<button id="popupClose">OK</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="domains_management.js"></script>
|
|
</body>
|
|
|
|
</html> |