Suggested tweaks
![]() ![]() |
I tweaked the script to take out 'dq' and 'q' parameters on the URL as these are text searches the user might have made and the citation itself should really be just to the book not a search within it. I also filtered 'client' as this is the user browser, again not relevant for a citation. The page links look rather large to me, so I added "buttons" to the add_link text and link.style.textDecoration = 'none' to the add_link function to make these a little easier on the eye. Whilst at it I also added a "trim" button to drop the word cloud, google maps and other optional guff, and move the useful 'more information' to the top rather than botton. It should be noted that the citation link fails for books with multi-line titles. I fixed this in my version, taking the first childNode gives the right title. A good practice I also suggest not using alert(), instead I have the citation button insert a neat framed box with the citation text above the Summary Content. This is easier to copy and avoids having to clear an alert prompt. |
![]() ![]() |
Cool, thanks! This was just something I hurriedly put together one day when I looking for a lot of books; glad that someone else finds it useful enough to improve it. :-)
Indeed I was aware that the links and the alert() boxes were ugly and clumsy, but I got used to it before I could get annoyed enough to improve it — your "tweaks" (more like a great rewrite!) are amazing. Ah, the pleasures of Free/open-source software :-) The dq and q parameters were intentionally kept, actually. When adding a citation on Wikipedia to something that is in some obscure paragraph on a page, I like to use a link that highlights some words from the paragraph; think of it as a bit more helpful detail than page numbers. Still, I'll probably soon abandon this script and start using your version instead. :-) |

