var Paywall = { api: 'https://tgt.tamedia.ch/cre-1.0/api', serviceId: 'magazin', host: 'https://www.dasmagazin.ch', pluginDir: '/wp-content/plugins/srsly-paywall', checkForGlobalSession: function () { var sucessUrl = this.host + this.pluginDir + '/Paywall/Cors/session.html'; var failureUrl = this.host + this.pluginDir + '/Paywall/Cors/noSession.html'; var loginUrl = failureUrl; url = this.api + '/auth_v2/validate_global_session?service_id=' + this.serviceId + '&success_url=' + sucessUrl + '&failure_url=' + failureUrl + '&login_url=' + loginUrl; $('body').append($("