PageSourceSearch

https://bowwowbeach.org/wp-content/themes/saraswati-blog/assets/js/jquery.fitvids_ver-20151215.js

js bowwowbeach.org collected 2026-10-07 14:11:44 UTC 4,072 bytes, 98 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opens = _____WB$wombat$assign$function_____("opens");
10/*jshint browser:true */
11/*!
12* FitVids 1.1
13*
14* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
15* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
16* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
17*
18*/
19
20;(function( $ ){
21
22  'use strict';
23
24  $.fn.fitVids = function( options ) {
25    var settings = {
26      customSelector: null,
27      ignore: null
28    };
29
30    if(!document.getElementById('fit-vids-style')) {
31      // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
32      var head = document.head || document.getElementsByTagName('head')[0];
33      var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
34      var div = document.createElement("div");
35      div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
36      head.appendChild(div.childNodes[1]);
37    }
38
39    if ( options ) {
40      $.extend( settings, options );
41    }
42
43    return this.each(function(){
44      var selectors = [
45        'iframe[src*="player.vimeo.com"]',
46        'iframe[src*="youtube.com"]',
47        'iframe[src*="youtube-nocookie.com"]',
48        'iframe[src*="kickstarter.com"][src*="video.html"]',
49        'object',
50        'embed'
51      ];
52
53      if (settings.customSelector) {
54        selectors.push(settings.customSelector);
55      }
56
57      var ignoreList = '.fitvidsignore';
58
59      if(settings.ignore) {
60        ignoreList = ignoreList + ', ' + settings.ignore;
61      }
62
63      var $allVideos = $(this).find(selectors.join(','));
64      $allVideos = $allVideos.not('object object'); // SwfObj conflict patch
65      $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
66
67      $allVideos.each(function(){
68        var $this = $(this);
69        if($this.parents(ignoreList).length > 0) {
70          return; // Disable FitVids on this video.
71        }
72        if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
73        if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
74        {
75          $this.attr('height', 9);
76          $this.attr('width', 16);
77        }
78        var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
79            width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
80            aspectRatio = height / width;
81        if(!$this.attr('name')){
82          var videoName = 'fitvid' + $.fn.fitVids._count;
83          $this.attr('name', videoName);
84          $.fn.fitVids._count++;
85        }
86        $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
87        $this.removeAttr('height').removeAttr('width');
88      });
89    });
90  };
91  
92  // Internal counter for unique video names.
93  $.fn.fitVids._count = 0;
94  
95// Works with either jQuery or Zepto
96})( window.jQuery || window.Zepto );
97
98}

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.