PageSourceSearch

https://www.newton.ac.uk/wp-content/cache/wpfc-minified/jnhbz5l4/3xvgk.js

js newton.ac.uk collected 2026-09-24 08:39:52 UTC 3,397 bytes, 89 lines download raw bytes

1// source --> https://www.newton.ac.uk/wp-content/plugins/ninja-forms-uploads/assets/js/nfpluginsettings.js?ver=3.3.33 
2
3jQuery(function ($) {
4    /* 
5    localized variables passed through params object:
6    params.clearLogRestUrl
7    params.clearLogButtonId  
8    params.downloadLogRestUrl
9    params.downloadLogButtonId
10    
11    */
12
13 $("#"+params.clearLogButtonId).on("click", () => {
14
15   $.post(
16      params.clearLogRestUrl,
17     { },
18     function (json) {
19       console.log(json);
20     }
21   );
22 });
23
24 $("#"+params.downloadLogButtonId).on("click", () => {
25   $.post(
26     params.downloadLogRestUrl,
27     {},
28     function (json) {
29       let download = json.data;
30
31       var blob = new Blob([download], { type: "json" });
32
33       var a = document.createElement("a");
34       a.download = "nf-file-uploads-debug-log.json";
35       a.href = URL.createObjectURL(blob);
36       a.dataset.downloadurl = ["json", a.download, a.href].join(":");
37       a.style.display = "none";
38       document.body.appendChild(a);
39       a.click();
40       document.body.removeChild(a);
41       setTimeout(function () {
42         URL.revokeObjectURL(a.href);
43       }, 15000);
44     }
45   );
46 });
47
48return;
49
50});
51// source --> https://www.newton.ac.uk/wp-content/themes/isaacnewton/static/reinstate_embeds.js?ver=7.1.2 
52function reinstateVideoEmbeds() {
53    let videoPlaceholders = document.getElementsByClassName("video-placeholder");
54
55    if (videoPlaceholders.length) {
56        for (let i = 0; i < videoPlaceholders.length; ++i) {
57            let videoId = videoPlaceholders.item(i).dataset.videoId;
58            let videoWidth = videoPlaceholders.item(i).dataset.videoWidth;
59            let videoHeight = videoPlaceholders.item(i).dataset.videoHeight;
60            videoPlaceholders.item(i).innerHTML = `<iframe src="https://www.youtube.com/embed/${videoId}"
61                width="${videoWidth}" height="${videoHeight}" 
62                title="YouTube video player" frameBorder="0"
63                allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
64                allowFullScreen="" referrerpolicy="strict-origin-when-cross-origin"></iframe>`;
65            videoPlaceholders.item(i).style.width = null;
66            videoPlaceholders.item(i).style.height = null;
67            $('.video-placeholder').fitVids();
68        }
69    }
70
71    let streamingPlaceholders = document.getElementsByClassName("streaming-placeholder");
72
73    if (streamingPlaceholders.length) {
74        for (let i = 0; i < streamingPlaceholders.length; ++i) {
75            let channelId = streamingPlaceholders.item(i).dataset.channelId;
76            let videoWidth = streamingPlaceholders.item(i).dataset.videoWidth;
77            let videoHeight = streamingPlaceholders.item(i).dataset.videoHeight;
78
79            streamingPlaceholders.item(i).innerHTML = `<iframe src="https://www.youtube.com/embed/live_stream?channel=${channelId}"
80				width="${videoWidth}" height="${videoHeight}" 
81				title="YouTube video player" frameborder="0" 
82				allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" 
83				allowfullscreen="" referrerpolicy="strict-origin-when-cross-origin"></iframe>`;
84            streamingPlaceholders.item(i).style.width = null;
85            streamingPlaceholders.item(i).style.height = null;
86            $('.streaming-placeholder').fitVids();
87        }
88    }
89};

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.