I just made some great updates to the Quizmarklet. Here's what it can now do:

  • User-contributed definitions. Before, it was just using the (excellent) WordNet dictionary, but I have now expanded it to use the ever-expanding word lists from Quizlet's users. It only uses words that are in sets open to everyone. User-contributed definitions are marked specially with yellow
  • It now has better handling of plural words - so it will pickup on "matrices" as a definition for "matrix" and "cherries" for "cherry."
  • Gmail support! I managed to wade through the jungle of Gmail's code enough find and correct the problem. The solution - appending a tag to a page - was both brilliant and insane (thanks to Fyorl for the tip). To all you programmers out there, I intend to write a blog post sometime soon about creating the bookmarklet.
  • Supporting Gmail also means supporting pretty much every webpage on the Internet. If you run into a page that doesn't work, send me a note in the comments.
  • The bookmarklet itself (the thing you save in your bookmarks bar) now has a version number (1.02). Everyone who used the old version should upgrade by resaving it to their bookmarks bar.
  • Various compatibility and display fixes were also added.

An interesting tidbit I forgot to mention last time is that the Quizmarklet records the definitions you save to Quizlet (from the official dictionary only, not the user-contributed stuff). It will then rank the most often chosen definition and show them at the top of the list. This has two benefits: 1) You see the most 'universal' definition first. 2) I get some stat-tracking capabilities to see how I can improve the Quizmarklet.

I still consider the Quizmarklet to be in "pre-release" mode, meaning it's not finished. That means I'm still changing things, and I'm not going to promote it outside of the blog for now. But when it's ready, I think it has a lot of potential to be a part of Quizlet's core functionality/workflow. More on that later...

Lastly, I had some trouble getting it started up in Internet Explorer. I only use Macs, so it's hard for me to dig into the problem. I have access to both version 6 and 7 of IE via Parallels, but I have this strange feeling that they're not behaving like regular IE. I can get the bookmarklet to boot up on the Quizmarklet's page itself, but I can't get it to save into the "Links" bar via dragging. I can circumvent that by going to "Add to Favorites" and selecting the links bar, which saves the Quizmarklet correctly. But then it doesn't seem to function at all. So if anyone has some insight or wouldn't mind helping to discover the problem, it would be much appreciated.

Thanks! I hope you enjoy the new version. Let me know how it goes for you, as always.

