Skip to content

Instantly share code, notes, and snippets.

View johnpauljanecek's full-sized avatar

John Paul Janecek johnpauljanecek

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johnpauljanecek
johnpauljanecek / Basic Monkey Patching.js
Last active July 17, 2022 08:12
Monkey Patching Javascript
(function () {
/*
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function
createElement(tagName)
createElement(tagName, options)
https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
*/
console.log("monkey patch start");
var old_CreateElement = Document.prototype.createElement
function new_CreateElement() {