Skip to content

Instantly share code, notes, and snippets.

@YOzaz
Last active March 31, 2016 16:10
Show Gist options
  • Save YOzaz/c85019a476ff566e83804fcb6971eafb to your computer and use it in GitHub Desktop.
Save YOzaz/c85019a476ff566e83804fcb6971eafb to your computer and use it in GitHub Desktop.
function isTransactionTrackingPresent(symbol)
{
symbol = symbol || 'trackTrans';
var present = false;
var script_tags = document.getElementsByTagName("script");
Array.prototype.slice.call(script_tags).forEach( function(tag)
{
if ( present ) return;
var source = tag.innerText || tag.textContent;
if ( source && source.indexOf(symbol) != -1 )
present = true;
});
return present;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment