Release cookie-free Persimmons vault link 0.6.0
This commit is contained in:
1 parent
53c4bb50f4
commit
1aa3cffaf2
32 files changed
+1535
-624
No files matched your search
@@ -14,8 +14,7 @@ export async function connectionStatus(message, sender) {
|
||||
const result = {connected: false, version: chrome.runtime.getManifest().version};
|
||||
if (!/^[a-z0-9][a-z0-9_.-]{0,99}$/.test(message.owner)) return result;
|
||||
const hint = (await chrome.storage.local.get(CONNECTION))[CONNECTION];
|
||||
if (hint?.owner !== message.owner ||
|
||||
!await chrome.permissions.contains({origins: ['https://persimmons.app/*']})) return result;
|
||||
if (hint?.owner !== message.owner) return result;
|
||||
try {
|
||||
const data = await vaultRequest('GET', hint.owner);
|
||||
const storageId = `human-vault:https://persimmons.app:${hint.owner}`;
|
||||
@@ -30,8 +29,7 @@ export async function vaultInventory(message, sender) {
|
||||
if (!trustedPage(message, sender, 'persimmons.inventory.v1')) return null;
|
||||
if (!/^[a-z0-9][a-z0-9_.-]{0,99}$/.test(message.owner)) return null;
|
||||
const hint = (await chrome.storage.local.get(CONNECTION))[CONNECTION];
|
||||
if (hint?.owner !== message.owner || !vaultUnlocked(message.owner) ||
|
||||
!await chrome.permissions.contains({origins: ['https://persimmons.app/*']})) return null;
|
||||
if (hint?.owner !== message.owner || !vaultUnlocked(message.owner)) return null;
|
||||
try {
|
||||
const data = await vaultRequest('GET', hint.owner);
|
||||
const items = [];
|
||||
@@ -50,7 +48,7 @@ export async function vaultInventory(message, sender) {
|
||||
|
||||
async function liveJuice(owner) {
|
||||
const hint = (await chrome.storage.local.get(CONNECTION))[CONNECTION];
|
||||
if (hint?.owner !== owner || !await chrome.permissions.contains({origins: ['https://persimmons.app/*']})) throw new Error();
|
||||
if (hint?.owner !== owner) throw new Error();
|
||||
await vaultRequest('GET', owner);
|
||||
}
|
||||
let juiceBusy = false;
|
||||
|
||||
Reference in new issue
Block a user