Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add embedded svg link check
  • Loading branch information
gfldex committed Jul 15, 2016
1 parent dcab8da commit 461a54c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions html/js/main.js
Expand Up @@ -137,8 +137,11 @@ function setup_debug_mode(){
}

var seen_link = [];
$('html').find('a[href]').each( function(i, el) {
var url_without_anchor = el.href.split('#')[0];
var links = [];
$('html').find('a[href]').each(function(i,el){ links.push(el.href)});
$('svg').find('a').filter(function(i,e){return e.href.baseVal}).each(function(i,el){ links.push(el.href.baseVal) });
links.forEach( function(el) {
var url_without_anchor = el.split('#')[0];
if ( ! seen_link.includes(decodeURIComponent(url_without_anchor)) ) {
seen_link.push(decodeURIComponent(url_without_anchor));
}
Expand Down

0 comments on commit 461a54c

Please sign in to comment.