diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index b0bd4b43..c1991a22 100755 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -127,7 +127,7 @@ FONT.parseMCMFontFile = function (data) { return FONT.data.characters; }; -FONT.openFontFile = function ($preview) { +FONT.openFontFile = function (fontPreviewElement) { return new Promise(function (resolve) { chrome.fileSystem.chooseEntry({ type: 'openFile', accepts: [{ description: 'MCM files', extensions: ['mcm'] }] }, function (fileEntry) { FONT.data.loaded_font_file = fileEntry.name; @@ -200,7 +200,8 @@ FONT.upload = function ($progress) { return MSP.promise(MSPCodes.MSP_OSD_CHAR_WRITE, FONT.msp.encode(i)); }) .then(function () { - OSD.GUI.jbox.close(); + OSD.GUI.fontManager.close(); + return MSP.promise(MSPCodes.MSP_SET_REBOOT); }); }; @@ -1632,14 +1633,14 @@ TABS.osd.initialize = function (callback) { $('#content').load("./tabs/osd.html", function () { // Generate font type select element - var fontselect = $('.fontpresets'); + var fontPresetsElement = $('.fontpresets'); OSD.constants.FONT_TYPES.forEach(function (e, i) { var option = $('