Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==UserScript==
// @name TurboPublik
// @description Prevents loading of New Relic Agent scripts on eRepublik.
// @include *://www.erepublik.com/*
// @version 0.1
// @grant none
// @run-at document-start
// ==/UserScript==
document.onbeforescriptexecute = function (e) {
var nodeValue = e.target.childNodes[0].nodeValue;
var newrelic = nodeValue.lastIndexOf("(window.NREUM||(NREUM={}))", 0) === 0
|| nodeValue.lastIndexOf("window.NREUM||(NREUM={})", 0) === 0;
if (newrelic) e.preventDefault(); // Yeah, block them.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.