SB100 / GGn Logo Switcher

// ==UserScript==
// @namespace    https://openuserjs.org/users/SB100
// @name         GGn Logo Switcher
// @description  Change the logo on the home page
// @updateURL    https://openuserjs.org/meta/SB100/GGn_Logo_Switcher.meta.js
// @version      1.0.1
// @author       SB100
// @copyright    2021, SB100 (https://openuserjs.org/users/SB100)
// @license      MIT
// @include      https://gazellegames.net*
// ==/UserScript==

// ==OpenUserJS==
// @author SB100
// ==/OpenUserJS==

/* jshint esversion: 6 */

/**
 * =============================
 * ADVANCED OPTIONS
 * =============================
 */

// Which background you'd like to see. The value should be one of the keys from SETTINGS_LOGOS
const SETTING_SELECTED_LOGO = 'birthday11';

// A list of all backgrounds. Switch which one is selected by inputting it into SETTING_SELECTED_LOGO above
const SETTINGS_LOGOS = {
  'birthday11': '/images/logo_birthday11.png'
}

/**
 * =============================
 * END ADVANCED OPTIONS
 * DO NOT MODIFY BELOW THIS LINE
 * =============================
 */

const SETTING_BASE_IMG_URL = 'https://gazellegames.net/static/styles/game_room';

(function () {
  if (!Object.prototype.hasOwnProperty.call(SETTINGS_LOGOS, SETTING_SELECTED_LOGO)) {
    throw new Error('Selected logo not configured');
  }

  const logoElem = document.getElementById('logo');
  logoElem.style.background = `url('${SETTING_BASE_IMG_URL}${SETTINGS_LOGOS[SETTING_SELECTED_LOGO]}') no-repeat bottom center`;
  logoElem.style.backgroundSize = 'contain';
})();