From 1fccef082057618fb3cfdf82359920c07dbf5bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Wed, 20 Feb 2019 13:50:12 -0600 Subject: [PATCH] Fixed Playground issue and updated copy --- app/components/client/playground-scripts.js | 39 ++++++++++++++------- documents/developer-program.md | 4 +-- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/app/components/client/playground-scripts.js b/app/components/client/playground-scripts.js index 7a17f9f..5de27e0 100644 --- a/app/components/client/playground-scripts.js +++ b/app/components/client/playground-scripts.js @@ -125,19 +125,13 @@ function debounce(func, wait, immediate) { }; } -function initializePlayground() { - document.querySelector(".playground").classList.add("waiting"); - document.querySelector("#fetch-claim-uri").value = ""; - document.querySelector("#fetch-claim-uri").focus(); - document.querySelector(".playground-navigation__example:nth-child(1)").classList.add("active"); - - send({ - message: "landed on playground" - }); - - setTimeout(() => { - document.querySelector(".playground-navigation__example:nth-child(1)").click(); - }, 300); +function escapeHTML(content) { + return content.replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'") + .replace(/\//g, "/"); } function fetchMetadata(exampleNumber, data) { @@ -153,6 +147,8 @@ function fetchMetadata(exampleNumber, data) { example: exampleNumber }); + data = escapeHTML(data); + document.getElementById("fetch-claim-uri").value = data; document.getElementById("playground-results").innerHTML = playgroundResponseForExample1(data); document.getElementById("playground-loader").style.display = "none"; @@ -178,6 +174,8 @@ function fetchMetadata(exampleNumber, data) { example: exampleNumber }); + data = escapeHTML(data); + document.getElementById("fetch-claim-uri").value = data; document.getElementById("playground-results").innerHTML = playgroundResponseForExample3(data); document.getElementById("playground-loader").style.display = "none"; @@ -200,6 +198,21 @@ function getMemeInfo() { // TODO: Error handling }; } +function initializePlayground() { + document.querySelector(".playground").classList.add("waiting"); + document.querySelector("#fetch-claim-uri").value = ""; + document.querySelector("#fetch-claim-uri").focus(); + document.querySelector(".playground-navigation__example:nth-child(1)").classList.add("active"); + + send({ + message: "landed on playground" + }); + + setTimeout(() => { + document.querySelector(".playground-navigation__example:nth-child(1)").click(); + }, 300); +} + function playgroundResponseForExample1(source) { return `
# With the LBRY app/daemon running locally, you can use this in your Terminal
diff --git a/documents/developer-program.md b/documents/developer-program.md
index 758519a..3972c1d 100644
--- a/documents/developer-program.md
+++ b/documents/developer-program.md
@@ -6,7 +6,7 @@ LBRY offers a complimentary 100 LBC to qualified engineers to facilitate explora
 
 To qualify you must:
 
-- Have a GitHub account prior to January 1st, 2018.
-- Have made a public pull request within the past year.
+- have a GitHub account that is at least 90 days old and
+- have an active commit history
 
 This program will be active on 2019.02.21. Stay tuned!