Commit 99d46f6 1 parent 15a324f commit 99d46f6 Copy full SHA for 99d46f6
File tree 4 files changed +8
-9
lines changed
4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 5
5
*
6
6
* @version 2.0 dev
7
7
*
8
- * This bits acts as middle-man between the notify (above) and the ElkNotifications
8
+ * This bits acts as middle-man between Push and the ElkNotifications
9
9
* providing the interface required by the latter.
10
10
*/
11
11
15
15
opt = ( opt ) ? opt : { } ;
16
16
17
17
const send = function ( request ) {
18
- if ( request . desktop_notifications . new_from_last > 0 )
18
+ if ( request . desktop_notifications && request . desktop_notifications . new_from_last > 0 )
19
19
{
20
20
if ( hasPermissions ( request ) )
21
21
{
22
22
Push . create ( request . desktop_notifications . title , {
23
23
body : request . desktop_notifications . message ,
24
24
icon : opt . icon ,
25
- link : request . desktop_notifications . link , // Used by mobile devices
25
+ link : request . desktop_notifications . link ,
26
26
onClick : function ( ) {
27
27
window . focus ( ) ;
28
28
this . close ( ) ;
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ function calcCharLeft (init, event = {})
87
87
return ;
88
88
}
89
89
90
- init = typeof init !== 'undefined' ? init : false ;
90
+ init = typeof init === 'undefined' ? false : init ;
91
91
92
92
currentChars = currentSignature . replace ( / \r / , '' ) . length ;
93
93
@@ -268,8 +268,8 @@ function changeSel (selected)
268
268
{
269
269
if ( files [ i ] . indexOf ( cat . options [ cat . selectedIndex ] . value ) === 0 )
270
270
{
271
- let filename = files [ i ] . substr ( files [ i ] . indexOf ( '/' ) + 1 ) ,
272
- showFilename = filename . substr ( 0 , filename . lastIndexOf ( '.' ) ) ;
271
+ let filename = files [ i ] . substring ( files [ i ] . indexOf ( '/' ) + 1 ) ,
272
+ showFilename = filename . substring ( 0 , filename . lastIndexOf ( '.' ) ) ;
273
273
274
274
showFilename = showFilename . replace ( / [ _ ] / g, ' ' ) ;
275
275
Original file line number Diff line number Diff line change @@ -434,15 +434,14 @@ function submitonce (theform)
434
434
function submitThisOnce ( oControl , bReadOnly )
435
435
{
436
436
// oControl might also be a form.
437
- var oForm = 'form' in oControl ? oControl . form : oControl ,
437
+ let oForm = 'form' in oControl ? oControl . form : oControl ,
438
438
aTextareas = oForm . getElementsByTagName ( 'textarea' ) ;
439
439
440
- bReadOnly = typeof bReadOnly == 'undefined' ? true : bReadOnly ;
440
+ bReadOnly = bReadOnly = == 'undefined' ? true : bReadOnly ;
441
441
for ( let i = 0 , n = aTextareas . length ; i < n ; i ++ )
442
442
{
443
443
aTextareas [ i ] . readOnly = bReadOnly ;
444
444
}
445
-
446
445
// If in a second the form is not gone, there may be a problem somewhere
447
446
// (e.g. HTML5 required attribute), so release the textarea
448
447
window . setTimeout ( function ( ) {
You can’t perform that action at this time.
0 commit comments