HitkoDev / Videobox-MODX

Video player and gallery plugin for MODX
https://hitko.eu/videobox/
GNU General Public License v3.0
2 stars 0 forks source link

Snippet option to prevent jQuery loading (twice) ? #2

Closed hitodev closed 7 years ago

hitodev commented 8 years ago

hello

First thank you very much for your extra.

For information, when jQuery is already loaded before videobox snippet call, I need to comment the following line in videobox.class.php :

//w.mod DISABLED $this->modx->regClientScript($this->config['assets_url'] . 'js/jquery.min.js');

Without that videobox snippet breaks some JS and I get errors.

A snippet option to prevent jQuery loading will be appreciated !

Something like &loadjquery=0

HitkoDev commented 8 years ago

This could easily be achieved by changing that line to

if(!isset($this->config['loadjquery']) || $this->config['loadjquery']) $this->modx->regClientScript($this->config['assets_url'] . 'js/jquery.min.js');

However, Videobox 6 no longer needs jQuery, so you can update to the latest RC to fix your problem.