Changed around line 1
- document.addEventListener('DOMContentLoaded', () => {
+ document.addEventListener("DOMContentLoaded", () => {
-
+
- 'US': 'United States',
- 'GB': 'United Kingdom',
- 'CA': 'Canada'
+ US: "United States",
+ GB: "United Kingdom",
+ CA: "Canada",
- 'US': {'US-TX': 'Texas', 'US-CA': 'California'},
- 'GB': {'GB-LND': 'London', 'GB-MAN': 'Manchester'},
- 'CA': {'CA-ON': 'Ontario', 'CA-BC': 'British Columbia'}
+ US: { "US-TX": "Texas", "US-CA": "California" },
+ GB: { "GB-LND": "London", "GB-MAN": "Manchester" },
+ CA: { "CA-ON": "Ontario", "CA-BC": "British Columbia" },
- 'US-TX': ['Austin', 'Houston', 'Dallas'],
- 'US-CA': ['Los Angeles', 'San Francisco', 'San Diego'],
- 'GB-LND': ['London', 'Westminster'],
- 'GB-MAN': ['Manchester'],
- 'CA-ON': ['Toronto', 'Ottawa'],
- 'CA-BC': ['Vancouver', 'Victoria']
+ "US-TX": ["Austin", "Houston", "Dallas"],
+ "US-CA": ["Los Angeles", "San Francisco", "San Diego", "Perris"],
+ "GB-LND": ["London", "Westminster"],
+ "GB-MAN": ["Manchester"],
+ "CA-ON": ["Toronto", "Ottawa"],
+ "CA-BC": ["Vancouver", "Victoria"],
- const countrySelect = document.getElementById('country');
+ const countrySelect = document.getElementById("country");
- countrySelect.addEventListener('change', (e) => {
- const regionSelect = document.getElementById('region');
- const citySelect = document.getElementById('city');
-
+ countrySelect.addEventListener("change", (e) => {
+ const regionSelect = document.getElementById("region");
+ const citySelect = document.getElementById("city");
+
-
+
Changed around line 51: document.addEventListener('DOMContentLoaded', () => {
- document.getElementById('region').addEventListener('change', (e) => {
- const citySelect = document.getElementById('city');
+ document.getElementById("region").addEventListener("change", (e) => {
+ const citySelect = document.getElementById("city");
-
+
- cities[e.target.value].forEach(city => {
+ cities[e.target.value].forEach((city) => {
Changed around line 67: document.addEventListener('DOMContentLoaded', () => {
- document.getElementById('geofeedForm').addEventListener('submit', (e) => {
+ document.getElementById("geofeedForm").addEventListener("submit", (e) => {
-
+
- ipPrefix: document.getElementById('ipPrefix').value,
- country: document.getElementById('country').value,
- region: document.getElementById('region').value,
- city: document.getElementById('city').value,
- postalCode: document.getElementById('postalCode').value
+ ipPrefix: document.getElementById("ipPrefix").value,
+ country: document.getElementById("country").value,
+ region: document.getElementById("region").value,
+ city: document.getElementById("city").value,
+ postalCode: document.getElementById("postalCode").value,
-
+
- document.getElementById('downloadBtn').addEventListener('click', () => {
- const csv = geofeeds.map(entry =>
- `${entry.ipPrefix},${entry.country},${entry.region},${entry.city},${entry.postalCode}`
- ).join('\n');
-
- const blob = new Blob([csv], { type: 'text/csv' });
+ document.getElementById("downloadBtn").addEventListener("click", () => {
+ const csv = geofeeds
+ .map(
+ (entry) =>
+ `${entry.ipPrefix},${entry.country},${entry.region},${entry.city},${entry.postalCode}`,
+ )
+ .join("\n");
+
+ const blob = new Blob([csv], { type: "text/csv" });
- const a = document.createElement('a');
+ const a = document.createElement("a");
- a.download = 'geofeed.csv';
+ a.download = "geofeed.csv";
- document.getElementById('clearBtn').addEventListener('click', () => {
- if (confirm('Are you sure you want to clear all entries?')) {
+ document.getElementById("clearBtn").addEventListener("click", () => {
+ if (confirm("Are you sure you want to clear all entries?")) {
- const tbody = document.querySelector('#geofeedTable tbody');
- tbody.innerHTML = '';
-
+ const tbody = document.querySelector("#geofeedTable tbody");
+ tbody.innerHTML = "";
+
- const tr = document.createElement('tr');
+ const tr = document.createElement("tr");
-
${countries[entry.country] || ''} | -
${regions[entry.country]?.[entry.region] || ''} | +
${countries[entry.country] || ""} | +
${regions[entry.country]?.[entry.region] || ""} |