v1.6.0/added support, cleanup webhook
This commit is contained in:
@@ -19,6 +19,9 @@ HBO Now and HBO Max logos are trademark and intellectual property of WarnerMedia
|
||||
/* global chrome */
|
||||
/* global firebase */
|
||||
|
||||
const APP_VERSION = '1.6.0';
|
||||
const APP_VERSION_STRING = APP_VERSION.replace(/\./g, '');
|
||||
|
||||
const firebaseConfig = {
|
||||
apiKey: 'AIzaSyCJLuYpzXLDRmu2ttzFuSGmYcpFxqToWFU',
|
||||
authDomain: 'watch-party-crx.firebaseapp.com',
|
||||
@@ -68,11 +71,40 @@ const sendAuth = async (sendResponse) => {
|
||||
sendResponse(firebase.auth().currentUser);
|
||||
};
|
||||
|
||||
chrome.runtime.onInstalled.addListener(() => {
|
||||
chrome.tabs.create({
|
||||
url: 'https://www.chromewatchparty.com/welcome',
|
||||
active: true,
|
||||
});
|
||||
chrome.runtime.onInstalled.addListener((details) => {
|
||||
if (details.reason) {
|
||||
if (details.reason === 'install') {
|
||||
if (window.localStorage.getItem('watchPartyVersion')) {
|
||||
if (window.localStorage.getItem('watchPartyVersion') !== APP_VERSION) {
|
||||
chrome.tabs.create({
|
||||
url: `http://www.chromewatchparty.com/changes/v${APP_VERSION}`,
|
||||
active: true,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
chrome.tabs.create({
|
||||
url: 'https://www.chromewatchparty.com/welcome',
|
||||
active: true,
|
||||
});
|
||||
window.localStorage.setItem('watchPartyVersion', APP_VERSION);
|
||||
}
|
||||
} else if (details.reason === 'update') {
|
||||
if (window.localStorage.getItem('watchPartyVersion')) {
|
||||
if (window.localStorage.getItem('watchPartyVersion') !== APP_VERSION) {
|
||||
chrome.tabs.create({
|
||||
url: `http://www.chromewatchparty.com/changes/v${APP_VERSION}`,
|
||||
active: true,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
chrome.tabs.create({
|
||||
url: `http://www.chromewatchparty.com/changes/v${APP_VERSION}`,
|
||||
active: true,
|
||||
});
|
||||
window.localStorage.setItem('watchPartyVersion', APP_VERSION);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
|
||||
Reference in New Issue
Block a user