Skip to content

Instantly share code, notes, and snippets.

@devinmancuso
Last active August 29, 2015 14:24
Show Gist options
  • Save devinmancuso/d53262bf150341999b7b to your computer and use it in GitHub Desktop.
Save devinmancuso/d53262bf150341999b7b to your computer and use it in GitHub Desktop.
Inject browser test status table template into Jira bug ticket description textarea
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3.2",function($,L){var caretPos = document.getElementById("description").selectionStart;var textAreaTxt = $("#description").val();var txtToAdd = "\\\\\r\n\\\\\r\n*Testing status*\r\n|| OS X || || || WIN || || || || IPAD || || ANDROID || || || \r\n|| SAFARI || CHROME || FF || IE11 || IE10 || FF || CHROME || SAFARI || CHROME || INTERNET || CHROME || FF ||\r\n| (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) |\r\n\\\\\r\n\\\\\r\n";$("#description").val(textAreaTxt.substring(0, caretPos) + txtToAdd + textAreaTxt.substring(caretPos));});
javascript:(function(e,a,g,h,f,c,b,d){
if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){
c=a.createElement("script");
c.type="text/javascript";
c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";
c.onload=c.onreadystatechange=function(){
if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){
h((f=e.jQuery).noConflict(1),b=1);
f(c).remove()}};
a.documentElement.childNodes[0].appendChild(c)
}
})
(window,document,"1.3.2",function($,L){
var caretPos = document.getElementById("description").selectionStart;
var textAreaTxt = $("#description").val();
var txtToAdd = "\\\\r\n
\\\\r\n
*Testing status*\r\n
|| OS X || || || WIN || || || || IPAD || || ANDROID || || || \r\n
|| SAFARI || CHROME || FF || IE11 || IE10 || FF || CHROME || SAFARI || CHROME || INTERNET || CHROME || FF ||\r\n
| (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) |\r\n
\\\\r\n
\\\\r\n";
$("#description").val(textAreaTxt.substring(0, caretPos) + txtToAdd + textAreaTxt.substring(caretPos) );
});
// Props to Ben Alman's bookmarklet boilerplate http://benalman.com/projects/run-jquery-code-bookmarklet/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment