Created
May 11, 2020 03:38
-
-
Save elliz/747a141ae0e70acf531f56040f020a76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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