Using this hook comes with a big performance penalty, since the variables are injected into the <head> and load before even the article content. We should switch to another hook, or a ResourceLoader data module. Our variable names alone add up to 128 bytes:
"wgPopupsReferencePreviews":!0, "wgPopupsReferencePreviewsBeta":!0, "wgPopupsConflictsWithNavPopupGadget":!1, "wgPopupsConflictsWithRefTooltipsGadget":!0,