I\'m trying to access wikipedia using javascript+CORS
As far as I know, wikipedia should support CORS: http://www.mediawiki.org/wiki/API:Cross-site_requests
As of today, Wikipedia supports CORS requests by using the normal ajax requests (no need of JSONP/callback manipulation).
This can be done by setting the origin in the API call.
For authenticated requests, this must match the one of the one of the "origins" in the Origin header exactly (you need to set this using the beforeSend property while making an ajax call).
For unauthenticated requests, you can simply set it as an asterisk (*), and it works when using a simple $.getJSON from your domain.
Example api call:
https://en.wikipedia.org//w/api.php?action=opensearch&format=json&origin=*&search=stack&limit=10
More at the MediaWiki API sandbox: MediaWiki API sandbox