Last active
December 8, 2023 14:40
-
-
Save wodim/5ccc521593a4a6a5aa45f3bd4aa1f702 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name NPC and item pictures for aowow | |
// @namespace Violentmonkey Scripts | |
// @match https://aowow.trinitycore.info/ | |
// @grant none | |
// ==/UserScript== | |
"use strict"; | |
if (jQuery("#view3D-button").length > 0 && !jQuery("#view3D-button").hasClass("button-red-disabled")) { | |
const model_id = jQuery("#view3D-button").attr("onclick").match(/'displayId':(\d+)/)[1] | |
const model_type = location.href.match(/\?([a-z]+)=/)[1] | |
const thumb_url = `https://raw.githubusercontent.com/wowfanet/w/master/wdb/modelviewer/thumbs/${model_type}/${model_id}.png` | |
jQuery(`<img src="${thumb_url}" style="float: right">`).insertAfter("#main-contents .text h1") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment