Skip to content

Instantly share code, notes, and snippets.

@ajorpheus
ajorpheus / JQuery.ShortcutKeys-1.0.0.js
Created July 10, 2022 17:05
jquery keyboard shortcuts
/**
* ------------------------------------------------------------------------------------------------
* Rogel Delgado Mesa, 2019
* ------------------------------------------------------------------------------------------------
*/
// KEYCODES //
var BACK_SPACE = 8; // BACKSPACE
var TAB = 9; // TAB
var RETURN = 13; // ENTER
@ajorpheus
ajorpheus / waitForKeyElements.js
Created May 17, 2022 08:12 — forked from BrockA/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
// Following grants are needed for some of the functions below to function
// @grant GM_openInTab
// @grant GM_xmlhttpRequest
// @grant GM_notification
// Default configuration object that can be overridden
window.TM_CONFIG = window.TM_CONFIG || {
debug: true,
notificationTimeout: 3000,
clickMethods: {