AIS

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

目前為 2014-09-30 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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);