Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [Script] Linkify Equipment, Add links to equipment for easy access via mouse. No need for 'C' key.

 
post Nov 26 2025, 15:08
Post #1
ultramage



Newcomer
**
Group: Members
Posts: 73
Joined: 12-June 10
Level 317 (Dovahkiin)


This silly thing lets you see the internal equip url on hover, copy it to clipboard, open it in new tab, rapidly open 10 of them with middle click, etc. I use it to examine shop items' ranges with LER. A similar thing can be achieved with the 'C' key, but I didn't like it because it creates new window popups instead of tabs. Works in all sections on both Persistent and Isekai.

Attached File  hv_linkify_equipment_1.0.txt ( 1.65k ) Number of downloads: 4

Note 2025-12-03: Currently the exclude patterns in the header also exclude the Item World preparation screen. If that's an issue, remove them or include ?s=Battle&ss=iw.

CODE
function linkify(textnode, id) {
    var key = (typeof dynjs_equip !== 'undefined' && dynjs_equip[id]?.k) || dynjs_eqstore[id].k;
    var url = MAIN_URL + "equip/" + id + "/" + key;

    var a = document.createElement('a');
    a.href = url;
    a.style.cssText = 'color:inherit;text-decoration:none;';
    a.addEventListener('click', function(e) { e.preventDefault(); return false; }, false);

    textnode.parentNode.insertBefore(a, textnode);
    a.appendChild(textnode);
}

// Equipment
document.querySelectorAll('#eqsb div[onmouseover*="equips.set"]').forEach(div => {
    var id = parseInt(div.getAttribute('onmouseover').match(/equips\.set\s*\(\s*(\d+)/)[1]);
    linkify(div.firstChild, id);
});

// Equip Inventory, Equipment Shop, Equip Select (Persistent)
document.querySelectorAll('.equiplist div[onmouseover*="equips.set"]').forEach(div => {
    var id = parseInt(div.getAttribute('onmouseover').match(/equips\.set\s*\(\s*(\d+)/)[1]);
    linkify(div.firstChild, id);
});

// The Armory, Equip Select (Isekai)
document.querySelectorAll('#equiplist tr[onmouseover*="hover_equip"]').forEach(tr => {
    var id = parseInt(tr.getAttribute('onmouseover').match(/hover_equip\s*\(\s*(\d+)/)[1]);
    var textnode = [...tr.firstChild.firstChild.childNodes].find(n => n.nodeType === Node.TEXT_NODE);
    linkify(textnode, id);
});


This post has been edited by ultramage: Dec 3 2025, 10:48
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 9th December 2025 - 17:07