Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 3231a818 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

adding script to check dead internal links

parent 0e934967
No related branches found
No related tags found
No related merge requests found
......@@ -46,4 +46,25 @@ $("#TOC li a[href='#hvac-auxiliaries-editor']").parent().hide()
$("td[align=left").filter(function() {return $(this).text().indexOf("Locked default")===0 || $(this).text().indexOf("Locked Calc") === 0; }).addClass("aaux_locked")
});
/*
javascript to check if all links are valid:
*/
function CheckGeneratedLinks() {
var content = jQuery("#CONTENT");
content.html("");
jQuery("a[href]").each(function(idx, elem) {
var link=jQuery(elem).attr("href");
if(link.startsWith("javascript:")) {return true}
if (!link.startsWith("#")) { content.append("ignoring: " + link +"<br/>"); return true; }
var node=jQuery(link);
if (node.length) {
content.append("found: " + link)
} else {
content.append("missing: " + link)
};
content.append("<br/>"); });
}
</script>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment