1337x - Torrent page improvements

Makes titles longer on the torrent page and optionally enables the detail box when available.

< 腳本1337x - Torrent page improvements的回應

評論:普通 - 腳本能使用,但有一些問題

§
發表於:2022-03-25
編輯:2022-03-25

Very nice script, but I found one problem. Older movies on 1337x have only nine characters for the IMDB ID, whereas newer ones have 10. I'm no programmer, but I was able to fix the script with changes in the following section:

if(usingIMDBLinker) {
    foundIMDB = document.getElementById("description").innerHTML.split("imdb.com/title/")[1];
    if (foundIMDB != null) { //if code was found...
        foundIMDB = foundIMDB.substr(0, 10); //...get it.
        if (!/^tt[0-9/]{8}$/.test(foundIMDB)) { //if code is invalid...
            foundIMDB = null; //...make it null
        }
        if (foundIMDB.substr(9,1) == "/") {
            foundIMDB = foundIMDB.substr(0,9);
        }
    }

I'm sure you could easily prettify this and make it more efficient. Thanks for the work!

NotNeo作者
§
發表於:2022-03-30

Updated.
Should now support any imdb code that is 9 or more characters long and ends in a number

發表回覆

登入以回復