1 | // Built-in buttons |
||
2 | Mivhak.buttons = { |
||
0 ignored issues
–
show
|
|||
3 | |||
4 | /** |
||
5 | * The wrap button features a toggle button and is used to toggle line wrap |
||
6 | * on/off for the currently active tab |
||
7 | */ |
||
8 | wrap: { |
||
9 | text: 'Wrap Lines', |
||
10 | toggle: true, |
||
11 | click: function(e) { |
||
12 | e.stopPropagation(); |
||
13 | this.callMethod('toggleLineWrap'); |
||
14 | } |
||
15 | }, |
||
16 | |||
17 | /** |
||
18 | * The copy button copies the code in the currently active tab to clipboard |
||
19 | * (except for Safari, where it selects the code and prompts the user to press command+c) |
||
20 | */ |
||
21 | copy: { |
||
22 | text: 'Copy', |
||
23 | click: function(e) { |
||
0 ignored issues
–
show
|
|||
24 | this.callMethod('copyCode'); |
||
25 | } |
||
26 | }, |
||
27 | |||
28 | /** |
||
29 | * The collapse button toggles the entire code block into and out of its |
||
30 | * collapsed state. |
||
31 | */ |
||
32 | collapse: { |
||
33 | text: 'Colllapse', |
||
34 | click: function(e) { |
||
0 ignored issues
–
show
|
|||
35 | this.callMethod('collapse'); |
||
36 | } |
||
37 | }, |
||
38 | |||
39 | /** |
||
40 | * The about button shows the user information about Mivhak |
||
41 | */ |
||
42 | about: { |
||
43 | text: 'About Mivhak', |
||
44 | click: function(e) { |
||
0 ignored issues
–
show
|
|||
45 | this.notifier.dismissibleNotification('Mivhak.js v1.0.0 | <a href="http://products.askupasoftware.com/mivhak-js/">Official Page</a>'); |
||
46 | } |
||
47 | } |
||
48 | }; |
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.