Archive for the 'User Scripts' Category

Endless Forum Pages user script

Monday, August 29th, 2005

The Endless Forum Pages user script makes phpBB forum pages infinitely long instead of limited to 15 posts per page. It loads the next page into a hidden iframe when you scroll to near the bottom of the page, and then it moves the posts from the iframe into the main page when the iframe finishes loading. If you hate clicking the tiny "Next" link on MozillaZine Forums topic pages (example) as much as I do, please try this script.

If you use this script, it is best to scroll using pgup/pgdn. If you scroll by dragging the scrollbar, your position will jump when the page gets longer.

Using this script shouldn't affect the load on forum servers much, because it only activates when you scroll to near the bottom of the page, which indicates that you're likely to continue reading.

This script works at MozillaZine Forums and The Blue Gryphon. You can try using it with other phpBB forums using Greasemonkey's "included pages" feature. Don't expect it to work at all phpBB forums, though, because phpBB forums are often customized a lot and the script is somewhat fragile.

Greasemonkey 0.4 pre-beta

Sunday, July 17th, 2005

Aaron Boodman posted Greasemonkey 0.4, attempt III today on the Greasemonkey mailing list. It is the first version of Greasemonkey that works in Deer Park alpha 2 and Firefox trunk builds. Earlier messages describe attempt I and new features, attempt 2, and the call for pre-beta testing.

Bash.org Instant Voting user script

Wednesday, May 25th, 2005

Bash.org Instant Voting makes the vote links on bash.org submit your vote without taking you to another page. If the server accepts your vote, the script shows the item's new score, assuming nobody else has voted on the item since you loaded the page.

AutoLink filters

Tuesday, May 24th, 2005

If you've made new AutoLink filters, please post them in comments wrapped in <pre> or post them in your blog and use trackback. Feel free to request filters, too.

For tutorials and references on using regular expressions in JavaScript, see http://del.icio.us/jesser/regexp+javascript.

Tips for testing filters:

  • Use the Edit button in Greasemonkey 0.3.3+. As soon as you save your changes in your text editor, they will apply the next time you load or reload a page.
  • Create a test page similar to autolink-test.html. Then you can test each change by saving autolink.user.js in your text editor and reloading the test page.
  • Use Thomas Russell's regular expression tool or the JavaScript Environment to test your regular expressions.

AutoLink user script

Sunday, May 22nd, 2005

AutoLink turns plain text URLs, email addresses, bug numbers, ISBNs, and US phone numbers into links. For example, it turns all of these into links:

  • http://www.squarefree.com/userscripts/
  • jruderman@gmail.com
  • Bug 162020
  • Bug 162020 comment 0
  • ISBN 0-340-82899-4
  • (555) 555-5555

You can add new filters if you know how to use JavaScript regular expressions. Here is an example filter, rewrapped to fit in my blog:

  {
    name: "Bug number",
    regexp: /bug \#?(\d+)/ig,
    href: function(match) {
      return
        "https://bugzilla.mozilla.org/show_bug.cgi?id=" + 
          match[1];
    }
  }

To install a user script into Firefox, install Greasemonkey, restart Firefox, open the user script, and select "Install User Script..." from the Tools menu.

Bookmarklets to User Scripts

Monday, May 16th, 2005

Bookmarklets to User Scripts is a Greasemonkey script that lets you turn any bookmarklet into a Greasemonkey script. The bookmarklet will then run every time a page in the included-sites list is loaded. If you find yourself using certain bookmarklets every time you go to certain pages, this script is for you.

New version of JavaScript Environment

Monday, May 16th, 2005

JavaScript Development Environment 2.0 can run as a bookmarklet and lets you create Greasemonkey scripts in four clicks. I used it to make the Valid XHTML Greasemonkey script and I loved the shortened edit-test cycle.

Valid XHTML user script

Monday, May 16th, 2005

The Valid XHTML user script is an adaptation of the blogidate XML well-formedness bookmarklet. It shows a line of text under each textarea indicating whether the text is well-formed XHTML. When the text is not well-formed XHTML, it displays Gecko's error message and gives you a link that selects the location of the error in the textarea. When the text is well-formed XHTML, it displays links that let you check whether the XHTML is valid in addition to being well-formed.

By default, it only runs on admin posting pages for Movable Type and WordPress and on archive pages for Simon Willison's blog. You can use Greasemonkey's interface to make it run on the sites on which you edit XHTML.

Screenshots

Demo for Firefox and other Gecko browsers