1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-16 15:05:46 +01:00

added feeds info to :pageinfo

This commit is contained in:
Martin Stubenschrott
2007-11-05 22:48:03 +00:00
parent be0f735339
commit 8c28e8fd81
6 changed files with 198 additions and 63 deletions

View File

@@ -91,7 +91,7 @@ vimperator.util = {
// takes a string like 'google bla, www.osnews.com'
// and returns an array ['www.google.com/search?q=bla', 'www.osnews.com']
stringToURLArray: function(str) // {{{
stringToURLArray: function(str)
{
var urls = str.split(/\s*\,\s+/);
@@ -164,8 +164,28 @@ vimperator.util = {
}
return urls;
} // }}}
},
highlightURL: function(str, force)
{
if (force || /^[a-zA-Z]+:\/\/.*\//.test(str))
return "<a class='hl-URL' href='" + str + "'>" + vimperator.util.escapeHTML(str) + "</a>";
else
return str;
},
formatNumber: function(num)
{
var strNum = (num + "").split(".", 2);
for (var u = strNum[0].length - 3; u > 0; u -= 3)
strNum[0] = strNum[0].substring(0, u) + "," + strNum[0].substring(u, strNum[0].length);
if (strNum[1])
strNum[0] += "." + strNum[1]
return strNum[0];
}
}
// vim: set fdm=marker sw=4 ts=4 et: