Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
chore: Just a little bit of housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
dikayx committed Aug 14, 2024
1 parent 0066eff commit 893ce59
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 19 deletions.
2 changes: 0 additions & 2 deletions mapy/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ body {
padding-bottom: 60px;
}

/* TODO: Footer should be on the very bottom of the page */

/* Sticky footer */
.footer {
position: fixed;
Expand Down
5 changes: 0 additions & 5 deletions mapy/static/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
* Initialize a Leaflet map with markers for each location in the locations array.
*/
document.addEventListener("DOMContentLoaded", function () {
// Get the map element and its data attribute
var mapElement = document.getElementById("map");
var locations = JSON.parse(mapElement.getAttribute("data-locations"));

// Check if the locations array is not empty
if (locations.length > 0) {
// Initialize the map centered around the first location or default coordinates
var initialLocation = locations[0];
Expand All @@ -21,7 +19,6 @@ document.addEventListener("DOMContentLoaded", function () {
'&copy; <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
}).addTo(map);

// Array to store all the latlng points
var latlngs = [];

// Add a marker for each location in the locations array
Expand All @@ -32,14 +29,12 @@ document.addEventListener("DOMContentLoaded", function () {
`<b>IP: ${location.ip}</b><br>Lat: ${location.latitude}<br>Lon: ${location.longitude}`
);

// Push the coordinates to the latlngs array
latlngs.push([location.latitude, location.longitude]);
});

// If there is more than one location, draw a line connecting them
if (latlngs.length > 1) {
var polyline = L.polyline(latlngs, { color: "blue" }).addTo(map);
// Adjust the map's bounds to fit the polyline
map.fitBounds(polyline.getBounds());
}
}
Expand Down
3 changes: 0 additions & 3 deletions mapy/static/js/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ document.addEventListener("DOMContentLoaded", function () {
const spinner = document.getElementById("spinner");

form.addEventListener("submit", function () {
// Disable the submit button to prevent multiple submissions
submitButton.disabled = true;

// Show the spinner
spinner.style.display = "inline-block";
});
});
9 changes: 0 additions & 9 deletions mapy/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@
>
</span>
</div>
<div>
<span class="text-muted">
<a
href="https://github.com/cyberdefenders/email-header-analyzer"
class="text-muted"
>Inspired by CyberDefenders' MHA</a
>
</span>
</div>
</div>
</footer>

Expand Down

0 comments on commit 893ce59

Please sign in to comment.