Skip to content

Instantly share code, notes, and snippets.

@yachi
Created August 11, 2011 07:29
Show Gist options
  • Save yachi/1139088 to your computer and use it in GitHub Desktop.
Save yachi/1139088 to your computer and use it in GitHub Desktop.
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "(" + callback.toString() + ")();";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
}
function runthehell(){
jQuery('span.messageBody').each(function(){console.log($(this).html())});
};
addJQuery('runthehell');
@yachi
Copy link
Author

yachi commented Aug 26, 2011

function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "(" + callback.toString() + ")();";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
}
function runthehell(){
$("#issue_done_ratio").children().each(function(){
if ($(this).text()=="100 %"){
$(this).attr("selected","true");
}
});
$('#issue-form').submit();
};
addJQuery('runthehell');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment