User scripts for IBList and IBDoF

This is the place for OT discussions of your favorite movies, TV shows, music, cultural trends and fads, or other non-literature-related topics.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

User scripts for IBList and IBDoF

Post by gollum »

For background on what userscripts are - see the next post.

For browser installation instructions see Firefox, IE7, Opera, Safari


I have written a few Greasemonkey user scripts[or userscripts] that modify and/or add functionality to the IBDoF & IBList sites. My original goal was to create helpers for "Data Editors" of either site, and these have been available in a DE restricted forum for a short while. Lately I have added at least one general purpose script that together with some of existing scripts may be of interest to a wider range of members...

My scripts...gollum's scripts can be found on my user page at Not Site Specific

{Image Amazon Book Reader} {Image Amazon Book Reader} View/Save book images from inside Amazon's Book Reader
**X-browser FF, IE7, Opera


{Image AmazonBookCover} {Image AmazonBookCover} Convert book cover thumbnails to full-size images.
**New 2008-03-27: X-browser FF, IE7, Opera **Update 2008-04-04: Now handles customer cover images
**minor update 2008-04-15: Add extra url include to handle jump links from other sites



IBList

{Image ibl list_sort} {Image IBList list_sort} Sort authors data alphabetically


{Image ibl_searchSort} {Image IBList search_sort} An attempt to add some sort options to the crazy world that is IBList search
**Updated 2008-01-30: NOW WORKS :oops: - Uploaded copy was "an print-only [html escape'd] version" & would NOT!! have worked without errors (and no complaints - huh??)


{Image amazon2wem} {Image IBList amazon2wem} DE's only. Copy|Paste Amazon book info into IBL Manifest data-entry
**Updated 2008-01-29: Fixed regex bug r.e. published month matching would fail under some conditions
**Updated 2008-03-09: Now defaults to ISBN-13 if present **Updated 2008-03-11: Bugfix - date capture re-written
**Updated 2008-03-22 ISBN-13 wasn't being reset on new page load - fixed **Updated 2008-03-23 Found another trap for regex month extract, fixed - again!
**Updated 2008-04-15 Added extra test in publisher name match-up **Updated 2008-04-28 Bugfix - Dimensions copy/paste
**Updated 2008-05-05 Update - Improved publisher name matching **Updated 2008-08-08 Update - Amended to work with amazons changed page internals
**Updated 2008-08-10 Update - Amended to correct overly aggressive page checking



{Image ibl_ref} {Image IBList dbref} Displays the IBL ref# alongside the entry
**Updated 2008-05-05 Update - Added display of #ID's for Edition & Manifestations


{Image iblist search4data} {Image IBList search4data} Enter a Author/Series-Name or Book-Title & press 'Enter' or click nav link for list of "starting with" results.
**NEW 2008-01-29 **2008-01-30 Update: Now cross-browser - tested in FF & IE7. Also added input size change when in focus
**2008-02-13 Update: Tested in Opera + Corrected potential code brace bug
**2008-06-23 Update: Fix for FF3, increase font-size


{Image IBList xISBN} On any "bookxxx.htm" page, find xisbn's. Search sites for isbn info.
**NEW 2008-03-08 currently FF only. **MAJOR upgrade 2008-03-17 **Update 2008-03-21 more meta-info, backuped isbn check
**Update 2008-04-15 isbn-10's - adjust to ISBN-13 in xisbn list; Always include backuped isbns; Cache isbn search results
**Updated 2008-05-06 Updates+Bugfixes - Added Amazon page scraper


{Image IBList compact M entry} A compact version of the data-entry form add||edit manifestation - see the essentials without scrolling!
**NEW 2008-04-28 currently FF only.
**2008-06-23 Update: Fix for FF3, temp fix for strange layout problem


{Image IBList simpleWEM} A compact version of Add new book to author (WEM Initial Record) - enter the essentials without scrolling!
**NEW 2008-05-20 currently FF only., **2008-12-02 Update: added "Place of Publication" to form.



