import React, { useState } from "react" import SettingsPopup from "./SettingsPopup" import $ from "jquery" const Header = () => { // Get the board name from the URL (e.g. /g/ or /pol/) const board = window.location.pathname.split("/")[1] // Get the URL for the index page of the board const indexUrl = `https://boards.4chan.org/${board}/` // Get the URL for the catalog page of the board const catalogUrl = `https://boards.4chan.org/${board}/catalog` const [settingsVisible, setSettingsVisible] = useState(false) // Remove the default header $("#boardNavDesktop").remove() $(".danbo-slot").remove() $("h4").remove() $(".abovePostForm").remove() $(".boardList").remove() $("#boardNavMobile").remove() const toggleSettingsPopup = () => { setSettingsVisible(!settingsVisible) } return (
Index Catalog
{settingsVisible && (
)}
) } export default Header