aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorLibravatar Yoga Setiawan <yogainformatika@gmail.com>2020-10-10 10:21:29 +0700
committerLibravatar GitHub <noreply@github.com>2020-10-10 04:21:29 +0100
commit00275a80cd70cea3ac53d00ca68a643dee25b5aa (patch)
tree819b39b93c0e7b18425561260ba6ee02bd3b3a8f /recipes
parentFixed Slite querySelector and code style improvements (#324) (diff)
downloadferdium-recipes-00275a80cd70cea3ac53d00ca68a643dee25b5aa.tar.gz
ferdium-recipes-00275a80cd70cea3ac53d00ca68a643dee25b5aa.tar.zst
ferdium-recipes-00275a80cd70cea3ac53d00ca68a643dee25b5aa.zip
Add recipe for Microsoft To Do (#325)
Diffstat (limited to 'recipes')
-rw-r--r--recipes/mstodo/README.md2
-rw-r--r--recipes/mstodo/icon.pngbin0 -> 36224 bytes
-rw-r--r--recipes/mstodo/icon.svg22
-rw-r--r--recipes/mstodo/index.js2
-rw-r--r--recipes/mstodo/package.json13
-rw-r--r--recipes/mstodo/service.css6
-rw-r--r--recipes/mstodo/webview.js24
7 files changed, 69 insertions, 0 deletions
diff --git a/recipes/mstodo/README.md b/recipes/mstodo/README.md
new file mode 100644
index 0000000..e806d60
--- /dev/null
+++ b/recipes/mstodo/README.md
@@ -0,0 +1,2 @@
1# mstodo for Ferdi
2This is a Ferdi recipe for Microsoft To-do
diff --git a/recipes/mstodo/icon.png b/recipes/mstodo/icon.png
new file mode 100644
index 0000000..d536f4e
--- /dev/null
+++ b/recipes/mstodo/icon.png
Binary files differ
diff --git a/recipes/mstodo/icon.svg b/recipes/mstodo/icon.svg
new file mode 100644
index 0000000..65075d2
--- /dev/null
+++ b/recipes/mstodo/icon.svg
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3<svg width="100%" height="100%" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
4 <g transform="matrix(11.125,0,0,11.125,516.839,512.605)">
5 <g transform="matrix(1,0,0,1,-43.5,-35.5)">
6 <clipPath id="_clip1">
7 <rect x="0" y="0" width="87" height="71"/>
8 </clipPath>
9 <g clip-path="url(#_clip1)">
10 <g id="Logo" transform="matrix(1,0,0,1,0,-8)">
11 <rect id="Bounds" x="0" y="0" width="87" height="87" style="fill:none;"/>
12 <path id="square" d="M0.258,43.5L17.555,26.203L34.852,43.5L17.555,60.797L0.258,43.5Z" style="fill:url(#_Linear2);"/>
13 <path id="dash" d="M69.445,8.906L17.555,60.797L34.852,78.094L69.445,43.5L86.742,26.203L69.445,8.906Z" style="fill:url(#_Linear3);"/>
14 </g>
15 </g>
16 </g>
17 </g>
18 <defs>
19 <linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-95.7165,65.6281,-65.6281,-95.7165,86.3668,26.2031)"><stop offset="0" style="stop-color:rgb(28,159,255);stop-opacity:0.5"/><stop offset="1" style="stop-color:rgb(118,94,231);stop-opacity:0.5"/></linearGradient>
20 <linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-97.6059,55.4635,-55.4635,-97.6059,86.7422,26.0136)"><stop offset="0" style="stop-color:rgb(28,159,255);stop-opacity:1"/><stop offset="1" style="stop-color:rgb(118,94,231);stop-opacity:1"/></linearGradient>
21 </defs>
22</svg>
diff --git a/recipes/mstodo/index.js b/recipes/mstodo/index.js
new file mode 100644
index 0000000..73107f7
--- /dev/null
+++ b/recipes/mstodo/index.js
@@ -0,0 +1,2 @@
1module.exports = Ferdi => class mstodo extends Ferdi {
2};
diff --git a/recipes/mstodo/package.json b/recipes/mstodo/package.json
new file mode 100644
index 0000000..9e9ece5
--- /dev/null
+++ b/recipes/mstodo/package.json
@@ -0,0 +1,13 @@
1{
2 "id": "mstodo",
3 "name": "Microsoft To Do",
4 "version": "1.0.0",
5 "description": "Microsoft To Do",
6 "main": "index.js",
7 "author": "Yoga Setiawan <ariokidev@gmail.com>",
8 "license": "MIT",
9 "config": {
10 "serviceURL": "https://to-do.live.com/tasks/",
11 "hasNotificationSound": true
12 }
13}
diff --git a/recipes/mstodo/service.css b/recipes/mstodo/service.css
new file mode 100644
index 0000000..d129c4f
--- /dev/null
+++ b/recipes/mstodo/service.css
@@ -0,0 +1,6 @@
1/* Insert custom styles you want to insert here */
2.app-wrapper-web .app {
3 width: 100% !important;
4 height: 100% !important;
5 top: 0 !important;
6}
diff --git a/recipes/mstodo/webview.js b/recipes/mstodo/webview.js
new file mode 100644
index 0000000..8f5f0e9
--- /dev/null
+++ b/recipes/mstodo/webview.js
@@ -0,0 +1,24 @@
1"use strict";
2
3var _path = _interopRequireDefault(require("path"));
4
5function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
7module.exports = Ferdi => {
8 const getMessages = function getMessages() {
9 const elements = document.querySelectorAll('.taskItem');
10 let count = 0;
11
12 for (let i = 0; i < elements.length; i += 1) {
13 if (elements[i].querySelectorAll('.completed').length === 0) {
14 count += 1;
15 }
16 }
17
18 // set Ferdi badge
19 Ferdi.setBadge(count);
20 };
21
22 Ferdi.loop(getMessages);
23 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));
24};