diff --git a/js/background.js b/js/background.js index 26e1e067..a38ffcd9 100644 --- a/js/background.js +++ b/js/background.js @@ -28,18 +28,20 @@ chrome.runtime.onMessage.addListener(function (request, sender, response) { }); /* Initially set the course data in storage */ -chrome.runtime.onInstalled.addListener(function () { - var arr = new Array(); - chrome.storage.sync.set({ - savedCourses: arr - }, function () { - console.log('initial course list'); - }); - chrome.storage.sync.set({ - courseConflictHighlight: true - }, function () { - console.log('initial highlighting: true'); - }); +chrome.runtime.onInstalled.addListener(function (details) { + if (details.reason == "install" || details.reason == "update") { + var arr = new Array(); + chrome.storage.sync.set({ + savedCourses: arr + }, function () { + console.log('initial course list'); + }); + chrome.storage.sync.set({ + courseConflictHighlight: true + }, function () { + console.log('initial highlighting: true'); + }); + } }); /* Find all the conflicts in the courses and send them out/ if there is even a conflict*/ diff --git a/js/popup.js b/js/popup.js index 8d1aa4e2..708a9b89 100644 --- a/js/popup.js +++ b/js/popup.js @@ -41,7 +41,7 @@ chrome.storage.sync.get('savedCourses', function (data) { if (profname == "") { profname = "Undecided Professor"; } - var listhtml = "
▼
▼