Files
zulip/static/js/page_params.js
Anders Kaseorg 6ec808b8df js: Add "use strict" directive to CommonJS files.
ES and TypeScript modules are strict by default and don’t need this
directive.  ESLint will remind us to add it to new CommonJS files and
remove it from ES and TypeScript modules.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-31 22:09:46 -07:00

16 lines
496 B
JavaScript

"use strict";
/* global __webpack_public_path__:writable */
const t1 = performance.now();
window.page_params = $("#page-params").remove().data("params");
const t2 = performance.now();
window.page_params_parse_time = t2 - t1;
if (!window.page_params) {
throw new Error("Missing page-params");
}
// Webpack exposes this global for dynamic configuration of publicPath.
// https://webpack.js.org/guides/public-path/#on-the-fly
__webpack_public_path__ = window.page_params.webpack_public_path;