webOS Nation Forums >  webOS tablets >  HP TouchPad homebrew > How to set a browser homepage
How to set a browser homepage

  Reply
 
LinkBack Thread Tools Display Modes
Old 09/10/2011, 06:01 PM   #1 (permalink)
Member
 
Join Date: Aug 2011
Location: Portland, OR
Posts: 82
Likes Received: 9
Thanks: 12
Thanked 37 Times in 22 Posts
Default How to set a browser homepage

Hey, so i found out how to set a homepage for the browser.
You have to use internalz to edit a file though, as i don't know how to make a patch,
but in the file /usr/palm/applications/com.palm.app.browser/source/BrowserApp.js, i changed the line:

this.$.pane.selectViewByName("startpage");

to

this.setUrl("http://www.precentral.net");


This is in the function labeled "rendered:"

I attached a screen shot of it.
after editing, save and luna restart, and it will load up right to precentral.

Do this at your own risk, and only if your comfortable with editing files.
Maybe someone can make a patch out of this...
Attached Images
File Type: png code.png (69.7 KB, 168 views) Email Attachment
thricetwice is online now   Reply With Quote
Old 09/10/2011, 09:09 PM   #2 (permalink)
Member
 
Join Date: Aug 2011
Posts: 229
Likes Received: 24
Thanks: 83
Thanked 21 Times in 17 Posts
Default

This file shows read only. How do I change to editable ?
matchqq is offline   Reply With Quote
Old 09/10/2011, 09:12 PM   #3 (permalink)
Member
 
Join Date: Aug 2011
Location: Portland, OR
Posts: 82
Likes Received: 9
Thanks: 12
Thanked 37 Times in 22 Posts
Default

in the preferences of internalz, all the way at the bottom is "Master Mode", turn it on. Should be able to edit it now.


I changed mine around a little, and added it to the menu:

In the kind "AppMenu", add the line:

{name: "homeMenuItem", caption: $L("Home"), onclick: "goToHome"},

I put it as the first entry but you can put it where you want.

then in the rendered function, instead of putting the URL there, i had it call a new function i created:

this.goToHome();


this is the function:

goToHome: function() {
this.setUrl("http://yourhomepage.com");
},


See the screen shots for the code i added.
Attached Images
File Type: png code1.png (66.8 KB, 95 views) Email Attachment
File Type: png code2.png (79.4 KB, 81 views) Email Attachment

Last edited by thricetwice; 09/10/2011 at 11:52 PM.
thricetwice is online now   Reply With Quote
Old 09/10/2011, 09:37 PM   #4 (permalink)
Member
 
Join Date: Jun 2009
Location: SC
Posts: 106
Likes Received: 11
Thanks: 28
Thanked 10 Times in 9 Posts
Default

patch please!
Bockscar is offline   Reply With Quote
Old 09/10/2011, 09:46 PM   #5 (permalink)
Member
 
Join Date: Aug 2011
Posts: 229
Likes Received: 24
Thanks: 83
Thanked 21 Times in 17 Posts
Default

It works, thanks! Is there any difference on using those gotohome lines than just the url one?

In the screen shot from the first post, you forget to remove the line this.$.pane.selectViewByName("startpage");
matchqq is offline   Reply With Quote
Old 09/10/2011, 09:48 PM   #6 (permalink)
Member
 
Join Date: Aug 2011
Location: Portland, OR
Posts: 82
Likes Received: 9
Thanks: 12
Thanked 37 Times in 22 Posts
Default

Quote:
Originally Posted by matchqq View Post
It works, thanks! Is there any difference on using those gotohome lines than just the url one?

In the screen shot from the first post, you forget to remove the line this.$.pane.selectViewByName("startpage");
yeah i just commented it out, so it doesn't execute it

The difference in the second one, is it will add a menu option to click and it will load the homepage.
thricetwice is online now   Reply With Quote
Old 09/10/2011, 10:29 PM   #7 (permalink)
Member
 
Join Date: Aug 2011
Posts: 229
Likes Received: 24
Thanks: 83
Thanked 21 Times in 17 Posts
Default

Second instruction works for me too. Just the "AppMenu" line has one symbol typo, should be } in the end instead of ).
Any chance to create a text search function? :-P
matchqq is offline   Reply With Quote
Thanked By: Dizzle88
Old 09/11/2011, 01:49 PM   #8 (permalink)
Member
 
