Skip to content

Commit 547d4b6

Browse files
committedJul 11, 2021
build: update jquery
1 parent aab4a43 commit 547d4b6

21 files changed

+131
-169
lines changed
 

‎about-uris.html

+23-23
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
66
<title>URI.js - About URIs</title>
77
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
8-
9-
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
8+
9+
<script src="jquery-3.6.0.min.js" type="text/javascript"></script>
1010
<script src="prettify/prettify.js" type="text/javascript"></script>
1111
<script src="screen.js" type="text/javascript"></script>
1212
<link href="screen.css" rel="stylesheet" type="text/css" />
@@ -28,10 +28,10 @@
2828
</head>
2929
<body>
3030
<a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
31-
31+
3232
<div id="container">
3333
<h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
34-
34+
3535
<ul class="menu">
3636
<li><a href="/URI.js/">Intro</a></li>
3737
<li class="active"><a href="about-uris.html">Understanding URIs</a></li>
@@ -41,14 +41,14 @@ <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
4141
<li><a href="build.html">Build</a></li>
4242
<li><a href="http://rodneyrehm.de/en/">Author</a></li>
4343
</ul>
44-
44+
4545
<h2>Understanding URIs</h2>
46-
46+
4747
<p>
4848
Uniform Resource Identifiers (URI) can be one of two things, a Uniform Resource Locator (URL) or a Uniform Resource Name (URN).
4949
You likely deal with URLs most of the time. See RFC 3986 for a proper definition of the terms <a href="http://tools.ietf.org/html/rfc3986#section-1.1.3">URI, URL and URN</a>
5050
</p>
51-
51+
5252
<p>
5353
URNs <em>name</em> a resource.
5454
They are (supposed to) designate a globally unique, permanent identifier for that resource.
@@ -84,7 +84,7 @@ <h2>URLs and URNs in URI.js</h2>
8484
The most surprising result of this is that <code>mailto:</code> URLs will be considered by URI.js to be URNs rather than URLs.
8585
That said, the functional differences will not adversely impact the handling of those URLs.
8686
</p>
87-
87+
8888
<h2 id="components">Components of an URI</h2>
8989
<p><a href="http://tools.ietf.org/html/rfc3986#section-3">RFC 3986 Section 3</a> visualizes the structure of <abbr title="Uniform Resource Indicator">URI</abbr>s as follows:</p>
9090
<pre class="ascii-art">
@@ -120,70 +120,70 @@ <h3 id="components-url">Components of an <abbr title="Uniform Resource Locator">
120120
</span> <a href="docs.html#accessors-domain">domain</a> <a href="docs.html#accessors-filename">filename</a>
121121

