Sha256: 167056d4144fca56413900d96a02ffa2d277e7941e518de41bb9b15679034249
Contents?: true
Size: 872 Bytes
Versions: 62
Compression:
Stored size: 872 Bytes
Contents
/** * @namespace WORKAREA.trafficReferrer */ WORKAREA.registerModule('trafficReferrer', (function () { 'use strict'; var referrer = document.referrer, setReferrer = function (url) { referrer = url; }, isSameHost = function(referrer) { var currentUrl = WORKAREA.url.parse(document.URL), referrerUrl = WORKAREA.url.parse(referrer); return currentUrl.host === referrerUrl.host; }, setCookie = function() { var currentCookie = WORKAREA.cookie.read('workarea_referrer'); if (!referrer || currentCookie || isSameHost(referrer)) { return; } WORKAREA.cookie.create('workarea_referrer', referrer, 7); }; return { setReferrer: setReferrer, setCookie: setCookie, init: _.once(setCookie) }; }()));
Version data entries
62 entries across 62 versions & 1 rubygems