Wikipedia talk:User scripts/Guide: Difference between revisions
Content deleted Content added
→Ajax and cross-origin requests: new section |
|||
Line 79:
:Good points, I agree. {{done}}. I replaced Logan with Tampermonkey. –[[User:Novem Linguae|<span style="color:limegreen">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 10:04, 7 September 2021 (UTC)
::@[[User:Novem Linguae|Novem Linguae]] That was swift. :) BTW, I'm still a little curious about what Logan is... [[User:Betty|Betty]] ([[User talk:Betty|talk]]) 11:32, 7 September 2021 (UTC)
== Ajax and cross-origin requests ==
Hi! The documentation says, in the Ajax section, that "AJAX scripts cannot reach a page on a different server (for example, google.ca or en.wikisource.org from en.wikipedia.org". I'm writing a user script that requires making a query to a tool hosted in Toolforge. I thought this would not be possible (given what the documentation says), but I found that `$.ajax` is being able to fetch resources from it, as long as other server includes the appropriate CORS Allow-Origin headers. Am I misinterpreting the documentation? Or has this changed lately? Thanks! [[User:Diegodlh|Diegodlh]] ([[User talk:Diegodlh|talk]]) 16:02, 12 April 2022 (UTC)
|