Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Delete all deals in Highrise by 37Signals (basecamp.com)
/**
* This script should be pasted into a Browser debug console
* after clicking the Highrise links to show all deals.
*
* It may need to be run several times to deal with the massive amount
* of AJAX queries.
*/
// Inject jQuery
var s=document.createElement('script');
s.setAttribute('src','//code.jquery.com/jquery.js');
document.getElementsByTagName('body')[0].appendChild(s);
// Give jQuery time to load
setTimeout( function(){
var $ = jQuery;
// Select all deal links
$('tr.deal h3 a').each(function(){
var baseUrl = $(this).prop('href');
// Load the confimation page
$.get( baseUrl + '/confirm_destroy', function( data ) {
var $html = $(data);
// Submit the confirmation form
var $form = $html.find('div.submit form');
$.post( baseUrl, $form.serialize() );
} );
});
}, 3000 );
@nerdvibe

This comment has been minimized.

Copy link

@nerdvibe nerdvibe commented Jul 7, 2017

Many thanks for sharing this gist! It's absurd that highrise doesn't provide a bulk delete :/

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