Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Commit

Permalink
Pass gUserDatabase as param.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marina Samuel committed Sep 29, 2015
1 parent c4311cf commit 21435bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/blockedLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Singleton that keeps track of all blocked links in the grid.
*/
(function(exports) {
(function(exports, userDB) {
const gBlockedLinks = {
/**
* The cached list of blocked links.
Expand All @@ -16,10 +16,10 @@


/**
* Load the blocked links from gUserDatabase and cache them.
* Load the blocked links from userDB and cache them.
*/
init() {
var loadPromise = gUserDatabase.load("prefs", "blockedLinks");
var loadPromise = userDB.load("prefs", "blockedLinks");
loadPromise.then(loadedLinks => {
if (loadedLinks && loadedLinks.length) {
this._links = new Set(JSON.parse(loadedLinks));
Expand Down Expand Up @@ -58,7 +58,7 @@
* Saves the current list of blocked links.
*/
save() {
return gUserDatabase.save("prefs", "blockedLinks", JSON.stringify([...this._links]));
return userDB.save("prefs", "blockedLinks", JSON.stringify([...this._links]));
},

/**
Expand Down Expand Up @@ -88,4 +88,4 @@
},
};
exports.gBlockedLinks = gBlockedLinks;
}(window));
}(window, gUserDatabase));

0 comments on commit 21435bc

Please sign in to comment.