aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--all.json9
-rw-r--r--recipes/good-reads/icon.svg10
-rw-r--r--recipes/good-reads/index.js1
-rw-r--r--recipes/good-reads/package.json9
-rw-r--r--recipes/good-reads/service.css1
-rw-r--r--recipes/good-reads/webview.js21
6 files changed, 51 insertions, 0 deletions
diff --git a/all.json b/all.json
index 9c11887..b63cbc7 100644
--- a/all.json
+++ b/all.json
@@ -533,6 +533,15 @@
533 }, 533 },
534 { 534 {
535 "featured": false, 535 "featured": false,
536 "id": "good-reads",
537 "name": "Good Reads",
538 "version": "1.0.0",
539 "icons": {
540 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/recipes/good-reads/icon.svg"
541 }
542 },
543 {
544 "featured": false,
536 "id": "google-contacts", 545 "id": "google-contacts",
537 "name": "Google Contacts", 546 "name": "Google Contacts",
538 "version": "1.1.0", 547 "version": "1.1.0",
diff --git a/recipes/good-reads/icon.svg b/recipes/good-reads/icon.svg
new file mode 100644
index 0000000..f695d6a
--- /dev/null
+++ b/recipes/good-reads/icon.svg
@@ -0,0 +1,10 @@
1<svg version="1.2" baseProfile="tiny-ps" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="1024" height="1024">
2 <title>icon-svg</title>
3 <style>
4 tspan { white-space:pre }
5 .shp0 { fill: #ece9d4 }
6 .shp1 { fill: #814910 }
7 </style>
8 <path id="Layer" class="shp0" d="M0 15C0 6.72 6.72 0 15 0L497 0C505.28 0 512 6.72 512 15L512 497C512 505.28 505.28 512 497 512L15 512C6.72 512 0 505.28 0 497L0 15Z" />
9 <path id="Layer" fill-rule="evenodd" class="shp1" d="M380.2 73C379.8 146 380.9 229 380 319C379 335 378 351 374 367C364 411 335 436 291 443C257 449 223 447 191 431C164 418 147 397 145 365L178 365C199 414 256 433 304 408C326 397 336 377 340 354C343 336 344 317 345 298C341 303 335 308 329 313C318 323 302 331 286 334C236 348 173 327 151 277C130 229 129 181 149 133C180 59 291 35 345 110L345 73L380.2 73ZM340.4 251C350.4 222 349.4 192 342.4 162C335.4 133 319.4 112 298.4 101C292.4 99 276.4 90 256.4 92C256.4 92 256.3 92 255.4 92.1C216.4 93.1 185.4 119.1 174.4 162.1C167.4 191.1 167.4 221.1 177.4 250.1C189.4 285.1 216.4 306.1 252.4 308.1C252.7 308.1 252.8 308.1 253 308C258 308.2 263 308.1 264 308C289 307 306 295 309 293C323 283 334 269 340 251L340.4 251Z" />
10</svg> \ No newline at end of file
diff --git a/recipes/good-reads/index.js b/recipes/good-reads/index.js
new file mode 100644
index 0000000..419c60d
--- /dev/null
+++ b/recipes/good-reads/index.js
@@ -0,0 +1 @@
module.exports = (Ferdi) => class GoodReads extends Ferdi {};
diff --git a/recipes/good-reads/package.json b/recipes/good-reads/package.json
new file mode 100644
index 0000000..310da33
--- /dev/null
+++ b/recipes/good-reads/package.json
@@ -0,0 +1,9 @@
1{
2 "id": "good-reads",
3 "name": "Good Reads",
4 "version": "1.0.0",
5 "license": "MIT",
6 "config": {
7 "serviceURL": "https://www.goodreads.com/"
8 }
9}
diff --git a/recipes/good-reads/service.css b/recipes/good-reads/service.css
new file mode 100644
index 0000000..38dcab0
--- /dev/null
+++ b/recipes/good-reads/service.css
@@ -0,0 +1 @@
/* Insert custom styles you want to insert here */ \ No newline at end of file
diff --git a/recipes/good-reads/webview.js b/recipes/good-reads/webview.js
new file mode 100644
index 0000000..338b634
--- /dev/null
+++ b/recipes/good-reads/webview.js
@@ -0,0 +1,21 @@
1var _path = _interopRequireDefault(require("path"));
2
3function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj };
5}
6
7module.exports = (Ferdi) => {
8 const getMessages = () => {
9 const notificationBadge = document.querySelector(
10 ".siteHeader__topLevelItem--profileIcon .headerPersonalNav .modalTrigger .headerPersonalNav__icon .headerPersonalNav__flag"
11 );
12 let notification = notificationBadge
13 ? Number.parseInt(notificationBadge.textContent)
14 : 0;
15
16 Ferdi.setBadge(notification);
17 };
18 Ferdi.loop(getMessages);
19
20 Ferdi.injectCSS(_path.default.join(__dirname, "service.css"));
21};