Skip to content

Instantly share code, notes, and snippets.

@alexandrosandre
alexandrosandre / cypress-trackingplan.yaml
Last active November 21, 2023 04:59
Github Action for Trackingplan Regression Testing with Cypress
name: cypress-trackingplan
on:
push:
branches:
- master
- release/*
paths:
- "frontend/**"
- "deploy/**"
@alexandrosandre
alexandrosandre / tradeinn_snippet.js
Last active June 16, 2021 14:41
TradeInn Snippet
<script type="text/javascript">
(function(){function a(){try{if(s.setItem("_tp_t","a"),"a"!==s.getItem("_tp_t"))return!1;if(s.removeItem("_tp_t"),"function"!=typeof navigator.sendBeacon)return!1}catch(a){return!1}return!0}function b(){var a=Object.getOwnPropertyDescriptor(HTMLImageElement.prototype,"src").set;Object.defineProperty(HTMLImageElement.prototype,"src",{set:function(b){return e({method:"GET",endpoint:b,protocol:"img"}),a.apply(this,arguments)}});var b=HTMLImageElement.prototype.setAttribute;HTMLImageElement.prototype.setAttribute=function(a,c){return"src"==a.toLowerCase()&&e({method:"GET",endpoint:c,protocol:"img"}),b.apply(this,arguments)}}function c(){var a=v.prototype.open,b=v.prototype.send;v.prototype.open=function(b,c){return this._tpUrl=c,this._tpMethod=b,a.apply(this,arguments)},v.prototype.send=function(a){return e({method:this._tpMethod,endpoint:this._tpUrl,payload:a,protocol:"xhr"}),b.apply(this,arguments)}}function d(){var a=navigator.sendBeacon;navigator.sendBeacon=function(b,c){re