INNER CODE UNIT · JavaScript
getPlayTemplate
increpare/flickgame · flickgame_share.js:8
function getPlayTemplate() {
if (templatePromise) return templatePromise;
if (typeof window.FLICKGAME_STANDALONE_PLAY_HTML_B64 === 'string' && window.FLICKGAME_STANDALONE_PLAY_HTML_B64.length > 0) {
templatePromise = new Promise(function (resolve, reject) {
try {
var b64bin = atob(window.FLICKGAME_STANDALONE_PLAY_HTML_B64);
var b64bytes = new Uint8Array(b64bin.length);
for (var i = 0; i < b64bin.length; i++) {
b64bytes[i] = b64bin.charCodeAt(i) & 0xff;
}
resolve(new TextDecoder('utf-8').decode(b64bytes));
} catch (e) {
reject(e);
}
});
return templatePromise;
}
templatePromise = new Promise(function (resolve, reject) {