1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 21:17:59 +01:00

merge new support for feeds in :pageinfo

This commit is contained in:
Doug Kearns
2007-11-07 11:31:37 +00:00
parent f1b878a1cc
commit 38696c37bb
3 changed files with 193 additions and 68 deletions

View File

@@ -75,6 +75,27 @@ vimperator.util = {
}
return arg;
},
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];
}
}