Skip to content

Instantly share code, notes, and snippets.

@daverau-optimizely
Last active August 2, 2017 17:44
Show Gist options
  • Select an option

  • Save daverau-optimizely/c28519d5c80c5b08f3c9fa4c2587c5d9 to your computer and use it in GitHub Desktop.

Select an option

Save daverau-optimizely/c28519d5c80c5b08f3c9fa4c2587c5d9 to your computer and use it in GitHub Desktop.
// Create JS bookmarklet here: http://mrcoles.com/bookmarklet/
// Toggle function
function toggleReact(key) {
if (localStorage.getItem(key) === 'true') {
localStorage.setItem(key,false);
console.log('Highlighting has been disabled.');
} else {
localStorage.setItem(key,true);
console.log('Highlight React enabled!');
}
}
toggleReact('show_ouireact');
//toggleReact('show_react');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment