Skip to content

Instantly share code, notes, and snippets.

@tomoconnor
Created October 13, 2016 10:47
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 tomoconnor/45bc8fb5204c132f94aaa90020e83a6e to your computer and use it in GitHub Desktop.
Save tomoconnor/45bc8fb5204c132f94aaa90020e83a6e to your computer and use it in GitHub Desktop.
Set all bundle options on https://flavourfactory-eliquid.co.uk to cherry menthol, as it's my favourite.
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();
var x = $('select');
var flavour_options = x.slice(1,-1);
flavour_options.each(function(i,v){v.value="cherry-menthol";})
@tomoconnor
Copy link
Author

$$('select').slice(1,-1).forEach(x=>x.value='foo') //seems easier! Thanks @floopily

@tomoconnor
Copy link
Author

$$('select').slice(1,-1).forEach(x=>x.value='cherry-ice-cherry-menthol')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment