webOS Nation Forums >  Homebrew >  webOS patches > [Patch][Touchpad] Add 'Find In Page' to Browser
[Patch][Touchpad] Add 'Find In Page' to Browser

  Reply
Like Tree2Likes

 
LinkBack Thread Tools Display Modes
Old 07/13/2011, 10:28 PM   #1 (permalink)
Homebrew Developer
 
Join Date: Jul 2011
Posts: 126
Likes Received: 68
Thanks: 43
Thanked 3,129 Times in 2,010 Posts
Default [Patch][Touchpad] Add 'Find In Page' to Browser

Note: This patch is still kinda buggy. Please see the notes below.

Remember when I found the 'Find On Page' function hidden in the Browser code? Well I went back to it and adding some things to make it more functional. I also moved the FindBar to the top of the screen so you can see what you're typing.

How to use:
In the Browser's app menu, tap 'Find On Page'. You will then be able to enter whatever you want to find on the current page. Hit the 'Enter' key to find the first instance. Tap the 'Next' button to keep finding the next instance.

I attached a screenshot to show you how it looks.

Current Issues:
- The 'Prev' button does not work.
- When cycling through the search results, sometimes the zoom level gets changed. You can pinch-to-zoom to zoom back out.
- When cycling through results, sometimes the screen doesn't follow you.
- When you tap the 'done' button, you'll see a blank space at the bottom of your screen. Minimize the card to get it back to normal.

Maybe someone with more skills than me can take this patch and improve it.
Attached Images
File Type: png browser_2011-13-07_231127.png (133.8 KB, 122 views) Email Attachment
Attached Files
File Type: patch Add_FindInPage_to_Browser.patch (3.7 KB, 134 views) Email Attachment
__________________
Twitter: @ChoorpStudios
Like my work and want to donate? You can do so here.

Last edited by Garrett92C; 07/13/2011 at 10:49 PM.
Garrett92C is offline   Reply With Quote
Liked by irwinr12 likes this.
Old 07/13/2011, 10:32 PM   #2 (permalink)
Member
 
Join Date: Dec 2009
Location: Cleveland, Ohio
Posts: 1,627
Likes Received: 27
Thanks: 161
Thanked 196 Times in 87 Posts
Default

mine would not install
stu5797 is offline   Reply With Quote
Old 07/13/2011, 10:33 PM   #3 (permalink)
Homebrew Developer
 
Join Date: Jul 2011
Posts: 126
Likes Received: 68
Thanks: 43
Thanked 3,129 Times in 2,010 Posts
Default

Quote:
Originally Posted by stu5797 View Post
mine would not install
I've tested this on my Touchpad using untouched files... What problem are you having?
__________________
Twitter: @ChoorpStudios
Like my work and want to donate? You can do so here.
Garrett92C is offline   Reply With Quote
Old 07/13/2011, 10:35 PM   #4 (permalink)
Member
 
Join Date: Dec 2009
Location: Cleveland, Ohio
Posts: 1,627
Likes Received: 27
Thanks: 161
Thanked 196 Times in 87 Posts
Default

I just tried to download from the link.
I got it to work by emailing it to myself. Great work garrett
stu5797 is offline   Reply With Quote
Old 07/13/2011, 10:37 PM   #5 (permalink)
Homebrew Developer
 
Join Date: Jul 2011
Posts: 126
Likes Received: 68
Thanks: 43
Thanked 3,129 Times in 2,010 Posts
Default

Quote:
Originally Posted by stu5797 View Post
I just tried to download from the link.
I got it to work by emailing it to myself. Great work garrett
Ah, yea. Lately, PC forums have a habit of breaking attachments...
__________________
Twitter: @ChoorpStudios
Like my work and want to donate? You can do so here.
Garrett92C is offline   Reply With Quote
Old 07/13/2011, 10:39 PM   #6 (permalink)
Member
 
