Make js/inline-expanding.js better, now that post images are marked with .post-image
This commit is contained in:
parent
aaeac9de3c
commit
23f23b8301
@ -16,10 +16,7 @@ onready(function(){
|
|||||||
var link = this.getElementsByTagName('a');
|
var link = this.getElementsByTagName('a');
|
||||||
|
|
||||||
for (var i = 0; i < link.length; i++) {
|
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 (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/)) {
|
||||||
if (window.jQuery && !$(link).prev().hasClass('fileinfo')) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
link[i].childNodes[0].style.maxWidth = '95%';
|
link[i].childNodes[0].style.maxWidth = '95%';
|
||||||
link[i].onclick = function(e) {
|
link[i].onclick = function(e) {
|
||||||
if (this.childNodes[0].className == 'hidden')
|
if (this.childNodes[0].className == 'hidden')
|
||||||
|
Loading…
Reference in New Issue
Block a user