[wiki] All the Userscripts

wiki
userscript

(Matteogiuseppe) #83

No worries at all. I just sent you a private message. Thanks! :muscle:


(Gecks) #84

About that final nail. I do also fear, that they will make all of their properties local/closure variables instead (or rather the bundler for their ES Modules), but I believe that there is no such thing as a final nail in our coffins. There is always a way out. Right now I’m considering to parse their scripts, inject a function on the textural level, in the same closure as all of their objects and functions, that can return any enclosed value and then have the browser run that modified script instead of Memrise’ original one. As you can imagine, this will be very unstable, as you need to refer to the local variables (like timer etc.) by the name that the bundler generated for them, so you might have to change the custom scripts whenever the Memrise team decides to mutilate their code even further, even if the changes have no direct impact on the custom script, because their changes may have caused the bundler to name a local variable differently (t instead of n and so on). It’s not gonna be pretty, but Memrise can’t bring us down that easily.


(The Four Gated Danzig) #85

Hey, I was wondering if anyone had a script that would resolve this issue.

"The English translations are there, but Memrise did an update so that “audio cards” don’t show the extra information. I don’t know their reasoning, but it’s not good and really hurts that course. It was a big reason I finally stopped using Memrise.

You could post a “bug report” and mention that problem. They might change it back if they realize people need that extra info even on “audio” cards."


(Cooljingle) #86

I guess that would work, but here’s hoping it won’t get to that level of hackery required!


(Cooljingle) #87

I’m not sure what audio cards are, are you are referring to the presentation screens which (re)introduce items? It’s a bit hidden but on those screens the english is shown as part of the ‘attributes’ row (each attribute is shown as a little ‘badge’)


(The Four Gated Danzig) #88

hey cooljingle,

so one of the courses in question is this.

You’ll see it has the Japanese sentence and audio. However, if you click esc/see answer when you’re reviewing/learning, the part that says “attribute” where the English should be, is missing. The creator of the course says the translations are still there, but somehow Memrise has hidden them.


(Gecks) #89

Actually, considering that Memrise ships a source map together with their bundled scripts, this may not even be a bad idea (or maybe I’m just crazy). Sure, it’s a hack, but a better one than the ad hoc “fixes” people are currently using, because it lets you do the things you could do previously in the same way you did previously. It would allow you to basically use Memrise’ code as if it was open source, changing the behaviour by adding your own code to theirs, instead of finding some janky hacks like using the MEMRISE.garden._events variable, of which I’m not even sure what it means, and that will most likely change a lot in the future, or overwriting the MEMRISE.garden.box.make_box function in order to overwrite the MEMRISE.garden.box.getTimerLength function in time to make it return 0 before it is called by MEMRISE.garden.setTimer, which is very specific to the timer and thus does not address all the other problems that arose from making their object private, whereas my approach is actually pretty robust, because of the source maps. If they take away the source maps, though, it will get really, really ugly. This is what I’m going to do get my Memrise Chrome Extension to work again.


(Cooljingle) #90

That’s weird, I see the English translation when I click See Answer:


(Cooljingle) #91

A stumbling block would be the ability to intercept the page early enough to override the initial script as it comes in. Userscripts are executed after the DOM is fully loaded so the request is done by the time the userscript runs. I’m not sure if it’s the same situation for extensions but I’d be curious to know it there is a way to do it.


(The Four Gated Danzig) #92

Huh… hm… now I’m stumped. Your font looks different from mine, too. Do you have another script to change your interface? I have your CSS Tweaks installed.


(Gecks) #93

Yeah, I was considering my Chrome extension, where you can do pretty much anything at any time. Userscripts may either have to move to extensions, or continue to search for ways around Memrise’ shenanigans, unfortunately. Memrise has never disappointed us when it comes to making life harder for their users.


(Cooljingle) #94

with the tweaks script on:

Same deal. This is testing on chrome - could be a firefox issue.


(The Four Gated Danzig) #95

I use Chrome, too - but I’m looking at your screenshot, and I see you have that flower in the right-hand corner. I blocked that image because I hated it in sessions. I may have cancelled out the attribute for the English translation? I’ll check.


(The Four Gated Danzig) #96

Adblock it was :sweat_smile:


(Fflorian) #97

@cooljingle first, thank you very much for your scripts that improve the efficiency of learning on Memrise. Do you think it could be possible to add some options for the all typing script? Personally I’d like to have typing question if before the first semicolon, there are 3 words or less, and a typing test otherwise

Because, for example, I have some cards like “по крайней мере” in the official Russian course for which I always have typing tests and that I can’t memorize. The same for “потерпевший; потерпевшая”

Thanks,

Florian


(Cooljingle) #98

Do you mean you want a tapping test for four words or more? The script already has an option for not turning off tapping tests, which as I recall memrise selects for you if the word is > 15 characters.


(Fflorian) #99

Yes, tapping text for 4 words or more, but before the first semicolon. Because with the second example above, I get a tapping test even if there are less then 15 characters before the semicolon. My problem is actually with this 15 characters rule


(Mishamus) #100

Mate, you providing your scripts is the only reason I am still using Memrise at all, so I am immensely grateful. Also happy to make a donation in whatever way is suitable.


(Cooljingle) #101

I’m thinking just because the logic you want is so specific it makes it not a candidate to put in as an extra option, but I can give you a line replacement which will do the job for you, note that if the script gets updated your change might get overridden in the future! You’ll need to keep the replace tapping option off but the change will turn tapping to typing if it meets your conditions.

replace line 106

            (localStorageObject["replace-tapping"] !== false && box.template === "tapping") ||

with

            ((localStorageObject["replace-tapping"] !== false || MEMRISE.garden.learnables[box.learnable_id].item.value.match(/[^;]+/)[0].split(' ').length < 4) && box.template === "tapping") ||

(Overlord Hydroptère) #103

hi there

the reverse translation script seems not functional anymore…or it is just my firefox quantum the latest update the reason for this?

many thanks