Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some changes #9

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
232 changes: 0 additions & 232 deletions MemriseForgiveTypos.user.js

This file was deleted.

52 changes: 52 additions & 0 deletions MemriseTurbo.user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,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;
44 changes: 9 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,14 @@
MemriseForgiveTypos.user.js
MemriseTurbo.user.js
===========================

Shows an alert box ***once*** if the [Levenshtein
distance](http://en.wikipedia.org/wiki/Levenshtein_distance) of a given
answer and the correct answer is 1 or 2.
Memrise Turbo advances to the next question as soon as you finish
typing the correct answer, without any delays or even the need for you
to press Enter. Ever. It enables you to water your items at the speed
of your fingers.

I'm not a big fan of making a hack like this but at the same time I don't
think you should be punished for accidental typos as Memrise currently does.
Use at your own peril.
It works for all types of questions — no more pauses.

![](https://raw.github.com/raneksi/memrise-forgive-typos/gh-pages/demo.gif)
Inspired by memrise-forgive-typos by raneksi.

# Installation

I have tested the userscript on Chrome and Firefox using Greasemonkey.

## Firefox

1. Install [Greasemonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/).
2. Go to http://userscripts.org/scripts/show/167003 and click **Install**.

## Chrome

### Method 1 (Recommended)

This method provides automatic updates for the script.

1. Install [Tampermonkey extension](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) on Chrome Store.
2. Go to http://userscripts.org/scripts/source/167003.user.js and click **OK** to confirm installation.

### Method 2

1. Download [MemriseForgiveTypos.user.js](https://github.com/raneksi/memrise-forgive-typos/raw/master/MemriseForgiveTypos.user.js) to your computer.
2. Go to the extension view in Chrome ([chrome://extensions](chrome://extensions)).
3. Drag the `MemriseForgiveTypos.user.js` file on the extension page. It should say "Drop to install" as you do so.

## Safari

I haven't tried. [Search Google](https://www.google.com/search?q=install+userscripts+safari) for ways to install userscripts.
Installation link:
https://github.com/infofarmer/memrise-turbo/raw/master/MemriseTurbo.user.js
Loading