Trying to generate the bookmarklet in IE results in an "Access is denied" error. This is because the JS makes a post to the API at http://closure-compiler.appspot.com/compile to minify the JS for use in the bookmarklet. IE blocks this request because it's on a different domain.

To get around this, define a menu callback in the module and make the Ajax on the bookmarklet form call that instead. The module can then make a request to the third-party API using cURL and pass the returned value back to the page.

While I'm adding this, I'll probably re-factor the JS: there's no sense building the bookmarklet code in JS just to pass it to the server, then to the API. The bookmarklet code generation can be moved into the module, so that the Ajax call made to the new menu callback will only include the user's selections from that form.

Comments

BrockBoland’s picture

Note: if possible, get the blank tab functionality working: #1378772: Fix bookmarklet to work on new tabs with no content