diff options
Diffstat (limited to 'uncompressed')
-rw-r--r-- | uncompressed/meetfranz-lastpass/.gitignore | 40 | ||||
-rw-r--r-- | uncompressed/meetfranz-lastpass/README.md | 17 | ||||
-rw-r--r-- | uncompressed/meetfranz-lastpass/darkmode.css | 6 | ||||
-rw-r--r-- | uncompressed/meetfranz-lastpass/icon.png | bin | 0 -> 56568 bytes | |||
-rw-r--r-- | uncompressed/meetfranz-lastpass/icon.svg | 1 | ||||
-rw-r--r-- | uncompressed/meetfranz-lastpass/index.js | 8 | ||||
-rw-r--r-- | uncompressed/meetfranz-lastpass/package.json | 14 | ||||
-rw-r--r-- | uncompressed/meetfranz-lastpass/service.css | 5 | ||||
-rw-r--r-- | uncompressed/meetfranz-lastpass/webview.js | 50 |
9 files changed, 141 insertions, 0 deletions
diff --git a/uncompressed/meetfranz-lastpass/.gitignore b/uncompressed/meetfranz-lastpass/.gitignore new file mode 100644 index 0000000..3c678cc --- /dev/null +++ b/uncompressed/meetfranz-lastpass/.gitignore | |||
@@ -0,0 +1,40 @@ | |||
1 | # https://raw.githubusercontent.com/github/gitignore/master/Global/macOS.gitignore | ||
2 | # General | ||
3 | .DS_Store | ||
4 | .AppleDouble | ||
5 | .LSOverride | ||
6 | |||
7 | # Icon must end with two \r | ||
8 | Icon | ||
9 | |||
10 | |||
11 | # Thumbnails | ||
12 | ._* | ||
13 | |||
14 | # Files that might appear in the root of a volume | ||
15 | .DocumentRevisions-V100 | ||
16 | .fseventsd | ||
17 | .Spotlight-V100 | ||
18 | .TemporaryItems | ||
19 | .Trashes | ||
20 | .VolumeIcon.icns | ||
21 | .com.apple.timemachine.donotpresent | ||
22 | |||
23 | # Directories potentially created on remote AFP share | ||
24 | .AppleDB | ||
25 | .AppleDesktop | ||
26 | Network Trash Folder | ||
27 | Temporary Items | ||
28 | .apdisk | ||
29 | |||
30 | |||
31 | # https://raw.githubusercontent.com/github/gitignore/master/Global/VisualStudioCode.gitignore | ||
32 | .vscode/* | ||
33 | !.vscode/settings.json | ||
34 | !.vscode/tasks.json | ||
35 | !.vscode/launch.json | ||
36 | !.vscode/extensions.json | ||
37 | *.code-workspace | ||
38 | |||
39 | # Local History for Visual Studio Code | ||
40 | .history/ | ||
diff --git a/uncompressed/meetfranz-lastpass/README.md b/uncompressed/meetfranz-lastpass/README.md new file mode 100644 index 0000000..171592c --- /dev/null +++ b/uncompressed/meetfranz-lastpass/README.md | |||
@@ -0,0 +1,17 @@ | |||
1 | # meetfranz-lastpass | ||
2 | This recipe allows you to use your lastpass vault in Franz. | ||
3 | |||
4 | # How do I install this recipe? | ||
5 | To install this new integration create the follow directory: | ||
6 | Mac: ~/Library/Application Support/Franz/recipes/dev/meetfranz-lastpass | ||
7 | Windows: %appdata%/Franz/recipes/dev/meetfranz-lastpass | ||
8 | Linux: ~/.config/Franz/recipes/dev/meetfranz-lastpass | ||
9 | |||
10 | Clone the repo in the /recipes/ directory (not in dev). | ||
11 | |||
12 | That's all. | ||
13 | |||
14 | # Check my-new.me | ||
15 | |||
16 | # Notice | ||
17 | Unfortunately, on windows can't see the caret. :( \ No newline at end of file | ||
diff --git a/uncompressed/meetfranz-lastpass/darkmode.css b/uncompressed/meetfranz-lastpass/darkmode.css new file mode 100644 index 0000000..342b01b --- /dev/null +++ b/uncompressed/meetfranz-lastpass/darkmode.css | |||
@@ -0,0 +1,6 @@ | |||
1 | html { | ||
2 | -webkit-filter: invert(100%); | ||
3 | -moz-filter: invert(100%); | ||
4 | -o-filter: invert(100%); | ||
5 | -ms-filter: invert(100%); | ||
6 | } | ||
diff --git a/uncompressed/meetfranz-lastpass/icon.png b/uncompressed/meetfranz-lastpass/icon.png new file mode 100644 index 0000000..ae3a9e3 --- /dev/null +++ b/uncompressed/meetfranz-lastpass/icon.png | |||
Binary files differ | |||
diff --git a/uncompressed/meetfranz-lastpass/icon.svg b/uncompressed/meetfranz-lastpass/icon.svg new file mode 100644 index 0000000..7248497 --- /dev/null +++ b/uncompressed/meetfranz-lastpass/icon.svg | |||
@@ -0,0 +1 @@ | |||
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><rect fill="#d32d27" height="512" rx="15%" width="512"/><g fill="#fff"><circle cx="108" cy="256" r="44"/><circle cx="227" cy="256" r="44"/><circle cx="347" cy="256" r="44"/><rect height="192" rx="2%" width="20" x="428" y="160"/></g></svg> \ No newline at end of file | |||
diff --git a/uncompressed/meetfranz-lastpass/index.js b/uncompressed/meetfranz-lastpass/index.js new file mode 100644 index 0000000..dd10055 --- /dev/null +++ b/uncompressed/meetfranz-lastpass/index.js | |||
@@ -0,0 +1,8 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => class Messenger extends Franz { | ||
4 | overrideUserAgent() { | ||
5 | return window.navigator.userAgent.replace(/(Franz|Electron)([^\s]+\s)/g, ''); | ||
6 | } | ||
7 | |||
8 | }; \ No newline at end of file | ||
diff --git a/uncompressed/meetfranz-lastpass/package.json b/uncompressed/meetfranz-lastpass/package.json new file mode 100644 index 0000000..bccaa2c --- /dev/null +++ b/uncompressed/meetfranz-lastpass/package.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "id": "meetfranz-lastpass", | ||
3 | "name": "LastPass", | ||
4 | "version": "1.0.0", | ||
5 | "description": "LastPass integration", | ||
6 | "main": "index.js", | ||
7 | "author": "Janis Hau <janis@my-new.me>, Jonathan Winter <jonathanhwinter@gmail.com>", | ||
8 | "license": "MIT", | ||
9 | "config": { | ||
10 | "serviceURL": "https://lastpass.com/?ac=1&lpnorefresh=1", | ||
11 | "hasNotificationSound": true, | ||
12 | "message": "LastPass" | ||
13 | } | ||
14 | } \ No newline at end of file | ||
diff --git a/uncompressed/meetfranz-lastpass/service.css b/uncompressed/meetfranz-lastpass/service.css new file mode 100644 index 0000000..2d8c1a6 --- /dev/null +++ b/uncompressed/meetfranz-lastpass/service.css | |||
@@ -0,0 +1,5 @@ | |||
1 | .app-wrapper-web .app { | ||
2 | width: 100% !important; | ||
3 | height: 100% !important; | ||
4 | top: 0 !important; | ||
5 | } | ||
diff --git a/uncompressed/meetfranz-lastpass/webview.js b/uncompressed/meetfranz-lastpass/webview.js new file mode 100644 index 0000000..4fdd007 --- /dev/null +++ b/uncompressed/meetfranz-lastpass/webview.js | |||
@@ -0,0 +1,50 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | const { | ||
4 | remote | ||
5 | } = require('electron'); | ||
6 | |||
7 | const path = require('path'); | ||
8 | |||
9 | const webContents = remote.getCurrentWebContents(); | ||
10 | const { | ||
11 | session | ||
12 | } = webContents; | ||
13 | setTimeout(() => { | ||
14 | if (document.querySelector('body').innerHTML.includes('Google Chrome 36+')) { | ||
15 | window.location.reload(); | ||
16 | } | ||
17 | }, 1000); | ||
18 | window.addEventListener('beforeunload', async () => { | ||
19 | try { | ||
20 | session.flushStorageData(); | ||
21 | session.clearStorageData({ | ||
22 | storages: ['appcache', 'serviceworkers', 'cachestorage', 'websql', 'indexdb'] | ||
23 | }); | ||
24 | const registrations = await window.navigator.serviceWorker.getRegistrations(); | ||
25 | registrations.forEach(r => { | ||
26 | r.unregister(); | ||
27 | console.log('ServiceWorker unregistered'); | ||
28 | }); | ||
29 | } catch (err) { | ||
30 | console.err(err); | ||
31 | } | ||
32 | }); | ||
33 | |||
34 | module.exports = Franz => { | ||
35 | const getMessages = function getMessages() { | ||
36 | const elements = document.querySelectorAll('.CxUIE, .unread'); | ||
37 | let count = 0; | ||
38 | |||
39 | for (let i = 0; i < elements.length; i += 1) { | ||
40 | if (elements[i].querySelectorAll('*[data-icon="muted"]').length === 0) { | ||
41 | count += 1; | ||
42 | } | ||
43 | } | ||
44 | |||
45 | Franz.setBadge(count); | ||
46 | }; | ||
47 | |||
48 | Franz.injectCSS(path.join(__dirname, 'service.css')); | ||
49 | Franz.loop(getMessages); | ||
50 | }; \ No newline at end of file | ||