live updating of calendar

This commit is contained in:
Sriram Hariharan
2018-08-11 19:45:24 -05:00
parent 1beb77187f
commit b92a42ed41
3 changed files with 40 additions and 19 deletions

View File

@@ -60,8 +60,13 @@ $(function () {
setTimeout(function () {
$("#snackbar").attr("class", "");
}, 3000);
setTimeout(update(), 1000);
chrome.runtime.sendMessage({
command: "updateCourseList"
}, function () {
update();
});
});
});
$("#Syllabi").click(function () {
@@ -90,6 +95,7 @@ $(function () {
chrome.runtime.onMessage.addListener(
function (request, sender, sendResponse) {
if (request.command == "updateCourseList") {
console.log("hello");
update();
}
});