AIS

A simple userscript for A-Island(h.acfun.tv)

当前为 2014-09-30 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name AIS
// @namespace http://h.acfun.tv/
// @version 0.7
// @description A simple userscript for A-Island(h.acfun.tv)
// @match http://h.acfun.tv/*
// @copyright 2013+, Mimiko
// @require http://cdn.staticfile.org/jquery/2.1.1-beta1/jquery.min.js
// @grant none
// ==/UserScript==
var style = 'form center{position:fixed;display:block;background-color:#ffe;right:0;top:0;width:450px;padding:16px 8px;border:1px dashed #ea8;border-top:none;border-right:none}#block-img-preview{position:absolute;display:block;z-index:65535}#block-img-preview img{max-width:100%;max-height:100%;width:auto;height:auto;background:url("http://static.acfun.com/dotnet/20130418/style/image/bg-trans.png") left top repeat}#block-img-preview .hint{position:absolute;top:-24px;left:0;height:24px;line-height:24px;text-align:left;padding:0 8px;margin:0;font-size:12px;color:#fff;background-color:rgba(0,0,0,0.8);border-radius:2px 2px 0 0;opacity:0}';(function(){$(function(){(function(){var html;html="<style>"+style+"</style>";return $("head").append(html)})();(function(){var area,block,html;html='<div id="block-img-preview"></div>';area=$("#right_content");area.append(html);block=$("#block-img-preview");block.data({timer:null});area.delegate("a>img","mouseenter",function(){var img;img=$(this);window.clearTimeout(block.data().timer);return block.data().timer=window.setTimeout(function(){var elem,src;src=img.parent().attr("href");if(src.toLowerCase().search(/jpg|jpeg|png|bmp|gif/)!==-1){img.one("mouseleave",function(){return block.mouseleave()}).parent().removeAttr("title");html='<img src="'+src+'">';block.html(html).css({"max-width":$(window).width()-img.offset().left-img.width()-16,"max-height":$(window).height()+$(window).scrollTop()-img.offset().top-32,left:img.offset().left+img.width()+8,top:img.offset().top,display:"block",opacity:0}).stop().animate({opacity:1},200);elem=block.find("img:eq(0)");return elem.load(function(){var hint;html='<p class="hint">'+elem.width()+"*"+elem.height()+"px</p>";elem.after(html);hint=block.find("p.hint:eq(0)");return hint.animate({opacity:1},200)})}},200)});return block.mouseenter(function(){return window.clearTimeout(block.data().timer)}).mouseleave(function(){window.clearTimeout(block.data().timer);return block.data().timer=window.setTimeout(function(){return block.stop().animate({opacity:0},200,function(){return block.css({display:"none"})})},200)})})();(function(){var area,menu;menu=$("#menu");area=$("#right_content");return menu.mouseover(function(){menu.stop().animate({"margin-left":0,opacity:1},200).focus();return area.css({"margin-left":160})}).mouseleave(function(){menu.stop().animate({"margin-left":-128,opacity:0},200);return area.css({"margin-left":32})}).mouseleave()})();return function(){var area;area=$("#right_content");area.css({"margin-right":480});return $("#content").css({height:160})}()})}).call(this);