Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
favoriteCourses
Browse files Browse the repository at this point in the history
  • Loading branch information
Bloemendaal committed Apr 17, 2019
1 parent 754df47 commit be5afb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
var snackbar;
var progressBar;

var favoriteCourses = 0;
var favoriteCourses = localStorage.getItem("favoriteCourses") == "-1" ? -1 : 0;
var pages = [
{
name: 'courses',
Expand Down Expand Up @@ -46,6 +46,7 @@
},
fab: function() {
favoriteCourses = Math.abs(favoriteCourses + 1) * -1;
localStorage.setItem("favoriteCourses", favoriteCourses.toString());
setCoursesPortfolios(true, $('#search').is(':visible') ? $('#search').val() : '');
}
}
Expand Down
3 changes: 2 additions & 1 deletion userscript/MDELO.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
var snackbar;
var progressBar;

var favoriteCourses = 0;
var favoriteCourses = localStorage.getItem("favoriteCourses") == "-1" ? -1 : 0;
var pages = [
{
name: 'courses',
Expand Down Expand Up @@ -65,6 +65,7 @@
},
fab: function() {
favoriteCourses = Math.abs(favoriteCourses + 1) * -1;
localStorage.setItem("favoriteCourses", favoriteCourses.toString());
setCoursesPortfolios(true, $('#search').is(':visible') ? $('#search').val() : '');
}
}
Expand Down

0 comments on commit be5afb5

Please sign in to comment.