Skip to content

Instantly share code, notes, and snippets.

@thisjustin
Last active March 8, 2020 16:50
Show Gist options
  • Select an option

  • Save thisjustin/7a0823d51059a6b79e0443e8f4b40594 to your computer and use it in GitHub Desktop.

Select an option

Save thisjustin/7a0823d51059a6b79e0443e8f4b40594 to your computer and use it in GitHub Desktop.
add no bags comment to all king soopers items
function fillOutForms() {
$('.WebBuySimpleAccordion-toggleButton').click();
$('.items-center input[data-qa=cart-page-item-instructions-input]').val('No bags, will bring own');
// TODO need to trigger saving via some sort of keypress or focus event in inputs
}
// fill in mass comments on king soopers items in carts to say you don't want bags instead of clicking in each one individually
(function() {
var script = document.createElement("SCRIPT");
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js';
script.type = 'text/javascript';
script.onload = function() {
var $ = window.jQuery;
fillOutForms();
};
document.getElementsByTagName("head")[0].appendChild(script);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment