Skip to content

Instantly share code, notes, and snippets.

@mistersourcerer
Created May 12, 2010 18:41
Show Gist options
  • Save mistersourcerer/398959 to your computer and use it in GitHub Desktop.
Save mistersourcerer/398959 to your computer and use it in GitHub Desktop.
function worksforme_click_link()
{
all_links = document.getElementsByTagName("a");
link = null;
for(i=0; i < all_links.length; i++)
{
link = all_links[i];
is_my_link = link.id == "link_to_worksforme";
if ( is_my_link )
{
link.onclick = function()
{
window.open('http://worksforme.com.br', 'poopup',
'toolbar=no, width=300, height=300, statusbar=no');
return false;
}
break;
}
}
}
window.onload = function()
{
worksforme_click_link();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment