1var ApplicationEmbed = ApplicationEmbed || function (w, u) { 2 var AppPath = "https://widget.taggbox.com/embed.json"; 3 function randomID(length) { 4 var result = ''; 5 var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 6 var charactersLength = characters.length; 7 for (var i = 0; i < length; i++) { 8 result += characters.charAt(Math.floor(Math.random() * 9 charactersLength)); 10 } 11 return result; 12 } 13 return { 14 init: function () { 15 var socialwall = document.getElementsByClassName('taggbox-socialwall').length 16 var container = socialwall && socialwall > 0 ? document.getElementsByClassName('taggbox-socialwall') : document.getElementsByClassName('taggbox'); 17 for (var i = 0; i < container.length; i++) { 18 if (container[i].getAttribute("data-is-load") == undefined || container[i].getAttribute("data-is-load") == "0" || container[i].getAttribute("data-is-load") == null) { 19 const url = AppPath; 20 const rootID = `root_${randomID(5)}` 21 container[i].setAttribute("data-render-id", rootID) 22 container[i].setAttribute("data-is-load", 0) 23 container[i].setAttribute("id", `co_${rootID}`) 24 if (container[i].getAttribute("ugcSuite")) { 25 window.ugcSuite = true 26 var ugcSuite = true 27 } 28 fetch(url) 29 .then(response => response.json()) 30 .then(json => { 31 const {css, id, script} = json; 32 let myScript = document.createElement("div"); 33 myScript.setAttribute("id", rootID); 34 if (document.getElementById(`co_${rootID}`)) { 35 document.getElementById(`co_${rootID}`).appendChild(myScript); 36 let myCss = document.createElement("link"); 37 myCss.setAttribute("type", 'text/css'); 38 myCss.setAttribute("rel", 'stylesheet'); 39 myCss.setAttribute("href", css); 40 document.head.appendChild(myCss); 41 let myreact = document.createElement("script"); 42 myreact.setAttribute("src", script); 43 document.body.appendChild(myreact); 44 } 45 }) 46 } 47 } 48 49 } 50 }; 51}(window, undefined); 52ApplicationEmbed.init();
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.