Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-20-2010, 08:47 AM   #16
neftaly
Junior Member
neftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with others
 
Posts: 8
Karma: 2600
Join Date: Oct 2010
Device: none
Here's an online demo, though it's not really working (slapped that together - I'm about to go to bed). You can get an idea of what it looks like, however.

Here is a mostly-working version for Kindle (downloader doesn't work all the time). Be sure to backup usr/share/browser/readability/ (the only files that get replaced). The included shell script start_httpd must be running for it to work.

Plugins are loaded from readabilityMod.js. Here's its contents:

Code:
function readabilityMod_linkfixer() {
  _links = document.getElementsByTagName('a');
  for (i in _links) {
    _links[i].target = "";  
  }
}

readabilityMod_addDialog("Readability", "readabilityMod_loadCSS('readability.css');readabilityMod_loadScript('readability.js');");
readabilityMod_addDialog("Fix Links", "readabilityMod_linkfixer();")
readabilityMod_addDialog("Download Files", "readabilityMod_loadScript('download.js');");
readabilityMod_addDialog(null,null);
readabilityMod_addDialog("Settings", "alert('not yet implimented');");
It'll look pixel-perfect with the standard Kindle menus in Opera or FF4 (any browser with rounded corner support). Still got a lot of work to do, but it's pretty simple eh

Last edited by neftaly; 10-20-2010 at 09:06 AM.
neftaly is offline   Reply With Quote
Old 10-21-2010, 06:17 PM   #17
Polvo
Enthusiast
Polvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshes
 
Posts: 45
Karma: 14412
Join Date: Oct 2010
Location: Spain
Device: Kindle 3 - 3G
I had a quick look at the code but haven't loaded it yet. Its more complex that I expected. Why is httpd needed?
Polvo is offline   Reply With Quote
Old 10-21-2010, 07:53 PM   #18
neftaly
Junior Member
neftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with others
 
Posts: 8
Karma: 2600
Join Date: Oct 2010
Device: none
Quote:
Originally Posted by Polvo View Post
I had a quick look at the code but haven't loaded it yet. Its more complex that I expected. Why is httpd needed?
So that I can interface directly with the kindle via CGI scripts (makes writing a web-based terminal, settings editor and the included wget downloader alongside many other ideas possible). It can also be set to share content easily.
neftaly is offline   Reply With Quote
Old 10-24-2010, 06:26 AM   #19
Polvo
Enthusiast
Polvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshes
 
Posts: 45
Karma: 14412
Join Date: Oct 2010
Location: Spain
Device: Kindle 3 - 3G
OK, I installed everything. Now, when I select Article Mode I just get a blank box on the web page top left. I have checked that the busybox arm process is running.

I imagine this is a permissions issue.

What am I doing wrong?
Polvo is offline   Reply With Quote
Old 10-25-2010, 02:41 AM   #20
Polvo
Enthusiast
Polvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshes
 
Posts: 45
Karma: 14412
Join Date: Oct 2010
Location: Spain
Device: Kindle 3 - 3G
Bookmarklets

OK, I got it working and am playing around. This looks very promising. I love having the ability to fix some of the browser's shortcomings along with the use of BusyBox to control the device.

At the moment I'm trying to get a couple of bookmarklets to run but it looks like pop-up windows are not supported so I'll have to make changes.

Any idea how to get this Google Bookmark script to work?

Code:
javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("https://www.google.com/bookmarks/mark?op=edit&bkmk="+c(b.location)+"&notes=xxx&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();
I've saved it as /www/bookmarks.js and added
Code:
readabilityMod_addDialog("Bookmark", "readabilityMod_loadScript('bookmark.js');");
to /www/readabilityMod.js and its showing in the menu.
Polvo is offline   Reply With Quote
Old 10-25-2010, 03:53 AM   #21
neftaly
Junior Member
neftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with othersneftaly plays well with others
 
Posts: 8
Karma: 2600
Join Date: Oct 2010
Device: none
a=window;b=document;c=encodeURIComponent;document. location="https://www.google.com/bookmarks/mark?op=edit&bkmk="+c(b.location)+"&notes=xxx&titl e="+c(b.title);
*edit: The forum is adding spaces in the above for some reason - there shouldn't be any.

Might be a good idea to create a lightbox script with an iframe in the middle, as a "popup simulator".

Last edited by neftaly; 10-25-2010 at 03:58 AM.
neftaly is offline   Reply With Quote
Old 10-25-2010, 02:22 PM   #22
Polvo
Enthusiast
Polvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshes
 
Posts: 45
Karma: 14412
Join Date: Oct 2010
Location: Spain
Device: Kindle 3 - 3G
In the end I got it working using:

Code:
a=window;b=document;c=encodeURIComponent;document.location="https://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&notes=xxx&title="+c(b.title);
Polvo is offline   Reply With Quote
Old 11-10-2010, 03:09 PM   #23
Polvo
Enthusiast
Polvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshesPolvo can read faster than his screen refreshes
 
Posts: 45
Karma: 14412
Join Date: Oct 2010
Location: Spain
Device: Kindle 3 - 3G
I've been playing with netfaly's readability mod. Although I see the benefits of using a BusyBox server I'm not running it and am just using the modified js. I've added some bookmarkets and links to the pop-up menu and it works fine without the server running.

The Google Bookmarks booklet now works fine but the link fixer code does not work to fix links in Gmail (I use the version at https://mail.google.com/mail/mu) but still get the message about not being able to open link in a new window. Is there a way round this or is it an iframe issue?

I'd like the link fixer to auto-run on running the readability js rather than having it as a menu item. Is there any reason you wouldn't want to run it?

One last thing. Is there a way to assign an accesskey to each link in the menu? I'd like to be able to press "B" to bookmark rather than moving the pointer all the time. Does the k3 browser support accesskey? Update: It does, you have to press Alt + B not just B!

Last edited by Polvo; 11-10-2010 at 03:26 PM.
Polvo is offline   Reply With Quote
Old 02-13-2011, 10:53 AM   #24
otichy
Connoisseur
otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!
 
Posts: 82
Karma: 5072
Join Date: Nov 2010
Device: KPW
This is great, first hack I've met that actually allows me to read gmail attachments (word/pdf/excel/powerpoint) over 3G, thanks!

As Polvo noted, the linkfixer doesn't work in the standard/desktop version of Gmail, but it works in the mobile and the html versions. Unfortunately the mobile version does not have the "view as html" links and the html version is a bit more cumbersome on Kindle.

I agree with Povlo, it would be great to have the linkfixer as default, I see no reason why I wouldn't like to open a link when I click it.

Also, it would be great to have this as a simple update in a bin with httpd autostarting.

(btw the downloader didn't work at all form me, but I don't really need it)
otichy is offline   Reply With Quote
Old 03-02-2011, 08:37 PM   #25
otichy
Connoisseur
otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!otichy , Klaatu Barada Niktu!
 
Posts: 82
Karma: 5072
Join Date: Nov 2010
Device: KPW
Any idea why this neftaly's script works when I am connected over wifi, but not over 3G? Over 3g it behaves as if the httpd was not running (an empty small white frame appears in lefthand conrenr when switched to article mode).
otichy is offline   Reply With Quote
Old 07-10-2011, 02:18 PM   #26
z0mtec
Member
z0mtec began at the beginning.
 
z0mtec's Avatar
 
Posts: 16
Karma: 20
Join Date: Jun 2011
Device: Kindle PW 2
Quote:
Originally Posted by jetfin View Post
Just a quick update:

Although this hack does what was most important to me (changing default google and wikipedia searches *from* the home screen), when the web browser is running and you do a search through the URL text box, both google and wikipedia go to the regular website...

This means there must be another separate browser setting for this somewhere...
Have u find it?
z0mtec is offline   Reply With Quote
Old 07-17-2011, 08:17 AM   #27
z0mtec
Member
z0mtec began at the beginning.
 
z0mtec's Avatar
 
Posts: 16
Karma: 20
Join Date: Jun 2011
Device: Kindle PW 2
? ?
z0mtec is offline   Reply With Quote
Old 10-24-2011, 01:50 PM   #28
Kindle456
Junior Member
Kindle456 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
Seems like the link fo readability mod http://kindlebru.com/apps/readabilitymod-0.1.zip is dead. Does anyone have an idea, where to get it?
Kindle456 is offline   Reply With Quote
Old 10-24-2011, 02:30 PM   #29
z0mtec
Member
z0mtec began at the beginning.
 
z0mtec's Avatar
 
Posts: 16
Karma: 20
Join Date: Jun 2011
Device: Kindle PW 2
Smile

Download it her

readabilitymod-0.1.zip

Last edited by z0mtec; 02-28-2013 at 11:18 AM.
z0mtec is offline   Reply With Quote
Old 11-12-2011, 06:48 AM   #30
preve
Junior Member
preve began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2011
Device: Amazon Kindle Keyboard
Hi,
I'm an Italian dummy...... I've got a question. I read through all this discussion, but this point wasn't clear to me:
When I'm reading a text, the automatic search in the text directs me to en.wikipedia.org. I want the direct search with it.wikipedia.org
How and where can I change the settings?
thank you very much
preve is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
change default fonts p3aul Sigil 3 10-18-2009 07:14 PM
Google CEO Sees No Alternatives to Google Book Search sforce News 44 09-23-2009 02:52 PM
How do I change the default folder? johnwhelan Calibre 2 08-07-2009 11:50 AM
Google Book Search to search full-text books online Bob Russell Deals and Resources (No Self-Promotion or Affiliate Links) 1 08-19-2006 12:13 PM
Google Print becomes Google Book Search Alexander Turcic News 0 11-20-2005 09:22 AM


All times are GMT -4. The time now is 06:31 PM.


MobileRead.com is a privately owned, operated and funded community.