PageSourceSearch

https://www.dharmadrum.org/js/youtube_rwd.js

js dharmadrum.org collected 2026-10-02 10:45:04 UTC 2,520 bytes, 70 lines download raw bytes

1$(function() {
2  if(typeof YOUTUBE_VIDEO_MARGIN == 'undefined') {
3    YOUTUBE_VIDEO_MARGIN=5;
4  }
5
6//  if($('iframe').size() > 0)
7//  {
8//     $('iframe').each(function(index,item) {
9//       if($(item).attr('src') != null)
10//       {
11//       if($(item).attr('src').match(/http(s)?:\/\/www\.youtube\.com/)) {
12//            var w=$(item).attr('width');
13//            if(w != "100%")
14//            {
15//                var h=$(item).attr('height');
16//                var ar = h/w*100;
17//                ar=ar.toFixed(2);
18//                //Style iframe
19//                $(item).css('position','absolute');
20//                $(item).css('top','0');
21//                $(item).css('left','0');
22//                $(item).css('width','100%');
23//                $(item).css('height','100%');
24//                $(item).css('max-width',w+'px');
25//                $(item).css('max-height', h+'px');
26//                $(item).wrap('<div style="max-width:'+w+'px;margin:0 auto; padding:'+YOUTUBE_VIDEO_MARGIN+'px;" />');
27//                $(item).wrap('<div style="position: relative;padding-bottom: '+ar+'%; height: 0; overflow: hidden;" />');
28//            }
29//       }
30//       }
31//     });
32//  }
33
34  setTimeout(function(){
35//      alert($('iframe').size());
36
37      var win_w =$(window).width();
38//      alert(win_w);
39//      if($('iframe').size() > 0 and win_w < 800)
40//      {
41         $('iframe').each(function(index,item) {
42           if($(item).attr('src') != null)
43           {
44           if($(item).attr('src').match(/http(s)?:\/\/www\.youtube\.com/)) {
45                var w=$(item).attr('width');
46                //alert(w);
47                if(w != "100%")
48                {
49                    var h=$(item).attr('height');
50                    var ar = h/w*100;
51                    ar=ar.toFixed(2);
52                    //Style iframe
53                    $(item).css('position','absolute');
54                    $(item).css('top','0');
55                    $(item).css('left','0');
56                    $(item).css('width','100%');
57                    $(item).css('height','100%');
58                    $(item).css('max-width',w+'px');
59                    $(item).css('max-height', h+'px');
60                    $(item).wrap('<div style="max-width:'+w+'px;margin:0 auto; padding:'+YOUTUBE_VIDEO_MARGIN+'px;" />');
61                    $(item).wrap('<div style="position: relative;padding-bottom: '+ar+'%; height: 0; overflow: hidden;" />');
62                }
63           }
64           }
65         });
66//      }
67
68  },1500);
69
70});

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.