Skip to content
Table of contents

GithubSimpleFileDownloader: A browser extension tied to page structure

This archived extension attempted to add individual-file download controls to repository browsers. Its GitHub implementation shows the fragility of building an integration around another website’s DOM rather than a stable application interface.

Integration Archived
  • Updated
  • 3
  • JavaScript · 97.74%
Documented components
2Explore modules
Source documents
2Read the instructions
Repository languagesJavaScript 97.74%2

Shares calculated from GitHub Linguist bytes.

JavaScript97.74%
97.74%12,092 bytes
CSS2.26%
2.26%279 bytes
Language%Bytes
JavaScript97.74%12,092
CSS2.26%279

1. Overview

1.1. Why it exists

Browser extension injecting one-click raw file download buttons into GitHub & GitLab interfaces.

1.2. Best fit

Quick single-file extraction without cloning large repositories.

2. Use cases

A Chrome extension that adds a download link and file size next to each file in GitHub, GitLab and Bitbucket listings.

Use-case diagram for GithubSimpleFileDownloader: Add icons to file listings; Download a single file; Show each file's size; Open a folder from its iconGithubSimpleFileDownloaderAdd icons to file listingsDownload a single fileShow each file's sizeOpen a folder from its iconRepository visitor«system»Git hosting site
People on the left, external systems on the right; each oval is a use case backed by the files cited below.
Add icons to file listings
Repository visitorGit hosting site

manifest.json injects inject_github.js, inject_gitlab.js or inject_bitbucket.js on matching pages; each script appends an icon link to every row (td.content, td.tree-item-file-name or tr.iterable-item).

Download a single file
Repository visitorGit hosting site

The script rewrites the blob link to its raw URL (raw.githubusercontent.com on GitHub, /raw/ on GitLab), fetches the text and sets a Blob object URL with a download attribute.

Show each file's size
Repository visitorGit hosting site

On GitHub, getFileURLDocument() loads the file page with XMLHttpRequest and changeFileSize() copies the Bytes/KB/MB line into a span next to the icon.

Open a folder from its icon
Repository visitorGit hosting site

Paths without a file extension are treated as directories, so the icon simply links to the folder page instead of downloading.

2.1. Scenario: Grabbing one config file from a GitHub repository

  1. Load the extension in Chrome (Manifest V2, content scripts for github.com, gitlab.com and bitbucket.org).
  2. Open a repository's file list on github.com; inject_github.js waits for document.readyState to be complete.
  3. A small GitHub icon and a size label appear next to each file row.
  4. Click the icon next to the file: the raw content is saved under the file's name.
  5. If icons do not appear, refresh the page as the README advises; the README title also flags the extension as not working.

Files readREADME.mdmanifest.jsonsrc/inject/inject_github.jssrc/inject/inject_gitlab.jssrc/inject/inject_bitbucket.js

3. Getting started

These commands come from the repository documentation. They were not run during this review.

Tasks declared in manifests

4. Repository references

The repository does not provide a detailed guide for these steps. Start with its README and the source walkthrough above.

Source documentation

2 documents read from 2 candidates.

5. Features and components 2

Content-script injection
The GitHub script waits for document readiness, locates td.content cells and inserts icons, links and size labels. Separate scripts target GitLab and Bitbucket. Each adapter depends on that site’s markup.
Raw-file download
The script converts a repository file link to a raw URL, fetches text and creates a Blob download link. Its text-based path should not be assumed to preserve arbitrary binary files.

6. Architecture

Expand a component to follow its connections, or explore the full diagram.

System components Context
Mermaid Interactive diagram

System overview of the components and connections verified in the repository.

Static architecture view for GithubSimpleFileDownloader
Static preview. The interactive diagram replaces it after Mermaid loads.
flowchart LR
  n0["Repository web page"]
  n1["Injected content script"]
  n2["DOM link extraction"]
  n3["Raw file request"]
  n4["Blob download link"]
  n0 --> n1
  n1 --> n2
  n2 --> n3
  n3 --> n4
Text version of the diagram
  • Repository web page → Injected content script
  • Injected content script → DOM link extraction
  • DOM link extraction → Raw file request
  • Raw file request → Blob download link
Follow one path through the code

Start at querySelectorAll('td.content') and inspect how child-node positions select the original link. A changed table layout can break this path before the network request is even made.

7. Technical dossier

Built from the source at commit dfdd796 (8 files). Each item comes from a pattern match in the code, so open the linked file before relying on it.

7.1. Layers and modules

Folders are sorted into layers by name, from the user interface down to data access. Because the sorting uses names only, the diagram says nothing about calls between layers.

Mermaid Layered view
flowchart TB
  subgraph L_presentation["Presentation"]
    direction TB
    presentation_0["assets/js<br/>1 file"]
    presentation_1["inject<br/>1 file"]
  end
  subgraph L_core["Core source"]
    direction TB
    core_0["inject<br/>3 files"]
  end
  L_presentation ~~~ L_core
Modules and their main layer
ModuleLayerFilesTypesExtensions
injectCore source40.js .css
assets/jsPresentation10.js

7.2. C4 model

From system context to code declarations. Each level reflects the available source evidence.

UML 1 · System context
1 · System context

