| // ==UserScript==
|
| // @name Hordes Kamisa UI
|
| // @version 2026-02-19
|
| // @description example of basic ui modification with cc indicator
|
| // @author Kamisa
|
| // @match *://hordes.io/*
|
| // @icon https://hordes.io/data/ui/favicon32.png
|
| // @grant GM_addStyle
|
| // @run-at document-end
|
| // ==/UserScript==
|
|
|
| 'use strict';
|
|
|
| setTimeout(main, 2000)
|
|
|
| function main() {
|
| console.log('hello');
|
| ui_cleanup();
|
| cc_indicator();
|
| }
|
|
|
| function ui_cleanup() {
|
| const remove = [
|
| 'div.l-corner-ul.uiscaled div.btnbar',
|
| //'#partybtn', 'div.textparty', 'div.textexp',
|
| //'div.l-corner-ur.uiscaled div.btnbar',
|
| '#sysgem', '#syschar', '#sysbook ', '#sysbag', '#syspvp', '#sysclan', '#systrophy', '#syssocial',
|
| '#expbar',
|
| //'div.container.panel-black',
|
| ];
|
| remove.forEach(s => document.querySelector(s)?.remove());
|
| }
|
|
|
| function cc_indicator() {
|
| GM_addStyle(`
|
| @keyframes pulse {
|
| 0%,
|
| 50% {box-shadow: 0 0 0 10px rgba(255, 255, 0, 0);}
|
| 100% {box-shadow: 0 0 0 0 rgba(255, 255, 0, 0.7);}
|
| }
|
| .panic {
|
| animation: pulse 0.3s infinite !important;
|
| border: 2px solid red !important;
|
| box-shadow: 0 0 20px rgba(255,0,0,0.9) !important;
|
| }`);
|
| const ccs = ["stunbuff.avif", "deepfrozen.avif", "root.avif", "14.avif", "37.avif", "49.avif", "50.avif"]; //, "7.avif"
|
| setInterval(() => {
|
| const targets = document.querySelectorAll('div.grid div.bars');
|
| targets.forEach(x => {
|
| const box = x.querySelector('div.barsInner');
|
| if (!box) return;
|
| const buffs = x.querySelectorAll('div.buffarray img.icon[src]');
|
| console.log(buffs)
|
| const hasCC = Array.from(buffs).some(img => ccs.some(cc => img.src.includes(cc)));
|
| box.classList.toggle('panic', hasCC);
|
| });
|
| }, 200);
|
| }
|