How to disable loading the external script “jquery.browser”?
-
Hello Support,
I would like to stop the loading of external files, because in Europe this can have legal consequences without the user’s consent.
Your plugin is great and I use it regularly. However, with the Lightbox variant “Fancybox” it loads a file from the CDN “cdn.cloudflare”:
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.1.0/jquery.browser.min.js?ver=3.30' id='fancybox-0-js'></script>
Since I am embedding this file locally, I would like to avoid this external source.
The following two attempts have been unsuccessful so far:
function dequeue_footer_jquery() { wp_dequeue_script( 'fancybox-0' ); wp_deregister_script('fancybox-0'); } add_action( 'wp_print_scripts', 'dequeue_footer_jquery', 100 );
function mywptheme_child_deregister_script() { wp_dequeue_script( 'fancybox-0' ); wp_deregister_script('fancybox-0'); } add_action( 'wp_enqueue_scripts', 'mywptheme_child_deregister_script', 100 );
Please be so kind and give me a short instruction how to solve the problem.
Thank you in advance!
Jomi
- The topic ‘How to disable loading the external script “jquery.browser”?’ is closed to new replies.