5 148
redigeringar
Niklas (diskussion | bidrag) Ingen redigeringssammanfattning |
Niklas (diskussion | bidrag) Ingen redigeringssammanfattning |
||
Rad 1: | Rad 1: | ||
// Customized transcription table | $(document).ready(function() { | ||
var transcriptionTable = { | // Use mw.loader.using to ensure compatibility with Mediawiki's module loading system | ||
mw.loader.using(['mediawiki.util'], function() { | |||
// Customized transcription table | |||
var transcriptionTable = { | |||
"α":"a", | "α":"a", | ||
"ἁ":"â", | "ἁ":"â", | ||
Rad 41: | Rad 44: | ||
"ϗ":"ķ", | "ϗ":"ķ", | ||
"ₓ":"x" | "ₓ":"x" | ||
// Add more mappings as needed | |||
}; | }; | ||
function transcribeString() { | // Function to transcribe a string based on the transcription table | ||
function transcribeString() { | |||
var element = document.getElementById("convert-go"); | var element = document.getElementById("convert-go"); | ||
if (element) { | if (element) { | ||
Rad 63: | Rad 67: | ||
// Automatically transcribe when the page finishes loading | // Automatically transcribe when the page finishes loading | ||
transcribeString(); | |||
}); | |||
}); |