Skip to content
Snippets Groups Projects

Resolve "Specific Async Script Loading by using a Page Variable"

Compare and Show latest version
261 files
+ 2273
1072
Compare changes
  • Side-by-side
  • Inline
Files
261
@@ -30,16 +30,14 @@ $(() => {
@@ -30,16 +30,14 @@ $(() => {
}
}
});
});
setTimeout(() => {
// If we're accessing a permalink, ensure it is not inside a
// If we're accessing a permalink, ensure it is not inside a
// closed js-toggle-container!
// closed js-toggle-container!
const hash = window.gl.utils.getLocationHash();
const hash = window.gl.utils.getLocationHash();
const anchor = hash && document.getElementById(hash);
const anchor = hash && document.getElementById(hash);
const container = anchor && $(anchor).closest('.js-toggle-container');
const container = anchor && $(anchor).closest('.js-toggle-container');
if (container) {
if (container) {
toggleContainer(container, true);
toggleContainer(container, true);
anchor.scrollIntoView();
anchor.scrollIntoView();
}
}
}, 0);
});
});
Loading