You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@spratt says "Does it work if you build the bookmarklet in dev mode? I think the root cause of this issue was that dev mode builds bookmarklet.js and production builds bookmarklet.min.js"
All the production script does is uglify the bookmarklet.js to a file named bookmarklet.min.js code. The code still runs fine. The issue I'm getting is that the server is no longer sending an OPTIONS header.
Activity
spratt commentedon Apr 19, 2013
You're right, because it should be using bookmarklet.min.js. At least, that's what the build script builds.
Also, there's a typo in the build script that outputs it to bookmarket/ instead of bookmarklet/. See: http://review.steamedpears.com/bookmarket/bookmarklet.min.js
spratt commentedon Apr 19, 2013
Fixed the typo in the build script: http://review.steamedpears.com/bookmarklet/bookmarklet.min.js
cdelahousse commentedon Apr 19, 2013
Shit.
Nor is /bookmarklet/style.css being served.
spratt commentedon Apr 19, 2013
Yeah, that file doesn't even get built by the build script.
cdelahousse commentedon Apr 19, 2013
Also, the cors module isn't working.
spratt commentedon Apr 19, 2013
What makes you say that?
cdelahousse commentedon Apr 19, 2013
I'm getting this HTTP header/message:
OPTIONS
(failed)
Origin http://www.lipsum.com is not allowed by Access-Control-Allow-Origin.
spratt commentedon Apr 19, 2013
Cool. Things to fix.
cdelahousse commentedon Apr 19, 2013
I'm fixing the CSS now...
cdelahousse commentedon Apr 19, 2013
@spratt says "Does it work if you build the bookmarklet in dev mode? I think the root cause of this issue was that dev mode builds bookmarklet.js and production builds bookmarklet.min.js"
All the production script does is uglify the bookmarklet.js to a file named bookmarklet.min.js code. The code still runs fine. The issue I'm getting is that the server is no longer sending an OPTIONS header.
cdelahousse commentedon Apr 19, 2013
Hold on. I'll retest locally.
spratt commentedon Apr 19, 2013
I appreciate everything you're saying here, but the context of that question was a line of code that specifically references the uglified version.
cdelahousse commentedon Apr 19, 2013
Even testing locally on the unminified build of the bookmarklet against my local install, I still get the same OPTION error.
spratt commentedon Apr 19, 2013
Look: that question is about a GET request for bookmarklet.min.js when you may have only built bookmarklet.js. The CORS issue is separate.
cdelahousse commentedon Apr 19, 2013
Look: that's clearer. Thanks.