Skip to content

Instantly share code, notes, and snippets.

@ohnit
Created February 28, 2021 15:12
Show Gist options
  • Save ohnit/afc8741e13b46d91e2fcd43ed3556e95 to your computer and use it in GitHub Desktop.
Save ohnit/afc8741e13b46d91e2fcd43ed3556e95 to your computer and use it in GitHub Desktop.
Turn off selection popup on Educative.io
// ==UserScript==
// @name Turn off educative notetaking
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Remove popup when you select text
// @author ohnit
// @match https://www.educative.io/courses/*
// @grant none
// ==/UserScript==
EventTarget.prototype._addEventListener = EventTarget.prototype.addEventListener;
EventTarget.prototype.addEventListener = function(a, b, c) {
if (a != "mouseup") {
this._addEventListener(a, b, c);
} else {
console.log("Ignoring adding of mouseup event")
}
}
@ohnit
Copy link
Author

ohnit commented Feb 28, 2021

Why? I have a shortcut that triple-clicks to select a paragraph, then reads it to me with TTS, but this popup screws it up. See how to use a userscript like this one at: https://greasyfork.org/en

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment