cryptpad/www/poll/main.js

30 lines
841 B
JavaScript
Raw Normal View History

2017-09-27 16:52:04 +00:00
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/api/config',
2017-12-01 15:05:20 +00:00
'/common/dom-ready.js',
2017-09-27 16:52:04 +00:00
'/common/sframe-common-outer.js',
2020-11-04 10:22:31 +00:00
], function (nThen, ApiConfig, DomReady, SFCommonO) {
2017-09-27 16:52:04 +00:00
// Loaded in load #2
2020-01-27 11:18:25 +00:00
var hash, href;
2017-09-27 16:52:04 +00:00
nThen(function (waitFor) {
2017-12-01 15:05:20 +00:00
DomReady.onReady(waitFor());
2017-09-27 16:52:04 +00:00
}).nThen(function (waitFor) {
2020-11-04 10:22:31 +00:00
var obj = SFCommonO.initIframe(waitFor, true);
href = obj.href;
hash = obj.hash;
if (!hash) {
window.location.href = '/form/';
waitFor.abort();
}
2017-09-27 16:52:04 +00:00
}).nThen(function (/*waitFor*/) {
SFCommonO.start({
2020-01-27 11:18:25 +00:00
hash: hash,
href: href,
2018-09-18 14:36:29 +00:00
useCreationScreen: true,
messaging: true
});
2017-09-27 16:52:04 +00:00
});
});