PageSourceSearch

https://ultrasoniccleanermanufacturers.org/wp-content/themes/iqs-microsites/inc/gapreview.js

js ultrasoniccleanermanufacturers.org collected 2026-10-06 04:00:34 UTC 3,845 bytes, 99 lines download raw bytes

1/*************** Swap Image **********/
2function MM_swapImage(){var a,b=0,c,d=MM_swapImage.arguments;document.MM_sr=[];for(a=0;a<d.length-2;a+=3)if(null!=(c=MM_findObj(d[a])))document.MM_sr[b++]=c,c.oSrc||(c.oSrc=c.src),c.src=d[a+2]}function MM_preloadImages(){var a=document;if(a.images){a.MM_p||(a.MM_p=[]);var b,c=a.MM_p.length,d=MM_preloadImages.arguments;for(b=0;b<d.length;b++)0!=d[b].indexOf("#")&&(a.MM_p[c]=new Image,a.MM_p[c++].src=d[b])}}
3function MM_swapImgRestore(){var a,b,c=document.MM_sr;for(a=0;c&&a<c.length&&(b=c[a])&&b.oSrc;a++)b.src=b.oSrc}function MM_findObj(a,b){var c,d;b||(b=document);if(0<(c=a.indexOf("?"))&&parent.frames.length)b=parent.frames[a.substring(c+1)].document,a=a.substring(0,c);if(!(d=b[a])&&b.all)d=b.all[a];for(c=0;!d&&c<b.forms.length;c++)d=b.forms[c][a];for(c=0;!d&&b.layers&&c<b.layers.length;c++)d=MM_findObj(a,b.layers[c].document);!d&&b.getElementById&&(d=b.getElementById(a));return d};
4/*********** End of Swap Image *********/
5
6function getUrl(e) {
7
8	var href = e.getAttribute('href');
9callApi(e);
10
11}
12
13function getTitle(externalUrl){
14  var proxyurl = "/wp-content/themes/iqs-microsites/inc/getit.php?url=" + externalUrl;
15  $.ajax({
16    url: proxyurl,
17    async: true,
18    success: function(response) {
19      alert(response);
20    },   
21    error: function(e) {
22      alert("error! " + e);
23    }
24  });
25}
26
27function removeTrailingSlash(str) {
28   str.replace(/\/+$/, '');
29
30}
31
32function removeSpaces(url) {
33  return encodeURIComponent(decodeURIComponent(url).replace(/\s/g, ''));
34}
35
36function callApi(e){
37    let gid = getCookie();
38    fetch("/wp-content/themes/iqs-microsites/inc/getit.php?website=" + encodeURI(e))
39    .then(function(response){
40    return response.text();
41    }).then(function(data){
42    return fetch(data + gid);
43    }).then(function(response){
44		const collection = document.getElementById("hitslink").children;
45		collection[0].setAttribute("id", "tracking");
46		var x = document.getElementById('tracking');
47		var y = x.contentDocument;
48		var elmnt = document.getElementById('tracking').contentDocument.title;
49		 console.log(elmnt);
50		var href = e.getAttribute('href');
51		var rspace = removeSpaces(href);
52		//var rslash = removeTrailingSlash(rspace);
53		var src = response['url'].substring(response['url'].indexOf('xx2tid=') + 7);
54		var code = src.substr(0, src.indexOf('&'));
55			if(code.startsWith("G-")){
56			var srctag = "https://www.googletagmanager.com/gtag/js?id=" + code;
57			var script = document.createElement("script");
58			script.setAttribute("async", "");		
59			script.setAttribute("src", srctag);
60				y.body.appendChild(script); 
61			const script2 = document.createElement("script");
62			script2.innerHTML = "window.dataLayer = window.dataLayer || [];\r\n";
63						console.log('no error1')
64 			script2.innerHTML += "function gtag(){dataLayer.push(arguments);}\r\n";
65						console.log('no error2')
66			script2.innerHTML += "gtag('js', new Date());\r\n";
67						console.log('no error3')
68			script2.innerHTML += "gtag('config', '" + code + "');\r\n";
69			script2.innerHTML +="gtag('event', 'page_view', {";
70			script2.innerHTML +="page_title: '" + elmnt + "',";
71  			script2.innerHTML +="page_location: '" + rspace + "',";
72  			script2.innerHTML +="page_referrer: '" + window.location.href + "',";
73			script2.innerHTML +="send_to: '" + code + "'";
74			script2.innerHTML +="});";
75		y.body.appendChild(script2); 
76		}
77    return response
78    })
79     .catch(function(error){
80     console.log('error')
81
82     })
83
84}
85function getCookie(){
86    let name = "_gid=";
87    let decodedCookie = decodeURIComponent(document.cookie);
88    let ca = decodedCookie.split(';');
89    for(var i = 0; i < ca.length; i++){
90    var c = ca[i];
91    while(c.charAt(0)== ' '){
92        c = c.substring(1);
93    }
94    if(c.indexOf(name)==0){
95        return c.substring(name.length, c.length);
96    }
97    }
98    return "";
99}

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.