refactored blog client-side code

This commit is contained in:
Rushabh Mehta
2012-12-17 12:52:43 +05:30
parent 60f47b3648
commit fd6ad19fa0
8 changed files with 139 additions and 221 deletions

View File

@@ -42,4 +42,12 @@ function get_url_arg(name) {
return "";
else
return decodeURIComponent(results[1]);
}
}
function repl(s, dict) {
if(s==null)return '';
for(key in dict) {
s = s.split("%("+key+")s").join(dict[key]);
}
return s;
}