This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
KOMenu.js
36 lines (27 loc) · 5.03 KB
/
KOMenu.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
36
/*
* Adding icon to side menu and adding shortcut to brackets menu -> Find (Ctrl+Alt+K).
*/
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define, brackets, $ */
define(function (require, exports, module) {
"use strict";
// Load dependent modules
var Command = brackets.getModule('command/CommandManager'),
Menus = brackets.getModule('command/Menus'),
NativeApp = brackets.getModule('utils/NativeApp');
function open_ko_link() {
NativeApp.openURLInDefaultBrowser('http://knockoutjs.com/documentation/introduction.html');
}
function initKOMenu() {
var icon = $("<a href='#'><img title='Knockout.js documentation' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAA7BAAAOwQG4kWvtAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAsKSURBVHjarJd5UFR3tsd/atgEJXTf2327WRroVrvBZkcSNgUEkUX27gaFRsWYFgxoxCUqLqjgCJqgLOLKaDSisV6e0UkqmUreVCqVypuYvBfHLDNJSiepKSszKWMs45rP/EHbSF5eav6YU/WpW/ecW+d87++e8/vVFeJnpvb2Dk7TastmKYpjpqLYf4lZOsU+W6fYc/8f8sbiyNPrbBEB/jHi18x/woTABTHW3wyWl317qnYBp2oXcKqudhRnHcPOOoadTobrnZxb6OTCQicX6kc5X+/kfH3dI746Ljhr+V19HS87bLc7s2a+MTVwcur/Ke41bpzfhsyMt0/XLmDIYeew3cYRu40jDjtHHHaOVjtGqKn28NL8Gs4sqOFMzQina6o9nPHg4EyNg5er7ZytdnChbgFnqiq+n64KKhgjoMRkajvhsHOwvIyDFeUcrCjnUGXFCFWVHKqq5LCtisM2G4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VjZ9vvxBikRAi5uHS/5I95m4MoxBiuhDC+m8iWggRKYR4XAgx4dGC/xwA6WoKby/tWLgAAAAASUVORK5CYII='></a>")
.appendTo($("#main-toolbar .buttons"));
icon.click(function () {
open_ko_link();
});
var KO_DOC_EXECUTE = 'ko.doc';
Command.register('KO Doc', KO_DOC_EXECUTE, open_ko_link);
var menu = Menus.getMenu(Menus.AppMenuBar.HELP_MENU);
menu.addMenuItem(KO_DOC_EXECUTE, 'Ctrl-Alt-K');
}
exports.initKOMenu = initKOMenu;
});