Skip to content

Commit df064bd

Browse files
committed
1.0.90
1 parent 8c7351e commit df064bd

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.0.89",
2+
"version": "1.0.90",
33
"manifest_version": 2,
44
"minimum_chrome_version": "51",
55
"name": "Code Pad IDE",

src/js/handlers/editors.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,15 @@ var EditorsHandler = function () {
268268

269269
idx = parseInt(idx);
270270
this._getTabMode(idx).then(function (data) {
271-
if (JSON.parse(data).mode === that.undefinedFileMode) {
271+
data = that.isJsonString(data) ? JSON.parse(data) : data;
272+
if (data.mode === that.undefinedFileMode) {
272273
chrome.fileSystem.getDisplayPath(fileEntry, function (path) {
273274
// noinspection JSUnresolvedVariable
274275
that.getEditor(idx).setOption('mode', that.Modelist.getModeForPath(path).mode);
275276
that._populateStatusBar(idx);
276277
});
277278
} else {
278-
that.getEditor(idx).setOption('mode', 'ace/mode/' + JSON.parse(data).mode);
279+
that.getEditor(idx).setOption('mode', 'ace/mode/' + data.mode);
279280
that._populateStatusBar(idx);
280281
}
281282
});
@@ -390,14 +391,15 @@ var EditorsHandler = function () {
390391
data = that.isJsonString(data) ? JSON.parse(data) : data;
391392
var ext = that._getTabFileExtension(idx);
392393
if (typeof ext === typeof undefined) {
393-
deferred.resolve(JSON.stringify({
394+
deferred.resolve({
394395
"icon": that.undefinedFileIcon,
395396
"mode": that.undefinedFileMode,
396397
"name": that.undefinedFileName
397-
}));
398+
});
398399
}
399-
if (data.hasOwnProperty(ext)) {
400-
deferred.resolve(JSON.stringify(data[ext]));
400+
401+
if (typeof data[ext] !== typeof undefined) {
402+
deferred.resolve(data[ext]);
401403
}
402404
});
403405

@@ -431,6 +433,7 @@ var EditorsHandler = function () {
431433

432434
idx = parseInt(idx);
433435
this._getTabMode(idx).then(function (data) {
436+
data = that.isJsonString(data) ? JSON.parse(data) : data;
434437
var $el = that.getTabNavEl(idx).find('*[data-toggle="tab"]').first();
435438
$el.find('.filetype-icon').remove();
436439
$el.append(that.navTabIconHtml);

src/js/handlers/notifications.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var NotificationsHandler = function () {
44
this.ratingReminderId = 'rating_reminder';
55

66
this.versionKey = 'last_notified_version';
7-
this.requestRateKey = 'rating_requested';
7+
this.requestRateKey = 'rate_requested';
88

99
this.init = function () {
1010

@@ -64,7 +64,7 @@ var NotificationsHandler = function () {
6464

6565
}
6666
});
67-
}, 30000);
67+
}, 3000);
6868

6969
chrome.notifications.onButtonClicked.addListener(function (notificationId) {
7070
if (notificationId === that.ratingReminderId) {

0 commit comments

Comments
 (0)