...
|
...
|
@@ -63,4 +63,18 @@ exports.escapeLength = function(value) { |
|
|
return strs.join('');
|
|
|
};
|
|
|
|
|
|
exports.getHref = function(url, name) {
|
|
|
name = name.toLowerCase();
|
|
|
if (name === 'boys' || name === 'girls') {
|
|
|
if (url.indexOf('channel=') > -1) {
|
|
|
return url.replace(/(boys|girls)/ig, function() {
|
|
|
return name;
|
|
|
});
|
|
|
} else {
|
|
|
return url.indexOf('?') > -1 ? url + '&channel=' + name : url + '?channel=' + name;
|
|
|
}
|
|
|
} else {
|
|
|
return url;
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
|