Join Date: Dec 2009
Location: Cleveland, Ohio
Posts: 1,627
Likes Received: 27
Thanks: 161
Thanked 196 Times in 87 Posts
Default

I think this is a must have patch. This can really be helpful when needed. Thanks again
stu5797 is offline   Reply With Quote
Thanked By: soccergum
Old 07/13/2011, 10:40 PM   #7 (permalink)
Homebrew Developer
 
Join Date: Jul 2011
Posts: 126
Likes Received: 68
Thanks: 43
Thanked 3,129 Times in 2,010 Posts
Default

Quote:
Originally Posted by stu5797 View Post
I think this is a must have patch. This can really be helpful when needed. Thanks again
It'll be a must-have patch if I can work out all the bugs.. lol. It's decent as it is now though.
__________________
Twitter: @ChoorpStudios
Like my work and want to donate? You can do so here.
Garrett92C is offline   Reply With Quote
Old 07/14/2011, 01:44 AM   #8 (permalink)
Homebrew Developer
 
Join Date: Jul 2011
Posts: 126
Likes Received: 68
Thanks: 43
Thanked 3,129 Times in 2,010 Posts
Default

So... anyone else try this patch yet?
__________________
Twitter: @ChoorpStudios
Like my work and want to donate? You can do so here.
Garrett92C is offline   Reply With Quote
Old 07/14/2011, 03:23 AM   #9 (permalink)
Member
 
Join Date: Oct 2009
Location: Germany
Posts: 87
Likes Received: 2
Thanks: 31
Thanked 13 Times in 10 Posts
Default

Trying to install with WOSQI results in an error message saying that it was unable to connect with the WebOS-Internals-servers and can´t download AUPT-scripts for the patch.

Will keep you posted, Garrett.
T.

edit: It worked in the end (though a connection with the servers could still not be established).
__________________
140

Last edited by tklr; 07/14/2011 at 03:34 AM.
tklr is offline   Reply With Quote
Old 07/14/2011, 04:11 AM   #10 (permalink)
Member
 
i_maq's Avatar
 
Join Date: Apr 2010
Location: London, UK
Posts: 382
Likes Received: 19
Thanks: 86
Thanked 59 Times in 38 Posts
Default

Another winner from Garrett!!
i_maq is offline   Reply With Quote
Old 10/07/2011, 12:39 PM   #11 (permalink)
Member
 
Join Date: Oct 2011
Posts: 2
Likes Received: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hey Garret,

Not looked at your code yet but I saw your post and thought I'd reply. I was rooting around today cos we were looking at setting a homepage and like you I spotted the code for 'find in page' that hadn't been implemented. I don't pretend to be a proper developer but I can read code and I noticed that the next and previous functions hadn't been written so no surprise they didn't work ;-) BUT I noticed your excellent post and hard work and I thought I'd let you know that there's some code in the StartPage.is file that might help with redrawing the page after the keyboard has disappeared. Looks like one of the original devs has put in a wee hack that made it into production; could be just what you need to redraw the page without having to minimise etc.

anyone interested in adding a 'set as homepage' option or are you not bothered? No point in me hacking my way through it if nobody is interested :-)
daviehooks is offline   Reply With Quote
Old 10/10/2011, 09:17 PM   #12 (permalink)
Member
 
Join Date: Oct 2011
Posts: 1
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Garrett,
I installed it on two touchpads, one with success. The only difference I see is the one that failed had the thumbnav controls (which I see you co-wrote?) added and the successful one started with an original file. The error from webosqi was:
ERROR: An error occurred while attempting to apply addfindinpagetobrowser.patch
1 out of 3 hunks FAILED -- saving rejects to file usr/palm/applications/com.palm.app.browser/source/Browser.js.rej

Of course when I check the location, there is no such file found.

I'm new at this, but does the patch alter absolute locations in the browser file so trying to apply it to an already patched file (with some earlier patch) will fail?

