mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 04:57:09 +03:00
Use templates
This commit is contained in:
committed by
GitHub
parent
373edf883d
commit
c7f254db70
@@ -599,8 +599,8 @@ function downloadConfig() {
|
||||
const file = document.createElement("a");
|
||||
const jsonData = JSON.parse(JSON.stringify(Config.cachedSyncConfig));
|
||||
const dateTimeString = new Date().toJSON().replace("T", "_").replace(/:/g, ".").replace(/.\d+Z/g, "")
|
||||
file.setAttribute("href", "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(jsonData)));
|
||||
file.setAttribute("download", "SponsorBlockConfig_"+dateTimeString+".json");
|
||||
file.setAttribute("href", `data:text/json;charset=utf-8,${encodeURIComponent(JSON.stringify(jsonData))}`);
|
||||
file.setAttribute("download", `SponsorBlockConfig_${dateTimeString}.json`);
|
||||
document.body.append(file);
|
||||
file.click();
|
||||
file.remove();
|
||||
@@ -674,4 +674,4 @@ function copyDebugOutputToClipboard() {
|
||||
|
||||
function isIncognitoAllowed(): Promise<boolean> {
|
||||
return new Promise((resolve) => chrome.extension.isAllowedIncognitoAccess(resolve));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user