Recurbate

Wide screen, Added button for hide model, transparent play button on recu.me

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Recurbate
// @version      1.0.0
// @description  Wide screen, Added button for hide model, transparent play button on recu.me
// @match        https://recu.me/*
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
// @grant        GM_addStyle
// @namespace https://greasyfork.org/users/1291978
// ==/UserScript==

var $ = unsafeWindow.jQuery;

$(function () {
    $('[title="Give yourself a New Year Gift"]').remove();
    var thumbs = $(".video-thumb");
    thumbs.each(function(i, obj) {
        var username = $(obj).data('performer');
        var hideBtn = $("<button class=\"btn btn-warning btn-sm\"><i class=\"fas fa-eye-slash\"></i></button>").appendTo(obj);
        hideBtn.on("click", function () {
            console.log('Hide ' + username);
            var url = 'https://recu.me/api/performer/'+username+'/hide';
            var json = '{"performer":"'+username+'"}';
            $.ajax({
                type: "POST",
                url: url,
                data: json,
                contentType : 'application/json',
                success: function (data) {
                    $('[data-performer="'+username+'"]').each(function(i, obj1) {
                        //$(obj1).addClass('hidden-for-user');
                        $(obj1).remove();
                    });
                    obj.remove();
                },
                error: function (jqXHR, exception) {
                    alert('Error: ' + jqXHR.responseText);
                }
            });
        });
    });
});

GM_addStyle(`
    .video-thumb.hidden-for-user {
        opacity: 0.1;
    }
    .video-play-button {
        opacity: 0.1;
    }
    .video-play-button:hover {
        opacity: 1;
    }
    .video-splash-big img {
        opacity: 1;
    }
    @media (min-width: 1200px) {
     .container {
       max-width: 100%;
     }
   }
`);