Gladiatus scrolls highlighter

Gladiatus+

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Gladiatus scrolls highlighter
// @namespace    https://kemsan.xyz
// @version      0.1.0
// @description  Gladiatus+
// @author       Kemsan
// @license      MIT
// @match        *://*.gladiatus.gameforge.com/game/index.php*
// @grant        none
// ==/UserScript==
(() => {
  const $ = window.jQuery


  const scrolls = () => {
      const goodScrolls = ['Antonius', 'Gai', 'Gaius', 'Ichorus', 'Lucius', 'Opiehnzas', 'Sebastian', 'Talith', 'Titanius', 'Trafan', 'Vergilius', 'Alleluja', 'Cierpienia', 'Delikatności', 'Dominacji', 'Duchowej', 'Głupoty', 'Miłości', 'Niebios', 'Ognia', 'Piekieł', 'Piekła', 'Pomysłowości', 'Ran', 'Samotności', 'Smoka', 'Sztuk', 'Śmierci', 'Zabójstwa', 'Ziemi', 'Złośliwości', 'Zniszczenia'].map(title => title.toLowerCase())
      // const $scrolls = $('[data-content-type="64"]')
      const $scrolls = $('[data-content-type]')

      $scrolls.each((idx, scroll) => {
        const $scroll = $(scroll)
        const data = $scroll.data('tooltip')
        let [title] = (data && data[0] && data[0][0]) || []
        title = title && title.replace(/Zwój|\s+/g, '').toLowerCase()

        if (goodScrolls.includes(title)) {
            $scroll.css('background-color', 'red')
        }

        goodScrolls.forEach(scroll => {
          if (title.includes(scroll)) {
            $scroll.css('background-color', 'red')
          }
        })
      })

      setTimeout(scrolls, 1000)
  }

  scrolls()
})()