Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@MattArnold
Last active February 5, 2018 19:15
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 MattArnold/34a133c0712c0e8e33f7ccb9e4bfe24f to your computer and use it in GitHub Desktop.
Save MattArnold/34a133c0712c0e8e33f7ccb9e4bfe24f to your computer and use it in GitHub Desktop.
Set Transaction Search Settings On Cybersource
// ==UserScript==
// @name Set transaction search settings on Cybersource
// @namespace https://gist.githubusercontent.com/MattArnold
// @version 0.2
// @description Set search settings
// @author You
// @updateURL https://gist.githubusercontent.com/MattArnold/34a133c0712c0e8e33f7ccb9e4bfe24f/raw/ec2cef0052db860f6f36f0bcf69575aeb1f671bb
// @downloadURL https://gist.githubusercontent.com/MattArnold/34a133c0712c0e8e33f7ccb9e4bfe24f/raw/ec2cef0052db860f6f36f0bcf69575aeb1f671bb
// @match https://ebc.cybersource.com/ebc/transactionsearch/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
$(document).ready(function() {
$('select[name=searchField] option:contains("Account Number")').attr('selected', 'selected');
window.setTimeout(function() {
document.TransactionSearchForm.searchType[0].checked = true;
document.TransactionSearchForm.searchField.disabled = false;
document.TransactionSearchForm.searchValue.disabled = false;
document.TransactionSearchForm.searchApplication.disabled = true;
document.TransactionSearchForm.searchReply.disabled = true;
$('input[name=searchValue]').focus();
}, 100);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment