Skip to content

Instantly share code, notes, and snippets.

@tomgross
Last active December 27, 2015 02:59
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 tomgross/7256426 to your computer and use it in GitHub Desktop.
Save tomgross/7256426 to your computer and use it in GitHub Desktop.
operationsmanager control
/* XXX Post to TFS */
function follow_href(title) {
$('a[title="' + title + '"]').click(function() {
window.location = $(this).attr("href");
});
$('a[title="' + title + '"]').trigger('click');
}
function get_text(selector) {
return $.trim($(selector).text());
}
$.ajax({url: 'http://localhost:5000/api',
type: 'POST',
dataType: 'jsonp',
crossDomain: true,
data: {id: get_text('#ticketId > a'),
subject: get_text('#subject')}}).done(function () {
follow_href('Mitteilungen');
follow_href('Notiz hinzufügen...');});
/* XXX Actually add a note */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment