]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/GNUsocialPhotos/res/gnusocialphotos.js
Matt's demands (ticket #217)
[quix0rs-gnu-social.git] / plugins / GNUsocialPhotos / res / gnusocialphotos.js
1 function increasePhotoSize() {
2     $('.photoingallery, .albumingallery').each(function(index) {
3             this.height *= 1.1;
4             this.width *= 1.1;
5         });
6     return false;
7 }
8
9 function decreasePhotoSize() {
10     $('.photoingallery, .albumingallery').each(function(index) {
11             this.height /= 1.1;
12             this.width /= 1.1;
13         });
14     return false;
15 }
16
17 function scalePhotosToSize(size) {
18     $('.photoingallery, .albumingallery').each(function(index) {
19             if(this.height > this.width) {
20                 this.width = this.width*size/this.height;
21                 this.height = size;
22             }
23             else {
24                 this.height = this.height*size/this.width;
25                 this.width = size;
26             }
27         });
28     return false;
29 }