Modifies background.js to handle an arbitrary number of keyframes.