Skip to content

Commit

Permalink
Remove GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
32Bites committed Oct 11, 2021
1 parent b190723 commit 3cc4d4a
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 188,505 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
# Let's Get!
A browser extension which will add a "download as raw" button to github files.

![alt text](https://github.com/32Bites/LetsGet/blob/master/screenshot.png)
## Screenshots

### File View
![File View](https://github.com/32Bites/LetsGet/blob/master/screenshot.png)

### Gist View
![Gist View](https://github.com/32Bites/LetsGet/blob/master/gist_screenshot.png)

## How to install

### Firefox
Download at the Mozilla Addon Store [[Here]](https://addons.mozilla.org/en-US/firefox/addon/let-s-get/).

### Chrome (until I'm able to get it on the web store)

1. Download the repo
2. Extract the repo (if you downloaded from the GitHub website)
3. Head to `chrome://extensions`
4. Click `Load Unpacked`
5. Select the extension folder
6. Done!

## How to use
Simply go to the specific file you'd like to download, then click the download icon next to the blame button. That's it!
As for gists, a download button will be placed before the raw button.
8 changes: 0 additions & 8 deletions background.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
chrome.storage.sync.get('enabled', function (data) {
if (data === undefined || data.enabled === undefined) {
chrome.storage.sync.set({
enabled: true
}, null);
}
});

chrome.runtime.onMessage.addListener(function (url) {
chrome.downloads.download({
'url': url
Expand Down
20 changes: 4 additions & 16 deletions content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,7 @@ function run() {
}
}

chrome.storage.sync.get('enabled', function (data) {
var enabled = data.enabled;
if (enabled === undefined) {
chrome.storage.sync.set({
enabled: true
}, null);
enabled = true;
}

if (enabled) {
document.addEventListener('pjax:success', function () {
run();
});
run();
}
});
document.addEventListener('pjax:success', function () {
run();
});
run();
20 changes: 4 additions & 16 deletions gist_content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,7 @@ function run() {
}
}

chrome.storage.sync.get('enabled', function (data) {
var enabled = data.enabled;
if (enabled === undefined) {
chrome.storage.sync.set({
enabled: true
}, null);
enabled = true;
}

if (enabled) {
document.addEventListener('pjax:success', function () {
run();
});
run();
}
});
document.addEventListener('pjax:success', function () {
run();
});
run();
Binary file added gist_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed icon_32.png
Binary file not shown.
Binary file removed icon_64.png
Binary file not shown.
32 changes: 0 additions & 32 deletions index.html

This file was deleted.

36 changes: 0 additions & 36 deletions index.js

This file was deleted.

11 changes: 1 addition & 10 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Noah Shanaberger",
"description": "Download those pesky raw files on Github!",
"manifest_version": 2,
"version": "0.0.7.1",
"version": "0.0.8",
"background": {
"scripts": ["background.js"],
"persistent": true
Expand All @@ -25,15 +25,6 @@
"*://github.com/*",
"*://gist.github.com/*"
],
"browser_action": {
"default_popup": "index.html",
"default_title": "Let's Get!",
"default_icon": {
"16": "icon_16.png",
"32": "icon_32.png",
"64": "icon_64.png"
}
},
"browser_specific_settings": {
"gecko": {
"id": "{8129971f-42ae-4350-b191-b2ff190437c0}"
Expand Down
Loading

0 comments on commit 3cc4d4a

Please sign in to comment.