mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-02-04 09:14:30 +00:00
JS faff #88
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
//
|
||||
// GEOGRAPHIC UTILITY FUNCTIONS
|
||||
// Great Circle calculation, Maidenhead grid calcs, etc.
|
||||
//
|
||||
|
||||
// Calculate great circle bearing between two lat/lon points.
|
||||
function calcBearing(lat1, lon1, lat2, lon2) {
|
||||
lat1 *= Math.PI / 180;
|
||||
@@ -1,3 +1,8 @@
|
||||
//
|
||||
// LOCAL STORAGE FUNCTIONS
|
||||
// Generic functions for saving the state of HTML inputs to local storage, and restoring them
|
||||
//
|
||||
|
||||
let useLocalStorage = true;
|
||||
|
||||
// Save settings to local storage. Suppressed if "use local storage" is false.
|
||||
@@ -1,3 +1,8 @@
|
||||
//
|
||||
// USER INTERFACE FUNCTIONS (AMATEUR RADIO)
|
||||
// Functions providing colour schemes for ham radio bands, SIG icons etc.
|
||||
//
|
||||
|
||||
const BAND_COLOR_SCHEMES = {
|
||||
"PSK Reporter": {
|
||||
"2200m": "#ff4500",
|
||||
@@ -1,3 +1,8 @@
|
||||
//
|
||||
// GENERAL UTILITY FUNCTIONS
|
||||
// String manipulation etc.
|
||||
//
|
||||
|
||||
// Utility function to escape HTML characters from a string.
|
||||
function escapeHtml(str) {
|
||||
if (typeof str !== 'string') {
|
||||
Reference in New Issue
Block a user