February 20, 2008

Scribd iPaper Bookmarklets and Greasemonkey Script

One of the neat features about the Scribd iPaper platform is the way it provides you QuickSwitch, a single javascript include that, when added to a page, will convert all the document links to embedded, or online viewable, versions of the document.

So you can get a feel for what this may be like in practice, I've put together a couple of demo bookmarklets. One will convert all the document links to links through to a page that will display the document using iPaper; the other will embed all the documents contained in the page within the page using iPaper.

To use the bookmarklets, drag them on to your bookmarks toolbar (Firefox/Flock - I'm not sure what the process is with IE nowadays?) and then click one of them, when your on a likely suspect page (e.g. try this page from MIT OpenCourseware: Continuity).

- iPaper this (link) bookmarklet: converts document download links to iPaper viewer links; (really, this should optionally open in a lightbox, maybe with the option to open in a new window from there?)

- iPaper this (embed) bookmarklet: scans the page for document links and replaces them with the embedded version of each document.

[UPDATE: I've had a comment from Scribd pointing out that whenever anyone uses the bookmarklets, the files get uploaded to my Scribd account. So the above bookmarklets will now only work if you drag them on to your toolbar and then edit them to replace YOUR_PUB-ID with your own Scribd publisher ID (available from Scribd Platform (it's free...;-).

LATEST NEWS - chatting with the Scribd folks again, I've sacrificed my original Scribd account so that the bookmarklet can be re-released with a publisher code embedded - so it should work for anyone, out of the can. The publisher code is the same one I originally used, so any bookmarklets out there should continue to work. Apologies to the few hundred people who's docs I deleted from the account a couple of days ago...

So.... if you want to keep a safely bookmarked copy of the documents you're viewing in iPaper, you should get your own iPaper publisher ID and create your own, personalised bookmarklet. To generate your own custom bookmarklets painlessly, I've created a bookmarklet generator: iPaper bookmarklet generator utility. Provide your Scribd Platform publisher ID and it will generate your own bookmarklets for you... To anyone who used the original bookmarklet: you may find the files have disappeared, because I've deleted them...sorry about that... (Scribd folks - any chance of resetting my pub-id, and you taking over the original one? ;-)]

What could be easier? ;-)

PS you should change the publisher-id in the bookmarklet to your own publisher id - you can get one for free from the scribd developer site. Use this: iPaper bookmarklet generator utility.

PPS a couple of people requested a Greasemonkey script based on the bookmarklets. I'm not convinced the embed bookmarklet is appropriate for a GM script, but the linkifier one is.... so for those who asked, here's a iPaper linkifier Greasmonkey script. If you install this script, it will convert all document links in a page to 'view in iPaper' links. As a default, the script is set up to only run on http://ocw.mit.edu/OcwWeb/* . If you want the script to run on all pages, go to the Greasemonkey 'Manage User Scripts' menu item (browser Tools menu, I think?), select the Scribd iPaper linkify script and then add http://* to the allowed sites. (It may also be worth adding https://* to the disallowed sites... And remember, all docs viewed with the script will be uploaded to an account I have access to on Scribd... If you want the docs to be uploaded to your account, you will need to edit the Greasemonkey script to replace my pub-id with yours...

Posted by ajh59 at February 20, 2008 11:23 AM
Comments

Finished a marking batch, so I had a play. Is there a file size limit here. I tried it on the AQA site to scan through past papers, but it failed for every one.
:-(

Posted by: Kate at February 20, 2008 12:31 PM

Hmmm - not sure about the that; I guess the only thing to do is use the link bookmarklet, then if it doesn't convert at least you can link through to the original pdf?

Maybe worth mailing scribd and giving them the heads up?

Or maybe my script doesn't work properly on sites where I haven't declared the site URL as one I want to use my scribd a/c on?

(To get the code you need to register; and inthe setup you declare URLs you want the converter to work with; i didnlt declare MIT open courseware site though, and that seemed to work okay?)

I wonder if licensing metadata might play a role, now or in the future? e.g. like robots.txt on a site can be used to stop well behaved search engines trawling a site, maybe rights info could stop scribd displaying a page.

I didn't check the aqa aite to see if the links to the PDFs were declared as nofollow? Scribd might respect that too, and not upload/convert/render nofollow linked docuuments?

Posted by: Tony Hirst at February 20, 2008 01:12 PM

You might want to be careful about publishing bookmarklets with your Scribd API publisher ID. This way, anyone can upload documents as you, which could lead to some potential problems.

People should sign up for their *own* Scribd API ID (it's free), and then paste that into the bookmarklet in place of yours.

Posted by: Jason Bentley at February 20, 2008 07:38 PM

I tried your example of http://ocw.mit.edu/OcwWeb/hs/calculus/a/1/1.htm and simply obtained Unable to load document - Unable to reach provided URL, and I have my own Pub ID.

Posted by: Jack Yensen at February 20, 2008 11:25 PM

I was just reading about scribd and iPaper in G reader and wondering how it would work inside an LMS. I'll have to try it inside of Blackboard. Thanks for the bookmarklet.

BTW, any chance of adding the comment link to your single-post template?

Posted by: todd at February 21, 2008 12:53 AM

I can't get it to work either .. I've tried on the site that I added as my URL in the list of sites, and i@ve tried with & without the "pub" at the start of the publisher number.

By the way, I agree with Todd about the lack of comment field in a single post view.

Posted by: Emma at February 22, 2008 01:35 PM

The bookmarklet has been rolled back to a version that includes a publisher ID, so the ones currently on the page should work out of the can.

If you edit the bookmarklet to add your own pub-id, you need to be careful that the backslashes that escape the various quote marks aren't deleted.

if you use the bookmarklet generatr, it should work?

If you have any more prblems, mail me a copy of the broken bookmarklet and i'll have a look at it.

As far as comments go - this is a v old blog engine and I don't have permissions to install extensions. Disabling page level comments was the only way i could manage spam...

I really should move the blog, but that would take time i donlt have...

tony

Posted by: Tony Hirst at February 22, 2008 02:57 PM