From 1104dc1189026a873cc25898b3504c1c298ea03d Mon Sep 17 00:00:00 2001 From: sghsri Date: Fri, 31 Aug 2018 14:06:20 -0500 Subject: [PATCH] updating status --- js/background.js | 24 +++++++++++++++++++++++- js/content.js | 48 +++++++++++++++++++++++++++--------------------- js/popup.js | 6 +++--- 3 files changed, 53 insertions(+), 25 deletions(-) diff --git a/js/background.js b/js/background.js index a38ffcd9..1aa5045a 100644 --- a/js/background.js +++ b/js/background.js @@ -11,7 +11,11 @@ chrome.runtime.onMessage.addListener(function (request, sender, response) { isSingleConflict(request.dtarr, request.unique, response); } else if (request.command == "checkConflicts") { checkConflicts(response); - } else if (request.command == "alreadyContains") { + } + else if(request.command == "updateStatus"){ + updateStatus(); + } + else if (request.command == "alreadyContains") { alreadyContains(request.unique, response); } else { const xhr = new XMLHttpRequest(); @@ -167,4 +171,22 @@ function alreadyContains(unique, sendResponse) { alreadyContains: contains }); }); +} + +function updateStatus(){ + chrome.storage.sync.get('savedCourses', function (data) { + console.log(data.savedCourses); + for(let i = 0; iPlus'); var modhtml = '