cryptpad/www/bounce/main.js

12 lines
475 B
JavaScript
Raw Normal View History

define(['/api/config'], function (ApiConfig) {
if (ApiConfig.httpSafeOrigin === window.location.origin) {
2017-08-28 18:25:05 +08:00
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;
2017-08-28 18:25:05 +08:00
window.location.href = bounceTo;
2017-11-23 19:28:49 +08:00
});