shankarnakai
9/10/2017 - 11:35 PM

NETFLIX

NETFLIX

(function() {
    var titles = document.getElementsByClassName('lockup title_card');
    var input = document.createElement("textarea");
    var text = "";

    for (var i = 0; i < titles.length; i += 1) {
        text += titles[i].getAttribute('aria-label') + "\n";
    }

    input.name = "content";
    input.maxLength = "5000";
    input.setAttribute("style","color:#333");
    input.cols = "80";
    input.rows = "40";
    input.value = text;
    document.body.appendChild(input); //appendChild
})();
(function() {
    var input = document.createElement("textarea");
    var button = document.createElement("button");

    input.id = "tmp_titles";
    input.name = "content";
    input.maxLength = "5000000";
    input.setAttribute("style", "color:#333");
    input.cols = "80";
    input.rows = "40";

    button.setAttribute('style', 'color:#333');
    button.innerHTML = "Pesquisar";

    button.addEventListener('click', function() {
        var pesquisar = document.getElementById('tmp_titles').value.split('\n');
        var titles = document.getElementsByClassName('lockup title_card');
        for (var i = 0; i < titles.length; i += 1) {
            var find = false;
            var t = titles[i].getAttribute('aria-label');

            for (var j = 0; j < pesquisar.length; j += 1) {
                if (t == pesquisar[j]) {
                    find = true;
                    break;
                }
            }
            if (!find) {
                titles[i].setAttribute('style', 'display:none !important');
            }
        }

    });

    document.body.appendChild(input);
    document.body.appendChild(button);
})();