feat: Add Enterprise App Protection extension with settings and popup UI
- 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.
This commit is contained in:
93
popup.html
Normal file
93
popup.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!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</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
padding: 15px;
|
||||
width: 280px;
|
||||
background-color: #f8f9fa;
|
||||
text-align: center;
|
||||
border-radius: 8px;
|
||||
}
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
color: #333;
|
||||
font-size: 18px;
|
||||
}
|
||||
p {
|
||||
font-size: 14px;
|
||||
margin: 10px 0;
|
||||
color: #555;
|
||||
}
|
||||
.counter {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #dc3545;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
max-height: 120px;
|
||||
overflow-y: auto;
|
||||
background: #fff;
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
|
||||
}
|
||||
li {
|
||||
font-size: 13px;
|
||||
padding: 5px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
button {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
margin-top: 10px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.update-btn {
|
||||
background: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.settings-btn {
|
||||
background: #28a745;
|
||||
color: white;
|
||||
}
|
||||
.domains-btn {
|
||||
background: #17a2b8;
|
||||
color: white;
|
||||
}
|
||||
button:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Enterprise App Protection</h2>
|
||||
<p>Suspicious Links Detected: <span class="counter" id="suspiciousCount">0</span></p>
|
||||
|
||||
<ul id="suspiciousLinks"></ul>
|
||||
<p id="lastUpdate">Last Updated: Never</p>
|
||||
<button id="updateDB" class="update-btn">🔄 Update Database</button>
|
||||
<button id="settings" class="settings-btn">⚙️ Open Settings</button>
|
||||
<button id="manageDomains" class="domains-btn">🌐 Manage Domains</button>
|
||||
|
||||
<h3>🔄 Reset Suspicious Links Counter</h3>
|
||||
<button id="resetCounter">♻️ Reset Counter</button>
|
||||
|
||||
<script src="popup.js"></script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user