IBDoF

{Image ibdof newposts filter} {Image IBDoF search_exclude-forum} Kvetch's sanity preserver - reject forum from "View posts since last visit" results.
**2008-02-11 Update: now Opera - PLUS select a forum on-the-fly auto-saves selection (cookie in Opera)
**2008-06-23 Update: Fix for FF3 security warning


{Image ibdof authors_series search} {Image ibdof authors_series search} Enter a search term & press 'Enter' for (list of) author/series
**NEW 2008-02-13 **2008-02-16 bugfix fixes an IE reloading problem when used with IBDoF sortable


{Image ibdof sortable} {Image ibdof sortable} Sort an Authors booklist||Series booklist||Serieslist. Click the button to make the table sortable. Click any header to sort up||down. (Useful to a Linkdev data editor ?? )


{Image IBDoF openInTabs} {Image IBDoF openInTabs} Choose a forum - or all - newposts||dailyposts and open them in tabs.
Oh, this one's not for Opera users, :( can't find a way to open a url in a tab in Opera using JS (don't think it's possible - dependant on browser configuration).
**2008-06-23 Update: Fix for FF3, select box background may show wrong colour


{Image Unpaginate phpbbV2 threads} "endless" forum pages
**NEED TO ALSO INSTALL {Image Unpaginate pagination microformated web pages}




Some resource links:
Last edited by gollum on Tue Dec 02, 2008 6:31 am, edited 28 times in total.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

Some backgound...
For the uninitiated, User scripts [or userscripts] are text files containing javascript commands to alter the view or functionality of a web page/site. One might wish to add extra links to a page, or hide certain sections that aren't relevant, or change the layout to be more efficient for your browsing habits. Or, at its simplest you might like to change the colour scheme (or fonts/size) to something easier on the eye.

Userscripts became popular when an extension called Greasemonkey became available for the Firefox browser. Similar tools (or enabling methods) have since been developed for other browsers that allow most Greasemonkey scripts to be run with little or no modification.

Greasemonkey scripts can be recognised by their header information. e.g.

// ==UserScript==
// @name ibdof search_exclude-forum
// @namespace http://www.ibdof.com/
// @description When executing "View posts since last visit", exclude the nominated forum from the 'newposts' results
// @include http://www.ibdof.com/*
// ==/UserScript==

The above metadata specifies
  • @name - the name displayed in Greasemonkey menus [not necessarily the name you gave the script when saved!]
  • @namespace - not required though can used as a disambiguation signature.
  • @description - obvious really!
  • @include - the web page/s or site where this script becomes active (some scripts can have many of these to specify more than one page address.)
Warning!
Like most things to do with the web, there will always be some small risk in blindly downloading or installing scripts. Some spammers have found creative methods to hid their true purpose, other authors have attempted to steal(monitor) cookies created for a secure site. The best tip I can give for avoiding these potential (and thankfully small in number) risks is to only install scripts from sources/authors you trust. While repository sites such as Userscripts.org allow any script to be uploaded & downloaded, harmfull scripts are quickly discovered by other authors and deleted by the sysop. When downloading from these types of repository sites look to see how long the author has been active and if they have other scripts - the typical spammer/hijacker is a fly-by-night poster. If in doubt, post the script url to a forum and ask others to confirm the script as safe. A short discussion on the us.o forum on this topic
Last edited by gollum on Thu Jan 24, 2008 7:47 am, edited 1 time in total.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Firefox browser

Post by gollum »

Image Firefox
Install the Greasemonkey extension. Go to https://addons.mozilla.org/en-US/firefox/addon/748 and select Install Now. Restart Firefox.
You can confirm this by selecting from the menu ||Tools||Add-ons and checking that Greasemonkey is included in the list of installed extensions. Also, the obvious indicator --- a coloured monkey-face should be visible in the statusbar. If the face is monochrome click it to activate.

