1. Forum
  2. >
  3. Topic: Duolingo
  4. >
  5. [Userscript] Duonews

https://www.duolingo.com/profile/joaopimentel

[Userscript] Duonews

Update (11/12/2016):
It doesn't work anymore, unfortunately.


I've been playing around with the Google News API for the last few weeks and 2 days ago I realized it could be an interesting addition to Duolingo as a userscript. So how does it work? Head over to the "Words" menu and DOUBLE-CLICK on a word. Then you'll see a popup with the example sentences retrieved from Google. Here's an example in spanish:

I tested it in the following languages: EN, FR, ES. But it should work with all the other languages too. Let me know if you find one that doesn't.

Browsers supported: Firefox and Chrome. Not sure if it works in any other browser.

Steps to install:
1. first install Tampermonkey (for Chrome) or Greasemonkey (for Firefox)
2. then click here to install or update the userscript (v1.2)
3. refresh the page after installing (CTRL+R or F5)

Update (v1.1):
- the word on top was missing some special characters, that should be fixed now;
- now it's possible to navigate through all the words without having to close the popup.

Update (v1.2):
- now available in lessons/practice too, but only in the exercises that ask you to translate a sentence from the target language to the base language.

Have fun :)

December 19, 2015

35 Comments


https://www.duolingo.com/profile/Lrtward

What a cool idea!!!! I love this. Seeing words in context is a great way to move them into long term memory. This is excellent. Haven't had time to try it out yet but I really look forward to it.

December 19, 2015

https://www.duolingo.com/profile/joaopimentel

I agree! The more example sentences we have the better :)

December 19, 2015

[deactivated user]

    I don't know why, but when I upvoted, your green moderator circle disappeared.

    Is it a glitch?

    December 19, 2015

    https://www.duolingo.com/profile/poppy_with_matt

    doesn't happen to usagiboy7. this happens to me too. when i upvote the discussion, lrtward's moderator shield and ring disappear, and when i upvote his comment the shield and ring appears on his pic again

    December 19, 2015

    https://www.duolingo.com/profile/Lrtward

    My flags that show my levels are buggy, too. They change. <shrug>

    December 19, 2015

    https://www.duolingo.com/profile/Usagiboy7

    I hope you will consider adding this one to the Duolingo Wiki ^_^

    December 19, 2015

    https://www.duolingo.com/profile/joaopimentel

    Sure :)

    December 19, 2015

    https://www.duolingo.com/profile/TheQueenZerelda

    Man, crowd sourcing is the best.

    December 20, 2015

    https://www.duolingo.com/profile/Xefjord

    I can't seem to get it to work :( I tried it on German and French

    December 19, 2015

    https://www.duolingo.com/profile/joaopimentel

    Have you tried refreshing the page? (CTRL+R or F5)

    December 19, 2015

    https://www.duolingo.com/profile/Xefjord

    Ah that fixed it. Thanks

    December 19, 2015

    https://www.duolingo.com/profile/joaopimentel

    Does it work in german?

    December 19, 2015

    https://www.duolingo.com/profile/Xefjord

    Yes

    December 19, 2015

    https://www.duolingo.com/profile/joaopimentel

    Great, thank you :)

    December 20, 2015

    https://www.duolingo.com/profile/arekolek

    This is nice. How about doing the same, but in lessons/practice?

    December 20, 2015

    https://www.duolingo.com/profile/joaopimentel

    Yea, that's definitely a good idea. How would you do it? Double-click on any word to view the sentences in a popup? (which is exactly the same way) Or do you have something else in mind?

    December 20, 2015

    https://www.duolingo.com/profile/arekolek

    Yes, I think double-click would be fine. Since stock popups show on hover, there won't be a conflict.

    December 20, 2015

    https://www.duolingo.com/profile/joaopimentel

    Ok, thanks. I'll see what I can do :)

    December 20, 2015

    https://www.duolingo.com/profile/poppy_with_matt

    thank you for this!

    December 19, 2015

    https://www.duolingo.com/profile/ArdeJohnson

    I don't have a "Words" menu... :\ Is this a feature of this script?

    January 6, 2016

    https://www.duolingo.com/profile/joaopimentel

    Nope. The "Words" menu may not be available on all courses. And it will have a different name if your base language is not english. If it is french or spanish it will be called "Mots" or "Palabras". But you can also use the script in a lesson. When you see an exercise that asks to translate from the target language to the base language you can double-click on any word of the sentence to open the popup.

    January 8, 2016

    https://www.duolingo.com/profile/ArdeJohnson

    I'm doing French in English mode.

    Imgur Screenshot

    :(

    The pop-up works fine for me, though, thanks. I like your script so far. I double-click words all the time to use Google Chrome's right-click context menu [copy, search and/or extensions] on them though, so, for me, it'd be nice if I could configure the trigger for the pop-up.

    I've had to resort to turning it off until my sole goal is to look up DL vocabulary in context.

    January 8, 2016

    https://www.duolingo.com/profile/joaopimentel

    Perhaps the reason you can't see the "Words" menu is that you're part of an A/B test. I'll think about a solution/alternative to your problem with the double-click action. Thank you for the feedback :)

    January 8, 2016

    https://www.duolingo.com/profile/ArdeJohnson

    I really wish I could've opted out, if that's the case. I have made an expansive Excel spreadsheet with the new vocabulary, IPA, plural forms, definitions, genders, irregular conjugations, etc. which would've been much less time consuming had I had a place where I could go after a lesson and see everything in a neat list at once :\

    Anyway, this is not at all of your doing nor your area of responsibility (I assume you're just a user like us), thanks for listening and for the script.

    January 9, 2016

    https://www.duolingo.com/profile/som3rsault

    the link for the script does not seem to work anymore :(

    June 5, 2016

    https://www.duolingo.com/profile/joaopimentel

    The link should be fixed now. But the Google News API is deprecated and I think you won't be able to see the sentences anymore.

    June 6, 2016

    https://www.duolingo.com/profile/som3rsault

    Thanks anyway

    June 7, 2016

    https://www.duolingo.com/profile/poppy_with_matt

    i'm sorry, but it does not work for me. dunno why.

    December 19, 2015

    https://www.duolingo.com/profile/joaopimentel

    Have you successfully installed tampermonkey (if you're using chrome) or greasemonkey (if you're using firefox) and restarted your browser afterwards?

    December 20, 2015

    https://www.duolingo.com/profile/hmada993

    it downloads a js file, how to install it to tampermonkey addon?

    December 20, 2015

    https://www.duolingo.com/profile/joaopimentel

    When you click on the userscript link you should see a tampermonkey page. In that page there's an option to install the userscript. You may need to restart your browser if you have just installed tampermonkey.

    December 20, 2015

    https://www.duolingo.com/profile/hmada993

    Well when I click on it the browser downloads a file instead

    edit: nvm it works now thanks for the help.

    December 20, 2015

    https://www.duolingo.com/profile/melbiam

    Good idea. I tried it but I get in all my languages only (Nothing found...) I already restarted firefox.

    Do you know what the problem is?

    December 8, 2016

    https://www.duolingo.com/profile/joaopimentel

    It doesn't work anymore. Sorry :(

    December 11, 2016

    https://www.duolingo.com/profile/melbiam

    what a shame. was a great idea.

    December 13, 2016
    Learn a language in just 5 minutes a day. For free.