Sha256: 0d2b1dff0edf18dac6824ddbddacc9d47cb7378735355afd8ff198ff12c0ee9a
Contents?: true
Size: 808 Bytes
Versions: 2
Compression:
Stored size: 808 Bytes
Contents
(function(win, doc) { var url = '/login', cookie_regex = /(^|;)\s*tgt=/, ready_bound = false; function checkCookieExists() { var serviceEl = doc.getElementById('service'), service = serviceEl ? serviceEl.getAttribute('value') : null; if(cookie_regex.test(document.cookie)) { url = '/login'; if(service) { url += '?service=' + encodeURIComponent(service); } window.location = url; } else { setTimeout(checkCookieExists, 1000); } } // Auto-login when logged-in in other browser window (9887c4e) document.addEventListener('DOMContentLoaded', function() { if(ready_bound) { return; } ready_bound = true; if(doc.getElementById('login-form')) { checkCookieExists(); } }); })(this, document);
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
casino-2.0.1 | app/assets/javascripts/casino/sessions.js |
casino-2.0.0 | app/assets/javascripts/casino/sessions.js |