AQW Link Preview for Wiki and Character Pages

Adds image previews for links on the official AQW Wiki or AQW character pages.

当前为 2017-08-19 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        AQW Link Preview for Wiki and Character Pages
// @description Adds image previews for links on the official AQW Wiki or AQW character pages.
// @namespace   AQW Whitehats
// @include     http://aqwwiki.wikidot.com/*
// @include     http://www.aq.com/char/*
// @include     http://www.aq.com/character.asp*
// @include     http://account.aq.com/Inventory.aspx*
// @version     1.2
// @grant       GM_log
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js

// ==/UserScript==



var currentMousePos = { x: -1, y: -1 };
    $(document).mousemove(function(event) {
        currentMousePos.x = event.pageX;
        currentMousePos.y = event.pageY;
    });


 $("a.item, div.item > div > a, div.list-pages-item > p > a, div.collapsible-block-content > a, div.collapsible-block-content > p > a, div.yui-content > div > a, div.yui-content > div > p > a, div.list-pages-box > p > a, #page-content > ul > li > a, #page-content > ul > li > span > a, #page-content > ul > li > ul > li > a, div.yui-content > div > ul > li > ul > li > a, #page-content > a, #page-content > p > a, tr > td > a ").hover(function(){
     $("body").append("<div id='preview' style='position:absolute;z-index:9999;'><iframe frameBorder='0' scrolling='no' width='2500px' height='800px' src='http://lel.wtg/wikimg.php?page="+this.href+"'></iframe></div>");                                
         $("#preview")
            .css("top",(currentMousePos.y - 200) + "px")
            .css("left",(currentMousePos.x + 100) + "px")
        },function(){
      $("#preview").remove();
    });


 
$( "div.invgrids div table tbody tr td:nth-child(2)" ).hover(function(){
    
     $("body").append("<div id='preview' style='position:absolute;z-index:9999;'><iframe frameBorder='0' scrolling='no' width='2500px' height='800px' src='http://lel.wtf/wikimg.php?page=http://aqwwiki.wikidot.com/search:site/a/p/q/"+this.innerHTML+"'></iframe></div>");                                
         $("#preview")
            .css("top",(currentMousePos.y - 200) + "px")
            .css("left",(currentMousePos.x + 100) + "px")
        },function(){
      $("#preview").remove();
    });