Skip to content

Commit b177403

Browse files
committed
extracting id on runtime
1 parent 1978311 commit b177403

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name" : "LeetHub",
44
"description" : "Automatically integrate your code with LeetCode and GitHub",
55
"homepage_url": "https://github.com/QasimWani/LeetHub",
6-
"version" : "0.0.2",
6+
"version" : "0.0.3",
77
"author" : "Qasim Wani",
88
"browser_action": {
99
"default_icon": "assets/thumbnail.png",

popup.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h1 id="title">Leet<span style="color: #f18500;">Hub</span></h1>
3737
<br>
3838
Set up repository hook to use <strong>Leet<span style="color: #f18500;">Hub</span></strong>
3939
</p>
40-
<a href="chrome-extension://aciombdipochlnkbpcbgdpjffcfdbggi/welcome.html" target="blank" class="ui secondary button">
40+
<a id="hook_URL" href="" target="blank" class="ui secondary button">
4141
<i class="icon github"></i>
4242
Set up Hook
4343
</a>
@@ -58,7 +58,7 @@ <h1 id="title">Leet<span style="color: #f18500;">Hub</span></h1>
5858
<a href="https://github.com/QasimWani/LeetHub" target="_blank"><i class="ui black github icon"></i></a>
5959
<a href="https://www.linkedin.com/in/qasimwani" target="_blank"><i class="ui linkedin icon"></i></a>
6060
<a href="mailto:qasim31wani@gmail.com" target="_blank"><i class="ui red envelope icon"></i></a>
61-
<a href="chrome-extension://aciombdipochlnkbpcbgdpjffcfdbggi/welcome.html" target="_blank"><i class="ui grey globe icon"></i></a>
61+
<a id="welcome_URL" href="" target="_blank"><i class="ui grey globe icon"></i></a>
6262
</div>
6363
</div>
6464

popup.js

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ $("#authenticate").on('click', ()=>{
77
}
88
});
99

10+
/* Get URL for welcome page */
11+
$("#welcome_URL").attr("href", `chrome-extension://${chrome.runtime.id}/welcome.html`);
12+
$("#hook_URL").attr("href", `chrome-extension://${chrome.runtime.id}/welcome.html`);
13+
1014
chrome.storage.sync.get("leethub_token", (data)=>{
1115
const token = data.leethub_token;
1216
if(token == null || token == undefined)

scripts/background.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function handleMessage(request, sender, sendResponse) {
2121
});
2222

2323
/* Go to onboarding for UX */
24-
let url_onboarding = "chrome-extension://aciombdipochlnkbpcbgdpjffcfdbggi/welcome.html";
24+
let url_onboarding = `chrome-extension://${chrome.runtime.id}/welcome.html`;
2525
chrome.tabs.create({url: url_onboarding, selected: true}); //creates new tab
2626
}
2727
else if(request && request.closeWebPage == true && request.isSuccess == true)

0 commit comments

Comments
 (0)