timezone-js icon indicating copy to clipboard operation
timezone-js copied to clipboard

for jsonp load

Open vflash opened this issue 10 years ago • 5 comments

vflash avatar Nov 20 '13 14:11 vflash

<script type="text/javascript" src="./tzdata.js?jsonp=tzdata">/*var tzdata = {...preparse...};*/</script>
<script type="text/javascript" src="./timezone-js/src/date.js"></script>

<script>
    timezoneJS.timezone.transport = function(o) {
        var data = o.url == 'tzdata' ? tzdata : '';
        if (o.async && typeof o.success == 'function') {
            o.success(data)
        };
        return data;
    };

    var _tz = timezoneJS.timezone;
    _tz.loadingScheme = _tz.loadingSchemes.MANUAL_LOAD;
    _tz.loadZoneJSONData('tzdata', true);
</script>

vflash avatar Nov 20 '13 20:11 vflash

We have a test suite, can you add it to our test suite?

longlho avatar Nov 20 '13 20:11 longlho

not, I can not use Jake ~ https://gist.github.com/vflash/e75f00dcf2cb923b796d,

vflash avatar Nov 20 '13 20:11 vflash

This has been around for a while -- should it be closed if not merged?

PunkChameleon avatar May 15 '14 20:05 PunkChameleon

Hmm I haven't got time to write a test for it yet

longlho avatar May 15 '14 20:05 longlho