[Userscript] Attempt to Eliminate Phantom Entries

Hello everyone,

This userscript attempts to remove phantom entries in a course.

What are phantom entries? Well, sometimes when you’re presented with multiple choice answers, some of the answers will be old definitions that aren’t present in your course anymore. These are phantom entries.

For example, let’s say that you add two words in your course, one after the other.

Word 1: helo
Word 2: goodbye

You then notice that word 1 is spelled incorrectly, so you correct it to “hello”, but when you get a multiple choice question for word 2, one of the answers is “helo” instead of “hello”, which isn’t what you wanted. This is a “phantom entry”.

Userscript
Github page for my Memrise scripts

To run this script, first install Tampermonkey, and then visit the “userscript” link above.

Then, to activate the script, go to the the page where you can edit a course’s levels. Next to the “Add level” button, there should be a new button that says “Attempt to eliminate phantom entries”. Click that button and then wait for the script to begin. After all of the items in all the levels have turned green or gray, the script should be finished.

Entries are marked as green when the script has attempted to fix them. Entries as marked as gray when the script has skipped the entry because it was already fixed in an earlier level.

Thanks to the people in this topic who tracked down the cause of this bug, and props to @DrewSSP who wrote a similar script in Python.

This script is only for course creators or course contributors. If you’d like to use this script on a course that you’re not the creator of or a contributor to, you’ll need to contact the course’s owner or ask Memrise to add you as a contributor.

Notes:

  1. You must have more than one level in your course in order to run the script.
  2. This script does not work when run using the Greasemonkey plugin in Firefox. If you’re using Firefox, please use the Tampermonkey plugin instead.
22 Likes

hi, Eli

if i leave the head aside, do you think I could install it with “stylish”?

many thanks for your work

Hi, Hydroptere,

I’m not sure what you mean by “leave the head aside”, but the script uses JavaScript to run, so I’m pretty sure you’ll need something like Greasemonkey or Tampermonkey to run it. As far as I know, Stylish is just for CSS.

Eli

sorry, “header”

thanks for clarifying! (as java is blocked by efault on my laptops, i’ll probably pass this time)

@Hydroptere, if you want to run the script without installing Greasemonkey or Tampermonkey, I think you could open the page for editing the levels of your course and then copy and paste the script’s contents into the Developer’s Console window.

2 Likes

thanks for the trick

.

You’re welcome :slight_smile:

I’ve changed the name of the file so that it should be easier to install using Greasemonkey/Tampermonkey/etc. Follow the link to the script that’s in the original post to install the new file or to update your old one.

1 Like

It looks like this isn’t working at the moment. I’m not sure if it was never working or if a Memrise update broke the script.

I’ve just run the script with Tampermonkey in MS Edge and it looks like it’s done the job. Thanks :slight_smile:

Ah, okay, interesting. Have you tested it to make sure that the phantom entries are gone? I have a course that I’ve been running the script on, but the script seems to not be working for it. I’m not sure why.

Sorry for the delay in coming back. I don’t know how check deeper into the database, but running reviews etc daily, no phantom entries have reappeared as of yet.

1 Like

This thread is also useful:

1 Like

@owlielovesbooks, Okay, awesome. Thanks for letting me know :slight_smile:

Hi @neoncube,
Does this script work in Firefox? I added to Greasemonkey, enabled the script, and went to the add level page on my courses but I’m not seeing the option to eliminate phantom levels.

Any ideas what I’m doing wrong?

Thanks!

Hi @matteogiuseppe, I just tried the script on Firefox, and it looks like no, it doesn’t currently work there :\

Thanks for letting me know about this. I’m now working on a fix :slight_smile:

Okay, the script should now work on Firefox using Greasemonkey :slight_smile:

1 Like

Thanks for your help! :slight_smile:

You’re welcome :slight_smile:

Let me know if you run into any issues.

1 Like

This worked great! Thanks again!:grin: