1
|
|
|
/** |
2
|
|
|
* A list of Mivhak default options |
3
|
|
|
*/ |
4
|
|
|
Mivhak.defaults = { |
|
|
|
|
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Whether to add a live preview (and a "play" button) to run the code |
8
|
|
|
* @type Boolean |
9
|
|
|
*/ |
10
|
|
|
runnable: false, |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Whether to allow the user to edit the code. If runnable is set to true, |
14
|
|
|
* the live preview will be updated when the code changes. |
15
|
|
|
* @type Boolean |
16
|
|
|
*/ |
17
|
|
|
editable: false, |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* Whether to show line numbers on the left |
21
|
|
|
* @type Boolean |
22
|
|
|
*/ |
23
|
|
|
lineNumbers: false, |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* One of the supported CSS color formats (HEX, RGB, etc...) to be used as |
27
|
|
|
* Mivhak's accent color. The color will be applied to scrollbars, |
28
|
|
|
* tab navigation and dropdown items. |
29
|
|
|
* @type String |
30
|
|
|
*/ |
31
|
|
|
accentColor: false, |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* Whether to collapse the viewport initially |
35
|
|
|
* @type Boolean |
36
|
|
|
*/ |
37
|
|
|
collapsed: false, |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* Text/HTML string to be displayed at the bottom of the embedded code block |
41
|
|
|
* @type Boolean|string |
42
|
|
|
*/ |
43
|
|
|
caption: false, |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Mivhak's theme. One of (dark|light) |
47
|
|
|
* @type String |
48
|
|
|
*/ |
49
|
|
|
theme: 'light', |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* The viewport's height. Either a number (for a custom height in pixels) |
53
|
|
|
* or one of (auto|min|max|average). |
54
|
|
|
* @type String|Number |
55
|
|
|
*/ |
56
|
|
|
height: 'average', |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* The surrounding padding between the code and the wrapper. |
60
|
|
|
* @type Number |
61
|
|
|
*/ |
62
|
|
|
padding: 15, |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Whether to show/hide the top bar |
66
|
|
|
* @type Boolean |
67
|
|
|
*/ |
68
|
|
|
topbar: true, |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* An array of strings/objects for the settings dropdown menu |
72
|
|
|
* @type Array |
73
|
|
|
*/ |
74
|
|
|
buttons: ['wrap','copy','collapse','about'] |
75
|
|
|
}; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* A list of Mivhak resource default settings (Mivhak resources are any <pre> |
79
|
|
|
* elements placed inside a Mivhak wrapper element). |
80
|
|
|
*/ |
81
|
|
|
Mivhak.resourceDefaults = { |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* The resource language (one of the supported Ace Editor languages) |
85
|
|
|
* @type string |
86
|
|
|
*/ |
87
|
|
|
lang: null, |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* How the resource should be treated in the preview window. One of (script|style|markup) |
91
|
|
|
* @type bool|string |
92
|
|
|
*/ |
93
|
|
|
runAs: false, |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* A URL to an external source |
97
|
|
|
* @type bool|string |
98
|
|
|
*/ |
99
|
|
|
source: false, |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* Whether to show this resource as a tab. Useful if you want to include |
103
|
|
|
* external libraries for the live preview and don't need to see their contents. |
104
|
|
|
* @type Boolean |
105
|
|
|
*/ |
106
|
|
|
visible: true, |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* Mark/highlight a range of lines given as a string in the format '1, 3-4' |
110
|
|
|
* @type bool|string |
111
|
|
|
*/ |
112
|
|
|
mark: false, |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* Set the initial line number (1 based). |
116
|
|
|
* @type Number |
117
|
|
|
*/ |
118
|
|
|
startLine: 1 |
119
|
|
|
}; |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.