View Javascript.html
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
<script> | |
// OnLoad GUI | |
window.addEventListener("load", initGui, true); | |
const tarea = document.getElementById('tarea'); | |
const btnRegistrar = document.getElementById('registrar'); | |
function initGui() { | |
getData(); | |
} |
View Style.html
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
<style> | |
:root { | |
--color-5c: #190934; | |
--color-4c: #300D6E; | |
--color-3c: #5A18C9; | |
--color-2c: #905BEC; | |
--color-1c: #E9DFFB; | |
} | |
* { |
View Gui.html
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> | |
<head> | |
<base target="_top"> | |
<!-- Google Fonts --> | |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css"> | |
<?!= include('Style'); ?> | |
</head> | |
<body> |
View Code.gs
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
const ss = SpreadsheetApp.getActiveSpreadsheet(); | |
function onOpen() { | |
let ui = SpreadsheetApp.getUi(); | |
// Add custom menu | |
ui.createMenu('ToDo App') | |
.addItem('Open', 'showModal') | |
.addToUi(); | |
} |
View JS_fetch_03.js
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
fetch("https://jsonplaceholder.typicode.com/posts/") | |
.then(function(response) { | |
if (response.status !== 200) { | |
console.log('Error en la respuesta HTTP'); | |
return; | |
} | |
return response.json(); | |
}) | |
.then(function(dataJson) { |
View JS_fetch_02.js
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
fetch("https://jsonplaceholder.typicode.com/posts/") | |
.then(function(response) { | |
if (response.ok) { | |
response.json().then(function(dataJson) { | |
dataJson.forEach((value, index) => { | |
console.log(value.id); | |
console.log(value.title); | |
console.log(value.body); | |
console.log(value.userId); | |
}); |
View JS_fetch_01.js
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
fetch('https://jsonplaceholder.typicode.com/posts/') | |
.then( | |
function(response) { | |
if (response.status !== 200) { | |
console.log(response.status); | |
return; | |
} | |
response.json().then(function(data) { | |
data.forEach((value, index) => { |
View JS_json_request.js
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
var requestJSON = 'https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json'; | |
let request = new XMLHttpRequest(); | |
request.open('GET', requestJSON); | |
request.responseType = 'json'; | |
request.send(); | |
request.onload = function() { | |
let data = request.response; |
View JS_object_prototype.js
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
function Person(name) { | |
this.name = name; | |
this.greeting = function() { | |
console.log(`Hi I'm ${this.name}`); | |
} | |
} | |
let person1 = new Person('Peter'); | |
let person2 = new person1.constructor('Sarah'); |
View JS_object_constructor.js
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
function Person(name) { | |
this.name = name; | |
this.greeting = function() { | |
console.log(`Hi I'm ${this.name}`); | |
} | |
} | |
let person1 = new Person('Peter'); | |
let person2 = new person1.constructor('Sarah'); |
NewerOlder