sladkoppop / CW: Чипсы Мох

// ==UserScript==
// @name         CW: Чипсы Мох
// @version      1.0
// @description  ты крутой;
// @author       Искажённый Судьбой
// @copyright    2021 sladkoppop
// @license      MIT; https://opensource.org/licenses/MIT
// @updateURL    https://openuserjs.org/meta/sladkoppop/CW_Чипсы_Мох.meta.js
// @downloadURL https://openuserjs.org/install/sladkoppop/CW_Чипсы_Мох.user.js
// @include      https://catwar.su/cw3/*
// @grant        GM_xmlhttpRequest
// @grant        GM.xmlHttpRequest
// @require      https://code.jquery.com/jquery-3.4.1.min.js
// @require      https://cdn.rawgit.com/meetselva/attrchange/master/js/attrchange.js
// ==/UserScript==

(function (win, $) {
  'use strict';

  if (typeof $ === 'undefined') return;
  const pageurl = window.location.href;
  const isCW3 = (/^https:\/\/catwar.su\/cw3(?!(\/kns|\/jagd))/.test(pageurl));
  try {
    if (isCW3) cw3();
  }
  catch (err) {
    win.console.error('Пиво Web err: ', err);
  }

  function cw3() {
    $(document).ready(function () {
      $("head").append(`<style>div[style="background: url(\\"things/75.png\\") 100% 0% no-repeat, url(\\"things/75.png\\") 0% 0% no-repeat;"] {
  background-image: url("https://i.imgur.com/veZeWSW.png") 100% 0% no-repeat, url("https://i.imgur.com/veZeWSW.png") 0% 0% no-repeat !important;
}
div[style="background: url(\\"things/75.png\\") 0% 0% no-repeat;"] {
  background-image: url("https://i.imgur.com/veZeWSW.png") !important;
}</style>`);
     /* $(".cage_items").attrchange({
        callback: function () {
          if ($(this).attr('style').indexOf('things/75.png') !== -1) {
            let link = $(this).attr('style');
            link = link.replace('things/75.png', 'https://i.imgur.com/veZeWSW.png');
            $(this).attr('style', link);
          }
        }
      });*/
    });
  }
})(window, jQuery);