Created
December 6, 2023 08:33
-
-
Save jxpsert/a951aea47ab5d72c08cc4fe201bd183a to your computer and use it in GitHub Desktop.
Frequentiedatabase punten
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Frequentiedatabase komma naar punt | |
// @namespace https://ptdk.nl/ | |
// @version 0.1 | |
// @description Verandert komma's in frequenties naar punten | |
// @author Jxpsert | |
// @match https://frequentiedatabase.eu/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=frequentiedatabase.eu | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const freqs = document.querySelectorAll("td > a"); | |
const freqs2 = document.querySelectorAll("td"); // TX kolom | |
freqs.forEach(freq => { | |
const href = freq.href; | |
const lastChar = href.charAt(href.length - 1); | |
if(isNaN(lastChar)) return; // Kijken of het einde van de link een frequentie is- zo niet, doen we er niks mee | |
freq.innerText = freq.innerText.replace(",", "."); | |
}); | |
freqs2.forEach(freq => { | |
const lastChar = freq.innerText.charAt(freq.innerText.length - 1); | |
if(isNaN(lastChar)) return; // Kijken of het einde van de link een frequentie is- zo niet, doen we er niks mee | |
freq.innerText = freq.innerText.replace(",", "."); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment