Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ define(function (require, exports, module) {
// Local variables
var lastFontSelected = null;
var lastTwentyFonts = [];
var prefs = {};
var prefs;
var whitespaceRegExp = /\s/;
var commaSemiRegExp = /([;,])/;
var fontnameStartRegExp = /[\w"',]/;
Expand Down Expand Up @@ -218,7 +218,8 @@ define(function (require, exports, module) {
if (lastTwentyFonts.length > 20) {
lastTwentyFonts.splice(20, lastTwentyFonts.length - 20);
}
prefs.setValue(PREFERENCES_FONT_HISTORY_KEY, lastTwentyFonts);
prefs.set(PREFERENCES_FONT_HISTORY_KEY, lastTwentyFonts);
prefs.save();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One less space in indentation on this line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RaymondLim Ouch. Nice catch. Will submit a correction.

}

function _showHowtoDialog() {
Expand Down Expand Up @@ -523,8 +524,8 @@ define(function (require, exports, module) {
});

// setup preferences
prefs = PreferencesManager.getPreferenceStorage(PREFERENCES_CLIENT_ID);
lastTwentyFonts = prefs.getValue(PREFERENCES_FONT_HISTORY_KEY);
prefs = PreferencesManager.getExtensionPrefs(PREFERENCES_CLIENT_ID);
lastTwentyFonts = prefs.get(PREFERENCES_FONT_HISTORY_KEY);
if (!lastTwentyFonts) {
lastTwentyFonts = [];
}
Expand Down