cryptpad/www/bounce/main.js
2017-12-12 10:47:01 +01:00

11 lines
475 B
JavaScript

define(['/api/config'], function (ApiConfig) {
if (ApiConfig.httpSafeOrigin !== window.location.origin) {
window.alert('The bounce application must only be used from the sandbox domain, ' +
'please report this issue on https://github.com/xwiki-labs/cryptpad');
return;
}
var bounceTo = decodeURIComponent(window.location.hash.slice(1));
if (!bounceTo) { return; }
window.opener = null;
window.location.href = bounceTo;
});