Open stevermeister opened 8 years ago
it looks like load is undefined for some cases:
Object {languages: Object, calendar_urls: Object, load: undefined}
it looks like it's broken from version 1.5.2
I think it is related to #11 PR :D
+1
Changing the line:
addtocalendar.load = ready(function () {
to:
addtocalendar.load = function () {
And changing:
});
addtocalendar.load();
to:
};
addtocalendar.load();
fixes the problem for me.
Hope this helps.
Sorry for long response time. Please check out the fix!
@atc-master great! thank you!
stange, version 1.5.3 is still broken for me (tried via bower)
I'm still getting this error:
Also have this same exact issue.
I did some digging since the plugin does what I want minus erring with the NPM package:
The NPM version is different than the GitHub::Master version. The NPM version doesn't contain the NPM fixes but the GitHub::Master one does.
So for me, I ended up including the script this way:
<script type="text/javascript">(function () {
if (window.addtocalendar)if(typeof window.addtocalendar.start == "function")return;
if (window.ifaddtocalendar == undefined) { window.ifaddtocalendar = 1;
var d = document, s = d.createElement('script'), g = 'getElementsByTagName';
s.type = 'text/javascript';s.charset = 'UTF-8';s.async = true;
s.src = ('https:' == window.location.protocol ? 'https' : 'http')+'://addtocalendar.com/atc/1.5/atc.min.js';
var h = d[g]('body')[0];h.appendChild(s); }})();
</script>
and I was finally able to use it in a callback.
@atc-master Can you update the npm package to use the fix please?
Guys! Sorry for long time response. Thank you for help and support!
Hi, would it be possible to publish the latest version of ATC to npm? This would fix this issue for users of npm, Bower and unpkg.com. Please let me know if you need help on how to do this
Would also be happy to help with this too.. I've recently learnt you can automate the process of deploying to NPM. Me and @SiAdcock would be happy to help you out with this if you needed a hand.
strange error during application unit tests.