blob: 632bc69800619717c4e9b19407d98a99d599f3bd [file] [log] [blame]
import {getOptions} from '../common/optionsUtils.js';
export async function setUpRedirectIfEnabled(options = null) {
if (options === null) options = await getOptions(['redirect']);
if (options.redirect) {
setUpRedirect();
}
}
function setUpRedirect() {
window.TWPTRedirectHash = window.location.hash;
// We're preloading the redirect option so we can redirect faster in
// publicThread.js without having to retrieve the options again.
window.TWPTShouldRedirect = true;
}