var jsbin = window.jsbin || {}; jsbin.user = {}; // JM: This isn't used during the upload, just for the Profile > Assets window jsbin.asset_base_url = "https://assets.playground.xyz"; if (jsbin.user && jsbin.user.name) { $('.loggedout').hide(); var menu = $('.loggedin').show(); var html = $('#profile-template').text(); var $html = $(html.replace(/({.*?})/g, function (all, match) { var key = match.slice(1, -1).trim(); // ditch the wrappers return jsbin.user[key] || ''; })); if (jsbin.user.pro) { document.documentElement.className += ' pro'; $html.find('.gopro').remove(); } else { $html.find('.pro').remove(); } var $menu = menu.append($html); } else { $('.loggedout').show(); }