-
Notifications
You must be signed in to change notification settings - Fork 0
/
wfh.html
105 lines (97 loc) · 3.96 KB
/
wfh.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html lang="en">
<head>
<title>Work From Home</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
</head>
<body>
<script src="js/gmail.js"></script>
<!-- <script src="js/calendar.js"></script> -->
<nav>
<div class="nav-wrapper">
<a class="brand-logo center">
Work From Home
</a>
</div>
</nav>
<div class="row">
<!-- Work Column -->
<div class="col s12 m6">
<!-- Mail Card -->
<div class="card blue-grey darken-1">
<div class="card-content white-text" >
<span class="card-title">G-Mail UNREAD</span>
<div>
<table>
<thead>
<tr>
<th>From</th>
<th>Subject</th>
<th>Date</th>
</tr>
</thead>
<tbody id='gmailT'>
</tbody>
</table>
</div>
</div>
<div class="card-action">
<a href="https://mail.google.com/mail/u/0/#inbox" target="_blank">Go to mail</a>
</div>
</div>
<!-- Upcomming Meetings Card -->
<div class="card blue-grey darken-1">
<div class="card-content white-text" >
<span class="card-title">Upcomming Events</span>
<div>
<table>
<thead>
<tr>
<th>From</th>
<th>Subject</th>
<th>Date</th>
</tr>
</thead>
<tbody id='calendarT'>
</tbody>
</table>
</div>
</div>
<div class="card-action">
<a href="https://mail.google.com/mail/u/0/#inbox" target="_blank">Go to mail</a>
</div>
</div>
</div>
<!-- Home Column -->
<div class="col s12 m6">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<span class="card-title">Card Title</span>
<p>I am a very simple card. I am good at containing small bits of information.
I am convenient because I require little markup to use effectively.</p>
</div>
<div class="card-action">
<a href="#">This is a link</a>
<a href="#">This is a link</a>
</div>
</div>
</div>
</div>
<ul></ul>
<script>
const electron = require('electron');
const {ipcRenderer} = electron;
var fs = require('fs');
var readline = require('readline');
var {google} = require('googleapis');
var SCOPES = ['https://www.googleapis.com/auth/gmail.readonly','https://www.googleapis.com/auth/calendar.readonly'];
var TOKEN_PATH = 'token.json';
var gmail = google.gmail('v1');
// gmail shit
setInterval(function() {
runGmail();
// runCalendar();
},5*60*1000); // Refresh after every 5 minutes = 5*60*1000
</script>
</body>
</html>