Skip to content

Commit

Permalink
feat: added option to ignore images in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
flexphere committed Sep 2, 2021
1 parent a4c0f4b commit 5b51e67
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const defaultSettings = {
preloadClipboard: false,
historySize: 1000,
watchInterval: 250,
includeImages: true,
};

const settings = new ObjectStore(SETTINGS_FILE, defaultSettings);
Expand Down Expand Up @@ -184,6 +185,10 @@ app.whenReady().then(() => {
return;
}

if (settings.includeImages === false && clip.image !== "" && clip.text === '') {
return;
}

if (clip.text !== prevClip.text || clip.image !== prevClip.image) {
clip.pasteOptions = Object.keys(clip).filter(k=>clip[k] !== '');
clip.pasteAs = clip.pasteOptions.length - 1;
Expand Down

0 comments on commit 5b51e67

Please sign in to comment.