Install scripts:
Assuming your getting a script from Userscripts.org, clicking on a script name takes you to that scripts page, read the notes (if any) and/or select View scripts source, select Install this script.

Verifying script installation
  1. Right-click the monkey-face, select menu option ||Manage User Scripts...|| the script you just installed should appear in the left-side window, click 'Cancel'.
  2. Go to the web page (or site) specified by the @include and right-click the monkey-face ... in the pop-up you should see (above the menu options) the script name you installed - with an enabled tick alongside it. [If not ticked then the script has been temporarily disabled - click again to activate it]
Last edited by gollum on Mon Feb 11, 2008 6:31 am, edited 2 times in total.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

IE7 browser

Post by gollum »

Image IE7
Install the IE7Pro extension. Download the extension from http://www.ie7pro.com/ and install it - usually to /Program Files/IE7Pro/

Your userscripts, and any others you may download, must be named as xxxxxx.ieuser.js and these scripts go in the /Program Files/IE7Pro/userscripts/ directory.

Install scripts:
There is a dedicated userscripts repository for IE at http://iescripts.org/index.php, not a great deal to choose from yet, but it's early days! Click on a scripts name and select Install Script
** 2008-01-30: Most of my FF scripts now have duplicates on gollum's IE7scripts user page (see 1st post for links) - makes it easier for you to install scripts.

OR
If your using a script from Userscripts.org, clicking on a script name takes you to that scripts page, read the notes (if any) and select View scripts source, copy the source and paste it into a text editor. Save the file as xxxxxx.ieuser.js into your userscripts directory [/Program Files/IE7Pro/userscripts/].
Last edited by gollum on Mon Feb 11, 2008 6:32 am, edited 3 times in total.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Opera browser

Post by gollum »

Image Opera
Browser configuration. Create an directory somewhere - mine is called OperaJS under My Documents.
Start Opera and select...Tools > Preferences > Advanced > Content > Javascript options... Select the directory you just created.

Script installation:
If your using a script from Userscripts.org, clicking on a script name takes you to that scripts page, read the notes (if any) and select View scripts source, copy the source and paste it into a text editor. Save the file as xxxxxx.user.js into the above directory [/My Documents/OperaJS ??].
Last edited by gollum on Mon Feb 11, 2008 6:32 am, edited 1 time in total.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Safari browser

Post by gollum »

Image Safari
Greasekit & script installation: Under consruction - not being conversant with mac's this may be hit and miss until I get some feedback from mac users.
Last edited by gollum on Mon Feb 11, 2008 6:33 am, edited 2 times in total.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

Naturally I appreciate any feedback (have I screwed-up any install instructions? are they too vague?) or do you have ideas for scripts that you feel might be useful.

--Greg
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

See first post for additions & changes - added (direct) install links for IE7 users + link to my iescripts user page ... PLUS

