nextcloud /
passman-webextension
| 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
Debugging Code
introduced
by
Loading history...
The variable
chrome seems to be never declared. If this is a global, consider adding a /** global: chrome */ 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...
|
|||
| 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); |
||
|
0 ignored issues
–
show
The variable
details seems to be never declared. If this is a global, consider adding a /** global: details */ 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...
|
|||
| 25 | } |
||
| 26 | else { |
||
| 27 | return new C_Promise(function () { |
||
| 28 | API.api.notifications.getAll(details, (function (notifications) { |
||
|
0 ignored issues
–
show
The variable
details seems to be never declared. If this is a global, consider adding a /** global: details */ 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...
|
|||
| 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 | }; |