PageSourceSearch

https://www.tibz.blog/js/studio.js?v=0

js tibz.blog collected 2026-10-05 03:40:45 UTC 848 bytes, 32 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function() {
2  let videos = document.querySelectorAll("video");
3
4  videos.forEach(function (video) {
5    let src = video.getAttribute("src");
6    if (!src) {
7      let source = video.querySelector("source[type='application/x-mpegURL'], source[type='application/vnd.apple.mpegURL']");
8      if (source) {
9        src = source.getAttribute("src");
10      }
11    }
12
13    if (!src || src.indexOf(".m3u8") == -1) {
14      return;
15    }
16
17    if (video.canPlayType("application/vnd.apple.mpegurl")) {
18      // Safari: native support
19      video.src = src;
20    }
21    else if (window.Hls && Hls.isSupported()) {
22      // Chrome and Firefox: hls.js
23      let hls = new Hls();
24      hls.loadSource(src);
25      hls.attachMedia(video);
26    }
27    else {
28      // very old browsers
29      video.src = src;
30    }
31  });
32});

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.