Font Awesome and Jquery

Hi,

How could I change the location of jquery and font awesome files which H5P is using? 

I am currently using Drupal 7 and the H5P module files are coming from my server even I am using a CDN module. 
For example this file: fontawesome-webfont.woff2 comes from my application server (it is about 70kb so relatively huge) 
(referrer: files/h5p/libraries/FontAwesome-4.5/h5p-font-awesome.min.css)
My Drupal installation has also a module "font awesome" which already loads the font awesome fonts from the CDN network. 

So currently my site users are getting 2 times the same file because first the Font Awesome module loads all the files from CDN and then H5P module loads again similar files. Also this file from my server in AWS environment causes costs because every kilobyte is charged.

So what I would like to do is change manually the file instead coming from my local server to some of the CDN networks. Or to have this even in the H5P UI to be able to check "load font awesome from external CDN network" etc. 

 

 

thomasmars's picture

Hi,
You might be able to use Drupal hooks to change where you're loading the styles from. See https://h5p.org/drupal-customization and http://cgit.drupalcode.org/h5p/tree/h5p.api.php, especially the hook_h5p_styles_alter hook should be relevant for changing where you're loading your styles from.