Adapted script to jQuery. The iframe approach for local exports has changed to postMessage communication.