Skip to content

Instantly share code, notes, and snippets.

@r-k-b
Last active May 26, 2016 08:48
Show Gist options
  • Save r-k-b/cd061d055581cba5d808d5e36a726ddd to your computer and use it in GitHub Desktop.
Save r-k-b/cd061d055581cba5d808d5e36a726ddd to your computer and use it in GitHub Desktop.
Set Payment Method to 11
// ==UserScript==
// @name Set Payment Method to 11
// @namespace https://gist.github.com/r-k-b/
// @version 1.0.1
// @description DESCRIPTIONGOESHERE
// @author Robert K. Bell
// @homepage https://gist.github.com/673e9c53d0b0da4994b48d2d7423ff8d
// @downloadURL https://gist.github.com/robert-bosweb/673e9c53d0b0da4994b48d2d7423ff8d/raw/set-BC-paymentmethodtype-to-11.user.js
// @match *
// @grant none
// @run-at context-menu
// ==/UserScript==
/* jshint esnext: true */
(() => {
'use strict';
let pms = $('[name=PaymentMethodType]');
let oldVal = pms.val();
pms
.val('11')
.change();
console.groupCollapsed('Changed paymentMethodType from', oldVal, 'to 11');
console.log('Target:', pms);
console.groupEnd();
})(jQuery);
// todo: handle multiple targets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment