Skip to content

Instantly share code, notes, and snippets.

@patrickskim
Last active August 29, 2015 14:02
Show Gist options
  • Save patrickskim/2d58610af61b491a3251 to your computer and use it in GitHub Desktop.
Save patrickskim/2d58610af61b491a3251 to your computer and use it in GitHub Desktop.
Remove gifbin from Hipchat
var post_url = "https://giddyapps.hipchat.com/history/room/428265/2014/06/18";
$("a").each(function(){
var str = "" + $(this).attr("href") + ""
if (str.match(/gifb/)) {
var $form = $(this).closest("table").find("form");
$.post(
post_url,
{
action: "delete",
message_id: $form.find("input[name=message_id]").val(),
xsrf_token: $form.find("input[name=xsrf_token]").val(),
message_index: $form.find("input[name=message_index]").val()
} );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment