git.schokokeks.org
Repositories
Help
Report an Issue
fs-draft.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
a2ab2b8
Branches
Tags
master
midgard
vorlage
fs-draft.git
source
logic
main.js
weitere anpassungen
Christian Fraß
commited
a2ab2b8
at 2018-08-22 10:21:45
main.js
Blame
History
Raw
"use strict"; function add_tooltips() { for (let dom_node of document.querySelectorAll(".type_word.lang_flk")) { let url = "http://folksprak.org/munin.php?query=translation_fs_" + dom_node.textContent + "_en"; load_file ( url, function (error, content) { try { let object = JSON.parse(content); dom_node.setAttribute("title", object.map(entry => entry.to.stem).join(", ")); } catch (exception) { console.warn("couldn't parse ", content); } } ) } } function main() { let contentnode = class_contentnode.read(); document.querySelector("#toc").appendChild(contentnode.generate()); contentnode.adjust(); // add_tooltips(); } document.addEventListener("DOMContentLoaded", function (event) {main();});