Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Force external links to open in a new browser window on Firefox OS
if (navigator.mozApps && window.locationbar.visible === false) {
var externalLinks = document.querySelectorAll("a[href^='http']:not([href*='""'])");
for (var i = 0; i < externalLinks.length; ++i) {
externalLinks[i].setAttribute("target", "_blank");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.