Skip to content

Instantly share code, notes, and snippets.

@eagletmt
Created February 8, 2010 10:05
Show Gist options
  • Save eagletmt/298028 to your computer and use it in GitHub Desktop.
Save eagletmt/298028 to your computer and use it in GitHub Desktop.
commands.addUserCommand(['matrixcode'], '',
function(args) {
var $LX = plugins.libly.$U.getFirstNodeFromXPath;
var $LXs = plugins.libly.$U.getNodesFromXPath;
$LXs('//th[@align="left"]').slice(2).forEach(function(t) {
var x = t.innerHTML;
$LX('../td/input', t).value = liberator.globalVariables.matrix_code[x[1]][x[3]-1];
});
$LX('//input[@type="submit"]').click();
}, null, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment