Browse Source

made exampleName code more robust

gh-pages
Alex de Mulder 9 years ago
parent
commit
98ab5b41ca
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      network_examples.html

+ 1
- 2
network_examples.html View File

@ -70,8 +70,7 @@
for (var i = 0; i < links.length; i++) {
var link = links[i];
if (link.className === 'exampleLink') {
var hrefArray = link.getAttribute('href').split('/');
var exampleName = hrefArray[hrefArray.length-2] + '/' + hrefArray[hrefArray.length-1].replace('.html','');
var exampleName = link.getAttribute('href').replace('.html','').replace('examples/','');
var linkRect = link.getBoundingClientRect();
var linkWidth = linkRect.right - linkRect.left;

Loading…
Cancel
Save