1 | /* |
||
2 | * To change this license header, choose License Headers in Project Properties. |
||
3 | * To change this template file, choose Tools | Templates |
||
4 | * and open the template in the editor. |
||
5 | */ |
||
6 | |||
7 | |||
8 | /* global API */ |
||
9 | API.notifications = { |
||
10 | create: function(title, message){ |
||
11 | var opt = { |
||
12 | type: "basic", |
||
13 | title: title, |
||
14 | message: message, |
||
15 | iconUrl: "icons/icon32.png" |
||
16 | }; |
||
17 | return API.api.notifications.create('PiCast', opt, function(id) { console.log("Last error:", chrome.runtime.lastError); }); |
||
0 ignored issues
–
show
|
|||
18 | }, |
||
19 | update: API.api.notifications.update, |
||
20 | clear: API.api.notifications.clear, |
||
21 | |||
22 | getAll: function () { |
||
23 | if (API.promise) { |
||
24 | return API.api.notifications.getAll(details); |
||
25 | } |
||
26 | else { |
||
27 | return new C_Promise(function () { |
||
28 | API.api.notifications.getAll(details, (function (notifications) { |
||
29 | this.call_then(notifications); |
||
30 | }).bind(this)); |
||
31 | }); |
||
32 | } |
||
33 | }, |
||
34 | /** |
||
35 | * Event handlers from now on |
||
36 | */ |
||
37 | onClosed: API.api.notifications.onClosed, |
||
38 | onClicked: API.api.notifications.onClicked, |
||
39 | onButtonClicked: API.api.notifications.onButtonClicked, |
||
40 | |||
41 | }; |
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.