Browse Source

Make js/inline-expanding.js better, now that post images are marked with .post-image

pull/40/head
Michael Foster 11 years ago
parent
commit
23f23b8301
  1. 5
      js/inline-expanding.js

5
js/inline-expanding.js

@ -16,10 +16,7 @@ onready(function(){
var link = this.getElementsByTagName('a');
for (var i = 0; i < link.length; i++) {
if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].className != 'file') {
if (window.jQuery && !$(link).prev().hasClass('fileinfo')) {
continue;
}
if (typeof link[i] == "object" && link[i].childNodes && typeof link[i].childNodes[0] !== 'undefined' && link[i].childNodes[0].src && link[i].childNodes[0].className.match(/post-image/)) {
link[i].childNodes[0].style.maxWidth = '95%';
link[i].onclick = function(e) {
if (this.childNodes[0].className == 'hidden')

Loading…
Cancel
Save