Last active
September 14, 2016 23:25
-
-
Save xbalaji/ca4c2eaaa4721242e0cbb03923e7a02b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(function() { | |
q=window.getSelection().toString().replace(/[^0-9]/g,%20''); | |
if (!q) { | |
q=prompt('Enter%20Bugid:') | |
} | |
if (q) { | |
window.open('https://bugs.XYZCompany.com/show_bug.cgi?id='+escape(q)) | |
} else { | |
window.open('http://bugs.XYZCompany.com') | |
} | |
})() | |
You can create a bookmark with the following URI, this when opened, will prompt if there is no selection in the page | |
javascript:(function(){q=window.getSelection().toString().replace(/[^0-9]/g,%20'');if(!q){q=prompt('Enter%20Bugid:')}if(q){window.open('https://bugs.XYZCompany.com/show_bug.cgi?id='+escape(q))}else{window.open('http://bugs.XYZCompany.com')}})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment