diff options
Diffstat (limited to 'recipes/ex-google-voice')
-rw-r--r-- | recipes/ex-google-voice/icon.png | bin | 0 -> 28956 bytes | |||
-rw-r--r-- | recipes/ex-google-voice/icon.svg | 15 | ||||
-rw-r--r-- | recipes/ex-google-voice/index.js | 3 | ||||
-rw-r--r-- | recipes/ex-google-voice/package.json | 15 | ||||
-rw-r--r-- | recipes/ex-google-voice/webview.js | 26 |
5 files changed, 59 insertions, 0 deletions
diff --git a/recipes/ex-google-voice/icon.png b/recipes/ex-google-voice/icon.png new file mode 100644 index 0000000..5af7c7d --- /dev/null +++ b/recipes/ex-google-voice/icon.png | |||
Binary files differ | |||
diff --git a/recipes/ex-google-voice/icon.svg b/recipes/ex-google-voice/icon.svg new file mode 100644 index 0000000..103d596 --- /dev/null +++ b/recipes/ex-google-voice/icon.svg | |||
@@ -0,0 +1,15 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" | ||
3 | "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> | ||
4 | <svg | ||
5 | xmlns="http://www.w3.org/2000/svg" | ||
6 | width="297mm" | ||
7 | height="297mm" | ||
8 | viewBox="0 0 744.09448819 1052.3622047"> | ||
9 | <g | ||
10 | style="display:inline"> | ||
11 | <path | ||
12 | style="display:inline;fill:#4e8df5;fill-opacity:1;stroke:none;stroke-opacity:1" | ||
13 | d="m 41.856744,824.21463 c -1.614861,-0.88813 -3.071569,-5.61994 -3.071569,-5.61994 l 0.698126,-295.09107 c 0.68499,-289.53901 0.735057,-295.20396 2.661027,-301.09107 5.365113,-16.39953 20.098832,-29.21876 37.30731,-32.45963 4.396562,-0.828 84.033972,-1.05119 298.000002,-0.83517 l 292,0.2948 5.79271,2.21083 c 18.12934,6.91921 29.06594,18.70029 32.57319,35.08839 0.82519,3.85578 1.1341,62.90429 1.1341,216.78155 l 0,211.48232 -2.08335,6.21846 c -6.09125,18.18137 -19.31869,30.63668 -35.80314,33.71317 -3.50982,0.65504 -84.90771,1.00528 -233.63157,1.00528 l -228.24508,0 -35.36843,28.30746 C 76.126006,802.4104 48.665064,823.91255 46.500216,823.91255 c -0.76732,0 -3.028611,1.19021 -4.643472,0.30208 z M 559.86022,634.47833 c 7.90205,-5.48065 7.53954,-2.50201 7.55356,-62.06578 l 0.0125,-53 -2.23087,-3.60763 c -3.75191,-6.06736 -8.48514,-7.65905 -26.24373,-8.82524 -23.69866,-1.55627 -37.83254,-4.28749 -69.04032,-13.34129 -8.25398,-2.39459 -8.89959,-1.93062 -39.44712,28.34905 -15.49473,15.35881 -28.63117,27.92511 -29.19214,27.92511 -1.73088,0 -19.22943,-10.86926 -31.22373,-19.39468 -40.31775,-28.65741 -77.52748,-69.17384 -97.93674,-106.64002 l -4.10444,-7.53471 27.03835,-26.96529 c 14.87109,-14.83092 27.68359,-28.18045 28.47222,-29.66564 1.87199,-3.5254 1.82864,-10.9191 -0.0909,-15.51332 -5.04213,-12.0675 -9.84651,-39.80736 -11.34293,-65.49258 -1.01554,-17.4313 -2.19183,-20.86503 -8.43266,-24.61605 -3.0122,-1.81046 -6.2451,-1.9569 -55.19959,-2.50038 -55.03267,-0.61096 -56.71905,-0.5022 -61.67261,3.97759 -1.12211,1.01479 -2.9506,3.62887 -4.06329,5.80907 -1.85874,3.64197 -1.96764,5.10418 -1.34055,18 1.88101,38.68191 7.85801,73.94269 17.53371,103.43857 5.22271,15.92114 19.3507,47.63158 29.67125,66.59744 21.52402,39.55426 58.37139,82.14136 97.61288,112.8181 27.29056,21.33417 61.65711,39.7256 99.53055,53.26425 37.90456,13.54978 86.29525,22.40829 120.31705,22.02553 8.89112,-0.10003 9.89689,-0.32143 13.81959,-3.0421 z" /> | ||
14 | </g> | ||
15 | </svg> | ||
diff --git a/recipes/ex-google-voice/index.js b/recipes/ex-google-voice/index.js new file mode 100644 index 0000000..e8243fb --- /dev/null +++ b/recipes/ex-google-voice/index.js | |||
@@ -0,0 +1,3 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => Franz; \ No newline at end of file | ||
diff --git a/recipes/ex-google-voice/package.json b/recipes/ex-google-voice/package.json new file mode 100644 index 0000000..8b98c80 --- /dev/null +++ b/recipes/ex-google-voice/package.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "id": "ex-google-voice", | ||
3 | "name": "Google Voice", | ||
4 | "version": "0.3.2", | ||
5 | "description": "Google Voice", | ||
6 | "main": "index.js", | ||
7 | "author": "Behind The Math <behindthemath@gmail.com>", | ||
8 | "license": "MIT", | ||
9 | "repository": "https://github.com/BehindTheMath/franz-recipe-google-voice", | ||
10 | "config": { | ||
11 | "serviceURL": "https://www.google.com/voice", | ||
12 | "hasTeamID": false, | ||
13 | "message": "Google Voice gives you one number for all your phones, voicemail as easy as email, free US long distance, low rates on international calls, and many calling features like transcripts, call blocking, call screening, conference calling, SMS, and more." | ||
14 | } | ||
15 | } | ||
diff --git a/recipes/ex-google-voice/webview.js b/recipes/ex-google-voice/webview.js new file mode 100644 index 0000000..1a91455 --- /dev/null +++ b/recipes/ex-google-voice/webview.js | |||
@@ -0,0 +1,26 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | function parseQuery(query) { | ||
5 | const el = document.querySelector(query); | ||
6 | return el && parseInt(el.innerHTML) || 0; | ||
7 | } | ||
8 | |||
9 | function getMessages() { | ||
10 | const el = document.querySelector('.msgCount'); | ||
11 | let count; | ||
12 | |||
13 | if (el) { | ||
14 | count = parseInt(el.innerHTML.replace(/[\(\) ]/gi, '')) || 0; | ||
15 | } else { | ||
16 | const count_messages = parseQuery('gv-nav-tab[tooltip="Messages"] div[aria-label="Unread count"]'); | ||
17 | const count_calls = parseQuery('gv-nav-tab[tooltip="Calls"] div[aria-label="Unread count"]'); | ||
18 | const count_voicemails = parseQuery('gv-nav-tab[tooltip="Voicemail"] div[aria-label="Unread count"]'); | ||
19 | count = count_messages + count_calls + count_voicemails; | ||
20 | } | ||
21 | |||
22 | Franz.setBadge(count); | ||
23 | } | ||
24 | |||
25 | Franz.loop(getMessages); | ||
26 | }; \ No newline at end of file | ||