Skip to content

Instantly share code, notes, and snippets.

View mjlogan's full-sized avatar
🌐
Make it work, work, make it work 😃

mjlogan

🌐
Make it work, work, make it work 😃
View GitHub Profile
@mjlogan
mjlogan / tslint-ban-config.json
Created March 8, 2023 11:32 — forked from gordey4doronin/tslint-ban-config.json
Configuration for TSLint's "ban" rule for modern Angular applications
"ban": [
true,
[ "angular", "each", "Don't rely on angular to perform loops. Either use a 'for of' loop or the native 'array.forEach': https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_each" ],
[ "jQuery", "each", "Don't rely on jQuery to perform loops. Either use a 'for of' loop or the native 'array.forEach': https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_each" ],
[ "$", "each", "Don't rely on jQuery to perform loops. Either use a 'for of' loop or the native 'array.forEach': https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_each" ],
[ "_", "each", "Don't rely on Underscore to perform loops. Either use a 'for of' loop or the native 'array.forEach': https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_each" ],
[ "_", "forEach", "Don't rely on Underscore to perform loops. Either use a 'for of' loop or the native 'array.forEach': https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_
// bind GA tracking events to most of html input types
// keep tracking of events on monitored objects on DOM changes
// requires jQuery 3.4 or newer for event binding
// requires GA script installed on page
// based on this script for DOM changes tracking - https://stackoverflow.com/questions/3219758/detect-changes-in-the-dom/14570614
// By mjlogan - 2019
window.ga_debug = false;//set this to true to have events printed on browser console
var fireGaEvent = function (category, action, label) {
if (window.ga_debug)