Skip to content

Commit

Permalink
Merge pull request #79 from njelich/main
Browse files Browse the repository at this point in the history
Firefox compatbility
  • Loading branch information
QasimWani authored Dec 12, 2021
2 parents ab92ac3 + 858becd commit e59e311
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"persistent": false
},
"permissions": [
"https://github.com/*",
"https://api.github.com/*",
"https://leetcode.com/*",
"https://practice.geeksforgeeks.org/*",
"tabs",
"activeTab",
"unlimitedStorage",
Expand Down
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
2 changes: 1 addition & 1 deletion scripts/oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const oAuth2 = {
chrome.storage.local.set({ pipe_leethub: true }, () => {
// opening pipe temporarily

chrome.tabs.create({ url, selected: true }, function () {
chrome.tabs.create({ url, active: true }, function () {
window.close();
chrome.tabs.getCurrent(function (tab) {
chrome.tabs.remove(tab.id, function () {});
Expand Down

0 comments on commit e59e311

Please sign in to comment.