PDA

View Full Version : Nokia770 in Forefox window - no menu, toolbars, etc.



Robin Bowes
2006-01-17, 09:46
Hi,

Just an idle thought, but how would I go about using the Nokia 770 skin
with Firefox and having it appear in a browser window sized to match the
mative resolution of the skin and with no toolbars or menu?

I thought it might make a nice "control panel" instead of running the
full web page.

Thanks,

R.
--
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?

bklaas
2006-01-17, 10:13
sounds like a job for javascript. If you also run a webserver, you could create a page that could pops an 800x400 window to slimserver with no toolbars, and then close the parent. If I get a chance I will experiment with that today. Sounds kinda cool.
#!/ben

fuzzyT
2006-01-17, 10:28
bklaas wrote:
> [...] a page that could pops an 800x400 window to slimserver with no
> toolbars, and then close the parent.

You might look at using a similar javascript concept for a bookmarklet.
I have a bunch of these in my personal bookmarks toolbar and they're
handy as all get out. This one would be cake.

--rt

bklaas
2006-01-17, 16:07
this is javascript code to do it as a bookmarklet. Replace localhost with the IP of your slimserver.

javascript:var winOpts = 'resizable=no,scrollbars=yes,width=800,height=480' ;function popUp(pPage) { var popUpWin = window.open(pPage,'popWin',winOpts); popUpWin.focus(); }popUp('http://localhost:9000');

I also did it as a webpage, with the hopes of having a clickable icon from my desktop, but firefox and opera don't allow self.close(), so you end up with a blank underlying window in addition to the slimserver window. Not the hugest deal, but I wish it was cleaner.

<html>
<head>
<title>Slimserver WebConsole Executor</title>
<script language = 'JavaScript'>
var winOpts = 'resizable=no,scrollbars=yes,width=800,height=480' ;

function popUp(pPage) {
var popUpWin = window.open(pPage,'popWin',winOpts);
popUpWin.focus();
}
popUp('http://localhost:9000');
</script>

</head>

<body>
<script language = 'JavaScript'>
window.close();
</script>
</body>
</html>

malsbury
2006-01-17, 17:22
this is javascript code to do it as a bookmarklet. Replace localhost with the IP of your slimserver.

javascript:var winOpts = 'resizable=no,scrollbars=yes,width=800,height=480' ;function popUp(pPage) { var popUpWin = window.open(pPage,'popWin',winOpts); popUpWin.focus(); }popUp('http://localhost:9000');
Ben this works great, but as I don't run the Nokia770 as my defualt webUI. I changed the end to "popUp('http://localhost:9000/nokia770/')" and bookmarked that. Now I can have a handy visual control panel for my server in it's own little window. I thought this might be useful for others who also don't run the Nokia as their default.

--Tom Malsbury

Robin Bowes
2006-01-17, 17:27
bklaas said the following on 17/01/2006 23:07:
> this is javascript code to do it as a bookmarklet. Replace localhost
> with the IP of your slimserver.
>
> javascript:var winOpts =
> 'resizable=no,scrollbars=yes,width=800,height=480' ;function
> popUp(pPage) { var popUpWin = window.open(pPage,'popWin',winOpts);
> popUpWin.focus(); }popUp('http://localhost:9000');

Cool.

So how do I create a bookmarklet?

R.
--
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?

Robin Bowes
2006-01-17, 17:36
bklaas said the following on 17/01/2006 23:07:
> this is javascript code to do it as a bookmarklet. Replace localhost
> with the IP of your slimserver.
>
> javascript:var winOpts =
> 'resizable=no,scrollbars=yes,width=800,height=480' ;function
> popUp(pPage) { var popUpWin = window.open(pPage,'popWin',winOpts);
> popUpWin.focus(); }popUp('http://localhost:9000');

OK, so I found out about bookmarklets!

This works great except (nitpick, nitpick):

