It works for pages on the same subdomain (
en.wikipedia.org) and maybe
also the same domain.
I can suggest the following solutions:
1) Edit security settings on users' computers to allow the loading of
remote javascript (unlikely)
2) Edit users' "hosts" file to map "r3m0t.wikipedia.org" to your
own
server's IP address (= Google). Then use document.write() to include
the script.
3) Attempt to copy the script to a page in the subdomain. (Actually,
it will be unable to contact
google.com)
4) Create a page in the subdomain which is a REDIRECT to the
javascript file on
google.com
It's difficult to integrate sites from different domains, and perhaps
for good reason.
On 19/01/06, Evan Martin <evanm(a)google.com> wrote:
On 1/19/06, Tony Bowden
<tony-wikitech(a)kasei.com> wrote:
On Thu, Jan 19, 2006 at 11:43:45PM +1100, Stephen
Bain wrote:
There's global css and js files for several
of the skins, in the
Mediawiki namespace. For example, on enwiki:
http://en.wikipedia.org/wiki/MediaWiki:Monobook.js
http://en.wikipedia.org/wiki/MediaWiki:Monobook.css
So everyone using the Monobook skin gets those files. You don't need
to modify any code, it's all stored in the database.
AIUI though, there's no way from within a Javascript file like this to
load another remote Javascript file (i.e. the one from Google's
servers).
I don't know the full scope of this particular problem, but I believe
using document.write() to put out a <script> tag works. Beware,
though, for this introduces more latency (the source document has to
wait for the inserted one to load).
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/wikitech-l