Join Date: Sep 2011
Posts: 1
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by matchqq View Post
Second instruction works for me too. Just the "AppMenu" line has one symbol typo, should be } in the end instead of ).
Any chance to create a text search function? :-P
You can make the built in one appear by re-enabling this line in BrowserApp.js:
Code:
{caption: $L("Find on Page"), onclick: "showFindOnPage"}
This will add a 'Find' option to the menu.

However, the find bar appears at the bottom of the screen and is covered by the keyboard, which isn't terribly helpful for seeing what you're typing! What needs to happen is to move it to the top of browser window, however having only just started looking at WebOS, I have no idea how to make that happen...
OwenRW is offline   Reply With Quote
Thanked By: matchqq
Old 09/11/2011, 03:57 PM   #9 (permalink)
Member
 
Join Date: Aug 2011
Location: United Kingdom
Posts: 16
Likes Received: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by thricetwice View Post
in the preferences of internalz, all the way at the bottom is "Master Mode", turn it on. Should be able to edit it now.


I changed mine around a little, and added it to the menu:

In the kind "AppMenu", add the line:

{name: "homeMenuItem", caption: $L("Home"), onclick: "goToHome"},

I put it as the first entry but you can put it where you want.

then in the rendered function, instead of putting the URL there, i had it call a new function i created:

this.goToHome();


this is the function:

goToHome: function() {
this.setUrl("http://yourhomepage.com");
},


See the screen shots for the code i added.
Any chance of submitting a patch to preware?
Warpedflash is offline   Reply With Quote
Old 09/11/2011, 04:30 PM   #10 (permalink)
Member
 
Join Date: Aug 2011
Location: Portland, OR
Posts: 82
Likes Received: 9
Thanks: 12
Thanked 37 Times in 22 Posts
Default

Quote:
Originally Posted by Warpedflash View Post
Any chance of submitting a patch to preware?
I don't know how to make them so someone else would have to do it.
thricetwice is online now   Reply With Quote
Old 09/11/2011, 05:21 PM   #11 (permalink)
Member
 
Join Date: Aug 2011
Posts: 40
Likes Received: 5
Thanks: 6
Thanked 5 Times in 4 Posts
Default

Why not just setup your links in 3x3links.com and save to your favorites/app bar and use the link to open a homepage?
atraum is offline   Reply With Quote
Old 09/11/2011, 05:50 PM   #12 (permalink)
Member
 
Join Date: Aug 2011
Location: United Kingdom
Posts: 16
Likes Received: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by atraum View Post
Why not just setup your links in 3x3links.com and save to your favorites/app bar and use the link to open a homepage?
because you could just have 3x3links.com open when you open the browser?
Warpedflash is offline   Reply With Quote
Old 09/12/2011, 12:20 PM   #13 (permalink)
Member
 
Join Date: Aug 2011
Posts: 40
Likes Received: 5
Thanks: 6
Thanked 5 Times in 4 Posts
Default

Quote:
Originally Posted by Warpedflash View Post
because you could just have 3x3links.com open when you open the browser?
Correcto and this is exactly what happens when you open the browser using the link you saved in favorites or your taskbar.
atraum is offline   Reply With Quote
Old 09/12/2011, 02:31 PM   #14 (permalink)
Member
 
Join Date: Aug 2011
Location: United Kingdom
Posts: 16
Likes Received: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by thricetwice View Post
Yeah, also i added in a way to add a home option to the menu, so you can navigate right back.
Added that and a context menu entry.

Quote:
Originally Posted by thricetwice View Post
I was adding that in as well, but i couldn't figure out how to get it to save and access the text you put in.
I know I couldn't find where I should store it. In then end considered a **** it move and was going to create a global variable and then just use that but didnt as it would have been a bit meh.

Quote:
Originally Posted by thricetwice View Post
I looked at this, and the find function isn't even complete.
I was able to move the find bar to the top, but when you use it, it will only find the first instance of the search word. The find next/previous functions were never written. (the functions exist, they are just empty).
Its interesting this was left out. and the save form data area was commented out as well which is a shame.
Warpedflash is offline   Reply With Quote
Old 09/12/2011, 03:32 PM   #15 (permalink)
Member
 
