note revisions for images, WIP

This commit is contained in:
zadam
2019-11-08 23:09:57 +01:00
parent 712f67e983
commit 58a857cf79
6 changed files with 44 additions and 5 deletions

View File

@@ -205,6 +205,13 @@ function isHtmlEmpty(html) {
return $("<div>").html(html).text().trim().length === 0 && !html.toLowerCase().includes('<img');
}
async function clearBrowserCache() {
if (isElectron()) {
const win = require('electron').remote.getCurrentWindow();
await win.webContents.session.clearCache();
}
}
export default {
reloadApp,
parseDate,
@@ -236,5 +243,6 @@ export default {
getNoteTypeClass,
getMimeTypeClass,
closeActiveDialog,
isHtmlEmpty
isHtmlEmpty,
clearBrowserCache
};