Skip to content

Instantly share code, notes, and snippets.

@elliz
Created May 11, 2020 03:38
Show Gist options
  • Save elliz/747a141ae0e70acf531f56040f020a76 to your computer and use it in GitHub Desktop.
Save elliz/747a141ae0e70acf531f56040f020a76 to your computer and use it in GitHub Desktop.
// Bookmarklet for Azure DevOps work items
// Select a number, click bookmarklet and open workitem with that id in new window
// Can edit using tools such as http://subsimple.com/bookmarklets/jsbuilder.htm
// based on code found at https://stackoverflow.com/questions/26261323
javascript:
(function(){
const path = 'your/path-here'; // usually Domain/projectId
s=document.selection?document.selection.createRange().text:window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection():'';
if(s==''){
s=prompt('Enter%20ID%20of%20workitem%20:','');
}
if(s){
window.open('https://dev.azure.com/'+path+'/_workitems/edit/'+s,'_blank')
}
;
}
)()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment