Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 4.24 KB

CONTRIBUTING.md

File metadata and controls

56 lines (41 loc) · 4.24 KB

Contributing

First off, thanks for taking the time to contribute! 🎉 👍

Developer Guide

Quick Start

To build and run the extension follow these steps.

  1. Clone the repository.
  2. Run yarn install to setup the project and install all required dependencies.
  3. Start hacking. If you're adding a plugin, you may be interested in seeing the commits that add these plugins:
  4. Build and load the extension:

Architecture Overview

Every single file on GitHub.com is represented by a blob. A blob consists of many attributes. One of these attributes is a reference to the blobs DOM node. The plugin will tweak this DOM node and turn static strings into clickable links. How does this work? There is an npm module for that. It's called findandreplacedomtext and it searches for regular expression matches in a given DOM node and wraps each match with a link node.

If a user clicks on a link, the associated plugin will be called and returns an array of urls. For every url a HTTP HEAD request is made (to determine if the resource is available or not) until one was successful. Finally, a redirect will be invoked. That’s it.

The outline above is an extremely simplified version. In real life you have to deal with a lot of edge cases. If you are interested in some of these edge cases check out the npm-manifest plugin and the javascriptUniversal resolver.

Pull Request Guidelines

  • Please check to make sure that there aren't existing pull requests attempting to address the issue mentioned. We also recommend checking for issues related to the issue on the tracker, as a team member may be working on the issue in a branch or fork.
  • Non-trivial changes should be discussed in an issue first
  • Develop in a topic branch, not main
  • Lint the code by yarn lint
  • Add relevant tests to cover the change
  • Make sure test-suite passes: yarn test
  • Document any new features in README.md
  • Squash your commits
  • Write a convincing description of your PR and why we should land it

Release Checklist