**Updated scripts**
ibl_searchSort - now works (somehow I uploaded the 'print" version :oops: )
amazon2wem - published-month regex matching too greedy at times ... fixed.


**New script**
{Image iblist search4data} {Image IBList search4data} Image Enter a search term & press 'Enter' or click nav link for list of "starting with" results.
Last edited by gollum on Mon Feb 11, 2008 6:30 am, edited 1 time in total.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

**Updated scripts**

ibdof search_exclude-forum - a few refinements
  • tested in FF, IE7, & Opera
  • select/drop a forum by clicking a trashcan (no need to edit the script now to change forum filter)
  • auto-saves the selected forum between sessions (cookie in Opera)
Image
felonius
Circumlocutus of Borg
Posts: 1980
Joined: Sat Mar 20, 2004 12:47 pm

Post by felonius »

Kvetch/Gollum:

thank you thank you thank you thank you thank you thank you thank you.

Jane Lindskold can now DIE. :lol:
Colourless green ideas sleep furiously
User avatar
laurie
Spelling Mistress
Posts: 8164
Joined: Sat Jul 17, 2004 2:52 am
Location: The part of New York where "flurries" means 2 feet of snow to shovel

Post by laurie »

felonius wrote:Kvetch/Gollum:

thank you thank you thank you thank you thank you thank you thank you.

Jane Lindskold can now DIE. :lol:

Beware, Felonius -- her wolves have sharp teeth! :wink:
"It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife." -- Jane Austen, Pride and Prejudice

"So where the hell is he?" -- Laurie
felonius
Circumlocutus of Borg
Posts: 1980
Joined: Sat Mar 20, 2004 12:47 pm

Post by felonius »

You're right, laurie. I didn't mean to say she's a bad writer, I just don't read her personally. But she's certainly popular among some members here! :)
Colourless green ideas sleep furiously
felonius
Circumlocutus of Borg
Posts: 1980
Joined: Sat Mar 20, 2004 12:47 pm

Re: Safari browser

Post by felonius »

gollum wrote:Image Safari
Greasekit & script installation: Under consruction - not being conversant with mac's this may be hit and miss until I get some feedback from mac users.
What sort of feedback do you need?
Colourless green ideas sleep furiously
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Re: Safari browser

Post by gollum »

felonius wrote:
gollum wrote:Image Safari
Greasekit & script installation: Under consruction - not being conversant with mac's this may be hit and miss until I get some feedback from mac users.
What sort of feedback do you need?
Well I know from this site Simple Help what steps are required to setup a userscript environment on a Mac, but I don't personally know anyone who has done so.

...Do you? Success?

And I would dearly like to know if any/none of my scripts work for a Safari(Mac) user. There are probably javascript/Greasemonkey compatibility issues. Issues which could/should be solvable if I can get a handle on what doesn't work.

And, search as I might I can't find any info on user scripts for the windows version of Safari - can only assume - from the lack of search returns - that it's not possible?

If you can help with any of the above ....

--Greg
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

See first post for additions & changes

**Updated scripts**

IBList search4data - bugfix - missed {brace wrapping} a block of code :oops:

**New script**
{Image ibdof authors_series search} {Image ibdof authors_series search} Image Enter a search term & press 'Enter' for (list of) author/series
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

See first post for additions & changes

**Updated scripts**

IBDoF author_series search - bugfix - stop IE from re-loading when used in conjunction with (New Script) IBDoF sortable

**New script**
{Image ibdof sortable} {Image ibdof sortable}
Normal View
Image

Now Sortable
Image

Probably more applicable to Linkdev data editors. Sort an Authors booklist||series booklist||serieslist. Click the button to make the table sortable. Click a header to sort up||down.


**New script**
One of my favourite scripts 8)
Scenario: Click "View posts since last visit" Scroll the listing and ctrl-click on each image thingy - boring & tedious, and what's more you do it every time *sheesh*
Oh, this one's not for Opera users, :( can't find a way to open a url in a tab in Opera using JS (don't think it's possible - dependant on browser configuration).

{Image IBDoF openInTabs} {Image IBDoF openInTabs} Image Choose a forum - or all - newposts||dailyposts and open them in tabs.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

See first post for additions & changes

EDIT: This script has been updated - viewtopic.php?p=1843951#1843951

**New script**
{Image IBList xISBN}Image

Probably more applicable to Linkdev data editors.
On any "bookxxx.htm" page, find xisbn's using rss from "labs.oclc.org". Display the found xisbns as a list. Make any unique isbn [double] click'able - currently searches only Amazon. This script (while stable) is still in development.