Works great on the touchpad with the successful install!

Thanks
gsharpe is offline   Reply With Quote
Old 11/03/2011, 08:31 PM   #13 (permalink)
Member
 
Join Date: Oct 2011
Posts: 15
Likes Received: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Default Error

Though I would LOOOVE to have this option my installation fails too. Did all updates to webos 3.0.4 and installed the patch over wifi with Internalz Pro.

The first 4-5 attempts gave me this error:

Quote:
Originally Posted by tklr View Post
..... error message saying that it was unable to connect with the WebOS-Internals-servers and can´t download AUPT-scripts for the patch.
Further attempts, yes I'm kind of desperate, showed me this error:

Quote:
Originally Posted by gsharpe View Post
....
1 out of 3 hunks FAILED -- saving rejects to file usr/palm/applications/com.palm.app.browser/source/Browser.js.rej
I really hope it works sooner than later. Although it seems that also here development kind of stalled??
Thanks for your effort!
jetset900 is offline   Reply With Quote
Old 11/05/2011, 09:01 PM   #14 (permalink)
Member
 
Join Date: May 2008
Posts: 56
Likes Received: 3
Thanks: 3
Thanked 23 Times in 11 Posts
Default

One thing missing here is whether this is 3.0.4 compatible... I'd love to try it out but the reject errors typically suggest that the file could not be patched since the line of text it was seeking was not the same as the patch is looking for.

@Garrett92C --- what was the OS level when you wrote the patch?

Thanks!

EDIT: played with it for 20 minutes and got it to work in 3.0.4 --- you're a genius Garrett nice work to say the least.

I hope you don't mind but folks (like me) NEED this functionality. If you don't post by mid-month or so, I'll post your patch with my modification. HP changed minor stuff so just modifying line numbers did not work in one specific area. Feel free to PM me and I'll send you the modified patch to post.

Last edited by JZ SmartMort; 11/05/2011 at 10:42 PM.
JZ SmartMort is offline   Reply With Quote
Old 11/06/2011, 01:23 AM   #15 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Default

I got it to work thanks to JZ SmartMort's mods. This only works with an unmodded browser. I had to uninstall my other patches first to get it to work.
knownboyofno is offline   Reply With Quote
Old 11/13/2011, 10:45 PM   #16 (permalink)
Member
 
Join Date: Jan 2010
Posts: 172
Likes Received: 1
Thanks: 92
Thanked 36 Times in 20 Posts
Default

Quote:
Originally Posted by JZ SmartMort View Post
One thing missing here is whether this is 3.0.4 compatible... I'd love to try it out but the reject errors typically suggest that the file could not be patched since the line of text it was seeking was not the same as the patch is looking for.

@Garrett92C --- what was the OS level when you wrote the patch?

Thanks!

EDIT: played with it for 20 minutes and got it to work in 3.0.4 --- you're a genius Garrett nice work to say the least.

I hope you don't mind but folks (like me) NEED this functionality. If you don't post by mid-month or so, I'll post your patch with my modification. HP changed minor stuff so just modifying line numbers did not work in one specific area. Feel free to PM me and I'll send you the modified patch to post.
Looking forward to seeing this modded patch for 3.0.4 ...
veerar is offline   Reply With Quote
Old 11/13/2011, 11:16 PM   #17 (permalink)
Member
 
Join Date: May 2008
Posts: 56
Likes Received: 3
Thanks: 3
Thanked 23 Times in 11 Posts
Default Find In Page for webOS 3.0.4

As I promised, it's about mid-month and I know folks are anxiously awaiting. Just an FYI to motivate folks... you can always open up a PATCH file and see exactly which files it's trying to update, then go to your device and see if the line number matches up with the PATCH. Typically, it's a couple of lines off but in this case there was also a very slight modification where just changing line number in the PATCH did not work and I had to grab the changed line and paste it into the PATCH so the correct portion of the source was identified. Remember, VI (or emacs if you're nuts) is your friend google it...

