v1.7.2/release
This commit is contained in:
+9
-6
@@ -10,6 +10,9 @@ CITED ARE THE SOLE INTELLECTUAL PROPERTY OF AYUSHYA AMITABH, AND MAY NOT BE
|
||||
COPIED, EDITED, OR REPRODUCED WITHOUT PERMISSION.
|
||||
************************************************************************/
|
||||
/*global chrome*/
|
||||
/*global browser*/
|
||||
|
||||
let CHROME_OR_BROWSER = chrome || browser;
|
||||
|
||||
const API_HOST = 'https://api.chromewatchparty.com';
|
||||
|
||||
@@ -62,7 +65,7 @@ export const getPlayerSource = () => {
|
||||
|
||||
export const getShowWPButton = () =>
|
||||
new Promise((resolve, reject) => {
|
||||
chrome.runtime.sendMessage(
|
||||
CHROME_OR_BROWSER.runtime.sendMessage(
|
||||
{
|
||||
type: 'IS_HIDDEN',
|
||||
},
|
||||
@@ -74,7 +77,7 @@ export const getShowWPButton = () =>
|
||||
|
||||
export const getTutorialStatus = () =>
|
||||
new Promise((resolve, reject) => {
|
||||
chrome.runtime.sendMessage(
|
||||
CHROME_OR_BROWSER.runtime.sendMessage(
|
||||
{
|
||||
type: 'GET_TUTORIAL',
|
||||
},
|
||||
@@ -86,7 +89,7 @@ export const getTutorialStatus = () =>
|
||||
|
||||
export const setTutorialStatus = (status) =>
|
||||
new Promise((resolve, reject) => {
|
||||
chrome.runtime.sendMessage(
|
||||
CHROME_OR_BROWSER.runtime.sendMessage(
|
||||
{
|
||||
type: 'SET_TUTORIAL',
|
||||
status,
|
||||
@@ -126,7 +129,7 @@ export const scrollThread = () => {
|
||||
|
||||
export const getUserUid = async () =>
|
||||
new Promise((resolve, reject) => {
|
||||
chrome.runtime.sendMessage(
|
||||
CHROME_OR_BROWSER.runtime.sendMessage(
|
||||
{
|
||||
type: 'GET_AUTH',
|
||||
},
|
||||
@@ -141,7 +144,7 @@ export const getUserUid = async () =>
|
||||
export const fetcher = async ({ endpoint, method, ...args }) => {
|
||||
const url = `${API_HOST}/${endpoint}`;
|
||||
return new Promise((resolve, reject) =>
|
||||
chrome.runtime.sendMessage(
|
||||
CHROME_OR_BROWSER.runtime.sendMessage(
|
||||
{
|
||||
type: 'API_CALL',
|
||||
url,
|
||||
@@ -158,7 +161,7 @@ export const fetcher = async ({ endpoint, method, ...args }) => {
|
||||
|
||||
export const webhookFetcher = async ({ endpoint, ...args }) => {
|
||||
return new Promise((resolve, reject) =>
|
||||
chrome.runtime.sendMessage(
|
||||
CHROME_OR_BROWSER.runtime.sendMessage(
|
||||
{
|
||||
type: 'API_CALL',
|
||||
url: endpoint,
|
||||
|
||||
Reference in New Issue
Block a user