auth improvements:
- add google drive reauth support, if auth expires (for on-demand downloaded content) - fix curated page width
This commit is contained in:
+12
-1
@@ -29,7 +29,18 @@ function getTS(iso) {
|
||||
return iso.replace(/[-:T]/g, '').slice(0, 14);
|
||||
}
|
||||
|
||||
async function sourceToId(url) {
|
||||
try {
|
||||
url = new URL(url, window.location.origin).href;
|
||||
} catch(e) {}
|
||||
|
||||
const digest = await digestMessage(url, 'SHA-256');
|
||||
const coll = "id-" + digest.slice(0, 12);
|
||||
return {url, coll};
|
||||
}
|
||||
|
||||
|
||||
|
||||
export { digestMessage, tsToDate, getTS };
|
||||
|
||||
|
||||
export { digestMessage, tsToDate, getTS, sourceToId };
|
||||
|
||||
Reference in New Issue
Block a user