v1.6.0/cross site party name history
- fix for room migrate - fix for netflix listener
This commit is contained in:
@@ -84,6 +84,9 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
case 'GET_AUTH':
|
||||
sendAuth(sendResponse);
|
||||
break;
|
||||
case 'GET_PARTIES':
|
||||
sendResponse(window.localStorage.getItem('parties') ? JSON.parse(window.localStorage.getItem('parties')): []);
|
||||
break;
|
||||
default:
|
||||
console.warn('Unknown message type: <', type, '>');
|
||||
break;
|
||||
@@ -98,7 +101,7 @@ chrome.runtime.onConnect.addListener((port) => {
|
||||
port.messageListener && port.messageListener();
|
||||
});
|
||||
port.onMessage.addListener((request) => {
|
||||
const { type, roomId } = request;
|
||||
const { type, roomId, roomPin } = request;
|
||||
if (type === 'INIT') {
|
||||
port.roomListener = firebase
|
||||
.firestore()
|
||||
@@ -152,6 +155,21 @@ chrome.runtime.onConnect.addListener((port) => {
|
||||
port.postMessage({ isError: true, ...err });
|
||||
}
|
||||
);
|
||||
if (window.localStorage.getItem('parties')) {
|
||||
var existing = JSON.parse(window.localStorage.getItem('parties'));
|
||||
if (!(existing.filter(i => i.name === roomId).length > 0)){
|
||||
existing.push({
|
||||
name: roomId,
|
||||
pin: roomPin
|
||||
});
|
||||
window.localStorage.setItem('parties', JSON.stringify(existing));
|
||||
}
|
||||
} else {
|
||||
window.localStorage.setItem('parties', JSON.stringify([{
|
||||
name: roomId,
|
||||
pin: roomPin,
|
||||
}]));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
+23
-1
@@ -19,6 +19,10 @@ HBO Now and HBO Max logos are trademark and intellectual property of WarnerMedia
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta
|
||||
http-equiv="Content-Security-Policy"
|
||||
content="default-src *; style-src 'self' https://* 'unsafe-inline'; script-src 'self' http://* 'unsafe-inline' 'unsafe-eval'"
|
||||
/>
|
||||
<style>
|
||||
a {
|
||||
display: table;
|
||||
@@ -34,6 +38,7 @@ HBO Now and HBO Max logos are trademark and intellectual property of WarnerMedia
|
||||
cursor: pointer;
|
||||
border-radius: 36px;
|
||||
text-decoration: none;
|
||||
outline: none;;
|
||||
}
|
||||
p {
|
||||
word-break: break-word;
|
||||
@@ -50,15 +55,30 @@ HBO Now and HBO Max logos are trademark and intellectual property of WarnerMedia
|
||||
background-color: #c0f300;
|
||||
color: black;
|
||||
}
|
||||
|
||||
body {
|
||||
min-width: max-content;
|
||||
padding: 5px 10px;
|
||||
background: #424242;
|
||||
}
|
||||
button {
|
||||
padding: 7.5px 3px;
|
||||
margin: 10px 0;
|
||||
border-radius: 13px;
|
||||
width: 100%;
|
||||
background: #c0f300;
|
||||
outline: none !important;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
filter: drop-shadow(0px 0px 15px rgba(0,0,0,0.7));
|
||||
transition: all ease-in 0.3s;
|
||||
}
|
||||
button:hover {
|
||||
filter: drop-shadow(0px 0px 3px rgba(0,0,0,0.7)) !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script src="popup.js"></script>
|
||||
<p>
|
||||
NOTHING TO DO HERE. GO TO A SUPPORTED WEBSITE, AND LOOK FOR WATCH PARTY IN THE BOTTOM RIGHT
|
||||
CORNER OF YOUR SCREEN
|
||||
@@ -67,5 +87,7 @@ HBO Now and HBO Max logos are trademark and intellectual property of WarnerMedia
|
||||
<a target="_blank" href="https://www.chromewatchparty.com/welcome/#tips">FAQ</a>
|
||||
<a target="_blank" href="mailto:admin@chromewatchparty.com?subject=User Feedback">Feedback</a>
|
||||
<a target="_blank" href="https://paypal.me/Ayushya">Donate</a>
|
||||
<p style="width: 100%; max-width: 100%;"></p>
|
||||
<button id="clear-button">Clear Party Names & Pins</button>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
function clearLocal() {
|
||||
window.localStorage.removeItem('parties');
|
||||
return 0;
|
||||
}
|
||||
window.onload = function () {
|
||||
document.getElementById('clear-button').onclick = clearLocal;
|
||||
}
|
||||
Reference in New Issue
Block a user