Skip to main content
Participant
Sep 8, 2020 8:17 PM UTC
Question

Force captivate to use custom CPM.js

I got a CPM.js located in C:\Program Files\Adobe\Adobe Captivate 2019 x64\HTML\assets\js.

 

I tried to update the index.html file to use the above file and put the following line before /head:

</script>
     <script type="text/javascript" src="C:\Program Files\Adobe\Adobe Captivate 2019 x64\HTML\assets\js\CPM.js"></script>

However, when I look at the CPM.js file that is produced after publishing, I do not see the custom CPM.js file change reflected.

I used to have this working, but needed to do a reinstall and forgot how to make this work again. Any pointers would be greatly appreciated.

 

 

    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    TLCMediaDesign
    Inspiring
    Oct 19, 2022 4:17 PM UTC

    Just change the name, it is more than likely getting overwritten when Captivate creates it's CPM.js

    Translate
    Participant
    Oct 18, 2022 5:06 PM UTC
    In the body of the index.html file you will find a script section containing this line:
    var lJSFiles = [ @JSFILES_ARRAY ];
    Try adding the following line immediately after:
    lJSFiles.push('assets/js/CPM.js');
    Not sure if the default CPM.js will overwrite yours or not, but this is how I get other javascript files to pull on preview or publish.
    Translate
    Paul Wilson CTDP
    Community Expert
    Community Expert
    Sep 9, 2020 8:40 AM UTC

    I've only copied and pasted any custom CPM.js into my final published project. I've never tried to have a custom index.html file point to a custom CPM.js file. It's more of a manual process but copying pasting the edited version, although manual, works fine. 

    Translate
    Paul Wilson, CTDP