git404hub

what is chromeless-external-links-snippet fr?

digitarald/chromeless-external-links-snippet — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2013-09-27

8JavaScriptAudience · developerComplexity · 1/5DormantSetup · easy

tl;dr

A tiny dependency-free JavaScript snippet that opens external links in a new window so mobile web apps don't lose the user by navigating away.

vibe map

mindmap
  root((repo))
    What it does
      Intercepts outbound clicks
      Opens links in new window
      Keeps app in foreground
    Tech stack
      JavaScript
    Use cases
      Firefox OS apps
      iOS web apps
      News or tool apps
    Audience
      Mobile web developers
      App developers
    Limitations
      Cant tell multi domain apps apart
      Only catches link clicks
      No window.open used

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Keep users inside an installable iOS web app when they tap an external link.

VIBE 2

Prevent a Firefox OS app from losing focus when a user clicks an outbound link.

VIBE 3

Add outbound-link handling to a news or tool app without pulling in a dependency.

VIBE 4

Stop a web-based game from navigating away entirely when it links to external resources.

what's the stack?

JavaScript

how it stacks up fr

digitarald/chromeless-external-links-snippetadguardteam/recoveryadm1nsys/safari-ai-extension
Stars888
LanguageJavaScriptJavaScriptJavaScript
Last pushed2013-09-272018-03-16
MaintenanceDormantDormant
Setup difficultyeasyeasyhard
Complexity1/52/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

Cannot distinguish your own app's multiple subdomains from truly external domains.

in plain english

This is a tiny JavaScript snippet that solves a specific problem for web apps running on mobile devices or in minimal browser environments: it automatically opens external links in a new window instead of navigating away from your app. If you've ever built a web app for Firefox OS or as an iOS web app, you know that when a user clicks a link to an outside website, they get kicked out of your app entirely. This snippet prevents that by intercepting external links and opening them in a separate window, keeping your app in the foreground where the user can return to it. The way it works is straightforward. The code watches for clicks on any link across your entire web app (using a technique called event delegation, which is fast and handles links added dynamically later). When someone clicks a link that points to a different domain, the snippet changes the link's target to open in a new window, without using the window.open() function, which can be unreliable. If a link already has a specific target set, the code respects that choice and leaves it alone. Who needs this? Mainly developers building web apps for older mobile platforms like Firefox OS, or creating installable web apps for iOS that run without a full browser interface. It's also useful for any web app where you want to keep users in your experience when they click outbound links, think of a news app, a tool, or a web-based game that occasionally links to external resources. The snippet is written in plain JavaScript with no external dependencies, so it works across browsers and adds almost no overhead to your app. The README honestly notes some limitations: if you have multiple domains within your own app (like login.example.com and www.example.com), the snippet can't tell those apart and will treat internal domain-switching as external links. It's also not perfect at detecting every kind of outbound navigation if it doesn't happen through a regular link click. But for most cases, especially mobile web apps where you just want to prevent accidental navigation away, it does the job.

prompts (copy fr)

prompt 1
Show me how to drop this snippet into my mobile web app so external links open in a new window.
prompt 2
Explain how this snippet uses event delegation to catch clicks on dynamically added links.
prompt 3
Help me adapt this snippet to correctly ignore my own app's subdomains like login.example.com.
prompt 4
What are the limitations of this external-link snippet I should watch out for in my app?

Frequently asked questions

what is chromeless-external-links-snippet fr?

A tiny dependency-free JavaScript snippet that opens external links in a new window so mobile web apps don't lose the user by navigating away.

What language is chromeless-external-links-snippet written in?

Mainly JavaScript. The stack also includes JavaScript.

Is chromeless-external-links-snippet actively maintained?

Dormant — no commits in 2+ years (last push 2013-09-27).

How hard is chromeless-external-links-snippet to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is chromeless-external-links-snippet for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.