1. I added the nokia skin explicitly to the url, i.e.
http://localhost:9000/nokia770
2. The window doesn't appear on top - it disappears behind the current
window
3. Is it possible to turn off the status bar?

Great work!

That skin works really well as a small Slimserver control panel. Only
trouble is I may have got get a Nokia 770 now. :)

R.
--
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?

bklaas
2006-01-17, 17:50
This works great except (nitpick, nitpick):

1. I added the nokia skin explicitly to the url, i.e.
http://localhost:9000/nokia770

yeah, that's a good idea.


2. The window doesn't appear on top - it disappears behind the current
window

That's weird, since the popUpWin.focus() line should have put it on top (it works for me, FF1.5/Linux). Don't know why it's working that way for you.



3. Is it possible to turn off the status bar?

I believe that's part of your browser's "chrome" and is not easily manipulated via javascript (for good reason). In Firefox, you can uncheck View->Status Bar and it'll go away...

Robin Bowes
2006-01-17, 18:15
bklaas said the following on 18/01/2006 00:50:
> Robin Bowes Wrote:
>> 2. The window doesn't appear on top - it disappears behind the current
>> window
>
> That's weird, since the popUpWin.focus() line should have put it on top
> (it works for me, FF1.5/Linux). Don't know why it's working that way for
> you.

I'm using FF1.5 on XP. I'll try it on Linux.

>
> Robin Bowes Wrote:
>> 3. Is it possible to turn off the status bar?
>
> I believe that's part of your browser's "chrome" and is not easily
> manipulated via javascript (for good reason). In Firefox, you can
> uncheck View->Status Bar and it'll go away...

Yes, I'm aware of that. Shame it can't be manipulated in JS.

Excellent skin, BTW.

R.
--
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?

Robin Bowes
2006-01-17, 18:20
Robin Bowes said the following on 18/01/2006 01:15:
> bklaas said the following on 18/01/2006 00:50:
>> Robin Bowes Wrote:
>>> 2. The window doesn't appear on top - it disappears behind the current
>>> window
>> That's weird, since the popUpWin.focus() line should have put it on top
>> (it works for me, FF1.5/Linux). Don't know why it's working that way for
>> you.
>
> I'm using FF1.5 on XP. I'll try it on Linux.

Hmmm. 1.07 on FC4. The popup works, but I can resize the window. And I
see scrollbars when it opens.

R.
--
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?

David Brittain
2006-01-18, 01:55
In 1.5 both focus and changing the status bar are controlled by
javascript advanced preferences. On my system (I'm not sure if these are
defaults or not) changing focus is allowed and changing status text is
not. However, the window is still launched at the back for me. (on xp)

Dave

Robin Bowes wrote:
> Robin Bowes said the following on 18/01/2006 01:15:
>
>> bklaas said the following on 18/01/2006 00:50:
>>
>>> Robin Bowes Wrote:
>>>
>>>> 2. The window doesn't appear on top - it disappears behind the current
>>>> window
>>>>
>>> That's weird, since the popUpWin.focus() line should have put it on top
>>> (it works for me, FF1.5/Linux). Don't know why it's working that way for
>>> you.
>>>
>> I'm using FF1.5 on XP. I'll try it on Linux.
>>
>
> Hmmm. 1.07 on FC4. The popup works, but I can resize the window. And I
> see scrollbars when it opens.
>
> R.
>

fuzzyT
2006-01-18, 07:58
Robin Bowes wrote:

> Hmmm. 1.07 on FC4. The popup works, but I can resize the window. And I
> see scrollbars when it opens.

The bookmarklet needs to set scrollbars=yes, so that you can scroll
vertically on pages like 'Artists'.

The trick to getting rid of them on the pages like 'Home' is to tweak
the opened window's size upwards a bit.

A width on 818px, was just right for getting rid of the horiz scroll for
me, and leaving enough of a right hand gutter so that it didn't reappear
on the 'Artists' page.

--rt