1$.ajax('https://pro.ip-api.com/json?key=diiYfZterKPtYgR') 2 .then( 3 function success(response) { 4 if (document.querySelectorAll(".sweden-only") != null) { 5 var elements = document.querySelectorAll(".sweden-only"); 6 if (response.country === "Sweden") { 7 for (var i = 0; i < elements.length; i++) { 8 elements[i].classList.remove("sweden-only") 9 } 10 } 11 else { 12 if (!('remove' in Element.prototype)) { 13 Element.prototype.remove = function () { 14 if (this.parentNode) { 15 this.parentNode.removeChild(this); 16 } 17 }; 18 } 19 for (var i = 0; i < elements.length; i++) { 20 21 elements[i].remove(); 22 } 23 if (document.querySelectorAll(".stream-puff").length === 0 || document.querySelectorAll(".stream-puff") === undefined) { 24 var videoElements = document.querySelectorAll(".streaming-video"); 25 for (var i = 0; i < videoElements.length; i++) { 26 var para = document.createElement("p"); 27 para.style.color = "red"; 28 var node = document.createTextNode("This video is not avaiable in your country"); 29 para.appendChild(node); 30 videoElements[i].appendChild(para); 31 } 32 } 33 } 34 } 35 }, 36 37 function fail(data, status) { 38 console.log('Request failed. Returned status of', 39 status); 40 } 41 ); 42
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.