Skip to content

Instantly share code, notes, and snippets.

@isquick82
Created September 18, 2017 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isquick82/fd1d46eeacaab0978e48271323afee33 to your computer and use it in GitHub Desktop.
Save isquick82/fd1d46eeacaab0978e48271323afee33 to your computer and use it in GitHub Desktop.
var utils = optimizely.get('utils');
utils.waitForElement('body')
 .then(function(elem) {
   // Prepend the extension html to the body
   elem.insertAdjacentHTML('afterbegin', extension.$html);
 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment