Okay, Julien has released the official fix only three hours after this post! So ignore my solution below (in fact I will remove the full code) and get over to the script’s home page for the fix.
As you may know from my Google Reader Print Button hack, I’m a big fan of the Google Reader Print Button greasemonkey script. I use it quite often to print feed entries to a format I can use on my PDA (which has no connectivity).
Now, an update to Google Reader has broken the script. I reported this at the script’s home page, but rather than waiting for the fix, I went ahead and fixed it myself. I need that Print Button! Here’s my fix.
Changes To Make The Script Work With Google Reader Update
In order to fix the script, I needed to fix a couple of items. First, I changed the name of several classes referenced, as follows:
- Line 26: I changed chrome-stream-title to stream-folder-chooser.
- Line 39: I changed chrome-footer-container to viewer-footer.
I also changed the printButton.innerHTML assignments on line 47 and 54 to use the new HTML that the Updated Google Reader uses.
For the Print button on line 47, I changed:
printButton.innerHTML ='<tbody><tr><td class="btl"></td><td class="btr"></td></tr><tr><td class="bbl"></td><td class="bbr"><div class="button-body-container"><span class="button-body unselectable">Print</span></div></td></tr></tbody>';
printButton.innerHTML ='<div role="wairole:button" tabindex="0" class="goog-button goog-button-base unselectable goog-inline-block goog-button-float-left goog-button-tight" id="entries-down"><div class="goog-button-base-outer-box goog-inline-block"><div class="goog-button-base-inner-box goog-inline-block"><div class="goog-button-base-pos"><div class="goog-button-base-top-shadow"> </div><div class="goog-button-base-content"><div class="goog-button-body"><div class="text">Print</div><div class="arrow"></div></div></div></div></div></div></div>';
I made a similar change for Print All on line 54.
The Full Code – Fixed Version Of The Script
I’ve now removed the full code for the fix, as the official script has now been updated. Go get it at the Google Reader Print Button script’s home page.
Hacking The Script
Here are the steps to fix the script (assuming you have installed the script):
- Right-Click on the Greasemonkey icon in Firefox
- Click Manage User Scripts and a dialog box will open
- Select Google Reader Print Button from the list
- Click the Edit button (at the bottom of the dialog box)
- If asked for the location of a text editor, find one on your hard drive (if you use Notepad, start by looking for C:\Windows\Notepad.exe)
- Copy and Paste the entire script from The Full Code section above
- Save, Close and click Okay
- Refresh (F5) Google Reader to make sure the changes are loaded
If you want to return the script to its default behaviour, go to the Google Reader Print Button script’s official home page and re-install the script.
The Final Word
I fixed this because I need the Google Reader Print Button script. I hope it helps someone else, but I see this as a short term solution until the official fix comes. Make sure you keep an eye on the official home page.