Path: blob/main/static/script/community.js
918 views
/**1* Incognito2*3* This program is free software: you can redistribute it and/or modify4* it under the terms of the GNU General Public License as published by5* the Free Software Foundation, either version 3 of the License, or6* (at your option) any later version.7*8* This program is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11* GNU General Public License for more details.12*13* You should have received a copy of the GNU General Public License14* along with this program. If not, see <https://www.gnu.org/licenses/>.15*/1617/*18_____ _ _ _19| __ \ | | | | | |20| |__) | ___ _ __ | |_ ___ __| | | |__ _ _21| ___/ / _ \ | '__| | __| / _ \ / _` | | '_ \ | | | |22| | | (_) | | | | |_ | __/ | (_| | | |_) | | |_| |23|_| \___/ |_| \__| \___| \__,_| |_.__/ \__, |24__/ |25|___/26_ _ _ _ _ _ _27/\ | | | | | | | \ | | | | | |28/ \ _ __ ___ ___ | |_ | |__ _ _ ___ | |_ | \| | ___ | |_ __ __ ___ _ __ | | __29/ /\ \ | '_ ` _ \ / _ \ | __| | '_ \ | | | | / __| | __| | . ` | / _ \ | __| \ \ /\ / / / _ \ | '__| | |/ /30/ ____ \ | | | | | | | __/ | |_ | | | | | |_| | \__ \ | |_ | |\ | | __/ | |_ \ V V / | (_) | | | | <31/_/ \_\ |_| |_| |_| \___| \__| |_| |_| \__, | |___/ \__| |_| \_| \___| \__| \_/\_/ \___/ |_| |_|\_\32__/ |33|___/34*/3536var invite_code;37async function community(app) {38app.search.title.style.display = 'block';39app.search.title.textContent = 'Community';40app.search.input.style.display = 'none';4142if(!invite_code) {43const res = await app.bare.fetch('https://cdn.jsdelivr.net/gh/amethystnetwork-dev/.github/meta/discord.json');44const json = await res.json();45invite_code = json.invite_code;46}4748app.main.support = app.createElement(49'div',50[51app.createElement('section', [52app.createElement('p', `You are being taken to the Amethyst Network discord server (discord.gg/${invite_code}).`, {53style: {54'margin-bottom': '0'55}56}),57app.createElement('p', `Are you sure you want to <a href="https://discord.gg/${invite_code}">proceed</a>?`, {58style: {59'margin-bottom': '0'60}61}),62], {63class: 'data-section'64}),6566]);67app.search.back.style.display = 'inline';68app.search.back.href = '#';69};7071export { community };727374