Currently only for Firefox. :(
X-browser version is in the works.

Suggestions for sites to search using the new ISBN's ?
Last edited by gollum on Mon Mar 17, 2008 4:59 am, edited 2 times in total.
User avatar
tollbaby
anything but this ...
Posts: 6827
Joined: Sun Mar 09, 2003 11:03 am
Location: Ottawa, Ontario
Contact:

Post by tollbaby »

I don't know if this one would bring us accurate results or not, but it seems good: http://www.isbn.nu/.

AWESOME script, Greg.... I really do have to sit down at some point when you're online to get you to show me how to work this LOL (at which point I'll likely learn that it's not nearly as complicated as I've convinced myself it is).
And what manner of jackassery must we put up with today? ~ Danae, Non Sequitur
User avatar
tollbaby
anything but this ...
Posts: 6827
Joined: Sun Mar 09, 2003 11:03 am
Location: Ottawa, Ontario
Contact:

Post by tollbaby »

Okay.... Greg, YOU, my friend are made of pure, unadulterated 100% AWESOME!!!!!! Thank you thank you thank you!!!! :D
And what manner of jackassery must we put up with today? ~ Danae, Non Sequitur
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

Image :thumb:
Last edited by gollum on Sun Mar 09, 2008 3:47 am, edited 1 time in total.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

See first post for additions & changes

**Updated scripts**

Amazon2wem - if ISBN-13 is present make default, otherwise fall-back to ISBN-10.


BOOKMARKLETS

Here's a couple that might be useful(?)
  • Browsing the 'net and found a book you might like? ... want to check Amazon?
    Highlight the Title||Author||ISBN and "click" on the bookmarklet.
    • Create a bookmark with a name something like Amazon lookup
    • Copy the following into the location box
    javascript:(function() {s=(document.selection) ? document.selection.createRange().text : window.getSelection();if(!s){void(s=prompt('If ISBN (no dashes!)',''))}if(s){window.open('http://www.amazon.com/s/?url=search-ali ... +escape(s));}})();
  • Again, browsing a book site and want see if IBList has the Title in the database?
    Highlight the Title and "click" on the bookmarklet. Remember don't include The... or A...
    • Create a bookmark with a name something like IBL title
    • Copy the following into the location box
    javascript:(function(){s=(document.selection) ? document.selection.createRange().text : window.getSelection();if(!s){void(s=prompt('Book Title... (no "THE ..." or "A ..."!)',''))}if(s){window.open('http://www.iblist.com/list.php?type=boo ... +escape(s));}})();
User avatar
tollbaby
anything but this ...
Posts: 6827
Joined: Sun Mar 09, 2003 11:03 am
Location: Ottawa, Ontario
Contact:

Post by tollbaby »

Thanks for the fix to the Amazon2WEM one! :D
And what manner of jackassery must we put up with today? ~ Danae, Non Sequitur
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

See first post for additions & changes

**Updated scripts**

Amazon2wem - Bugfix
  • If published date had missing day (on amazon) then date copy/paste failed. Fixed.
  • International dates (amazon.uk) not being handled properly (thanks Tollbaby). Fixed.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

See first post for additions & changes

**Updated Script**

IBList xISBN - Major Upgrade, search-site selection, WorldCat links, etc.

Click the above link to see full description and screenshots.
User avatar
gollum
Coveter of the Ring
Posts: 1817
Joined: Fri Jun 10, 2005 1:21 am
Location: Australia
Contact:

Post by gollum »

See first post for additions & changes

**Updated Script**

IBList xISBN - Yet another update to this script...
  • If no editions yet AND there exists Backuped ISBNs - use them.
  • Get more meta-info - form type (audio, e-book)
  • Make sure all currently entered - or backuped - isbns are included in our worldcat xisbn results**
**IBList has the advantage over WorldCat when classifying works as identical. On WorlCat, for instance... Acorna's People is a separate entry to Acorna's People : the further adventures of the unicorn girl
The effect is...using either as a seed ISBN to wcat xisbn returns a set of isbns restricted to editions entered under that title.



P.S. Oops .... I didn't mention when posting the previous update - this script also has an "auto-update" feature. It will occasionally check if a newer version exists on us.o and ask if you wish to upgrade. You can perform a 'Manual Update Check' by opening 'User Script Commands' in the GM menu.
Post Reply

Return to “The Margins”