The widest C4 view: who uses the project and which outside systems and data stores it relies on. Rendered with uml-mcp.

PlantUML source
@startuml
!include <C4/C4_Context>
LAYOUT_LEFT_RIGHT()
System(SYS, "GithubSimpleFileDownloader", "This archived extension attempted to add individual-file download con…")
@enduml
UML 2 · Containers
2 · Containers

One level closer: the parts that run separately inside the project, their main language and how calls flow between them. Rendered with uml-mcp.

PlantUML source
@startuml
!include <C4/C4_Container>
LAYOUT_LEFT_RIGHT()
System_Boundary(SYS, "GithubSimpleFileDownloader") {
  Container(APP, "GithubSimpleFileDownloader", "JavaScript")
}
@enduml
UML 3 · Components and layers
3 · Components and layers

Modules grouped by source-layer classification. Boundaries show organization, not runtime isolation or call relationships. Rendered with uml-mcp.

PlantUML source
@startuml
!include <C4/C4_Component>
LAYOUT_TOP_DOWN()
System_Boundary(SYS, "GithubSimpleFileDownloader") {
Boundary(L0, "Presentation", "layer") {
Component(M0_0, "assets/js", "JavaScript", "2 files")
Component(M0_1, "inject", ".css", "1 files")
}
Boundary(L1, "Core source", "layer") {
Component(M1_0, "inject", "JavaScript", "3 files")
}
}
@enduml
UML 4 · Code
4 · Code

Selected declarations, fields and methods grouped by source file. No inheritance or call edges are inferred. Rendered with uml-mcp.

PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
top to bottom direction
hide empty members
package "GithubSimpleFileDownloader" {
object "src/inject/inject_github.js" as FN0 {
  getRawLink()
  fetchDownloadLink()
  getFileURLDocument()
  changeFileSize()
}
object "src/inject/inject_bitbucket.js" as FN1 {
  getRawLink()
  fetchDownloadLink()
  getFileURLDocument()
}
object "src/inject/inject_gitlab.js" as FN2 {
  getRawLink()
  fetchDownloadLink()
  getFileURLDocument()
  changeFileSize()
}
}
@enduml

7.3. Public interface

Outside code can use everything listed here. The project also declares 0 public types.

Entry points

7.4. Business logic

No classes were extracted, so these are the largest source files and their functions.

src/inject/inject_github.js
getRawLink, fetchDownloadLink, getFileURLDocument, changeFileSize
src/inject/inject_bitbucket.js
getRawLink, fetchDownloadLink, getFileURLDocument
src/inject/inject_gitlab.js
getRawLink, fetchDownloadLink, getFileURLDocument, changeFileSize

7.5. External integrations

HTTP clients

fetch

Hosts named in the code

7.6. Stack and dependencies

PHP src/assets/js/jquery/composer.json 1 runtime

Open the manifest

External dependencies

1 declared packages (1 runtime, 0 development) in src/assets/js/jquery/composer.json.

Package table 1
External dependencies
PackageVersionScopePurposeRegistry
robloach/component-installer*runtimeAllows installation of Components via Composer.packagist.org

7.7. CI/CD pipeline

No CI/CD pipeline in the repository. The code is built and run by hand, as described above.

7.8. Deployment

Mermaid Deployment diagram
flowchart LR
  repo[("GitHub repository")]
  local["Local machine<br/>PHP"]
  repo -->|"clone and run"| local

The repository has no Dockerfile, Compose file or hosting configuration, so the code runs on the machine that clones it.

7.9. Security

Nothing found for: Private interface, Services, Entities, Database, Monitoring, Testing.

8. Reference

8 / 8 eligible files read (42 in the tree); 0 oversized, 0 failed reads and 0 syntax diagnostics.

What the scan covers

Known dependency/build folders, credential files and binaries are excluded. The scan covers READMEs, recognized manifests and parser-supported source files.

Linguist statistics cover the whole repository and may include other languages.

10. Files to read 3

11. Glossary

Repository

The versioned source files, configuration, and history of a project.

README

The repository’s entry document, usually covering its purpose and initial setup.

Dependency

A library, tool, or service that another component needs to build or run.

Published port

A host port mapped to a service’s container port. Publishing a port can expose that service beyond its container network.

CLI

A text interface in which commands and arguments select operations. Exit codes let scripts detect success or failure.

Build

The steps that turn source files and dependencies into a runnable program or distributable artifact.

12. References

  1. antoinebou12. (2026, November 5). GithubSimpleFileDownloader. [Software repository] github.com.
  2. antoinebou12. (2026, November 5). GithubSimpleFileDownloader: README. [Repository documentation] github.com.
  3. antoinebou12. (2026, November 5). manifest.json. [Source file] github.com.
  4. antoinebou12. (2026, November 5). src/inject/inject_github.js. [Source file] github.com.
  5. antoinebou12. (2026, November 5). src/inject/inject_gitlab.js. [Source file] github.com.
  6. Boucher, A. (2026, October 23). GithubSimpleFileDownloader: A browser extension tied to page structure. [Project article] antoineboucher.info.

Sources without a publication date show the date they were last checked, November 5, 2026. File links retain the inspected revision where available.