Quote:
Originally Posted by Elgin Clock
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.)