PageSourceSearch

https://www.swilson.info/js/disp.js

js swilson.info collected 2026-09-25 00:50:17 UTC 875 bytes, 49 lines download raw bytes

1// Email.js version 5
2var tld_ = new Array()
3tld_[0] = "com";
4tld_[1] = "org";
5tld_[2] = "net";
6tld_[3] = "ws";
7tld_[4] = "info";
8tld_[10] = "co.uk";
9tld_[11] = "org.uk";
10tld_[12] = "gov.uk";
11tld_[13] = "ac.uk";
12tld_[14] = "info";
13var topDom_ = 14;
14var m_ = "mailto:";
15var a_ = "@";
16var d_ = ".";
17
18function disp(name, dom, tl, params)
19{
20	var s = e(name,dom,tl);
21	document.write('<a href="'+m_+s+params+'">'+s+'</a>');
22}
23function disp2(name, dom, tl, params, display)
24{
25	document.write('<a href="'+m_+e(name,dom,tl)+params+'">'+display+'</a>');
26}
27function e(name, dom, tl)
28{
29	var s = name+a_;
30	if (tl!=-2)
31	{
32		s+= dom;
33		if (tl>=0)
34			s+= d_+tld_[tl];
35	}
36	else
37		s+= swapper(dom);
38	return s;
39}
40function swapper(d)
41{
42	var s = "";
43	for (var i=0; i<d.length; i+=2)
44		if (i+1==d.length)
45			s+= d.charAt(i)
46		else
47			s+= d.charAt(i+1)+d.charAt(i);
48	return s.replace(/\?/g,'.');
49}

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.