FL-IMDB2FL

Link from IMDB to FL

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         FL-IMDB2FL
// @namespace    fl.imdb
// @version      1.2.1
// @description  Link from IMDB to FL
// @author       CRK
// @match        https://www.imdb.com/title/*
// @grant        none
// @license      MIT
// @source <meta property="pageId" content="tt3882082" />
// @source <div class="add_to_checkins" data-const="tt3882082" data-lcn="title-maindetails">
// @source https://filelist.io/browse.php?search=tt3882082&cat=0&searchin=0&sort=2
// @source <span id="titleYear">(<a href="/year/2016/?ref_=tt_ov_inf">2016</a>)</span>
// ==/UserScript==

(function() {
    function hookTheMonkey() {
        var text = document.createElement('snap');
        text.setAttribute("align", "center");
        text.setAttribute("style", "cursor:pointer; display: inline-block; padding-left: 5px;");
        text.innerHTML = `
            <center>
                <input style='background-color:red; color:white; font-weight:bold; border: 0px; border-radius: 3px; padding-bottom: 2px;' type='button' name='FLDownload' id='FLDownload' onclick='window.open(getUrl(), "_blank");' value='FL download' title='!!! FL Download - click me Love Cristina !!!'>
            </center>
        `;

        var script = document.createElement('script');
        script.innerText = `
            function getUrl() {
                let imdbId = document.querySelector('meta[property="imdb:pageConst"]').content;
                let searchUrl = 'https://filelist.io/browse.php?search=' + imdbId + '&cat=0&searchin=0&sort=2';
                return searchUrl;
            }
        `;


         document.body.appendChild(script);
         document.querySelector('svg[class="ipc-icon ipc-icon--share"]').parentElement.parentElement.parentElement.appendChild(text);
    };
    hookTheMonkey();
})();