Skip to content

Commit fb6c008

Browse files
committed
finishi migration
1 parent fd132db commit fb6c008

File tree

14 files changed

+1068
-722
lines changed

14 files changed

+1068
-722
lines changed

background/background.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22

3-
let accessToken;
3+
let googleApiKey;
44

55
chrome.runtime.onInstalled.addListener(() => {
66
chrome.declarativeContent.onPageChanged.removeRules(undefined, () => {
@@ -26,8 +26,10 @@ chrome.runtime.onMessage.addListener((msg, sender, callback) => {
2626
});
2727
return;
2828
case "login":
29-
if (accessToken) {
30-
chrome.identity.removeCachedAuthToken({token: accessToken}, () => {
29+
if (googleApiKey) {
30+
chrome.identity.removeCachedAuthToken({
31+
token: googleApiKey
32+
}, () => {
3133
auth(msg.interactive, callback);
3234
})
3335
} else {
@@ -40,13 +42,15 @@ chrome.runtime.onMessage.addListener((msg, sender, callback) => {
4042
});
4143

4244
function auth(interactive, callback) {
43-
chrome.identity.getAuthToken({interactive: interactive}, function (token) {
45+
chrome.identity.getAuthToken({
46+
interactive: interactive
47+
}, function (token) {
4448
if (chrome.runtime.lastError) {
4549
console.log(chrome.runtime.lastError);
4650
callback(null);
4751
} else {
4852
chrome.storage.sync.set({
49-
accessToken: token
53+
googleApiKey: token
5054
});
5155
console.log(`token updated: ${token}`);
5256
callback(token);

content/alert.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<div tabindex="0" role="listitem" class="fHhrY ptNZqd" jsname="HYltEe">
88
<div class="Akkarb lNXgjb" id="alerttime">_TIMESTAMP_</div>
99
<div class="ACpDpe lNXgjb" id="alertLevel">_LEVEL_</div>
10-
<div class="BjuRcd lNXgjb">[github assistant]_MESSAGE_</div>
11-
</div>
10+
<div class="BjuRcd lNXgjb">[github assistant] _MESSAGE_</div>
1211
</div>
1312
</div>
1413
</div>
1514
</div>
15+
</div>
1616
</div>

content/button.html

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,37 @@
1-
<div class="CtTFvc">
2-
<div jsslot="">
3-
<div id="repoSelect" role="listbox" class="jgvuAb VsRsme">
4-
<div role="presentation">
5-
<div class="ry3kXd" role="presentation">
6-
<div class="MocG8c epDKCb LMgvRb KKjvXb" role="option">
7-
<div class="kRoyt MbhUzd ziS7vd" style="top: 23px; left: 99.0781px; width: 108px; height: 108px;"></div>
8-
<span id="scm-bind-repo" jsslot="" class="vRMGwf oJeWuf">Repository</span>
9-
</div>
1+
<div class="CtTFvc inject-content">
2+
<div id="repoSelect" role="listbox" class="jgvuAb VsRsme">
3+
<div role="presentation">
4+
<div class="ry3kXd" role="presentation">
5+
<div class="MocG8c epDKCb LMgvRb KKjvXb" role="option">
6+
<div class="kRoyt MbhUzd ziS7vd" style="top: 23px; left: 99.0781px; width: 108px; height: 108px;"></div>
7+
<span id="scm-bind-repo" jsslot="" class="vRMGwf oJeWuf">Repository</span>
108
</div>
11-
<div class="e2CuFe eU809d" role="presentation"></div>
12-
</div>
13-
<div class="repo-menu OA0qNb ncFHed EsFSId" role="presentation" style="min-width: 108px; top: 96px; display: none;">
149
</div>
10+
<div class="e2CuFe eU809d" role="presentation"></div>
11+
</div>
12+
<div class="repo-menu OA0qNb ncFHed EsFSId" role="presentation" style="min-width: 108px; top: 96px; display: none;">
1513
</div>
1614
</div>
1715
</div>
1816

19-
<div class="CtTFvc">
20-
<div jsslot="">
21-
<div id="branchSelect" role="listbox" aria-expanded="false" class="jgvuAb VsRsme" data-alignbottom="true">
22-
<div role="presentation">
23-
<div class="ry3kXd" role="presentation">
24-
<div class="MocG8c epDKCb LMgvRb KKjvXb" data-value="" aria-selected="true" tabindex="0" role="option">
25-
<div class="kRoyt MbhUzd ziS7vd" style="top: 23px; left: 99.0781px; width: 108px; height: 108px;"></div>
26-
<span id="scm-bind-branch" class="vRMGwf oJeWuf">Branch</span>
27-
</div>
17+
<div class="CtTFvc inject-content">
18+
<div id="branchSelect" role="listbox" aria-expanded="false" class="jgvuAb VsRsme" data-alignbottom="true">
19+
<div role="presentation">
20+
<div class="ry3kXd" role="presentation">
21+
<div class="MocG8c epDKCb LMgvRb KKjvXb" data-value="" aria-selected="true" tabindex="0" role="option">
22+
<div class="kRoyt MbhUzd ziS7vd" style="top: 23px; left: 99.0781px; width: 108px; height: 108px;"></div>
23+
<span id="scm-bind-branch" class="vRMGwf oJeWuf">Branch</span>
2824
</div>
29-
<div class="e2CuFe eU809d" role="presentation"></div>
30-
</div>
31-
<div class="branch-menu OA0qNb ncFHed EsFSId" role="presentation" style="min-width: 108px; top: 96px; display: none;">
3225
</div>
26+
<div class="e2CuFe eU809d" role="presentation"></div>
27+
</div>
28+
<div class="branch-menu OA0qNb ncFHed EsFSId" role="presentation"
29+
style="min-width: 108px; top: 96px; display: none;">
3330
</div>
3431
</div>
3532
</div>
3633

37-
<div class="yggLIc">
34+
<div class="yggLIc inject-content">
3835
<div class="RO63ad">
3936
<div jsslot="">
4037
<div id="pull-button" class="VfPpkd-dgl2Hf-ppHlrf-sM5MNb" data-is-touch-wrapper="true">
@@ -45,7 +42,7 @@
4542
</button></div>
4643
</div>
4744
</div>
48-
<div class="RO63ad">
45+
<div class="RO63ad inject-content">
4946
<div jsslot="">
5047
<div id="push-button" class="VfPpkd-dgl2Hf-ppHlrf-sM5MNb" data-is-touch-wrapper="true">
5148
<button class="VfPpkd-LgbsSe VfPpkd-LgbsSe-OWXEXe-dgl2Hf LjDxcd XhPA0b HDnnrf IVKqHd DOZNHf kQidhf">
@@ -55,7 +52,7 @@
5552
</button></div>
5653
</div>
5754
</div>
58-
<div class="RO63ad">
55+
<div class="RO63ad inject-content">
5956
<div jsslot="">
6057
<div id="config-button" class="VfPpkd-dgl2Hf-ppHlrf-sM5MNb" data-is-touch-wrapper="true">
6158
<button class="VfPpkd-LgbsSe VfPpkd-LgbsSe-OWXEXe-dgl2Hf LjDxcd XhPA0b HDnnrf IVKqHd DOZNHf kQidhf">

0 commit comments

Comments
 (0)