JavaScript snippets

Change background color = "#E6F6FD";

Change background image (no-repeat) = "#D9F3FF url('background.png') no-repeat center"; = "cover";

Change background image (repeat) = "#D9F3FF url('background.png') repeat center"; = "50%";

Toggle muting audio

var appState = require("helpers/appState");
appState.onToggleVolume(); //mute

Append scripts to the published story_html5.html file

var appendBody = '<script src=""></script><script type="text/javascript" src="cryptojs_v3.1.2.js"></script><script type="text/javascript" src="xapiwrapper.min.js"></script><script type="text/javascript" src="xapi.js"> </script>';

// Append the header with the code contained in the variable.