12 lines
388 B
JavaScript
12 lines
388 B
JavaScript
(function (Drupal, once) {
|
|
Drupal.behaviors.pagedPrint = {
|
|
attach(context) {
|
|
once('pagedPrint', 'body', context).forEach(() => {
|
|
const params = new URLSearchParams(window.location.search);
|
|
if (params.get('print') === '1' && window.PagedPolyfill) {
|
|
window.PagedPolyfill.preview();
|
|
}
|
|
});
|
|
}
|
|
};
|
|
})(Drupal, once); |