This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* user-timing-api-RUM-gtm.js 1.0.1 | |
* Olegs Belousovs @sgelob | |
*/ | |
(function() { | |
"use strict"; | |
// From https://github.com/addyosmani/timing.js/ –––> | |
var performance = window.performance || window.webkitPerformance || window.msPerformance || window.mozPerformance; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is super hackish, and will likely break as Discord's internal API changes | |
// Anything using this or what it returns should be prepared to catch some exceptions | |
const getInternalInstance = e => e[Object.keys(e).find(k => k.startsWith("__reactInternalInstance"))]; | |
function getOwnerInstance(e, {include, exclude=["Popout", "Tooltip", "Scroller", "BackgroundFlash"]} = {}) { | |
if (e === undefined) { | |
return undefined; | |
} | |
// Set up filter; if no include filter is given, match all except those in exclude |