Skip to content

Commit

Permalink
Merge pull request QasimWani#172 from QasimWani/webstore
Browse files Browse the repository at this point in the history
New Year's push
  • Loading branch information
QasimWani authored Dec 31, 2021
2 parents cffce54 + 1fef56e commit 1355500
Show file tree
Hide file tree
Showing 13 changed files with 767 additions and 93 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve LeetHub
title: ''
labels: bug
assignees: QasimWani

---

## Please review previous closed issues before filling out a new one! Duplicate issues will be closed without comment.

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: [bug, triage]
assignees:
- octocat
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. email@example.com
validations:
required: false
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: dropdown
id: version
attributes:
label: Version
description: What version of our software are you running?
options:
- 1.0.2 (Default)
- 1.0.3 (Edge)
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com)
options:
- label: I agree to follow this project's Code of Conduct
required: true
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: What would enhance your LeetHub experience?
title: ''
labels: ''
assignees: ''

---

## Please review previous closed issues before filling out a new one! Duplicate issues will be closed without comment.

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
scripts/authorize.js
scripts/oauth2.js
node_modules
.vscode
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
<a href="https://discord.gg/anXT9vErxu"><img src="https://img.shields.io/discord/781373810251137074" alt="discord"></a>
<a href="https://chrome.google.com/webstore/detail/leethub/aciombdipochlnkbpcbgdpjffcfdbggi"><img src="https://img.shields.io/chrome-web-store/v/aciombdipochlnkbpcbgdpjffcfdbggi.svg" alt="chrome-webstore"/></a>
<a href="https://chrome.google.com/webstore/detail/leethub/aciombdipochlnkbpcbgdpjffcfdbggi"><img src="https://img.shields.io/chrome-web-store/d/aciombdipochlnkbpcbgdpjffcfdbggi.svg" alt="users"></a>
<a href="https://github.com/QasimWani/LeetHub/graphs/contributors" alt="Contributors">
<img src="https://img.shields.io/github/contributors/QasimWani/LeetHub" />
</a>
<a href="https://twitter.com/intent/tweet?text=LeetHub%20-%20Automatically%20sync%20your%20code%20to%20GitHub%20after%20solving%20any%20leetcode%20problems!&url=https://github.com/QasimWani/LeetHub&hashtags=javascript,github,leetcode,coding,interview,chrome"> <img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social"> </a>


</p>

## Top 5 Trending JavaScript Repositories
Expand All @@ -22,7 +27,7 @@
<table style="border-collapse: separate;"><tr>
<td style="border-spacing:2em 0">
<a href="https://chrome.google.com/webstore/detail/leethub/aciombdipochlnkbpcbgdpjffcfdbggi">
<img src="https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fimg.talkandroid.com%2Fuploads%2F2014%2F10%2Fchrome_web_store_logo_new.png&f=1&nofb=1" alt="Chrome WebStore" height=100 width=200/>
<img src="https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fimg.talkandroid.com%2Fuploads%2F2014%2F10%2Fchrome_web_store_logo_new.png&f=1&nofb=1" alt="Chrome WebStore" height=152.19123505976 width=200/>
</a>
</td>
<td style="border-spacing:2em 0">
Expand All @@ -49,6 +54,7 @@ Moreover, pushing code manually to GitHub from Leetcode is very time consuming.

## How does LeetHub work?

<h4> Your LeetHub portfolio could like <a href="https://github.com/QasimWani/leetcode"> this </a>! </h4>
<p>It's as simple as:</p>
<ol>
<li>After installation, launch LeetHub.</li>
Expand All @@ -57,6 +63,7 @@ Moreover, pushing code manually to GitHub from Leetcode is very time consuming.
<li>Begin Leetcoding! To view your progress, simply click on the extension!</li>
</ol>


#### BONUS: Star [this repository](https://github.com/QasimWani/LeetHub) for further development of features. If you want a particular feature, simply [request](https://github.com/QasimWani/LeetHub/labels/feature) for it!


Expand Down
80 changes: 46 additions & 34 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
{
"manifest_version" : 2,
"name" : "LeetHub",
"description" : "Automatically integrate your code with LeetCode and GitHub",
"homepage_url": "https://github.com/QasimWani/LeetHub",
"version" : "0.1.3",
"author" : "Qasim Wani",
"browser_action": {
"default_icon": "assets/thumbnail.png",
"default_popup": "popup.html"
},
"icons": {
"16": "assets/thumbnail.png",
"48": "assets/thumbnail.png",
"128": "assets/thumbnail.png"
},
"background": {
"scripts": ["scripts/background.js"],
"persistent": false
},
"permissions": [
"tabs",
"activeTab",
"unlimitedStorage",
"storage"
],
"content_scripts": [
{
"matches": [
"https://leetcode.com/*", "https://github.com/*"
],
"js": ["scripts/leetcode.js", "scripts/authorize.js"],
"run_at": "document_start"
}
"manifest_version": 2,
"name": "LeetHub",
"description": "Automatically integrate your Leetcode, GeeksforGeeks submissions to GitHub",
"homepage_url": "https://github.com/QasimWani/LeetHub",
"version": "1.1.0",
"author": "Qasim Wani",
"browser_action": {
"default_icon": "assets/thumbnail.png",
"default_popup": "popup.html"
},
"icons": {
"16": "assets/thumbnail.png",
"48": "assets/thumbnail.png",
"128": "assets/thumbnail.png"
},
"background": {
"scripts": [
"scripts/background.js"
],
"persistent": false
},
"permissions": [
"https://github.com/*",
"https://api.github.com/*",
"https://leetcode.com/*",
"https://practice.geeksforgeeks.org/*",
"tabs",
"activeTab",
"unlimitedStorage",
"storage"
],
"content_scripts": [
{
"matches": [
"https://leetcode.com/*",
"https://github.com/*",
"https://practice.geeksforgeeks.org/*"
],
"content_security_policy": "script-src 'self' https://code.jquery.com/jquery-3.3.1.min.js https://github.com/login/oauth/authorize https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js; object-src 'self'"
"js": [
"scripts/leetcode.js",
"scripts/authorize.js",
"scripts/gfg.js"
],
"run_at": "document_idle"
}
],
"content_security_policy": "script-src 'self' https://code.jquery.com/jquery-3.3.1.min.js https://github.com/login/oauth/authorize https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js; object-src 'self'"
}
1 change: 1 addition & 0 deletions popup.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="css/popup.css" />
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
Expand Down
4 changes: 2 additions & 2 deletions popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ $('#authenticate').on('click', () => {
/* Get URL for welcome page */
$('#welcome_URL').attr(
'href',
`chrome-extension://${chrome.runtime.id}/welcome.html`,
chrome.runtime.getURL('welcome.html')
);
$('#hook_URL').attr(
'href',
`chrome-extension://${chrome.runtime.id}/welcome.html`,
chrome.runtime.getURL('welcome.html')
);

chrome.storage.local.get('leethub_token', (data) => {
Expand Down
4 changes: 2 additions & 2 deletions scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function handleMessage(request) {
});

/* Go to onboarding for UX */
const urlOnboarding = `chrome-extension://${chrome.runtime.id}/welcome.html`;
chrome.tabs.create({ url: urlOnboarding, selected: true }); // creates new tab
const urlOnboarding = chrome.runtime.getURL('welcome.html');
chrome.tabs.create({ url: urlOnboarding, active: true }); // creates new tab
} else if (
request &&
request.closeWebPage === true &&
Expand Down
Loading

0 comments on commit 1355500

Please sign in to comment.