Skip to content

Commit 5c1d875

Browse files
committed
misc edge overrides
1 parent 49f1efb commit 5c1d875

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/background.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,8 @@ chrome.runtime.onInstalled.addListener(async details => {
372372

373373
let url: string | null = null;
374374

375-
if (navigator.userAgent.indexOf("Chrome") !== -1) {
375+
if (navigator.userAgent.indexOf("Chrome") !== -1 &&
376+
navigator.userAgent.indexOf("Edg") === -1) {
376377
url = "https://authenticator.cc/docs/en/chrome-issues";
377378
}
378379

src/components/Popup/DrivePage.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ export default Vue.extend({
7979
);
8080
xhr.onreadystatechange = () => {
8181
if (xhr.readyState === 4) {
82-
if (navigator.userAgent.indexOf("Chrome") !== -1) {
82+
if (navigator.userAgent.indexOf("Chrome") !== -1 &&
83+
navigator.userAgent.indexOf("Edg") === -1) {
8384
chrome.identity.removeCachedAuthToken(
8485
{ token: localStorage.driveToken },
8586
() => {

src/components/Popup/MenuPage.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ export default Vue.extend({
106106
107107
if (navigator.userAgent.indexOf("Firefox") !== -1) {
108108
url = "https://authenticator.cc/docs/en/firefox-issues";
109+
} else if (navigator.userAgent.indexOf("Edg") !== -1) {
110+
url = "https://authenticator.cc/docs/en/edge-issues";
109111
}
110112
111113
const feedbackURL = this.$store.state.menu.feedbackURL;

src/models/backup.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ export class Drive implements BackupProvider {
129129
if (res.error.code === 401) {
130130
if (
131131
navigator.userAgent.indexOf("Chrome") !== -1 &&
132-
navigator.userAgent.indexOf("OPR") === -1
132+
navigator.userAgent.indexOf("OPR") === -1 &&
133+
navigator.userAgent.indexOf("Edg") === -1
133134
) {
134135
// Clear invalid token from
135136
// chrome://identity-internals/
@@ -162,7 +163,8 @@ export class Drive implements BackupProvider {
162163
private async refreshToken() {
163164
if (
164165
navigator.userAgent.indexOf("Chrome") !== -1 &&
165-
navigator.userAgent.indexOf("OPR") === -1
166+
navigator.userAgent.indexOf("OPR") === -1 &&
167+
navigator.userAgent.indexOf("Edg") === -1
166168
) {
167169
return new Promise((resolve: (value: boolean) => void) => {
168170
return chrome.identity.getAuthToken(

0 commit comments

Comments
 (0)