AQW Link Preview for Wiki and Character Pages

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

질문, 리뷰하거나, 이 스크립트를 신고하세요.
// ==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
// @license      GNU GPLv3
// @include     http://aqwwiki.wikidot.com/*
// @include     https://www.aq.com/char/*
// @include     https://www.aq.com/character.asp*
// @include     https://account.aq.com/Inventory.aspx*
// @include     https://account.aq.com/CharPage*
// @version     1.5
// @grant       GM_log
// @require     https://code.jquery.com/jquery-3.7.1.min.js

// ==/UserScript==



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


$(document).on("mouseenter", "a.item, div.item > div > a, div.title > 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", function() {
    $("body").append("<div id='preview' style='position:absolute;z-index:9999;'><iframe frameBorder='0' scrolling='no' width='2500px' height='800px' src='//lel.wtf/wikimg.php?page=" + this.href + "'></iframe></div>");
    $("#preview")
        .css("top", (currentMousePos.y - 200) + "px")
        .css("left", (currentMousePos.x + 100) + "px");
}).on("mouseleave", "a.item, div.item > div > a, div.title > 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", function() {
    $("#preview").remove();
});