122122
</pre>
123-
123+
124124
<p>
125-
In Javascript the <em>query</em> is often referred to as the <em>search</em>.
125+
In Javascript the <em>query</em> is often referred to as the <em>search</em>.
126126
URI.js provides both accessors with the subtle difference of <a href="docs.html#accessors-search">.search()</a> beginning with the <code>?</code>-character
127127
and <a href="docs.html#accessors-search">.query()</a> not.
128128
</p>
129129
<p>
130-
In Javascript the <em>fragment</em> is often referred to as the <em>hash</em>.
130+
In Javascript the <em>fragment</em> is often referred to as the <em>hash</em>.
131131
URI.js provides both accessors with the subtle difference of <a href="docs.html#accessors-hash">.hash()</a> beginning with the <code>#</code>-character
132132
and <a href="docs.html#accessors-hash">.fragment()</a> not.
133133
</p>
134-
134+
135135
<h3 id="components-urn">Components of an <abbr title="Uniform Resource Name">URN</abbr> in URI.js</h3>
136-
136+
137137
<pre class="ascii-art">
138138
urn:example:animal:ferret:nose?name=ferret#foo
139139
<span class="line"> \ / \________________________/ \_________/ \ /
140140
| | | |
141141
</span> <a href="docs.html#accessors-protocol">scheme</a> <a href="docs.html#accessors-pathname">path</a> &amp; <a href="docs.html#accessors-segment">segment</a> <a href="docs.html#accessors-search">query</a> <a href="docs.html#accessors-hash">fragment</a>
142142
</pre>
143-
143+
144144
<p>While <a href="http://tools.ietf.org/html/rfc2141">RFC 2141</a> does not define URNs having a query or fragment component, URI.js enables these accessors for convenience.</p>
145-
145+
146146
<h2 id="problems">URLs - Man Made Problems</h2>
147-
147+
148148
<p>URLs (URIs, whatever) aren't easy. There are a couple of issues that make this simple text representation of a resource a real pain</p>
149149
<ul>
150150
<li>Look simple but have tricky encoding issues</li>
151151
<li>Domains aren't part of the specification</li>
152152
<li>Query String Format isn't part of the specification</li>
153153
<li>Environments (PHP, JS, Ruby, …) handle Query Strings quite differently</li>
154154
</ul>
155-
155+
156156
<h3 id="problems-encoding">Parsing (seemingly) invalid URLs</h3>
157157
<p>Because URLs look very simple, most people haven't read the formal specification. As a result, most people get URLs wrong on many different levels. The one thing most everybody screws up is proper encoding/escaping.</p>
158158
<p><code>http://username:pass:word@example.org/</code> is such a case. Often times homebrew URL handling misses escaping the less frequently used parts such as the userinfo.</p>
159159
<p><code>http://example.org/@foo</code> that "@" doesn't have to be escaped according to RFC3986. Homebrew URL handlers often just treat everything between "://" and "@" as the userinfo.</p>
160160
<p><code>some/path/:foo</code> is a valid relative path (as URIs don't have to contain scheme and authority). Since homebrew URL handlers usually just look for the first occurence of ":" to delimit the scheme, they'll screw this up as well.</p>
161161
<p><code>+</code> is the proper escape-sequence for a space-character within the query string component, while every other component prefers <code>%20</code>. This is due to the fact that the actual format used within the query string component is not defined in RFC 3986, but in the HTML spec.</p>
162162
<p>There is encoding and strict encoding - and Javascript won't get them right: <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent#Description">encodeURIComponent()</a></p>
163-
163+
164164
<h3 id="problems-tld">Top Level Domains</h3>
165165
<p>The hostname component can be one of may things. An IPv4 or IPv6 address, an IDN or Punycode domain name, or a regular domain name. While the format (and meaning) of IPv4 and IPv6 addresses is defined in RFC 3986, the meaning of domain names is not.</p>
166-
<p>DNS is the base of translating domain names to IP addresses. DNS itself only specifies syntax, not semantics. The missing semantics is what's driving us crazy here.</p>
166+
<p>DNS is the base of translating domain names to IP addresses. DNS itself only specifies syntax, not semantics. The missing semantics is what's driving us crazy here.</p>
167167
<p>ICANN provides a <a href="http://www.iana.org/domains/root/db/">list of registered Top Level Domains</a> (TLD). There are country code TLDs (ccTLDs, assigned to each country, like ".uk" for United Kindom) and generic TLDs (gTLDs, like ".xxx" for you know what). Also note that a TLD may be non-ASCII <code>.香港</code> (IDN version of HK, Hong Kong).</p>
168168
<p>IDN TLDs such as <code>.香港</code> and the fact that any possible new TLD could pop up next month has lead to a lot of URL/Domain verification tools to fail.</p>
169169

170-
<h3 id="problems-sld">Second Level Domains</h3>
170+
<h3 id="problems-sld">Second Level Domains</h3>
171171
<p>To make Things worse, people thought it to be a good idea to introduce Second Level Domains (SLD, ".co.uk" - the commercial namespace of United Kingdom). These SLDs are not up to ICANN to define, they're handled individually by each NIC (Network Information Center, the orgianisation responsible for a specific TLD).</p>
172172
<p>Since there is no central oversight, things got really messy in this particular space. Germany doesn't do SDLs, Australia does. Australia has different SLDs than the United Kingdom (".csiro.au" but no ".csiro.uk"). The individual NICs are not required to publish their arbitrarily chosen SLDs in a defined syntax anywhere.</p>
173173
<p>You can scour each NIC's website to find some hints at their SLDs. You can look them up on Wikipedia and hope they're right. Or you can use <a href="http://publicsuffix.org/">PublicSuffix</a>.</p>
174174
<p>Speaking of PublicSuffix, it's time mentioning that browser vendors actually keep a list of known Second Level Domains. They need to know those for security issues. Remember cookies? They can be read and set on a domain level. What do you think would happen if "co.uk" was treated as the domain? <code>amazon.co.uk</code> would be able to read the cookies of <code>google.co.uk</code>. PublicSuffix also contains custom SLDs, such as <code>.dyndns.org</code>. While this makes perfect sense for browser security, it's not what we need for basic URL handling.</p>
175175
<p>TL;DR: It's a mess.</p>
176-
176+
177177
<h3 id="problems-querystring">The Query String</h3>
178178
<p>PHP (<a href="http://php.net/manual/en/function.parse-str.php">parse_str()</a>) will automatically parse the query string and populate the superglobal <code>$_GET</code> for you. <code>?foo=1&amp;foo=2</code> becomes <code>$_GET = array('foo' => 2);</code>, while <code>?foo[]=1&amp;foo[]=2</code> becomes <code>$_GET = array('foo' => array("1", "2"));</code>.</p>
179179
<p>Ruby's <code>CGI.parse()</code> turns <code>?a=1&amp;a=2</code> into <code>{"a" : ["1", "2"]}</code>, while Ruby on Rails chose the PHP-way.</p>
180180
<p>Python's <a href="http://docs.python.org/2/library/urlparse.html#urlparse.parse_qs">parse_qs()</a> doesn't care for <code>[]</code> either.
181181
<p>Most other languages don't follow the <code>[]</code>-style array-notation and deal with this mess differently.</p>
182182
<p>TL;DR: You need to know the target-environment, to know how complex query string data has to be encoded</p>
183-
183+
184184
<h3 id="problems-fragment">The Fragment</h3>
185185
<p>Given the URL <code>http://example.org/index.html#foobar</code>, browsers only request <code>http://example.org/index.html</code>, the fragment <code>#foobar</code> is a client-side thing.</p>
186-
186+
187187
</div>
188188
</body>
189189
</html>

‎build.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
66
<title>URI.js - Custom Build</title>
77
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
8-
9-
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
8+
9+
<script src="jquery-3.6.0.min.js" type="text/javascript"></script>
1010
<script src="screen.js" type="text/javascript"></script>
1111
<script src="build.js" type="text/javascript"></script>
1212
<link href="screen.css" rel="stylesheet" type="text/css" />
1313
</head>
1414
<body>
15-
15+
1616
<a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
1717

1818
<div id="container">
@@ -57,12 +57,12 @@ <h2>Custom Built URI.js</h2>
5757
<p class="download"> your custom built <code>URI.js</code> or copy the following code:</p>
5858
<textarea id="output" cols="50" rows="5" style="width: 100%; height: 200px;"></textarea>
5959
</div>
60-
60+
6161
<hr>
62-
62+
6363
<p>
6464
This "build tool" does nothing but downloading the selected files, concatenating them and pushing them through <a href="http://closure-compiler.appspot.com/home">Closure Compiler</a>.
65-
Since Closure Compiler is running on a different domain, this trick will only work on modern browsers.
65+
Since Closure Compiler is running on a different domain, this trick will only work on modern browsers.
6666
I'm sorry for the ~2% of you IE users. You'll have to do this <a href="https://github.com/medialize/URI.js#minify">manually</a>.
6767
</p>
6868
</form>

‎docs.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>URI.js - API Documentation</title>
77
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
88

9-
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
9+
<script src="jquery-3.6.0.min.js" type="text/javascript"></script>
1010
<script src="prettify/prettify.js" type="text/javascript"></script>
1111
<script src="screen.js" type="text/javascript"></script>
1212
<link href="screen.css" rel="stylesheet" type="text/css" />

‎index.html

+20-20
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
66
<title>URI.js - URLs in Javascript</title>
77
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
8-
9-
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
8+
9+
<script src="jquery-3.6.0.min.js" type="text/javascript"></script>
1010
<script src="prettify/prettify.js" type="text/javascript"></script>
1111
<script src="screen.js" type="text/javascript"></script>
1212
<link href="screen.css" rel="stylesheet" type="text/css" />
@@ -29,10 +29,10 @@
2929
<body>
3030
<a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
3131
<div id="github-watch"><a href="https://github.com/medialize/URI.js" class="gitwatch">URI.js Github Repository</a></div>
32-
32+
3333
<div id="container">
3434
<h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
35-
35+
3636
<ul class="menu">
3737
<li class="active"><a href="/URI.js/">Intro</a></li>
3838
<li><a href="about-uris.html">Understanding URIs</a></li>
@@ -42,8 +42,8 @@ <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
4242
<li><a href="build.html">Build</a></li>
4343
<li><a href="http://rodneyrehm.de/en/">Author</a></li>
4444
</ul>
45-
46-
<p>URI.js is a javascript library for working with URLs. It offers a "jQuery-style" API (<a href="http://en.wikipedia.org/wiki/Fluent_interface">Fluent Interface</a>, Method Chaining) to read and write all regular components and a number of convenience methods like
45+
46+
<p>URI.js is a javascript library for working with URLs. It offers a "jQuery-style" API (<a href="http://en.wikipedia.org/wiki/Fluent_interface">Fluent Interface</a>, Method Chaining) to read and write all regular components and a number of convenience methods like
4747
.<a href="docs.html#accessors-directory">directory</a>() and .<a href="docs.html#accessors-authority">authority</a>().</p>
4848
<p>URI.js offers simple, yet powerful ways of working with query string, has a number of URI-normalization functions and converts relative/absolute paths.</p>
4949
<p>While URI.js provides a <a href="jquery-uri-plugin.html">jQuery plugin</a>. URI.js itself does not rely on jQuery. You <em>don't need jQuery</em> to use URI.js</p>
@@ -52,13 +52,13 @@ <h2>Examples</h2>
5252
<p>How do you like manipulating URLs the "jQuery-style"?</p>
5353
<pre class="prettyprint lang-js">// mutating URLs
5454
URI("http://example.org/foo.html?hello=world")
55-
.<a href="docs.html#accessors-username">username</a>("rodneyrehm")
55+
.<a href="docs.html#accessors-username">username</a>("rodneyrehm")
5656
// -> http://rodneyrehm@example.org/foo.html?hello=world
57-
.<a href="docs.html#accessors-username">username</a>("")
57+
.<a href="docs.html#accessors-username">username</a>("")
5858
// -> http://example.org/foo.html?hello=world
5959
.<a href="docs.html#accessors-directory">directory</a>("bar")
6060
// -> http://example.org/bar/foo.html?hello=world
61-
.<a href="docs.html#accessors-suffix">suffix</a>("xml")
61+
.<a href="docs.html#accessors-suffix">suffix</a>("xml")
6262
// -> http://example.org/bar/foo.xml?hello=world
6363
.<a href="docs.html#accessors-hash">hash</a>("hackernews")
6464
// -> http://example.org/bar/foo.xml?hello=world#hackernews
@@ -82,14 +82,14 @@ <h2>Examples</h2>
8282
.<a href="docs.html#search-remove">removeSearch</a>("foo")
8383
// -> ?hello=world
8484
</pre>
85-
85+
8686
<p>How do you like relative paths?</p>
8787
<pre class="prettyprint lang-js">URI("/relative/path")
8888
.<a href="docs.html#relativeto">relativeTo</a>("/relative/sub/foo/sub/file")
89-
// -> ../../../path
89+
// -> ../../../path
9090
.<a href="docs.html#absolute">absoluteTo</a>("/relative/sub/foo/sub/file");
9191
// -> /relative/path </pre>
92-
92+
9393
<p>How do you like cleaning things up?</p>
9494
<pre class="prettyprint lang-js">URI("?&amp;foo=bar&amp;&amp;foo=bar&amp;foo=baz&amp;&quot;)
9595
.<a href="docs.html#normalize-search">normalizeSearch</a>();
@@ -98,7 +98,7 @@ <h2>Examples</h2>
9898
URI("/hello/foo/woo/.././../world.html")
9999
.<a href="docs.html#normalize-path">normalizePathname</a>();
100100
// -> /hello/world.html </pre>
101-
101+
102102
<p>How do you like detecting URIs within random text?</p>
103103
<pre class="prettyprint lang-js">var source = "Hello www.example.com,\n"
104104
+ "http://google.com is a search engine, like http://www.bing.com\n"
@@ -129,7 +129,7 @@ <h2>Examples</h2>
129129

130130
a !== b;
131131
URI(a).<a href="docs.html#equals">equals</a>(b) === true;</pre>
132-
132+
133133
<p>How do you like fiddling with the fragment?</p>
134134
<pre class="prettyprint lang-js">// <strong>storing values in the fragment (hash):</strong>
135135
var uri = URI("#hello-world");
@@ -150,24 +150,24 @@ <h2>Examples</h2>
150150
uri.protocol() == "urn";
151151
uri.path() == "uuid:c5542ab6-3d96-403e-8e6b-b8bb52f48d9a";
152152
uri.query() == "query=string";</pre>
153-
153+
154154
<p>How do you like URI Templating?</p>
155155
<pre class="prettyprint lang-js">URI.expand("/foo/{dir}/{file}", {
156156
dir: "bar",
157157
file: "world.html"
158158
});
159159
// -> /foo/bar/world.html</pre>
160-
160+
161161
<h2 id="authors">Authors</h2>
162162
<ul>
163163
<li><a href="http://rodneyrehm.de/en/">Rodney Rehm</a></li>
164164
</ul>
165-
165+
166166
<h2 id="license">License</h2>
167167
<p>URI.js is published under the <a href="http://www.opensource.org/licenses/mit-license">MIT license</a>.</p>
168-
168+
169169
</div>
170-
170+
171171
<script type="text/javascript" src="https://raw.github.com/addyosmani/github-watchers-button/master/github-watchers.min.js"></script>
172172
</body>
173-
</html>
173+
</html>

‎jquery-1.10.2.min.js

-6
This file was deleted.

‎jquery-1.12.4.min.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎jquery-1.7.2.min.js

-4
This file was deleted.

‎jquery-1.8.2.min.js

-2
This file was deleted.

‎jquery-1.9.1.min.js

-5
This file was deleted.

‎jquery-2.2.4.min.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎jquery-3.6.0.min.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎jquery-uri-plugin.html

+20-20
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
66
<title>URI.js - jQuery URI Plugin</title>
77
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
8-
9-
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
8+
9+
<script src="jquery-3.6.0.min.js" type="text/javascript"></script>
1010
<script src="prettify/prettify.js" type="text/javascript"></script>
1111
<script src="screen.js" type="text/javascript"></script>
1212
<link href="screen.css" rel="stylesheet" type="text/css" />
@@ -29,10 +29,10 @@
2929
</head>
3030
<body>
3131
<a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
32-
32+
3333
<div id="container">
3434
<h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
35-
35+
3636
<ul class="menu">
3737
<li><a href="/URI.js/">Intro</a></li>
3838
<li><a href="about-uris.html">Understanding URIs</a></li>
@@ -42,12 +42,12 @@ <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
4242
<li><a href="build.html">Build</a></li>
4343
<li><a href="http://rodneyrehm.de/en/">Author</a></li>
4444
</ul>
45-
45+
4646
<h2>URI.js jQuery Plugin</h2>
4747
<p>As of version 1.6.0 URI.js offers a simple jQuery integration. For the plugin to work, you need to regularly load <code>URI.js</code>, as well as <code>jquery.URI.js</code>.</p>
4848
<p>URI.js does not depend on jQuery unless you want to use the URI.js jQuery Plugin</p>
49-
50-
<h2>Accessing the URI Instance</h2>
49+
50+
<h2>Accessing the URI Instance</h2>
5151
<pre class="prettyprint lang-js">
5252
var $a = $('&lt;a href=&quot;http://google.com/hello.html&quot;&gt;Demo&lt;/a&gt;');
5353
var uri = $a.uri();
@@ -66,7 +66,7 @@ <h2>Accessing the URI Instance</h2>
6666
$a.uri('/hello/world.html');
6767
$a.attr('href') == '/hello/world.html';
6868
uri.href() == '/hello/world.html';</pre>
69-
69+
7070
<h2>Accessing URI components</h2>
7171
<pre class="prettyprint lang-js">var $a = $('&lt;a href=&quot;http://www.google.com/hello.html&quot;&gt;Demo&lt;/a&gt;');
7272

@@ -102,7 +102,7 @@ <h2>Accessing URI components</h2>
102102
<a href="docs.html#accessors-tld">tld</a>,
103103
<a href="docs.html#accessors-username">username</a>.
104104
</p>
105-
105+
106106
<h2>Selectors</h2>
107107
<p>You may find yourself wanting to select all links to a certain file-type or a specific domain. <code>:uri()</code> is a pseudo-class filter that will help you with that:</p>
108108
<pre class="prettyprint lang-html">
@@ -116,23 +116,23 @@ <h2>Selectors</h2>
116116
&lt;/div&gt;
117117
</pre>
118118
<pre class="prettyprint lang-js">// finding links to a given file-type
119-
$('a:uri(suffix = pdf)');
119+
$('a:uri(suffix = pdf)');
120120
// -&gt; finds PDF
121121

122122
// selecting links to a directory (or child thereof)
123-
$('a:uri(directory *= /directory/)');
123+
$('a:uri(directory *= /directory/)');
124124
// -&gt; finds Github
125125

126126
// selecting links to google.com
127-
$('a:uri(domain = google.com)');
127+
$('a:uri(domain = google.com)');
128128
// -&gt; finds Google1, Google2
129129

130130
// selecting all relative links
131-
$('a:uri(is: relative)');
131+
$('a:uri(is: relative)');
132132
// -&gt; finds PDF
133133

134134
// selecting links regardless of their representation
135-
$('a:uri(equals: http://github.com/some/other/../directory/help.html)');
135+
$('a:uri(equals: http://github.com/some/other/../directory/help.html)');
136136
// -&gt; finds Github
137137

138138
// finding elements containing a link to github
@@ -153,16 +153,16 @@ <h2>Selectors</h2>
153153

154154
<h3>The :uri() pseudo selector</h3>
155155
<p><code>:uri()</code> accepts the following three argument patterns:</p>
156-
156+
157157
<ul>
158158
<li><code>:uri(<em>accessor</em> operator <strong>string</strong>)</code> to compare a single URI-component</li>
159159
<li><code>:uri(is: <strong>string</strong>)</code> to compare against <a href="docs.html#is">.is()</a></li>
160160
<li><code>:uri(equals: <strong>string</strong>)</code> to compare URLs using <a href="docs.html#equals">.equals()</a></li>
161161
</ul>
162-
162+
163163
<p>Note: It is a good idea to prepend the element(s) you're looking for. <code>a:uri(is: relative)</code> is much faster than <code>:uri(is: relative)</code>.</p>
164164
<p>Note: <code>")"</code> may not be used in your comparison-<code>string</code>, as jQuery (Sizzle, actually) can't handle that properly.</p>
165-
165+
166166
<h3>Comparison Accessors</h3>
167167
<p>All URI-component accessors (except <a href="docs.html#accessors-segment">segment</a>) can be used:
168168
<a href="docs.html#accessors-authority">authority</a>,
@@ -188,7 +188,7 @@ <h3>Comparison Accessors</h3>
188188
<a href="docs.html#accessors-tld">tld</a>,
189189
<a href="docs.html#accessors-username">username</a>.
190190
</p>
191-
191+
192192
<h3>Comparison Operators</h3>
193193
<p>Comparison operators are derived from CSS attribute match operators:</p>
194194
<dl>
@@ -197,7 +197,7 @@ <h3>Comparison Operators</h3>
197197
<dt>$=</dt><dd><code>accessor</code> ends with <code>string</code> (case-insensitive)</dd>
198198
<dt>*=</dt><dd><code>accessor</code> contains <code>string</code> (case-insensitive)</dd>
199199
</dl>
200-
200+
201201
</div>
202202
</body>
203-
</html>
203+
</html>

‎test/index.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
<script>
1111
QUnit.testSuites([
1212
"test.URI.html",
13-
"test.jQuery-1.10.html",
14-
"test.jQuery-1.9.html",
15-
"test.jQuery-1.8.html",
16-
"test.jQuery-1.7.html",
13+
"test.jQuery-1.12.4.html",
14+
"test.jQuery-2.2.4.html",
15+
"test.jQuery-3.6.0.html",
1716
"test.fragmentQuery.html",
1817
"test.fragmentURI.html"
1918
]);

‎test/test.URI.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
1111
<script type="text/javascript" src="../src/URI.js"></script>
1212
<script type="text/javascript" src="../src/URITemplate.js"></script>
13-
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
13+
<script type="text/javascript" src="../jquery-3.6.0.min.js"></script>
1414
<script type="text/javascript" src="../src/jquery.URI.js"></script>
1515
<script type="text/javascript" src="qunit/qunit.js"></script>
1616

‎test/test.fragmentQuery.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
<script type="text/javascript" src="../src/URI.js"></script>
1212
<script type="text/javascript" src="../src/URITemplate.js"></script>
1313
<script type="text/javascript" src="../src/URI.fragmentQuery.js"></script>
14-
<script type="text/javascript" src="../jquery-1.9.1.min.js"></script>
14+
<script type="text/javascript" src="../jquery-3.6.0.min.js"></script>
1515
<script type="text/javascript" src="qunit/qunit.js"></script>
16-
17-
<!--
18-
as the plugins alter core URI functionality,
19-
it is necessary to re-test URI itself was well
16+
17+
<!--
18+
as the plugins alter core URI functionality,
19+
it is necessary to re-test URI itself was well
2020
-->
2121
<script type="text/javascript" src="urls.js"></script>
2222
<script type="text/javascript" src="test.js"></script>

‎test/test.fragmentURI.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
<script type="text/javascript" src="../src/URI.js"></script>
1212
<script type="text/javascript" src="../src/URITemplate.js"></script>
1313
<script type="text/javascript" src="../src/URI.fragmentURI.js"></script>
14-
<script type="text/javascript" src="../jquery-1.9.1.min.js"></script>
14+
<script type="text/javascript" src="../jquery-3.6.0.min.js"></script>
1515
<script type="text/javascript" src="qunit/qunit.js"></script>
1616

17-
<!--
18-
as the plugins alter core URI functionality,
19-
it is necessary to re-test URI itself was well
17+
<!--
18+
as the plugins alter core URI functionality,
19+
it is necessary to re-test URI itself was well
2020
-->
2121
<script type="text/javascript" src="urls.js"></script>
2222
<script type="text/javascript" src="test.js"></script>

‎test/test.jQuery-1.10.html ‎test/test.jQuery-1.12.4.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
1111
<script type="text/javascript" src="../src/URI.js"></script>
1212
<script type="text/javascript" src="../src/URITemplate.js"></script>
13-
<script type="text/javascript" src="../jquery-1.10.2.min.js"></script>
13+
<script type="text/javascript" src="../jquery-1.12.4.min.js"></script>
1414
<script type="text/javascript" src="../src/jquery.URI.js"></script>
1515
<script type="text/javascript" src="qunit/qunit.js"></script>
16-
17-
<!--
18-
as the plugins alter core URI functionality,
19-
it is necessary to re-test URI itself was well
16+
17+
<!--
18+
as the plugins alter core URI functionality,
19+
it is necessary to re-test URI itself was well
2020
-->
2121
<script type="text/javascript" src="urls.js"></script>
2222
<script type="text/javascript" src="test.js"></script>

‎test/test.jQuery-1.8.html

-31
This file was deleted.

‎test/test.jQuery-1.9.html ‎test/test.jQuery-2.2.4.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<html>
33
<head>
44
<meta charset="UTF-8" />
5-
<title>jQuery Plugin 1.9 - URI Test Suite</title>
5+
<title>jQuery Plugin 1.10 - URI Test Suite</title>
66
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
77
<script type="text/javascript" src="pre_libs.js"></script>
88
<script type="text/javascript" src="../src/punycode.js"></script>
99
<script type="text/javascript" src="../src/IPv6.js"></script>
1010
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
1111
<script type="text/javascript" src="../src/URI.js"></script>
1212
<script type="text/javascript" src="../src/URITemplate.js"></script>
13-
<script type="text/javascript" src="../jquery-1.9.1.min.js"></script>
13+
<script type="text/javascript" src="../jquery-2.2.4.min.js"></script>
1414
<script type="text/javascript" src="../src/jquery.URI.js"></script>
1515
<script type="text/javascript" src="qunit/qunit.js"></script>
1616

‎test/test.jQuery-1.7.html ‎test/test.jQuery-3.6.0.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
<html>
33
<head>
44
<meta charset="UTF-8" />
5-
<title>jQuery Plugin 1.7 - URI Test Suite</title>
5+
<title>jQuery Plugin 1.10 - URI Test Suite</title>
66
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen">
77
<script type="text/javascript" src="pre_libs.js"></script>
88
<script type="text/javascript" src="../src/punycode.js"></script>
99
<script type="text/javascript" src="../src/IPv6.js"></script>
1010
<script type="text/javascript" src="../src/SecondLevelDomains.js"></script>
1111
<script type="text/javascript" src="../src/URI.js"></script>
1212
<script type="text/javascript" src="../src/URITemplate.js"></script>
13-
<script type="text/javascript" src="../jquery-1.7.2.min.js"></script>
13+
<script type="text/javascript" src="../jquery-3.6.0.min.js"></script>
1414
<script type="text/javascript" src="../src/jquery.URI.js"></script>
1515
<script type="text/javascript" src="qunit/qunit.js"></script>
16-
17-
<!--
18-
as the plugins alter core URI functionality,
19-
it is necessary to re-test URI itself was well
16+
17+
<!--
18+
as the plugins alter core URI functionality,
19+
it is necessary to re-test URI itself was well
2020
-->
2121
<script type="text/javascript" src="urls.js"></script>
2222
<script type="text/javascript" src="test.js"></script>

‎uri-template.html

+24-24
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
66
<title>URI.js - URI-Template</title>
77
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
8-
9-
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
8+
9+
<script src="jquery-3.6.0.min.js" type="text/javascript"></script>
1010
<script src="prettify/prettify.js" type="text/javascript"></script>
1111
<script src="screen.js" type="text/javascript"></script>
1212
<link href="screen.css" rel="stylesheet" type="text/css" />
@@ -38,12 +38,12 @@
3838
font-weight: bold;
3939
color: #663399;
4040
}
41-
41+
4242
pre {
4343
padding: 10px;
4444
background: #EEE;
4545
}
46-
46+
4747
table {
4848
width: 100%;
4949
border: 1px solid #AAA;
@@ -61,10 +61,10 @@
6161
</head>
6262
<body>
6363
<a id="github-forkme" href="https://github.com/medialize/URI.js"><img src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
64-
64+
6565
<div id="container">
6666
<h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
67-
67+
6868
<ul class="menu">
6969
<li><a href="/URI.js/">Intro</a></li>
7070
<li><a href="about-uris.html">Understanding URIs</a></li>
@@ -74,14 +74,14 @@ <h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
7474
<li><a href="build.html">Build</a></li>
7575
<li><a href="http://rodneyrehm.de/en/">Author</a></li>
7676
</ul>
77-
77+
7878
<h2>URI Template</h2>
79-
79+
8080
<p>As of version 1.7.0 URI.js includes an implementation of URI Templates, as specified in <a href="http://tools.ietf.org/html/rfc6570">RFC 6570</a> (Level 4, March 2012).</p>
81-
81+
8282

8383
<h2>Using URI Templates</h2>
84-
84+
8585
<pre class="prettyprint lang-js">
8686
// creating a new URI Template
8787
var template = new URITemplate("http://example.org/{file}");
@@ -113,11 +113,11 @@ <h2>Using URI Templates</h2>
113113
var result = template.expand({filename: "hello world.html"}, { strict: true });
114114
// Uncaught Error: Missing expansion value for variable "file"
115115
</pre>
116-
117-
118-
116+
117+
118+
119119
<h2>URI Template Syntax</h2>
120-
120+
121121
<p><em>Expressions</em> are placeholders which are to be substituted by the values their variables reference.</p>
122122
<ul>
123123
<li><code>http://example.org/~<strong>{<em class="tpl-variable">username</em>}</strong>/</code></li>
@@ -128,7 +128,7 @@ <h2>URI Template Syntax</h2>
128128
An expression consists of an <span class="tpl-operator">operator</span> and a (comma-separated) list of <em>variable-specifications</em>.
129129
A variable-specification consists of a <em class="tpl-variable">variable</em> and an optional <em class="tpl-modifier">modifier</em>.
130130
</p>
131-
131+
132132
<hr>
133133
<p>Given the template</p>
134134
<pre><code>http://example.org/~<strong>{<em class="tpl-variable">username</em>}</strong>/<strong>{<em class="tpl-variable">term</em><span class="tpl-modifier">:1</span>}</strong>/<strong>{<em class="tpl-variable">term</em>}</strong><strong>{<span class="tpl-operator">?</span><em class="tpl-variable">q</em><span class="tpl-modifier">*</span>,<em class="tpl-variable">lang</em>}</strong></code></pre>
@@ -137,7 +137,7 @@ <h2>URI Template Syntax</h2>
137137
<p>the expansion looks as follows:
138138
<pre><code>"http://example.org/~rodneyrehm/h/hello%20world?a=mars&amp;b=jupiter&amp;lang=en"</code></pre>
139139
<hr>
140-
140+
141141
<p>List of supported <span class="tpl-operator">operators</span>:</p>
142142
<table>
143143
<tr><th>Operator</th><th>Description</th></tr>
@@ -150,7 +150,7 @@ <h2>URI Template Syntax</h2>
150150
<tr><td><code>?</code></td><td>Query component beginning with "?" and consisting of name=value pairs separated by "&amp;"; and,</td></tr>
151151
<tr><td><code>&amp;</code></td><td>Continuation of query-style &amp;name=value pairs within a literal query component.</td></tr>
152152
</table>
153-
153+
154154
<p>List of supported <span class="tpl-modifier">modifiers</span>:</p>
155155
<table>
156156
<tr><th>Modifier</th><th>Description</th></tr>
@@ -161,7 +161,7 @@ <h2>URI Template Syntax</h2>
161161

162162
<h3>Strings and Numbers</h3>
163163
<p>
164-
Given <code>{"var": "hello[world]"}</code>, the expression <code>{var}</code> expands to <code>hello%5Bworld%5D</code>.
164+
Given <code>{"var": "hello[world]"}</code>, the expression <code>{var}</code> expands to <code>hello%5Bworld%5D</code>.
165165
The following table shows an output matrix for every possible operator/modifier combination produced for <code>string</code> input.
166166
</p>
167167
<table>
@@ -180,7 +180,7 @@ <h3>Strings and Numbers</h3>
180180

181181
<h3>Arrays</h3>
182182
<p>
183-
Given <code>{"var": ["one", "two", "three"]}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
183+
Given <code>{"var": ["one", "two", "three"]}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
184184
The following table shows an output matrix for every possible operator/modifier combination produced for <code>array</code> input.
185185
</p>
186186
<table>
@@ -198,7 +198,7 @@ <h3>Arrays</h3>
198198

199199
<h3>Objects ("plain objects" / "hash maps")</h3>
200200
<p>
201-
Given <code>{"var": {"one": "alpha", "two": "bravo"}}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
201+
Given <code>{"var": {"one": "alpha", "two": "bravo"}}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
202202
The following table shows an output matrix for every possible operator/modifier combination produced for <code>object</code> input.
203203
</p>
204204
<table>
@@ -220,8 +220,8 @@ <h2>Limitations</h2>
220220
<p>URI Template is a <em>Proposed Standard</em> and because of that I did not want to deviate from it. That said I'm not at all happy with how the specification turned out. Here are some of my thoughts:</p>
221221
<ul>
222222
<li>The <em>explode modifier</em> works the wrong way. <code>{?some_object}</code> should lead to <code>?foo=bar&amp;hello=world</code>, as this is the common expansion</li>
223-
<li>The <em>prefix modifier</em> (which I would've named <em>truncate modifier</em>) only has an end-offset.
224-
The specification says it's »used to partition an identifier space hierarchically«. <code>abc</code> may become <code>a/bc</code> or <code>a/ab/abc</code>.
223+
<li>The <em>prefix modifier</em> (which I would've named <em>truncate modifier</em>) only has an end-offset.
224+
The specification says it's »used to partition an identifier space hierarchically«. <code>abc</code> may become <code>a/bc</code> or <code>a/ab/abc</code>.
225225
But there is no way of modifying output to <code>a/b/c</code> or <code>a/b/abc</code>. Whenever I had to partition identifier spaces, I used one of the latter patterns.</li>
226226
<li>Operators like <code>.</code> automatically prefix the expansion. So <code>{"var": ["filename", "extension"]}</code> and <code>{.var*}</code> results in <code>.filename.extension</code> - obviously not what I wanted.</li>
227227
<li>Variable names (<em>varname</em>) may only contain <code>ALPHA / DIGIT / "_" / pct-encoded</code> and may not be decoded for resolving the reference. This simply feels weird, especially the "may not be decoded" part.</li>
@@ -233,7 +233,7 @@ <h2>Limitations</h2>
233233

234234

235235

236-
236+
237237
</div>
238238
</body>
239-
</html>
239+
</html>

0 commit comments

Comments
 (0)
Please sign in to comment.