This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Aprendiendo Grid CSS</title> | |
<style> | |
html { | |
box-sizing: border-box; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const helpHttp = () => { | |
const customFetch = (endpoint, options) => { | |
const defaultHeader = { | |
accept: "application/json", | |
}; | |
const controller = new AbortController(); | |
options.signal = controller.signal; | |
options.method = options.method || "GET"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from "react"; | |
export const useFetch = (url) => { | |
const [data, setData] = useState(null); | |
const [error, setError] = useState(null); | |
const [loading, setLoading] = useState(false); | |
useEffect(() => { | |
const abortController = new AbortController(); | |
const signal = abortController.signal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Selector del comentario: ytd-comment-thread-renderer | |
//Selector del nombre usuario: ytd-comment-thread-renderer #author-text span | |
//Selector del texto comentario: ytd-comment-thread-renderer yt-formatted-string#content-text | |
const rifarMicro = () => { | |
const d = document, | |
$comentarios = d.querySelectorAll("ytd-comment-thread-renderer"); | |
const participantes = []; |