torrentsTime / embed

Embed Torrents Time in your site or project with a tiny piece of code
MIT License
335 stars 70 forks source link

Have an issue with a JavaScript line #24

Open jeremyongws opened 8 years ago

jeremyongws commented 8 years ago
window.onload = function(){
    setTimeout(function(){
        if(torrentsTime.embed.setup.poster && !torrentsTime.embed.wrapper.firstChild.style.background){
            torrentsTime.embed.wrapper.firstChild.style.background='#000 url('+torrentsTime.embed.setup.poster[0]+') no-repeat center center';
            torrentsTime.embed.wrapper.firstChild.style.backgroundSize='cover';
        }

        setTimeout(function(){
            if(window.top==window.self && torrentsTime.setup.browser=='firefox' && torrentsTime.setup.isInstalled && torrentsTime.embed.plugin && !torrentsTime.embed.plugin.isInitialized){
                var arrowimg = (new Image);
                arrowimg.src='arrow.png';
                document.body.appendChild(arrowing);
                arrowimg.setAttribute('style', 'position:fixed;right:40px;top:10px;z-index:99999;animation:fadeInOut 1s linear infinite');
                arrowimg.setAttribute('id','_tt_arrowimg');

                torrentsTime.functions.initialized = function(){
                    var arrowimg = document.getElementById('_tt_arrowimg');
                    arrowimg.parentNode.removeChild(arrowing);
                }
            }
        },1000)

    },1300)
}

if(torrentsTime.embed.setup.poster && !torrentsTime.embed.wrapper.firstChild.style.background){

torrentsTime.embed.setup.poster evaluates to nil somehow.

jeremyongws commented 8 years ago

torrent URL was https://torcache.net/torrent/C161F1DDD2797A7918D241B4386718AB12E08CC0.torrent?title=[kat.cr]game.of.thrones.s06e03.720p.hdtv.x264.avs.rartv