Enjoy the patch and again the credit goes to Garrett92C. I just modified his many hours of research in 20-30 mintues so not my work in any way.

Thanks!
JZ
Attached Files
File Type: patch Advanced_Browser_JustType_304.patch (1.7 KB, 24 views) Email Attachment
JZ SmartMort is offline   Reply With Quote
Liked by knownboyofno likes this.
Thanked by knownboyofno, veerar
Old 11/16/2011, 09:21 PM   #18 (permalink)
Member
 
Join Date: Oct 2011
Posts: 15
Likes Received: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Damn, I had high hopes ...

Installation went fine but no entry in the browser menu

Uninstalled previous patches like the gesture and private browsing patch -> still no menu entry. Uninstalled THIS patch and reinstalled again, still no menu entry.

Or am I blind? ...isn't it supposed to be beneath the "Web"-menu?? I could only find Settings/Print/Help
Maybe a language issue??? I'm running the german rom.

!! Edit: After trying to reinstall my two patches mentioned before, I cannot reinstall the "Private Browsing" patch:
-1: Unable to run command: IPKG_OFFLINE_ROOT=/media/cryptofs/apps /bin/sh /media/cryptofs/apps/usr/lib/ipkg/info/org.webosinternals.patches.browser-private-browsing.postinst 2>&1
1 out of 5 hunks FAILED -- saving rejects to file usr/palm/applications/com.palm.app.browser/source/Browser.js.rej

This patch would've had a menu entry too, so maybe any coherence...
Even after uninstalling the patch from this thread, it's impossible to install the "Private Browsing" patch again...

Might someone give me an idea of what this installation might have messed up? ....

THANKS!

Edit2:
After several attempts of installing and reinstalling and luna restarts I managed to reinstall "private browsing patch".
After another attempt to reinstall this search addin -still no menu entry.
...which brings me to the question: @JZ SmartMort

Does your patch only patch Garrett's? Or does yours work on it's own?

Last edited by jetset900; 11/16/2011 at 11:02 PM.
jetset900 is offline   Reply With Quote
Old 11/20/2011, 05:42 PM   #19 (permalink)
Member
 
Join Date: May 2008
Posts: 56
Likes Received: 3
Thanks: 3
Thanked 23 Times in 11 Posts
Default

Quote:
Originally Posted by jetset900 View Post
Edit2:
After several attempts of installing and reinstalling and luna restarts I managed to reinstall "private browsing patch".
After another attempt to reinstall this search addin -still no menu entry.
...which brings me to the question: @JZ SmartMort

Does your patch only patch Garrett's? Or does yours work on it's own?
It works on its own... I just modified Garrett's PATCH for 3.0.4...

Remember this is a TEXT file, just open it up in notepad and it will tell you EXACTLY the sections it's searching for within specific files and exactly which lines will be added/removed in each file.

EDIT: here's a favor attached... this is the STOCK 3.0.4 browser that I extracted from WebOS Doctor. Rename yours which is located under /usr/palm/applications and use this as it's stock and unmodified in any way. Then make sure to use one patch at a time as they obviously can affect eachother since they mess with the same files.

Thanks!
Attached Files
File Type: zip com.palm.app.browser_3.0.4.zip (721.3 KB, 8 views) Email Attachment

Last edited by JZ SmartMort; 11/20/2011 at 05:48 PM.
JZ SmartMort is offline   Reply With Quote
Old 11/21/2011, 09:43 PM   #20 (permalink)
Member
 
Join Date: Oct 2011
Posts: 15
Likes Received: 0
Thanks: 4
Thanked 0 Times in 0 Posts
Default

wow, thanks for the effort! seriously great, ...I'll check as soon as I have some time.
But don't you think it might be a concern to install a different language version?
So which local version did you extract?

THX!
jetset900 is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0