Sha256: 31b1eeebef3b9a888245f6ac935968c7103ff2d67aee32bccb34d77b480c0df5
Contents?: true
Size: 1.08 KB
Versions: 5
Compression:
Stored size: 1.08 KB
Contents
(function() { function ITPHelper(opts) { this.itpContent = document.getElementById('TopLevelInteractionContent'); this.itpAction = document.getElementById('TopLevelInteractionButton'); this.redirectUrl = opts.redirectUrl; } ITPHelper.prototype.redirect = function() { sessionStorage.setItem('duodealer.top_level_interaction', true); window.location.href = this.redirectUrl; } ITPHelper.prototype.userAgentIsAffected = function() { return Boolean(document.hasStorageAccess); } ITPHelper.prototype.canPartitionCookies = function() { var versionRegEx = /Version\/12\.0\.?\d? Safari/; return versionRegEx.test(navigator.userAgent); } ITPHelper.prototype.setUpContent = function(onClick) { this.itpContent.style.display = 'block'; this.itpAction.addEventListener('click', this.redirect.bind(this)); } ITPHelper.prototype.execute = function() { if (!this.itpContent) { return; } if (this.userAgentIsAffected()) { this.setUpContent(); } else { this.redirect(); } } this.ITPHelper = ITPHelper; })(window);
Version data entries
5 entries across 5 versions & 1 rubygems