Skip to content

Commit 63b9a3c

Browse files
committed
Chrome extension v2
1 parent 6cb30be commit 63b9a3c

File tree

9 files changed

+49
-333
lines changed

9 files changed

+49
-333
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Sometimes, a project might be abandoned, or someone had a different idea of how
1515
## Table of Content
1616
* [Releases](#releases)
1717
* [Online tool](#online-tool)
18-
* [Chrome extension](#chrome-extension-wip) (WIP)
18+
* [Chrome extension](#chrome-extension)
1919
* [`refined-github`](#refined-github)
2020
* [Bookmarklet](#bookmarklet)
2121
* [How it works](#how-it-works)
@@ -26,8 +26,8 @@ Sometimes, a project might be abandoned, or someone had a different idea of how
2626

2727
## Releases
2828
The project is released as:
29-
1. A website: great for people that just want to use this tool occasionally.
30-
2. A Chrome extension: has the advantage of always performing the search whenever you open a project's GitHub Forks page.
29+
1. A website
30+
2. A Chrome extension
3131
3. A feature in [`refined-github`](https://github.com/sindresorhus/refined-github)
3232
4. A bookmarklet
3333

@@ -38,19 +38,20 @@ You can query repository directly with the URL. Here is an example: https://usef
3838

3939
![website example](media/website_demo.gif)
4040

41-
### Chrome extension (WIP)
41+
### Chrome extension
4242
Not published yet. If you want to install it:
4343
1. Clone this repository
44-
2. Change the [script file](plugin/useful-forks.js#L1) so that `GITHUB_ACCESS_TOKEN`'s value is that of an [Access Token](https://github.com/settings/tokens/new?description=useful-forks%20(no%20scope%20required))
45-
3. Go to the `chrome://extensions` URL
46-
4. Enable `Developer mode` (switch at the top-right)
47-
5. Click `Load unpacked` (button at the top-left)
48-
6. Select the [`plugin` folder](plugin)
44+
2. Go to the `chrome://extensions` URL
45+
3. Enable `Developer mode` (switch at the top-right)
46+
4. Click `Load unpacked` (button at the top-left)
47+
5. Select the [`plugin` folder](plugin)
4948

50-
Once it's activated, the extension will automatically trigger itself whenever you open a Fork page, as shown by the GIF below:
49+
Once it's activated, the extension will automatically add a new "Useful" button, as shown by the GIF below:
5150

5251
![example](media/chrome_extension_demo.gif)
5352

53+
This button will only appear when you visit GitHub repositories, and clicking it opens a new tab that will automatically trigger a search using [the online tool](#online-tool).
54+
5455
### `refined-github`
5556
[`refined-github`](https://github.com/sindresorhus/refined-github) is an ensemble of tools and tweaks aimed at improving your GitHub experience.
5657

@@ -97,5 +98,5 @@ Whenever you want to test changes to the `src/queries-logic.js` file, you will n
9798
* Implement authenticated requests to the GitHub API (which increases the limit of calls)
9899
* Added some minimal feedback for certain edge-cases
99100
* Created an actual website for the feature
100-
* Position the chrome extension's results where they won't move the other links of the page
101+
* The Chrome extension leads to the (more powerful) website
101102
* Thanks to [`star-history`](https://star-history.t9t.io/#useful-forks/useful-forks.github.io)'s [open-source website](https://github.com/bytebase/star-history/tree/c0e7aa7cc01d5bab9188fc7d2a2bac409d2915ec/website) which I adapted for this project

media/chrome_extension_demo.gif

-2.41 MB
Loading

plugin/images/useful-forks-128.png

4.55 KB
Loading

plugin/images/useful-forks-16.png

570 Bytes
Loading

plugin/images/useful-forks-32.png

1.2 KB
Loading

plugin/images/useful-forks-48.png

1.71 KB
Loading

plugin/jquery-3.6.0.min.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

plugin/manifest.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
{
22
"name": "Useful Forks",
3-
"version": "1.7",
4-
"description": "Displays GitHub forks ordered by stars, with additional information and automatic filtering of irrelevant ones.",
3+
"version": "2.0",
4+
"description": "To list GitHub forks ordered by stars, with additional information and automatic filtering of irrelevant ones.",
55
"permissions": [
6-
"*://github.com/*",
7-
"*://api.github.com/*",
8-
"storage"
6+
"*://github.com/*"
97
],
8+
"icons": {
9+
"16": "images/useful-forks-16.png",
10+
"32": "images/useful-forks-32.png",
11+
"48": "images/useful-forks-32.png",
12+
"128": "images/useful-forks-128.png"
13+
},
1014
"content_scripts": [
1115
{
1216
"matches": [
1317
"*://github.com/*/*"
1418
],
1519
"js": [
16-
"jquery-3.6.0.min.js",
1720
"useful-forks.js"
1821
],
1922
"run_at": "document_idle",

0 commit comments

Comments
 (0)