forked from websanova/js-url
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (70 loc) · 3.08 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Websanova url()</title>
<script type="text/javascript" src="./js-url.min.js"></script>
<script type="text/javascript">
console.log(url());
console.log('err: ' + url('err'));
console.log('err: ' + url(''));
console.log('domain: ' + url('domain'));
console.log('hostname: ' + url('hostname'));
console.log('tld: ' + url('tld'));
console.log('sub: ' + url('sub'));
console.log('.0: ' + url('.0'));
console.log('.1: ' + url('.1'));
console.log('.2: ' + url('.2'));
console.log('.3: ' + url('.3'));
console.log('.-1: ' + url('.-1'));
console.log('.-2: ' + url('.-2'));
console.log('.-3: ' + url('.-3'));
console.log('.poo: ' + url('.poo'));
console.log('port: ' + url('port'));
console.log('protocol: ' + url('protocol'));
console.log('path: ' + url('path'));
console.log('file: ' + url('file'));
console.log('filename: ' + url('filename'));
console.log('fileext: ' + url('fileext'));
console.log('1: ' + url('1'));
console.log('2: ' + url('2'));
console.log('3: ' + url('3'));
console.log('-1: ' + url('-1'));
console.log('-2: ' + url('-2'));
console.log('-3: ' + url('-3'));
console.log('1: ' + url(1));
console.log('2: ' + url(2));
console.log('3: ' + url(3));
console.log('-1: ' + url(-1));
console.log('-2: ' + url(-2));
console.log('-3: ' + url(-3));
console.log('?: ' + url('?'));
console.log('?test: ' + url('?test'));
console.log('?poo: ' + url('?poo'));
console.log('#: ' + url('#'));
console.log('#this: ' + url('#this'));
console.log('#test: ' + url('#test'));
console.log('***********************************');
console.log(url('domain', 'test.www.domain.com/path/here'));
console.log(url('hostname', 'test.www.domain.com/path/here'));
console.log(url('sub', 'test.www.domain.com/path/here'));
console.log(url('protocol', 'test.www.domain.com/path/here'));
console.log(url('path', 'http://www.domain.com:8080/some/path'));
console.log(url('port', 'http://www.domain.com:8080/some/path'));
console.log(url('protocol', 'https://www.domain.com:8080/some/path'));
console.log(url('protocol', 'sml://www.domain.com:8080/some/path'));
console.log(url('hostname', 'sml://username:[email protected]:8080/some/path'));
console.log(url('auth', 'sml://rob:[email protected]:8080/some/path'));
console.log(url('user', 'sml://rob:[email protected]:8080/some/path'));
console.log(url('pass', 'sml://rob:[email protected]:8080/some/path'));
console.log(url('hostname', '//github.com'));
console.log(url('#', 'http://www.domain.com/sub#hash'));
console.log(url('file', 'http://www.domain.com/sub#hash'));
console.log(url('auth', 'http://rob:[email protected]/path/index.html?query1=test&silly=willy#test=hash&chucky=cheese'));
console.log(url('user', 'http://rob:[email protected]/path/index.html?query1=test&silly=willy#test=hash&chucky=cheese'));
console.log(url('pass', 'http://rob:[email protected]/path/index.html?query1=test&silly=willy#test=hash&chucky=cheese'));
</script>
</head>
<body>
</body>
</html>