Notification via Javascript => Linebreaks

13 views
Skip to first unread message

Thomas

unread,
Sep 10, 2009, 2:00:34 PM9/10/09
to Snarl Discussion
Hi Group,

how can i add Linebreaks in a notification via javascript?

I use snarl to notify users they have a new mail (webmailer). But the
text in the bubble should be:

You have one new Mail
from NameOfSender
eMailFromSender

Regards

Thomas

Sven Walther

unread,
Sep 10, 2009, 2:40:59 PM9/10/09
to snarl-...@googlegroups.com
Good question - not having my PC right now I would guess without
having tested to include a \n

Thomas

unread,
Sep 10, 2009, 3:02:02 PM9/10/09
to Snarl Discussion
Hi,

nope, \n and <br> is not working :-(



On 10 Sep., 20:40, Sven Walther <pidginsn...@googlemail.com> wrote:
> Good question - not having my PC right now I would guess without  
> having tested to include a \n
>

Chris Peel

unread,
Sep 10, 2009, 5:23:06 PM9/10/09
to snarl-...@googlegroups.com

Snarl expects CRLFs so try sticking a chr$(13)+chr$(10) pair in there.

Thomas

unread,
Sep 11, 2009, 4:19:25 AM9/11/09
to Snarl Discussion
Hi Chris,

does´nt work. I try following:

chr=String.fromCharCode(13)+String.fromCharCode(10);
Snarl.notify(myClass, 'My Title', "hallo"+chr+"Hallo", "MyPriority",
true);

I became:

halloHallo

Regards

joe t.

unread,
Sep 11, 2009, 1:33:05 PM9/11/09
to Snarl Discussion
Shot in the dark: \x0A ?
It's essentially the same as \n, just the hex sequence.
-joe t.

Thomas

unread,
Sep 12, 2009, 5:00:26 AM9/12/09
to Snarl Discussion
Nothing helps...

It seems that Linebreaks are impossible with snarl...

Regards

Sven Walther

unread,
Sep 12, 2009, 5:32:48 AM9/12/09
to snarl-...@googlegroups.com
Not in general - I know they are working within the Win32 API - so
we'll have a look to expose this also to the JSON API

John

unread,
Sep 12, 2009, 2:37:15 PM9/12/09
to Snarl Discussion
It would be great, if it was implemented in SNP too.

On Sep 12, 12:32 pm, Sven Walther <pidginsn...@googlemail.com> wrote:
> Not in general - I know they are working within the Win32 API - so  
> we'll have a look to expose this also to the JSON API
>

Chris Peel

unread,
Sep 15, 2009, 4:29:58 PM9/15/09
to snarl-...@googlegroups.com

For info, I've added translation for \n combos into the latest source
code. Will release a fix ASAP.

Tanner

unread,
Nov 9, 2009, 7:11:02 PM11/9/09
to Snarl Discussion
I am also trying to create a line break in my notifications. I am
using the snarl_CMD.exe application to send notifications to snarl but
the "/n" doesn't work. I have tried everything I can think of. Are
line breaks still not implemented?

Thanks,
-Tanner

Chris Peel

unread,
Nov 17, 2009, 3:23:48 AM11/17/09
to snarl-...@googlegroups.com

Will be fixed in R2.3 - an alpha will be out soon.
Reply all
Reply to author
Forward
0 new messages