Skip to content

Instantly share code, notes, and snippets.

View DIntriglia's full-sized avatar

Dakotah Intriglia DIntriglia

View GitHub Profile
@DIntriglia
DIntriglia / termageddon_usercentrics_geolocation.js
Last active May 19, 2025 05:16
Termageddon + Usercentrics - Geolocation Hide/Show (js)
/** For implementation, usage, and testing information, please see this article:
https://termageddon.freshdesk.com/support/solutions/articles/66000530255-geolocation-feature-for-all-web-building-platforms-
**/
const termageddon_usercentrics_geolocation = (config = {}) => {
const tuSessionStorageName = "uc_user_country";
const tuDebug = config.debug || false;
const tuPSLHide = config["psl_hide"] || true;
const tuToggle = "div#usercentrics-root,aside#usercentrics-cmp-ui";
@DIntriglia
DIntriglia / jquery.donetyping.js
Last active June 25, 2022 16:30
jquery .on('donetyping;, callback) integration
// $('#element').on('donetyping', callback)
// Fires donetyping event when a user has finished typing. This is determined by the time elapsed
// since the last keystroke and timeout parameter or the blur event--whichever comes first.
// @callback: function to be called when even triggers
// @timeout: (default=1000) timeout, in ms, to to wait before triggering event if not
// caused by blur.
// Requires jQuery 1.7+
// Based on the jQuery extension created by @brad-christie on StackOverflow
//
$(":input").each(function () {