PageSourceSearch

https://ohom-elec.com/static/js/form.js

js ohom-elec.com collected 2026-10-04 12:49:00 UTC 8,327 bytes, 266 lines download raw bytes

1host1 = "https://form.globalso.com/";
2// host="http://localhost:8087/";
3key = "017c42188c8073bd49b43800b16aa404";
4
5var timestamp = new Date().getTime();
6var hg_special_domain_name_small_language = {}, hg_minor_languages = {};
7hg_special_domain_name_small_language = {'en.hu-q.com': 'en.hu-q.com', 'en.sunleem.com': 'en.hu-q.com'};
8hg_minor_languages = {
9    'af': 'af',
10    'am': 'am',
11    'ar': 'ar',
12    'az': 'az',
13    'be': 'be',
14    'bg': 'bg',
15    'bn': 'bn',
16    'bs': 'bs',
17    'ca': 'ca',
18    'ceb': 'ceb',
19    'co': 'co',
20    'cs': 'cs',
21    'cy': 'cy',
22    'da': 'da',
23    'de': 'de',
24    'el': 'el',
25    'en': 'en',
26    'eo': 'eo',
27    'es': 'es',
28    'et': 'et',
29    'eu': 'eu',
30    'fa': 'fa',
31    'fi': 'fi',
32    'fr': 'fr',
33    'fy': 'fy',
34    'ga': 'ga',
35    'gd': 'gd',
36    'gl': 'gl',
37    'gu': 'gu',
38    'ha': 'ha',
39    'haw': 'haw',
40    'hi': 'hi',
41    'hmn': 'hmn',
42    'hr': 'hr',
43    'ht': 'ht',
44    'hu': 'hu',
45    'hy': 'hy',
46    'id': 'id',
47    'ig': 'ig',
48    'is': 'is',
49    'it': 'it',
50    'iw': 'iw',
51    'ja': 'ja',
52    'jw': 'jw',
53    'ka': 'ka',
54    'kk': 'kk',
55    'km': 'km',
56    'kn': 'kn',
57    'ko': 'ko',
58    'ku': 'ku',
59    'ky': 'ky',
60    'la': 'la',
61    'lb': 'lb',
62    'lo': 'lo',
63    'lt': 'lt',
64    'lv': 'lv',
65    'mg': 'mg',
66    'mi': 'mi',
67    'mk': 'mk',
68    'ml': 'ml',
69    'mn': 'mn',
70    'mr': 'mr',
71    'ms': 'ms',
72    'mt': 'mt',
73    'my': 'my',
74    'ne': 'ne',
75    'nl': 'nl',
76    'no': 'no',
77    'ny': 'ny',
78    'or': 'or',
79    'pa': 'pa',
80    'pl': 'pl',
81    'ps': 'ps',
82    'pt': 'pt',
83    'ro': 'ro',
84    'ru': 'ru',
85    'rw': 'rw',
86    'sd': 'sd',
87    'si': 'si',
88    'sk': 'sk',
89    'sl': 'sl',
90    'sm': 'sm',
91    'sn': 'sn',
92    'so': 'so',
93    'sq': 'sq',
94    'sr': 'sr',
95    'st': 'st',
96    'su': 'su',
97    'sv': 'sv',
98    'sw': 'sw',
99    'ta': 'ta',
100    'te': 'te',
101    'tg': 'tg',
102    'th': 'th',
103    'tk': 'tk',
104    'tl': 'tl',
105    'tr': 'tr',
106    'tt': 'tt',
107    'ug': 'ug',
108    'uk': 'uk',
109    'ur': 'ur',
110    'uz': 'uz',
111    'vi': 'vi',
112    'xh': 'xh',
113    'yi': 'yi',
114    'yo': 'yo',
115    'zh': 'zh',
116    'zh-tw': 'zh-tw',
117    'zu': 'zu',
118    'q': 'q',
119    'w': 'w',
120    'e': 'e',
121    'r': 'r',
122    't': 't',
123    'y': 'y',
124    'u': 'u',
125    'i': 'i',
126    'o': 'o',
127    'p': 'p',
128    'a': 'a',
129    's': 's',
130    'd': 'd',
131    'f': 'f',
132    'g': 'g',
133    'h': 'h',
134    'j': 'j',
135    'k': 'k',
136    'l': 'l',
137    'z': 'z',
138    'x': 'x',
139    'c': 'c',
140    'v': 'v',
141    'b': 'b',
142    'n': 'n',
143    'm': 'm'
144};
145var scr = {}, href = {}, source_address = {}, file = {}, scripts = {}, domain = {}, host = {}, html = {}, id_c = {},
146    id_document = {};
147id_c[timestamp] = "fromIframes" + timestamp;
148host[timestamp] = host1;
149scr[timestamp] = document.currentScript;
150scripts[timestamp] = document.getElementsByTagName("script");
151var durl = /(\/\/([^\/]+)\/)([\w\W]*)(form.js|widget-init-inline.js)/i;
152for (var i = scripts[timestamp].length - 1; i >= 0; i--) {
153    file[timestamp] = scripts[timestamp][i].getAttribute("src");
154    domain[timestamp] = durl.exec(file[timestamp]);
155    if (domain[timestamp] && domain[timestamp] != undefined) {
156        if (domain[timestamp].length == 5 && (domain[timestamp][4] == 'form.js' || domain[timestamp][4] == 'widget-init-inline.js')) {
157            host[timestamp] = domain[timestamp][1];
158            source_address[timestamp] = domain[timestamp][2];
159            href[timestamp] = scripts[timestamp][i].getAttribute("href");
160            break;
161        }
162    }
163}
164//------------按钮绑定----------------
165var domain_host_url = window.location.href;
166var reg_url = /^(http|https):\/\/([^\/]+)\//i;
167var domain_name = reg_url.exec(domain_host_url);
168var reg = /\\|\/|\?|\?|\*|\"|\“|\”|\'|\‘|\’|\<|\>|\{|\}|\[|\]|\【|\】|\:|\:|\、|\^|\$|\!|\~|\`|\||\./g;
169temp = '';
170if (domain_name) temp = domain_name[0].replace(reg, "");
171else if (domain_host) var temp = domain_host.replace(reg, "");
172var input_btn_id = '', len = '';
173if (temp) {
174    input_btn_id = "mauticform_input_" + temp + "_submit";
175    len = document.getElementById(input_btn_id);
176    if (!len) {
177        var targetElement = document.createElement("input"); // 创建一个元素节点
178        targetElement.type = 'button';//submit  button
179        targetElement.value = 'google统计';
180        targetElement.id = input_btn_id;
181        targetElement.class = "google-submit-sum form_" + input_btn_id;
182        targetElement.style.display = "none";
183        targetElement.addEventListener('click', function (e) {
184            console.log('gool统计');
185        });
186        document.body.insertAdjacentElement("beforeend", targetElement);
187        window.addEventListener('message', function (e) {
188            var Date = e.data;
189            if (Date.num == 3) {
190                var sub = document.getElementById(Date.id_c);
191                if (/msie/i.test(navigator.userAgent)) //IE
192                {
193                    sub.fireEvent("onclick");
194                } else {
195                    var e = document.createEvent('MouseEvent');
196                    e.initEvent('click', false, false);
197                    sub.dispatchEvent(e);
198                }
199            }
200        }, false);
201    }
202    document.getElementById(input_btn_id).className = "google-form-submit-sum form_" + input_btn_id;
203}
204var myDate = new Date;
205var year = myDate.getUTCFullYear(); //获取当前年
206var mon = myDate.getUTCMonth() + 1; //获取当前月
207var date = myDate.getUTCDate(); //获取当前日
208var dates = year + "-" + mon + "-" + date;
209var windowlocationhost = window.location.host;
210// var windowlocationhost = "m.sdgsdg.com";
211if(!arrayPrototype(hg_special_domain_name_small_language,windowlocationhost)){
212    host_arr=windowlocationhost.split('.');
213    if(arrayPrototype(hg_minor_languages,host_arr[0])){
214        host_arr[0]='www';
215        windowlocationhost=host_arr.join('.');
216    }
217}
218// console.log(myDate.getUTCFullYear()+"-"+(myDate.getUTCMonth()+1)+"-"+myDate.getUTCDate()+" "+myDate.getUTCHours()+":"+myDate.getUTCMinutes()+":"+myDate.getUTCSeconds())
219// console.log(myDate.getFullYear()+"-"+(myDate.getMonth()+1)+"-"+myDate.getDate()+" "+myDate.getHours()+":"+myDate.getMinutes()+":"+myDate.getSeconds())
220var html_url = year + '' + mon + '' + date + "_inquiry_form_" + windowlocationhost.replace(/\.|\:/g, "");
221html[timestamp] = "<iframe src='" + host[timestamp] + "api/form/" + html_url + "?domain=" + windowlocationhost + "&key=" + key + "&date=" + dates + "&source_address=" + source_address[timestamp] + "' id='" + id_c[timestamp] + "' name='" + id_c[timestamp] + "' class='from_iframe' style='min-width:280px;min-height:420px;width:100%;height:100%;background:transparent;border:none;outline:none;margin:0;padding:0;box-shadow: 0 0 10px rgb(0,0,0,.1);'></iframe>"
222if (scr[timestamp] !== undefined) {
223    scr[timestamp].insertAdjacentHTML("afterend", html[timestamp]);
224    var domain_ = document.domain;
225    var domain_host = windowlocationhost;
226    var domain_host_url = window.location.href;
227    var winWidth = 0;
228    var winHeight = 0;
229    id_document[timestamp] = document.getElementById(id_c[timestamp]);
230    // setTimeout(function () {
231    iframe(id_document[timestamp], domain_, domain_host_url, domain_host, host[timestamp], key, winHeight, winWidth, source_address[timestamp], timestamp, input_btn_id, href[timestamp])
232    // }, 1000);
233}
234
235function iframe(id_document, domain, domain_host_url, domain_host, host, key, winHeight, winWidth, source_address, timestamp, input_btn_id, href) {
236    id_document.onload = function () {
237        id_document.contentWindow.postMessage({
238            domain: domain,
239            domain_host_url: domain_host_url,
240            domain_host: domain_host,
241            host: host,
242            key: key,
243            winHeight: winHeight,
244            winWidth: winWidth,
245            source_address: source_address,
246            input_btn_id: input_btn_id,
247            timestamp: timestamp,
248            href: href
249        }, '*');
250    }
251}
252function arrayPrototype(array,string) {
253    for (var i in array){
254        if(i==string)return true;
255    }
256    return false;
257}
258
259window.addEventListener('message', function (e) {
260    var Date = e.data;
261    if(Date.num == 4){
262        if(Date.id_c=='0')window.location.reload();
263        else if(!isNaN(Date.id_c))window.history.go(Date.id_c);
264        else window.location.href=Date.id_c;
265    }
266}, false);

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.