Skip to content

Commit 99d46f6

Browse files
committed
! more substirng from substr, === form ==, cruft
1 parent 15a324f commit 99d46f6

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

themes/default/images/mobile.png

-2.12 KB
Binary file not shown.

themes/default/scripts/desktop-notify.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @version 2.0 dev
77
*
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
99
* providing the interface required by the latter.
1010
*/
1111

@@ -15,14 +15,14 @@
1515
opt = (opt) ? opt : {};
1616

1717
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)
1919
{
2020
if (hasPermissions(request))
2121
{
2222
Push.create(request.desktop_notifications.title, {
2323
body: request.desktop_notifications.message,
2424
icon: opt.icon,
25-
link: request.desktop_notifications.link, // Used by mobile devices
25+
link: request.desktop_notifications.link,
2626
onClick: function() {
2727
window.focus();
2828
this.close();

themes/default/scripts/profile.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function calcCharLeft (init, event = {})
8787
return;
8888
}
8989

90-
init = typeof init !== 'undefined' ? init : false;
90+
init = typeof init === 'undefined' ? false : init;
9191

9292
currentChars = currentSignature.replace(/\r/, '').length;
9393

@@ -268,8 +268,8 @@ function changeSel (selected)
268268
{
269269
if (files[i].indexOf(cat.options[cat.selectedIndex].value) === 0)
270270
{
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('.'));
273273

274274
showFilename = showFilename.replace(/[_]/g, ' ');
275275

themes/default/scripts/script.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -434,15 +434,14 @@ function submitonce (theform)
434434
function submitThisOnce (oControl, bReadOnly)
435435
{
436436
// oControl might also be a form.
437-
var oForm = 'form' in oControl ? oControl.form : oControl,
437+
let oForm = 'form' in oControl ? oControl.form : oControl,
438438
aTextareas = oForm.getElementsByTagName('textarea');
439439

440-
bReadOnly = typeof bReadOnly == 'undefined' ? true : bReadOnly;
440+
bReadOnly = bReadOnly === 'undefined' ? true : bReadOnly;
441441
for (let i = 0, n = aTextareas.length; i < n; i++)
442442
{
443443
aTextareas[i].readOnly = bReadOnly;
444444
}
445-
446445
// If in a second the form is not gone, there may be a problem somewhere
447446
// (e.g. HTML5 required attribute), so release the textarea
448447
window.setTimeout(function() {

0 commit comments

Comments
 (0)