简体   繁体   中英

Separate Addthis js file

I would like to add a separate AddThis JS file

Currently it using its own CDN link:

<script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=xxx"></script>

I tried to copy all the code and make my own addthis.js file but it didn't work.

I also tried the following:

<script type="text/javascript" src="addthis.js#pubid=xxx"></script>

But I didn't work.

Can someone tell me how do fix it?

Thanks.

Unfortunately, the addthis_widet.js code isn't meant to be hosted by websites. We reference other JS files which are hosted on our CDN, but since they are relative to the addthis_widget.js file, we won't be able to load them. Also, we update the addthis_widget.js to reference updated files with fixes and new features, so if you try to host it yourself, you won't get updates. Is there a reason why you want host the file yourself?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM