If you don't know anything about JSON, please, spend some time on learning JSON structure.
Recommended sources:
| #!/bin/bash | |
| # Check if script is run as root | |
| if [ "$EUID" -ne 0 ]; then | |
| echo "Please run this script with sudo" | |
| exit 1 | |
| fi | |
| # Ask for the cursor filename | |
| read -p "Enter the Cursor AppImage filename (without .AppImage extension): " cursorFileName |
| /* | |
| 1. Apply a more intuitive box-sizing model across all elements and pseudo-elements. | |
| This model includes padding and border in an element's total width and height, | |
| making it easier to size elements. | |
| */ | |
| *, *::before, *::after { | |
| box-sizing: border-box; | |
| } |
| //Create Fura Headers | |
| var furaHeaders = new Headers(); | |
| furaHeaders.append("sec-ch-ua", "\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\""); | |
| furaHeaders.append("accept", "*/*"); | |
| furaHeaders.append("content-type", "application/json"); | |
| furaHeaders.append("sec-ch-ua-mobile", "?0"); | |
| furaHeaders.append("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"); | |
| furaHeaders.append("sec-ch-ua-platform", "\"Windows\""); | |
| furaHeaders.append("Sec-Fetch-Site", "cross-site"); | |
| furaHeaders.append("Sec-Fetch-Mode", "cors"); |
| //How to use array prototypes in a simple way from signals | |
| import { createSignal,createEffect } from "solid-js"; | |
| const [ownedCats, setOwnedCats] = createSignal([]); | |
| let OwnedCatList = []; | |
| function App() { |
| //Just an example of a gallery, using this method you don't need index and useState and other expensive tricks | |
| <input type="checkbox" class="bBox" onClick={() => handleChange(photo.tokenId)} /> | |
| let IDs=[]; | |
| const handleChange = (ID) => { | |
| //push to an array, if the id is in the array, remove it, if not, add it | |
| if (IDs.includes(ID)) { | |
| IDs = IDs.filter((id) => id !== ID); |
| fetch( | |
| 'https://discordapp.com/api/webhooks/738983040323289120/mzhXrZz0hqOuUaPUjB_RBTE8XJUFLe8fe9mgeJjQCaxjHX14c3SW3ZR199_CDEI-xT56', | |
| { | |
| method: 'post', | |
| headers: { | |
| 'Content-Type': 'application/json', | |
| }, | |
| body: JSON.stringify({ | |
| // the username to be displayed | |
| username: 'webhook', |
If you don't know anything about JSON, please, spend some time on learning JSON structure.
Recommended sources: