Javascript regex URL matching
- by Blondie
I have this so far:
chrome.tabs.getSelected(null, function(tab)
{
var title = tab.title;
var btn = '<a href="' + tab.url + '" onclick="save(\'' + title + '\');"> ' + title + '</a>';
if(tab.url.match('/http:\/\/www.mydomain.com\/version.php/i'))
{
document.getElementById('link').innerHTML = '<p>' + btn +…