PageSourceSearch

https://denisesellsccmd.com/VideoHelper.js?v=lWQy-mBvC_WWbMzSeUiulCCqnZVHTlSZAg-FZ6pFlqs

js denisesellsccmd.com collected 2026-09-30 13:56:47 UTC 2,484 bytes, 66 lines download raw bytes

1var VideoHelper = {
2    GenerateBaseYoutubeIframe: function () {
3        let iframe = document.createElement("iframe");
4        iframe.title = "Youtube video player"
5        iframe.frameborder = "0";
6        iframe.allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share";
7        iframe.allowFullscreen = true;
8        return iframe;
9    },
10    GenerateYoutubeEmbedFromUrl: function (url) {
11        try {
12            let oUrl = new URL(url);
13            if (oUrl.hostname == "youtu.be") {
14                // Directly use the pathname as the code for youtu.be links
15                code = oUrl.pathname.slice(1); // Remove the leading '/'
16            } else {
17                // Extract the video ID using the 'v' query parameter for regular YouTube URLs
18                code = oUrl.searchParams.get("v");
19            }
20            if (!code) {
21                throw new Error("No YouTube video ID found.");
22            }
23            let iframe = VideoHelper.GenerateBaseYoutubeIframe();
24            iframe.src = "https://www.youtube.com/embed/" + code;
25            return iframe;
26        }
27        catch (ex) {
28            return null;
29        }
30    },
31    GenerateYoutubeEmbedFromEmbed: function (embed) {
32        try {
33            let temp = document.createElement("div");
34            temp.innerHTML = embed;
35            let iframe = document.createElement("iframe");
36            let input = temp.querySelector("iframe");
37            iframe.src = input.src;
38            iframe.title = input.title;
39            iframe.frameBorder = input.frameBorder;
40            iframe.allow = input.allow;
41            iframe.allowFullscreen = input.allowFullscreen;
42            return iframe;
43        }
44        catch (ex) {
45            return null;
46        }
47    },
48    GenerateVimeoEmbedFromEmbed: function (embed) {
49        try {
50            let temp = document.createElement("div");
51            temp.innerHTML = embed;
52            let input = temp.querySelector("iframe");
53            let inputAnchorList = temp.querySelectorAll("p a");
54            let iframe = document.createElement("iframe");
55            iframe.src = input.src;
56            iframe.frameBorder = input.frameBorder;
57            iframe.allow = input.allow;
58            iframe.allowFullscreen = input.allowFullscreen;
59            //iframe.style.backgroundColor = 'black';
60            return iframe;
61        }
62        catch (ex) {
63            return null;
64        }
65    }
66}

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.