10/15/2010, 10:50 PM
|
#1 (permalink) |
|
Member
![]() Join Date: Jul 2010
Posts: 282
Likes Received: 84
Thanks: 26
Thanked 187 Times in 40 Posts
|
As some of you may know, I've been poking away at overclocking the Pixi kernel. Now, I have my own request to make.
When reading web pages, sometimes pages are not mobile aware (gasp!) and render in their full page glory. This makes it really hard to read sometimes, even after accounting for the double tap zoom-in. So I thought it would be nice to have a patch that does the following: 1) Add a button to the web browser (currently, there are back and refresh buttons) 2) When button is pressed, it will run the current page through a local (preferably) copy of readability and reformat into nice clean readable text. For those of you who have not heard of Readability, see here for more info. Readability - An Arc90 Lab Experiment Thanks! PS. As additional incentive, I promise to try to ramp up to faster cpu speeds sooner rather than later. |
10/16/2010, 07:40 PM
|
#2 (permalink) |
|
Member
![]() Join Date: Jan 2010
Posts: 172
Likes Received: 1
Thanks: 92
Thanked 36 Times in 20 Posts
|
Readability has a bookmarklet ( I think ) that works for other browsers. It does not work with the webOS 1.4.5 browser. Heres hoping that the 2.0 version browser supports bookmarklets. If that happens, we dont need a patch; we can even add other bookmarklets like Find In Page.
|
02/10/2011, 03:03 PM
|
#3 (permalink) |
|
Member
![]() Join Date: Nov 2010
Posts: 1
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
|
There is an alternative to Readability:
Viewtext.org ViewText.org API With an extra Button (e.g. Browser Patch) you could catch the URL and open it in a new card with viewtext API. I have no experience with writing patches - would it be possible to do it this way? Code:
http://viewtext.org/api/text?url={url}&format={format}&callback={callback}
* {url}: REQUIRED. The url of the text to fetch
* {format}: OPTIONAL. The return type. Valid values are: html, json, xml. Default is html
* {callback}: OPTIONAL, only required for JSONP. The JSONP callback method
*
Other optional parameters
* &rl={true/false}: Redirect links in text through viewtext.org. Default true.
* &mld={decimal}: Remove HTML nodes with a link density greater than or equal to {decimal}. Default .8
Example with jQuery
$("#button").click(function () {
$.getJSON("http://viewtext.org/api/text?url=" + $("#url").val() + "&callback=?",
function (data) {
$("#article-text-demo").html(data.content);
});
});
|
12/08/2011, 06:47 PM
|
#4 (permalink) |
|
Member
![]() Join Date: Jan 2010
Posts: 172
Likes Received: 1
Thanks: 92
Thanked 36 Times in 20 Posts
|
Also, from Free Publisher Tools — Readability we can stick this piece of code
<div class="rdbWrapper" data-show-read="1" data-show-send-to-kindle="0" data-show-print="0" data-show-email="0" data-orientation="0" data-version="1"></div><script type="text/javascript">(function() {var s = document.getElementsByTagName("script")[0],rdb = document.createElement("script"); rdb.type = "text/javascript"; rdb.async = true; rdb.src = document.location.protocol + "//www.readability.com/embed.js"; s.parentNode.insertBefore(rdb, s); })();</script> I think this piece of code goes in usr/palm/applications/com.palm.app.browser/app/views/page/page-scene.html . However I am not sure what goes in usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js to make it work. Any help from the community ? |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



