ABPVN VNZ-toolkit

Hỗ trợ thêm tính năng trên VNZ

当前为 2015-05-14 提交的版本,查看 最新版本

// ==UserScript==
// @name        ABPVN VNZ-toolkit
// @namespace   ABPVN
// @author	Hoàng Rio
// @description	Hỗ trợ thêm tính năng trên VNZ
// @icon	http://i.imgur.com/vAI2Rxd.png
// @include     http://www.vn-zoom.com/f*
// @require     https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js
// @version     1.0
// @grant       none
// ==/UserScript==
String.prototype.ismatch = function (regex){
  return this.match(regex)!==null;
};
function VNZ_img(){
	$('head').append('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.css" type="text/css" media="screen" />');
		$('.content img').each(function (){
			if(!$(this).attr('src').ismatch("http://www.vn-zoom.com")){
				this.onclick= function () {};
				$(this).wrap('<a class="abpvn" title="'+$(this).attr("src")+'" rel="group" href="'+$(this).attr("src")+'"></a>');
			}
			
		});
		$("a.abpvn").fancybox({
		'padding' : '0',
		'type' : 'image',
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	300, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'hideOnOverlayClick':  	true,
		'overlayOpacity': 	0.2,
		helpers : {
        overlay : {
            css : {
                'z-index': '0'
            }
        }
    }
	});
}
$(document).ready(function (){
	VNZ_img();
});

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址