|
Currently we pass URL strings around, using regular expressions (e.g. to check for the protocol) or parsing them every time we need to extract the domain. In regard to correct handling of IDN domains (currently most of the code ignores them, for more details read the issue) things become even less optimal with the current approach.
With this patch, URLs are parsed immediately, and are stored/passed as URL object. Therefore I removed lib/basedomain.js, and moved/added helper functions to lib/url.js, which operate on URL objects and handle IDN domains correctly.
Total comments: 23
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+335 lines, -334 lines) |
Patch |
|
M |
background.js
|
View
|
|
4 chunks |
+15 lines, -6 lines |
0 comments
|
Download
|
|
M |
chrome/ext/background.js
|
View
|
1
2
|
8 chunks |
+8 lines, -7 lines |
0 comments
|
Download
|
|
R |
lib/basedomain.js
|
View
|
|
1 chunk |
+0 lines, -173 lines |
0 comments
|
Download
|
|
M |
lib/url.js
|
View
|
1
2
|
1 chunk |
+113 lines, -0 lines |
0 comments
|
Download
|
|
M |
lib/whitelisting.js
|
View
|
1
|
4 chunks |
+26 lines, -18 lines |
0 comments
|
Download
|
|
M |
metadata.common
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
popup.js
|
View
|
|
5 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
popupBlocker.js
|
View
|
|
2 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
|
M |
qunit/index.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
R |
qunit/tests/baseDomain.js
|
View
|
|
1 chunk |
+0 lines, -90 lines |
0 comments
|
Download
|
|
A |
qunit/tests/url.js
|
View
|
1
2
|
1 chunk |
+136 lines, -0 lines |
0 comments
|
Download
|
|
M |
safari/ext/background.js
|
View
|
1
2
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
safari/ext/content.js
|
View
|
|
2 chunks |
+2 lines, -4 lines |
0 comments
|
Download
|
|
M |
webrequest.js
|
View
|
|
4 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
Total messages: 10
|