(function () { var app = angular.module('Plania'); var BaseURL = document.location.protocol + '//' + document.location.host; var storage = window.localStorage; var fingerprint = storage.getItem('Fingerprint'); if (!fingerprint) { var d = new Date().getTime(); fingerprint = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = (d + Math.random() * 16) % 16 | 0; d = Math.floor(d / 16); return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16); }); storage.setItem('Fingerprint', fingerprint); } app.constant('config', { baseUrl: BaseURL + '/api/', baseUrlApi: BaseURL + '/api/v1/', clientId: 'Plania_web', clientSecret: 'PlaniaWeb', fingerprint: fingerprint }); })();