You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- update information in `readme.md`, including a section about possible problems one may encounter
- increase the number of fields in `manifest.json`
- make the extension name and descriptions longer
- general cleanup
- did a little testing of the distribution in all browsers, and everything seemed functional
Copy file name to clipboardExpand all lines: readme.md
+36-22Lines changed: 36 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,10 @@
1
1
# Github Aid
2
2
3
-
This is a Chromium and Firefox extension for viewing github Repository sizes, and ~~Bulk downloading~~ selected files and subdirectories.
3
+
This is a Chromium and Firefox extension for viewing github Repository file and folder sizes, in addition to ~~Bulk downloading them~~.
4
4
5
5
> [!note]
6
6
> TODO: The download feature has yet to be implemented
7
7
8
-
> [!warning]
9
-
> Currently does not work in Firefox due to its inability to dynamically import from `"web_accessible_resources"`.
10
-
> this is a long time [mozilla bug (1536094)](https://bugzilla.mozilla.org/show_bug.cgi?id=1536094), and it seems like it won't be fixed due to security concerns.
11
8
12
9
### Downloads
13
10
@@ -40,6 +37,27 @@ This is a Chromium and Firefox extension for viewing github Repository sizes, an
40
37
- wanted to do a fun weekend project, try out some GraphQL apis, and be done with the annoyance of constant non-functioning extensions
41
38
42
39
40
+
## Problems you may encounter:
41
+
42
+
1) The buttons are not appearing.
43
+
- Fixes:
44
+
- Refresh the page. Github is an SPA (single-page application), so there are times when the background script does get reloaded upon navigation from one page to another.
45
+
- Make sure that you did not disable all buttons in the option page's layout section. If you're having touble, consider clicking on the red "reset" button to clear any misconfigurations and return to factory settings.
46
+
- Make sure that storage permission has been granted to this extension, otherwise the script will fail to load the default configuration, and terminate fatally.
47
+
48
+
2) One of the buttons flashes in red, and nothing happens.
49
+
- This is because the request query sent to github's server has failed, possibly due to one of the following reasons:
50
+
- Github's server is overloaded, and it decided to reject your request (quite common).
51
+
In this case, try switching your api method in the options page, and reload your webpage and retry.
52
+
- You are viewing a private repo, and the access token that you have (or may lack) is not authorized for pulling up data of that private repository.
53
+
- Your Github Access Token key is invalid, or has expired.
54
+
- You (and your Token) have reached their per hour request limit, or that you've been sending too many requests too quickly.
55
+
The request data rate for github is: 50 requests per hour for non-authorized tokenless users, and 5000 per hour for authorized users.
56
+
Moreover, the REST api in this extension used 2 requests for fetching file and folder sizes.
57
+
- There might be a bug in the code, or github's api might have changed.
58
+
In that case, I'd appreciate if you could report the issue on github: https://github.com/omar-azmi/github_aid_ts/issues
59
+
60
+
43
61
## How the internals differ
44
62
45
63
This project provides a good minimal-boilerplate example of how one can generate a web-extension, while:
@@ -261,12 +279,8 @@ here's how it should look: <br>
261
279
// ...
262
280
"web_accessible_resources": [
263
281
{
264
-
"resources": [
265
-
"*.js"
266
-
],
267
-
"matches": [
268
-
"<all_urls>"
269
-
]
282
+
"resources": ["*.js"],
283
+
"matches": ["<all_urls>"]
270
284
}
271
285
],
272
286
// ...
@@ -275,7 +289,7 @@ here's how it should look: <br>
275
289
with that, you've solved the problem that you initiated, and made your extension less secure along the way. <br>
276
290
alternatively you can choose to bundle without code-splitting, and avoid all the fuss. but where's the fun in that? <br>
277
291
see this [stackexchange answer](https://stackoverflow.com/a/53033388), where I found this information from. <br>
278
-
also see [`/src/js/content_script.ts`](./src/js/content_script.ts#L32-L35) for the dynamic imports being done in this extension.
292
+
also see [`/src/js/content_script_extension_adapter.ts`](./src/js/content_script_extension_adapter.ts#L28) for the dynamic imports being done in this extension.
279
293
280
294
281
295
## License
@@ -289,14 +303,14 @@ see [`license.md`](./license.md). but for a quick summary:
289
303
## How to get a Github Access Token
290
304
291
305
- First of all, you'll need to be logged into your github account (Duh!).
292
-
- Navigate to here: [Generate new token (classic)](https://github.com/settings/tokens/new) (https://github.com/settings/tokens/new)
293
-
- Set an `Expiration` date, (you'll probably want to choose `No expiration`)
306
+
- Navigate to this github page: [Generate new token (classic)](https://github.com/settings/tokens/new) (https://github.com/settings/tokens/new).
307
+
- Set an `Expiration` date for your token, (you'll probably want to choose `No expiration`).
294
308
- In the `Select scopes` section, under the `repo` checkbox:
295
-
- enable only the `public_repo` checkbox if you will NOT be viewing your private repository's stats
296
-
- enable the whole `repo` group checkbox otherwise
297
-
- Scroll to the bottom and click on the `Generate token` button
298
-
- You will now be presented with the access token. MAKE SURE TO COPY AND SAVE IT NOW! This token will forever disappear after you close the dialog, so make sure to save it
299
-
- Paste the token into this browser extension
309
+
- enable only the `public_repo` checkbox if you will NOT be viewing your private repository's stats.
310
+
- enable the whole `repo` group checkbox otherwise.
311
+
- Scroll to the bottom and click on the `Generate token` button.
312
+
- You will now be presented with the access token. MAKE SURE TO COPY AND SAVE IT SECURELY RIGHT NOW! This is a one time preview of you key, and it will disappear forever after you've closed the dialog.
313
+
- Paste the token into this browser extension's options page.
0 commit comments