From bc41e4934326d8da57e6d9da81713499a212ae92 Mon Sep 17 00:00:00 2001 From: Lalle <29478339+LalleSX@users.noreply.github.com> Date: Sun, 16 Apr 2023 21:48:44 +0200 Subject: [PATCH] del js --- src/Menu/Menu.js | 61 ------------------------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 src/Menu/Menu.js diff --git a/src/Menu/Menu.js b/src/Menu/Menu.js deleted file mode 100644 index 1a56882..0000000 --- a/src/Menu/Menu.js +++ /dev/null @@ -1,61 +0,0 @@ -import Callbacks from '../classes/Callbacks' -import UI from '../General/UI' -import { g, Conf } from '../globals/globals' -import $ from '../platform/$' - -/* - * decaffeinate suggestions: - * DS102: Remove unnecessary code created because of implicit returns - * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md - */ -var Menu = { - init() { - if (!['index', 'thread'].includes(g.VIEW) || !Conf['Menu']) { - return - } - - this.button = $.el('a', { - className: 'menu-button', - href: 'javascript:;', - }) - - $.extend(this.button, { innerHTML: '' }) - - this.menu = new UI.Menu('post') - Callbacks.Post.push({ - name: 'Menu', - cb: this.node, - }) - - return Callbacks.CatalogThread.push({ - name: 'Menu', - cb: this.catalogNode, - }) - }, - - node() { - if (this.isClone) { - const button = $('.menu-button', this.nodes.info) - $.rmClass(button, 'active') - $.rm($('.dialog', this.nodes.info)) - Menu.makeButton(this, button) - return - } - return $.add(this.nodes.info, Menu.makeButton(this)) - }, - - catalogNode() { - return $.after(this.nodes.icons, Menu.makeButton(this.thread.OP)) - }, - - makeButton(post, button) { - if (!button) { - button = Menu.button.cloneNode(true) - } - $.on(button, 'click', function (e) { - return Menu.menu.toggle(e, this, post) - }) - return button - }, -} -export default Menu