View Single Post
  #6   Spotlight this post!  
Unread 15-04-2008, 02:19
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: [TBA]: Greasemonkey Chief Delphi?

Quote:
Originally Posted by Elgin Clock View Post
Would there be any way to have the javascript enable another tab to be opened in FF when you click the team number link instead of opening in the same tab?

Other than that, it seems to be working fine!
That would most likely be a very simple fix.

In this part of the script:

Code:
var a = document.createElement("a");
a.setAttribute("href", 'http://www.thebluealliance.net/tbatv/team.php?team=' + match[2]);
a.appendChild(document.createTextNode(match[0]));
span.appendChild(a);
Add in one extra line:

Quote:
var a = document.createElement("a");
a.setAttribute("href", 'http://www.thebluealliance.net/tbatv/team.php?team=' + match[2]);
a.setAttribute("target",'_blank');
a.appendChild(document.createTextNode(match[0]));
span.appendChild(a);
Note that I have not tested this yet.

This should force the browser to open the link in a new window, which Firefox should default to open in a new tab instead. (Yeah, yeah, I know the target attribute is depreciated in XHTML, but I really don't care when it comes to Javascript until the new CSS3 standards come out, when they actually plan to implement a target-new: tab; CSS property for links.)
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
Reply With Quote