ScalesImgageForJavHHH

ScaleInPics

Від 17.05.2021. Дивіться остання версія.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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         ScalesImgageForJavHHH
// @namespace    https://4ca.st
// @version      1.3
// @description  ScaleInPics
// @author       Nazicp
// @match        https://javhhh.com/*
// @icon         https://javhhh.com/template/javhhh/images/favicon.ico
// @grant        none
// ==/UserScript==

$(function(){
    var modal=`<div id="picmodal" class="modal fade" tabindex="-1" role="dialog">
  <div class="modal-dialog" style="max-width: 1000px;" role="document">
    <div class="modal-content">
       <img id="picmodalImage" src="" style="border-radius:10px 10px 0 0">
       <div class="text-shadow" id="picmodalText" style="padding:10px">
          <div id="video-info"></div>
          <a href="" id="video-url" target="_blank" class="btn btn-info btn-lg fa fa-link hidden"></a>
       </div>
    </div>
  </div>
</div>`;
    $('body').append(modal);
    $('#picmodal').modal({show:false}).on('show.bs.modal',function(e){
        let container=e.relatedTarget.offsetParent;
        let img=$(container).find('img[data-qazy]');
        let href=container.querySelector('a').href;
        $('#picmodalImage').attr('src',img.attr('src').replace('_400.jpg',''));
        $('#video-info').load(href + ' .col-12:has(.card-sub)');
        let urlseg=href.split('/');
        $('#video-url').attr('href',href).text(urlseg[urlseg.length-2]).removeClass('hidden');

    }).on('hidden.bs.modal',function(){
        $('#picmodalImage').attr('src','');
        $('#video-info').empty();
        $('#video-url').empty().removeAttr('href').addClass('hidden');
    });
    $('.content-views').html(function(i,n){
        return n + `<a href="javascript:;" data-toggle="modal" data-target="#picmodal" class="fa fa-eye fa-fw"></a>`;
    });
});