diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2021-12-15 13:28:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-15 13:28:40 +0100 |
| commit | ff48a41af07190307522a406e828b99aa3fa3808 (patch) | |
| tree | e92cf94b97572b792c30ad127c2b2c774513005f /searx/static/themes/oscar/js/searxng.js | |
| parent | da1f970eb50e9a48a25e9cb240585f8d81a5459a (diff) | |
| parent | 715f578cdae8e4129104bfb46bfc972c6a0c546e (diff) | |
Merge pull request #573 from return42/img-lazy
[fix] lazy loading of <img> tags
Diffstat (limited to 'searx/static/themes/oscar/js/searxng.js')
| -rw-r--r-- | searx/static/themes/oscar/js/searxng.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/searx/static/themes/oscar/js/searxng.js b/searx/static/themes/oscar/js/searxng.js index d3aef35e3..45272607f 100644 --- a/searx/static/themes/oscar/js/searxng.js +++ b/searx/static/themes/oscar/js/searxng.js @@ -341,7 +341,7 @@ $(document).ready(function(){ (function (w, d) { - function ImageLayout(container_selector, results_selector, img_selector, verticalMargin, horizontalMargin, maxHeight) { + function ImageLayout (container_selector, results_selector, img_selector, verticalMargin, horizontalMargin, maxHeight) { this.container_selector = container_selector; this.results_selector = results_selector; this.img_selector = img_selector; @@ -376,7 +376,7 @@ $(document).ready(function(){ } } - return (width - images.length * this.verticalMargin) / r; //have to round down because Firefox will automatically roundup value with number of decimals > 3 + return (width - images.length * this.verticalMargin) / r; // have to round down because Firefox will automatically roundup value with number of decimals > 3 }; ImageLayout.prototype._setSize = function (images, height) { @@ -466,12 +466,12 @@ $(document).ready(function(){ var results_nodes = d.querySelectorAll(this.results_selector); var results_length = results_nodes.length; - function img_load_error(event) { + function img_load_error (event) { // console.log("ERROR can't load: " + event.originalTarget.src); event.originalTarget.src = w.searxng.static_path + w.searxng.theme.img_load_error; } - function throttleAlign() { + function throttleAlign () { if (obj.isAlignDone) { obj.isAlignDone = false; setTimeout(function () { |