mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-28 02:10:39 +00:00
Rewrite FileDigester to tidy up code, be able to delete files in OPFS onPageHide and on abort of file transfer
This commit is contained in:
@@ -25,6 +25,11 @@ class BrowserTabsConnector {
|
||||
: false;
|
||||
}
|
||||
|
||||
static isOnlyTab() {
|
||||
let peerIdsBrowser = JSON.parse(localStorage.getItem('peer_ids_browser'));
|
||||
return peerIdsBrowser.length <= 1;
|
||||
}
|
||||
|
||||
static async addPeerIdToLocalStorage() {
|
||||
const peerId = sessionStorage.getItem('peer_id');
|
||||
if (!peerId) return false;
|
||||
|
||||
Reference in New Issue
Block a user