Separate Javascript file

Hi Guys

Just got off the phone with a publisher ‘Cogora’ who seem to require the javascript to not be a separate file within an online advert (MPU 300x250), is this something I can do in Hype or is there a work flow to answer the request?

Many Thanks

John

You can copy the content of the runtime into the HTML file. Into a script tag instead of referencing it as a dependency. If you need this to be an automated process you can create an export script (Python based).

Manual approach
Just do it for the banners in question by hand with a text editor like sublime etc,

Automated approach
A template to write your own exporter for Hype can be found here:
https://github.com/tumult/hype-export-scripts/

With the sample export script you could add the runtime (thin, min version) into the head section
https://github.com/tumult/hype-export-scripts/blob/master/SampleExportScript/SampleExportScript.hype-export.py

### There is more to it… this needs a different DocumentLoader @Daniel @jonathan

A modified custom python script is needed for this publisher.

Many thanks @MaxZieb @petester for looking into this. Would be interested to see what solution @Daniel @jonathan could suggests. Very odd that Im having this issue as other publishers haven’t had the same issue.

Cheers again

Daniel's post shows the method:

Let us know if that does the trick!

The other alternative is to use a CDN for the file and use that setting; we're looking to provide a more permanent solution in the future.

I added the runtime to the head section and it didn’t work … while I was trying to help. I am going to test this as suggested in the body section in an exporter script.

Feel free to send a zip of the version you made that didn’t work; I’d be curious about the problem :). Fundamentally there shouldn’t be an issue with the approach @Daniel did and I have done it several times myself.