Comments

  1. Neil Kelty

    Andrew, to be completely honest I don't think that is supported in IE 6/7, I may be wrong, but...

  2. Help!!!

    May computer doesn't have bookmarks. It has favorites, which is like bookmarks, but it won't let me put the Quizmarklet in the favorites. I did test on a computer with bookmarks and it worked. What should I do?

  3. Andrew

    Try right-clicking anywhere above the Address bar, then making sure "Links" is checked in the pulldown menu. If it is, try unchecking "Lock the Toolbar" and then dragging "Links" (which should appear somewhere in the top part of the window) onto its own row.

    That is if you're using Internet Explorer (with the blue E icon). If you're using Firefox or something else, let me know.

    Let me know how it goes. Thanks!

  4. Help!!!

    After I drag "Links" into its own row do I drag the Quizmarklet into the Links? I tried that and it didn't work.

  5. Andrew

    Yeah, that's what should happen, but it doesn't seem to be working as I outlined in the post. What was the other computer you tried that it did work on? Was that using Firefox, do you know? Or was it the same setup you had?

  6. Help!!!

    It was firefox. It had bookmarks not favorites.

  7. Andrew

    Hmm, I guess you might try <a href="http://firefox.com" rel="nofollow">getting Firefox</a> then. It's actually a much better browser anyway :) But I'm definitely working on figuring this out, just so you know.

  8. Amelia Bedilia

    I LOVE QUIZMARKLET! It has helped me SOOOO much! Thank you for your geniusness! :mrgreen:

  9. Andrew

    I've just <a>discovered</a> that IE6 only likes bookmarklets with 508 characters or less. This might be tricky...

  10. Andrew

    Okay with some absurd arm-twisting I got it working under 508 characters. There's nothing like single-letter variable names! That was an exercise in ridiculousness.

    Now I have to figure out why IE isn't recognizing my login cookies.

  11. Fyorl

    Nice job and thanks for the credit (although I didn't expect any). I'll wait for your post about the technicalities of the thing before writing any more, great job dude!

  12. VJ (formerly know as JP)

    Kudos to Andrew! this is AWESOME!
    For IE 6 and login cookies it should be in the tools bar.
    If it's not then ur screwed.

  13. Nik

    Were you planning on linking to something, Andrew? Anyway, 508 characters or less? That sounds like Internet Explorer. Single character variables are cool, but you're probably going to need to go over 508 characters at some point, what with new features, right? Is there some other fix?

  14. Andrew

    Nik -nah, there are two components of the bookmarklet - the first part (the one with 508-max) is the one that is actually saved in your browser. The first part loads in a javascript file from the Quizlet server with the data already embedded. And that can be unlimited length. I can also update that as much as I like - so new features can get added with no update process on the user's part.

    Also, the code has to be broken up into two separate blocks because IE has such a different frame-and-getSelection implementation. So the 508 max only applies to the IE version... When I realized it last night I was at 728 characters, so it was definitely fun to trim it.

  15. Chris

    You should make it downloadable off of the internet. Will YOu?

  16. gDS

    Good work Andrew!

  17. Sue

    andrew you are my best friend :D

  18. Fyorl

    If you want more room you could try replacing part of that long URL string with a <a href="http://tinyurl.com" rel="nofollow">TinyURL</a>. Also, I'm not 100% sure it'll work in all browsers (or any) but can you not just add to the body's innerHTML rather than creating a new script element and setting its source. It looks like it'd save you a few characters:

    http://pastie.textmate.org/60480

    You can replace all three of the last statements in the script with the one above.

    Also, in the first part I'm not sure what the try-catch statement's for. It looks like the logic you've got setup will handle a failed docu.getSelection() anyway.

  19. Nik

    @<a href="http://quizlet.com/blog/archives/44#comment-1490" rel="nofollow">Andrew</a> Ah, that's fantastic. Makes the updating process really easy. It seems that getting rid of /*__Quizmarklet_v1.02_all__*/ was probably the biggest move, though. What browsers does it work in, then? Fx, IE, Safari... Opera?

  20. Andrew

    @Fyorl, sorry about your comment - it got caught in a spam filter for some reason so I have just now restored it....

    I learned awhile about that <code>document.body.innerHTML +=</code> is a recipe for disaster. I don't exactly recall what happens, but it messes with the page's state and the back/forward buttons I think. Anyways, reducing the code is not super important right now, because I'm well below the maximums. I reduced the url to quizlet.com/qm/WORDHERE. Also, the try/catch thing exists because when I was testing I got plenty of JS exceptions for just calling getSelection.

    Right now I have it working in IE, FX, and Saf. Haven't checked Opera. I've also discovered a way to send the recursive frame search into infinite-recusion hell, so I'll need to update the client-saved code again. I've got the fix done, I just need to clean up some other parts of Quizlet before making a big update sometime soon....

  21. kourge

    Certain versions of Safari wouldn't work if you dynamically create a script element and set its source.

    Internet Explorer 7 has problems with bookmarklets, because the link bar isn't on by default, and dragging doesn't work.

    It seems like void() is used to avoid (no pun intended) the page being overwritten by returned values? You could use an anonymous function to contain the stuff, then use just one void statement. Here's a rewritten version:
    http://pastie.textmate.org/60966

    And the version that looks worse than Perl (if not, equally worse) because its whitespaces are all stripped away:
    http://pastie.textmate.org/60968

  22. Andrew

    Just made the update - update your quizmarklets again! When it's really done I'll make a final blog post, then hopefully do some digg'in :)

  23. Margaret

    Andrew, about how you said we're just better off installing Firefox because it's a better browser...that's free, right?

  24. Andrew

    Yes, Margaret, it is completely free! (and awesome)

  25. Andrew

    I have just discovered a fix to a bug in Quizmarklet in Safari where non-ASCII characters don't display correctly. The fix was to add <code>charset="utf-8"</code> to the script tag that gets included to display the Quizmarklet interface. Wild, eh?

    I had marked the bug previously but couldn't figure out a solution (it ignored headers I sent). Then I was browsing around and happened to look at the source code of a <a href="http://developer.apple.com/products/premier.html" rel="nofollow">page on apple.com</a> that uses this technique. Looking at that code reminded me of the Quizmarklet problem...so I applied it to the Quizmarklet and now it's working beautifully. It's also now up-to-date on Quizlet.com.

  26. Andrew

    kourge, sorry for the comment moderation, you got caught in Akismet's spam filter. That's kind of strange, apparently Akismet doesn't like those pastie.textmate.org links...

    Thanks for the code, that's very excellent! I'll definitely give it a whirl.

    Cheers!

  27. Margaret

    Hey! I'm now using Firefox and you were right! It is awesome =D I love the tab feature. Now I can study on quizlet and play games online at the same time without 5,000 million windows on the taskbar.

  28. Fyorl

    @Margaret: IE7 has tabbed browsing too ya know. It's not just on Firefox. That doesn't mean you should start using IE7 though. Firefox is much better for so many different reasons.

  29. Margaret

    Fyorl- I had IE6 =\

  30. K8

    Andrew.... do tell... what do you mean by "Gmail compatible"?

    What can I do now that I couldn't before?
    How do you use quizlet with gmail?

    Thanks for the pointers... clues...LOL

  31. Andrew

    Hey, I'm specifically referring to the Quiz<strong>mark</strong>let, which is a little program that lets you look up written words on <em>any website</em>. Previously, the Quiz<strong>mark</strong>let didn't function within Gmail, and now it does...

  32. katymogle

    how do u get Gmail?

  33. Andrew

    katymogle, http://gmail.com should be a good start :)

  34. Danny

    Hi Andrew,
    do you think you can help me out and send me your script for scatter, that would be great. If you can't i can tottally understand, but any help would be greatly appreciated. I know PHP Mysql and some AJAX. Thanks

  35. Andrew

    Hey Danny, you can see the scatter Javascript just through view source on the Scatter page. The php/mysql part of Scatter is pretty negligible.

  36. Andrew

    Status update on the Quizmarklet - I've been refining the browser-side code and it is really slick now. It's down to 417 characters WITH version numbering :) Kourge's suggestions were most excellent. Now I just need to work out the CSS kinks...

  37. Timothy

    Andrew, it may just be my computer but every time I select the quizlmarklet book market i come to this url http://quizlet.com/quizmarklet/and it tells me to drag quizlet into my toolbar again... Im using Windows Vista Home Premium and Ive got the latest version of IE Beta. Any advice?

  38. Timothy

    Maybe its because i put it on the links bar?

  39. VJ

    you've kiled my smilies!!!!!!!!!!!!!!!!
    this is horrible!!!!!!!!!!!!

  40. Grant

    Why won't the smiles work anymore?

  41. VJ

    I was shot in the neck.

  42. Margaret

    They do work...

    :)

  43. Margaret

    HUH! Nevermind. Yeah, what's going on?

  44. woojoo

    Firefox is STRONGLY recommended for anyone who has not yet switched.

    http://getfirefox.com

  45. yo mama

    fire fox is great

  46. genova

    ANDREW U R WAY TO SMART!!!!
    [DATS ATRACTING!]

  47. Alpal

    I love Firefox

  48. peach1

    wat is firefox????????????

  49. Chief

    Is there a way to insert an image file into the flash cards? Doesn't need to be large, but a small file would be nice to insert as a visual aid.

  50. mifficype

    I’d prefer reading in my native language, because my knowledge of your languange is no so well. But it was interesting!

Leave a comment

Login to leave a comment