Lagom / Lagom-flw:9.6.4.1.3

// ==UserScript==
// @name         Lagom-flw:9.6.4.1.3
// @namespace    http://openuserjs.org/users/Lagom
// @version      1.0
// @description  flw:9.6.4.1.3
// @author       Lagom
// @email        lagomscripts@gmail.com
// @license      AGPL-3.0-or-later
// @copyright    2024, Lagom (https://openuserjs.org/users/Lagom)
// @codigo       Conteudo feito em linguagem javascript com base em EcmaScript
// @match        http://*/*
// @grant        GM_getResourceText
// @grant        GM_addStyle
// @grant        GM_getValue
// @grant        unsafeWindow
// ==/UserScript==

(function () {
  "use strict";
  console.log(
    "Strategic Attack Automator v1.0 by Lagom © 2024. All rights reserved."
  );

  function handleBuilding() {
    function init() {
      const url = window.location.href;

      const pageHandlers = {
        "screen=memo": handleMemoPage,
        "screen=place&try=confirm": handlePlaceConfirmPage,
        "screen=place": handlePlacePage,
      };

      const handler = Object.entries(pageHandlers).find(([key]) =>
        url.includes(key)
      );

      if (handler) {
        handler[1]();
      }
    }

    init();
  }
})();