]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/GNUsocialPhotos/res/gnusocialphotos.js
Matt's demands (ticket #217)
[quix0rs-gnu-social.git] / plugins / GNUsocialPhotos / res / gnusocialphotos.js
index 3a959a5db49126b04c83b8d7540b50fc3e70ee19..8681f617554eec9a693ee2931cc3ed5f17562120 100644 (file)
@@ -13,3 +13,17 @@ function decreasePhotoSize() {
         });
     return false;
 }
+
+function scalePhotosToSize(size) {
+    $('.photoingallery, .albumingallery').each(function(index) {
+            if(this.height > this.width) {
+                this.width = this.width*size/this.height;
+                this.height = size;
+            }
+            else {
+                this.height = this.height*size/this.width;
+                this.width = size;
+            }
+        });
+    return false;
+}
\ No newline at end of file