Posts that alex. is monitoring

Subscribe to Posts that alex. is monitoring 5 posts found

Apr 21, 2008
Aquilax 329 posts

Topic: Update this script?

I don't understand the utility of that script, just to have styled titles? That script is over loading the javascript engine only for a useless styled title!

If otherwise you are bored of the shortened titles with "..." you can install this plugin

https://addons.mozilla.org/en-US/firefox/addon/...

 
Aug 6, 2007
Descriptor 758 posts

Topic: re-write links to not open in new tebs/windows?

Hmm, if I just added an if statement in my code above it would work better, "_blank Must Die" does nothing for image maps and needlessly checks anchors as well. Also it only stops "blank" new windows not specifically named windows, and the browser already has a built-in that handles most blank windows.
Of course I haven't actually tested anything either... what about form targets and base targets? What about targets in handlers? What about checking if the window target already exists so that it doesn't effect framesets?

 
Aug 6, 2007
LouCypher 209 posts

Topic: re-write links to not open in new tebs/windows?

_blank Must Die
I've been using it for years

 
Aug 4, 2007
Descriptor 758 posts

Topic: re-write links to not open in new tebs/windows?

You can actually just do this, which will also get map area links and won't change anchors

for (var i=0; i < document.links.length; i++)
{
  document.links[i].target = "_self";
}

 
Aug 4, 2007
terror 20 posts

Topic: re-write links to not open in new tebs/windows?

Hey!

Your plan should work with this statement:

var links = document.getElementsByTagName("a");
for (var i=0; i < links.length; i++)
{
  links[i].setAttribute("target","_self");
}

This statements changes EVERY Link on the page ...