Register the block listener.