Skip to content

Commit 2282438

Browse files
Fix url
1 parent 362bc2a commit 2282438

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/javascript/binary/base/page.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,8 @@ URL.prototype = {
485485
return;
486486
},
487487
path_matches: function(url) {
488-
//pathname is /d/page.cgi. Eliminate /d/ and /c/ from both urls.
489-
var this_pathname = this.location.pathname.replace(/\/[d|c]\//g, '');
490-
var url_pathname = page.url.location.pathname.replace(/\/[d|c]\//g, '');
488+
var this_pathname = this.location.pathname,
489+
url_pathname = url.location.pathname;
491490
return (this_pathname == url_pathname || '/' + this_pathname == url_pathname);
492491
},
493492
params_hash_to_string: function(params) {
@@ -501,7 +500,7 @@ URL.prototype = {
501500
var param_count = this_params.length;
502501
var match_count = 0;
503502
while(param_count--) {
504-
if(page.url.param(this_params[param_count][0]) == this_params[param_count][1]) {
503+
if(url.param(this_params[param_count][0]) == this_params[param_count][1]) {
505504
match_count++;
506505
}
507506
}

0 commit comments

Comments
 (0)