Join Date: Aug 2011
Location: United Kingdom
Posts: 16
Likes Received: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by atraum View Post
Correcto and this is exactly what happens when you open the browser using the link you saved in favorites or your taskbar.
yep but if you open a new blank page from within teh browser it would be blank again.

I actually started looking into making this into a patch that would allow you to set a URL in the preferences page but it got a bit over my head and then i found that the UniviedDiffCreator only works with 1 file edited (from what I can see anyway)
Warpedflash is offline   Reply With Quote
Old 09/12/2011, 04:34 PM   #16 (permalink)
Member
 
Join Date: Aug 2011
Location: Portland, OR
Posts: 82
Likes Received: 9
Thanks: 12
Thanked 37 Times in 22 Posts
Default

Quote:
Originally Posted by atraum View Post
Correcto and this is exactly what happens when you open the browser using the link you saved in favorites or your taskbar.
Yeah, also i added in a way to add a home option to the menu, so you can navigate right back.

Quote:
Originally Posted by Warpedflash
I actually started looking into making this into a patch that would allow you to set a URL in the preferences page but it got a bit over my head
I was adding that in as well, but i couldn't figure out how to get it to save and access the text you put in.


Quote:
Originally Posted by OwenRW
You can make the built in one appear by re-enabling this line in BrowserApp.js:
Code:

{caption: $L("Find on Page"), onclick: "showFindOnPage"}

This will add a 'Find' option to the menu.

However, the find bar appears at the bottom of the screen and is covered by the keyboard, which isn't terribly helpful for seeing what you're typing! What needs to happen is to move it to the top of browser window, however having only just started looking at WebOS, I have no idea how to make that happen...
I looked at this, and the find function isn't even complete.
I was able to move the find bar to the top, but when you use it, it will only find the first instance of the search word. The find next/previous functions were never written. (the functions exist, they are just empty).
thricetwice is online now   Reply With Quote
Old 09/12/2011, 04:45 PM   #17 (permalink)
Member
 
Orion Antares's Avatar
 
Join Date: Jun 2010
Location: Alaska
Posts: 1,617
Likes Received: 105
Thanks: 67
Thanked 304 Times in 227 Posts
Default

Quote:
Originally Posted by Warpedflash View Post
because you could just have 3x3links.com open when you open the browser?
People actually bother to open the browser manually???
__________________
Sign up for SugerSync Get and Give 500MB of extra space
Sign up for DropBox Get and Give 250MB of extra space
Sign up for Memopal Get and Give 500MB of extra space


GoAruna is a cloud service with a webOS app maintained by the company and referral bonuses
Orion Antares is offline   Reply With Quote
Old 09/12/2011, 06:33 PM   #18 (permalink)
Member
 
Join Date: Aug 2011
Location: United Kingdom
Posts: 16
Likes Received: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by thricetwice View Post
Yeah, also i added in a way to add a home option to the menu, so you can navigate right back.
Added that and a context menu entry.

Quote:
Originally Posted by thricetwice View Post
I was adding that in as well, but i couldn't figure out how to get it to save and access the text you put in.
I know I couldn't find where I should store it. In then end considered a **** it move and was going to create a global variable and then just use that but didnt as it would have been a bit meh.

Quote:
Originally Posted by thricetwice View Post
I looked at this, and the find function isn't even complete.
I was able to move the find bar to the top, but when you use it, it will only find the first instance of the search word. The find next/previous functions were never written. (the functions exist, they are just empty).
I saw this was left out as well might not be too hard to write the next/previous functions. would be great to know if you can create a patch using multiple files to do this stuff. and the save form data area was commented out as well which is a shame.

The Advanced webos basically just has this stuff back in and tabs.
Warpedflash is offline   Reply With Quote
Old 09/12/2011, 06:48 PM   #19 (permalink)
Member
 
volcom45's Avatar
 
Join Date: Jun 2009
Posts: 1,546
Likes Received: 42
Thanks: 721
Thanked 182 Times in 131 Posts
Default

This worked perfect for me! Thanks so much!
volcom45 is offline   Reply With Quote
Old 09/13/2011, 11:06 PM   #20 (permalink)
Member
 
Join Date: Aug 2011
Posts: 333
Likes Received: 29
Thanks: 14
Thanked 27 Times in 19 Posts
Default

A patch would be NICE!
next_milenium is offline   Reply With Quote
Reply

 

Tags
browser, homepage, touchpad

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0