Greasemonkey script to automatically click the “more…” link on Goodreads

It bugs me when web sites make me click a “more…” link to see the last line of 6 lines of text. Apparently it bugs me enough to figure out the Greasemonkey script to automatically click the more button on Goodreads.

// ==UserScript== 
// @name Goodreads Cleaner
// @namespace http://scripts.tenbergen.ca
// @description click the "more" button on goodreads pages
// @include https://www.goodreads.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// ==/UserScript==


console.log('Overdrive AutoExpander Greasemonkey script is being applied');
//--- find "...more" link; the contains() text is case-sensitive.
var TargetLink = $("a:contains('...more')")

if (TargetLink.length) {
console.log('clicking "more..." button')
TargetLink.click()
}
console.log('Overdrive AutoExpander Greasemonkey script is finished');

Leave a Reply

Your email address will not be published. Required fields are marked *