Issues (121)

src/js/mivhak.buttons.js (4 issues)

1
// Built-in buttons
2
Mivhak.buttons = {
0 ignored issues
show
The variable Mivhak seems to be never declared. If this is a global, consider adding a /** global: Mivhak */ comment.

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.

Loading history...
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
The parameter e is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
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
The parameter e is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
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
The parameter e is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
45
            this.notifier.dismissibleNotification('Mivhak.js v1.0.0 | <a href="http://products.askupasoftware.com/mivhak-js/">Official Page</a>');
46
        }
47
    }
48
};