Stylistically I have a preference for:
'''javascript
var beforesend_callback = function(xhr, settings) {
'''