36 Responses to “Google Reader Update Breaks Google Reader Print Button Script”

This page contains comments from the Google Reader Update Breaks Google Reader Print Button Script article.

  1. Looks like somebody’s on the ball today:), actually 2 days ago as it is now the 7th over here.

  2. Trey says:

    I tried the updated script from the home page and the Print button is still not showing up for me.

    Is it still working for you? I need this working again!

    -Trey

    • Hi Trey,

      I just tried it again and it definitely works for me.

      I guess you could try right-clicking the Greasemonkey icon, choosing Manage User Scripts, and uninstalling the Google Reader Print Button Script, then trying to install it again from the home page.

      Also, you could try clearing your browser cache (Ctrl+F5 in Firefox).

  3. Trey says:

    I know where the problem is occurring, but I still don’t know why.
    the linksContainer is NULL even though I can find that element after the page loads.
    Could it be a timing issue where the initializePrintButtons() is called before the
    linksContainer is loaded?

    var linksContainer = document.getElementById(‘viewer-footer’);

    if (!linksContainer) {
    GM_log(‘No Container’);

    return;
    }

  4. Trey says:

    I have confirmed the problem is a race condition like I described above.
    I think you will only see it if you have a lot of feeds to load. Firefox allows the greasemonkey script to execute before Google Reader is finished loading the ‘viewer-footer’ element, and this causes the linksContainer to be null.

    I was able to workaround this by changing the initializePrintButtons to an anonymous function and setting the delay period to 6 seconds, so that the page has time to finish loading. This is a very simple change. Examples are here -> http://diveintogreasemonkey.org/helloworld/code.html

    window.setTimeout(function(){
    var linksContainer = document.getElementById(‘viewer-footer’);

    if (!linksContainer) {
    GM_log(‘!linksContainer’);

    return;
    }
    printButton = document.createElement(‘div’);
    printButton.addEventListener(“click”, function() { greaderPrint(document.getElementById(‘current-entry’)) }, false);

    printButton.innerHTML =’ Print’;

    linksContainer.appendChild(printButton);

    printButton2 = document.createElement(‘div’);
    printButton2.addEventListener(“click”, function() { greaderPrint(document.getElementById(‘entries’)) }, false);
    printButton2.innerHTML =’ Print All’;
    linksContainer.appendChild(printButton2); }, 6000);

    • Hi Trey,

      Thanks for this great information! I didn’t even realise that this could be a problem. It may be worth copying this comment over to the script’s official home page so the author can see this and consider it for future versions.

      It’s also given me some food for thought, as I’m planning some greasemonkey scripts myself… Thanks!

  5. Cecilia Howks@bless you says:

    Hey! I’ve cheked it yesterday, It worked! Thanks a lot, I’ll use it in my work.
    You have a nice blog. May I visit you oftener?
    Cecilia

  6. oooh weee! your a genius to be able to fix it and able to share it.. the script is working perfectly.. thanks!!!

  7. Nice of you to set up a script…
    They got it fixed within three hours of you posting?
    Guess that’s why Google is Google.

  8. @mira,
    the power of journalism and word of mouth is the key to let google understand we are important in their business. Keeping their business free from bug.

  9. I would never have even noticed this as I’ve never even used the Print function, is something that people use a lot of with Google Reader? Especially since the introduction of Gears so you can read your news updates offline if needed?

    Good of you to put the time in on this for those that find it useful tho Stephen.

  10. Essay says:

    I never used it too. But I think Google started making the same mistakes as Microsoft

    LINK REMOVED: because of failure to use KeywordLuv syntax (name@keywords)

  11. I had heard about it some time back and was trying to figure it out. This article was really useful in the sense that it helped me arrive at a conclusion and now I am some what enlightened about it….

  12. Kevin@Great Wall of China Facts says:

    Thanks for teaching the hack to me. Your posts are always very great!

  13. Julien Gilles says:

    Hi,

    I have uploaded a new version. My solution is to add the setTimeout in the test of linkContainer :

       if (!linksContainer) {
          window.setTimeout(function() { initializePrintButtons() }, 1000);
          return;
       }

    So the init function is called in loop until the linkscontainer is loaded.

    A fixed delay of 6 seconds is not a good solution as sometimes the loading can be longer – you can’t be sure of the maximum loading time, and if the loading is very short, you have to wait 6 seconds. Time is money !

  14. I really scared of changing the HTML cause once i did it with my site, and never could fix it for the template and after a week it became perfect

  15. That sounds new to me and I never use it. I will check it out. Thank you very much.

  16. thats why you always make a saved copy before you make any changes mr sumaiya :/

  17. Thanks for the update. I like the fact julien even stoped bye with the new fix and told everyone the update is now on the site.

  18. Thanks for the heads up. Sounds interesting.

  19. Leonard@Holiday Gift Baskets says:

    Your post are always great! Thankm you very much for the heads up.

  20. money says:

    I don’t know more about scripting language. Thanks for providing this important information. Great post.

    LINK REMOVED: because of failure to use KeywordLuv syntax (name@keywords)

  21. Peet says:

    I just tried it again and it definitely works for me.

  22. Excellent work again Stephen! Thanks!

  23. bob says:

    thanks for sharing it. i use google reader and facing the problem. thanks for solving it. it really works.

  24. this is cool dude. i had been facing some problem with Google reader. now i think i have got the solution here. at last i think i can come up from the problem. thanks for the solution.

  25. this is just awesome. i had been facing problem with google reader but after applying this code it’s solved. thanks to all who has made this code.

  26. Katrina kaif says:

    I love google reader and i dont think this is not much touching for me

  27. That’s fast. How did he manage to post the fix for the script in 3 hours? Show’s a real commitment.

  28. Asif@Symbian Smartphone says:

    So, looks like everything has been fixed and we don’t need to apply this code anymore. I love google reader too and don’t want it to make a mess.

  29. I love Google Reader a lot!

  30. Very useful posting. I am very impress to get a lots of great info from here.
    Keep smiling.

  31. If someone sends me a word document i can print it with no problems. However, if I am the creator of the document, I have to hit the manual print button on my printer for every page.

  32. This is what I’ve been searching for. Thanks for providing the information. I’ll drop by here always. Ciao!

Leave a Reply

Anti-Spam Quiz:


Stephen Cronin

is Manager of Online Service Delivery at a Queensland Government department & has been a freelance WordPress developer/consultant since 2007
*Content on this site is my own and is not related to my employer

Hire me - I'm expensive, but I'm very good!

WordPress Plugins

Want a Custom WordPress plugin? See my Services page.

Greasemonkey Scripts

Visit my home page at Userscripts.org.