1337x - Torrent page improvements

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

< Feedback on 1337x - Torrent page improvements

Review: OK - script works, but has bugs

§
Posted: 2022.03.25.
Edited: 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!

NotNeoAuthor
§
Posted: 2022.03.30.

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

Post reply

Sign in to post a reply.