PageSourceSearch

https://www.gospelweeklies.com/wp-content/themes/skilled/assets/js/plugins/natural-width-height.js

js gospelweeklies.com collected 2026-10-09 17:53:40 UTC 685 bytes, 29 lines download raw bytes

1// adds .naturalWidth() and .naturalHeight() methods to jQuery
2  // for retreaving a normalized naturalWidth and naturalHeight.
3  (function($){
4    var
5    props = ['Width', 'Height'],
6    prop;
7
8    while (prop = props.pop()) {
9    (function (natural, prop) {
10      $.fn[natural] = (natural in new Image()) ? 
11      function () {
12      return this[0][natural];
13      } : 
14      function () {
15      var 
16      node = this[0],
17      img,
18      value;
19
20      if (node.tagName.toLowerCase() === 'img') {
21        img = new Image();
22        img.src = node.src,
23        value = img[prop];
24      }
25      return value;
26      };
27    }('natural' + prop, prop.toLowerCase()));
28    }
29  }(jQuery));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.