Skip to content
Browse files

Merge pull request #2 from notabene/patch-1

longdesc tab if and only if longdesc attrib not empty
  • Loading branch information...
2 parents ae35eb0 + fdb8e4c commit c19ab8182c50cc0f54c34d39b836a07a75d2e961 @rik committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 data/pagemod.js
View
2 data/pagemod.js
@@ -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');
@@ -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.
Something went wrong with that request. Please try again.