Prevent drupal loading from another javascript module

I have a drupal page that I use in a way that is very different from all the other pages on the site.

I have a module that loads a set of specialized js on this page. I find that my JS does not work well with js from other modules or, possibly, the drupal kernel.

How can I prevent other modules from doing drupal_add_js on this particular page.

Thank!

+3
source share
1 answer

It is impossible to prevent other modules from calling drupal_add_js(), with the exception of cracking the code of these modules.

" " myModule_preprocess_page() $variables['script'] script ( $variables['closure']).

page.tpl.php $scripts .

, , , JavaScript " js ". JavaScript /sloppy , , , .

+4

Source: https://habr.com/ru/post/1735173/


All Articles