-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
35 lines (27 loc) · 903 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*jslint vars: true */
/*global $, define, brackets */
define(function (require, exports, module) {
'use strict';
var EXTENSION_ID = 'brackets-maximize-editor';
var CommandManager = brackets.getModule('command/CommandManager');
var Menus = brackets.getModule('command/Menus');
var $mainView = $('.main-view');
var className = 'maximize-editor';
function handler() {
$mainView.toggleClass(className);
}
CommandManager.register('Maximize Editor', EXTENSION_ID, handler);
var menu = Menus.getMenu(Menus.AppMenuBar.VIEW_MENU);
var command = [{
key: "Ctrl-Shift-Enter",
platform: "win"
}, {
key: "Cmd-Shift-Enter",
platform: "mac"
}];
var ExtensionUtils = brackets.getModule("utils/ExtensionUtils");
ExtensionUtils.loadStyleSheet(module, 'main.css');
menu.addMenuDivider();
menu.addMenuItem(EXTENSION_ID, command);
menu.addMenuDivider();
});