Fixed Playground issue and updated copy

This commit is contained in:
ポール ウェッブ 2019-02-20 13:50:12 -06:00
parent a7a54704d1
commit 1fccef0820
2 changed files with 28 additions and 15 deletions

View file

@ -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, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#39;")
.replace(/\//g, "&#x2F;");
}
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 `
<pre><code class="language-bash"><span class="token comment"># With the LBRY app/daemon running locally, you can use this in your Terminal</span>

View file

@ -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!