Skip to content

Commit

Permalink
Merge pull request #2 from notabene/patch-1
Browse files Browse the repository at this point in the history
longdesc tab if and only if longdesc attrib not empty
  • Loading branch information
rik committed Dec 18, 2011
2 parents ae35eb0 + fdb8e4c commit c19ab81
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions data/pagemod.js
Expand Up @@ -15,6 +15,7 @@

for (var i=0, il=imgs.length; i < il; i++) {
var img = imgs[i];
if(img.getAttribute("longdesc").toString().length<1) return;

var a = document.createElement('a');
a.classList.add('longdesc-addon-link');
Expand All @@ -26,5 +27,6 @@
a.style.left = img.offsetLeft + "px";

img.parentNode.insertBefore(a, img.nextSibling);

}
})();

0 comments on commit c19ab81

Please sign in to comment.