js.urp.js Maven / Gradle / Ivy
The newest version!
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.urp = {}));
}(this, function (exports) { 'use strict';
var config = {profiles:[],profile:{},api:""};
function processProfileUrl() {
for(var i=0;i < config.profiles.length;i++){
var profile = config.profiles[i];
if(!profile.url){
profile.url = (location.origin + location.pathname +"?contextProfileId=" +profile.id)
}
}
}
function init(profiles,cookie){
var profile=null;
if(cookie && cookie.profileId){
for(var i=0;i