-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMemrise_No_Reverse_Translations.user.js
31 lines (28 loc) · 1.29 KB
/
Memrise_No_Reverse_Translations.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// ==UserScript==
// @name Memrise No Reverse Translations
// @namespace https://github.com/cooljingle
// @description Disables reverse translations when using Memrise
// @match https://www.memrise.com/course/*/garden/*
// @match https://www.memrise.com/garden/review/*
// @match https://app.memrise.com/course/*/garden/*
// @match https://app.memrise.com/garden/review/*
// @version 0.1.4
// @updateURL https://github.com/cooljingle/memrise-no-reverse-translations/raw/master/Memrise_No_Reverse_Translations.user.js
// @downloadURL https://github.com/cooljingle/memrise-no-reverse-translations/raw/master/Memrise_No_Reverse_Translations.user.js
// @grant none
// ==/UserScript==
$(document).ready(function() {
MEMRISE.garden._events.start.push(() => {
enableNoReverseTranslations();
});
function enableNoReverseTranslations() {
MEMRISE.garden.session.box_factory.make = (function () {
var cached_function = MEMRISE.garden.session.box_factory.make;
return function () {
var result = cached_function.apply(this, arguments);
result.template = result.template.replace("reversed_", "");
return result;
};
}());
}
});