-
-
Notifications
You must be signed in to change notification settings - Fork 374
/
profile-w3c-common.js
89 lines (88 loc) · 2.16 KB
/
profile-w3c-common.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
"use strict";
// this is only set in a build, not at all in the dev environment
require.config({
shim: {
shortcut: {
exports: "shortcut"
},
Promise: {
exports: "Promise"
},
},
paths: {
"handlebars": "/node_modules/handlebars/dist/handlebars",
"jquery": "/node_modules/jquery/dist/jquery",
"Promise": "/node_modules/promise-polyfill/promise",
"webidl2": "/node_modules/webidl2/lib/webidl2",
},
deps: [
"jquery",
"Promise",
"core/jquery-enhanced",
],
});
define([
// order is significant
"domReady",
"core/base-runner",
"core/ui",
"core/include-config",
"core/override-configuration",
"core/default-root-attr",
"w3c/l10n",
"core/markdown",
"core/style",
"w3c/style",
"w3c/headers",
"w3c/abstract",
"w3c/conformance",
"core/data-transform",
"core/data-include",
"core/inlines",
"core/dfn",
"w3c/rfc2119",
"core/examples",
"core/issues-notes",
"core/requirements",
"core/highlight",
"core/best-practices",
"core/figures",
"core/biblio",
"core/webidl-contiguous",
"core/webidl-oldschool",
"core/link-to-dfn",
"core/contrib",
"core/fix-headers",
"core/structure",
"w3c/informative",
"w3c/permalinks",
"core/id-headers",
"core/rdfa",
"w3c/aria",
"core/shiv",
"core/remove-respec",
"core/location-hash",
"ui/about-respec",
"ui/dfn-list",
"ui/save-html",
"ui/search-specref",
],
function(domReady, runner, ui) {
var args = Array.from(arguments);
domReady(function() {
ui.addCommand("Save Snapshot", "ui/save-html", "Ctrl+Shift+Alt+S");
ui.addCommand("About ReSpec", "ui/about-respec", "Ctrl+Shift+Alt+A");
ui.addCommand("Definition List", "ui/dfn-list", "Ctrl+Shift+Alt+D");
ui.addCommand("Search Specref DB", "ui/search-specref", "Ctrl+Shift+Alt+space");
runner
.runAll(args)
.then(document.respectIsReady)
.then(ui.show)
.catch(function(err){
console.error(err);
// even if things go critically bad, we should still try to show the UI
ui.show();
})
});
}
);