forked from raine/memrise-forgive-typos
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMemriseTurbo.user.js
52 lines (46 loc) · 1.61 KB
/
MemriseTurbo.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// ==UserScript==
// @name Memrise Turbo
// @namespace https://github.com/infofarmer
// @description Makes Memrise faster
// @match http://www.memrise.com/course/*/garden/*
// @match http://www.memrise.com/garden/water/*
// @match http://www.memrise.com/garden/review/*
// @version 0.1.8
// @updateURL https://github.com/infofarmer/memrise-turbo/raw/master/MemriseTurbo.user.js
// @downloadURL https://github.com/infofarmer/memrise-turbo/raw/master/MemriseTurbo.user.js
// @grant none
// ==/UserScript==
var oldstart = MEMRISE.garden.feedback.start;
MEMRISE.garden.feedback.start = function (){
if (MEMRISE.garden.box.state === 'choosing-mem') {
oldstart(1);
}else{
MEMRISE.garden.box.next_press();
}
};
$('body').on('input', function(e) {
try {
if ($(e.target).is('input')) {
var g = MEMRISE.garden;
var b = g.box;
var s = g.scoring.score_response(
b.$input.val(),b.thing,b.column_a,b.column_b);
if (s === 1) {
MEMRISE.garden.box.check();
}
}
} catch (err) {
console.log('error - falling back to default behavior', err);
}
});
// always let audio play in full
MEMRISE.audioPlayer.stop = $.noop;
MEMRISE.audioPlayer.stopAfter = $.noop;
// disable pausing (especially automatic)
MEMRISE.garden.pause = $.noop;
// always disable timer
$("div.garden-timer div.txt").bind("DOMSubtreeModified", function() {
MEMRISE.garden.timer.cancel();
});
// disable alert on exit
MEMRISE.garden.prevent_accidental_unloading = $.noop;