Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » More HTML Questions
- han614698
- Scratcher
1000+ posts
More HTML Questions
Credit to -gge for the icons in my signature | I condensed all this code into five lines using [p] tags, idk why
- Vaibhs11
- Scratcher
1000+ posts
More HTML Questions
But you can use https://shefwerld.rirurin.com/post/user?user=han614698 if not for an actual wesite
- han614698
- Scratcher
1000+ posts
More HTML Questions
Well, I understand the website, but I would like have it display on my website, You would need JS and the vast world API backend stuff which I don't understand
But you can use https://shefwerld.rirurin.com/post/user?user=han614698 if not for an actual wesite
I'm assuming I need something like:
<p>I have <script> *script for getting post number* </script> forum posts.</p>
Credit to -gge for the icons in my signature | I condensed all this code into five lines using [p] tags, idk why
- kccuber
- Scratcher
1000+ posts
More HTML Questions
Uhh, I believe you need ScratchDB and not Shefwerld.Well, I understand the website, but I would like have it display on my website, You would need JS and the vast world API backend stuff which I don't understand
But you can use https://shefwerld.rirurin.com/post/user?user=han614698 if not for an actual wesite
I'm assuming I need something like:But I don't know the Javascript part.<p>I have <script> *script for getting post number* </script> forum posts.</p>
- Maximouse
- Scratcher
1000+ posts
More HTML Questions
Something like this:Well, I understand the website, but I would like have it display on my website, You would need JS and the vast world API backend stuff which I don't understand
But you can use https://shefwerld.rirurin.com/post/user?user=han614698 if not for an actual wesite
I'm assuming I need something like:But I don't know the Javascript part.<p>I have <script> *script for getting post number* </script> forum posts.</p>
<p>I have <span id="count">(loading...)</span> forum posts.</p> <script> fetch("https://scratchdb.lefty.one/v3/forum/user/info/han614698") .then((res) => res.json()) .then((data) => { document.getElementById("count").innerText = data.counts.total.count; }); </script>
- han614698
- Scratcher
1000+ posts
More HTML Questions
But still, how do i get that info?Uhh, I believe you need ScratchDB and not Shefwerld.Well, I understand the website, but I would like have it display on my website, You would need JS and the vast world API backend stuff which I don't understand
But you can use https://shefwerld.rirurin.com/post/user?user=han614698 if not for an actual wesite
I'm assuming I need something like:But I don't know the Javascript part.<p>I have <script> *script for getting post number* </script> forum posts.</p>
Credit to -gge for the icons in my signature | I condensed all this code into five lines using [p] tags, idk why
- han614698
- Scratcher
1000+ posts
More HTML Questions
I am posting this post as a test.But still, how do i get that info?Uhh, I believe you need ScratchDB and not Shefwerld.Well, I understand the website, but I would like have it display on my website, You would need JS and the vast world API backend stuff which I don't understand
But you can use https://shefwerld.rirurin.com/post/user?user=han614698 if not for an actual wesite
I'm assuming I need something like:But I don't know the Javascript part.<p>I have <script> *script for getting post number* </script> forum posts.</p>
Credit to -gge for the icons in my signature | I condensed all this code into five lines using [p] tags, idk why
- han614698
- Scratcher
1000+ posts
More HTML Questions
Why isn't it updating instantly?I am posting this post as a test.But still, how do i get that info?Uhh, I believe you need ScratchDB and not Shefwerld.Well, I understand the website, but I would like have it display on my website, You would need JS and the vast world API backend stuff which I don't understand
But you can use https://shefwerld.rirurin.com/post/user?user=han614698 if not for an actual wesite
I'm assuming I need something like:But I don't know the Javascript part.<p>I have <script> *script for getting post number* </script> forum posts.</p>
It works fine,
but how long does it take to update?
Last edited by han614698 (May 28, 2021 13:53:16)
Credit to -gge for the icons in my signature | I condensed all this code into five lines using [p] tags, idk why
- Maximouse
- Scratcher
1000+ posts
More HTML Questions
I think it updates twice a day. Why isn't it updating instantly?
It works fine,
but how long does it take to update?
- linearlemur
- Scratcher
500+ posts
More HTML Questions
fetch('https://scratchdb.lefty.one/v3/forum/user/info/linearlemur')
.then(response => response.json())
.then(data => console.log(data["counts"]["total"]["count"]));
Last edited by linearlemur (May 28, 2021 14:25:14)
I found out how to put letters in cloud variables! https://turbowarp.org/526557379 (I really didn't feel like sharing the project, lol)
- han614698
- Scratcher
1000+ posts
More HTML Questions
Ok. Now how would I display follows?I think it updates twice a day. Why isn't it updating instantly?
It works fine,
but how long does it take to update?
https://scratchdb.lefty.one/v3/followers/user/info/han614698
doesn't work.
Credit to -gge for the icons in my signature | I condensed all this code into five lines using [p] tags, idk why
- Maximouse
- Scratcher
1000+ posts
More HTML Questions
https://scratchdb.lefty.one/v3/user/info/han614698Ok. Now how would I display follows?I think it updates twice a day. Why isn't it updating instantly?
It works fine,
but how long does it take to update?
https://scratchdb.lefty.one/v3/followers/user/info/han614698
doesn't work.
- Vaibhs11
- Scratcher
1000+ posts
More HTML Questions
They n e e d J a v a S c r i p t#python import requests x = requests.get('https://scratchdb.lefty.one/v3/user/info/han614698') x = x.json() followers = x['statistics']['followers'] #this variable stores your followers print(str(followers) + ' followers!')
- linearlemur
- Scratcher
500+ posts
More HTML Questions
<script> fetch('https://scratchdb.lefty.one/v3/user/info/han614698') .then(response => response.json()) .then(data => followerCount = data["statistics"]["followers"])); </script>
This sets the “followerCount” variable to the number of followers you have.
Last edited by linearlemur (May 28, 2021 15:00:11)
I found out how to put letters in cloud variables! https://turbowarp.org/526557379 (I really didn't feel like sharing the project, lol)
- han614698
- Scratcher
1000+ posts
More HTML Questions
That works, but Use this code to display follower count:<script> fetch('https://scratchdb.lefty.one/v3/user/info/han614698') .then(response => response.json()) .then(data => followerCount = data["statistics"]["followers"])); </script>
This sets the “followerCount” variable to the number of followers you have.
<p>I have <span id="followerCount">(followerCount)</span> followers</p> <script> fetch('https://scratchdb.lefty.one/v3/user/info/han614698') .then(response => response.json()) .then(data => followerCount = data["statistics"]["followers"])); </script>
“I have (followerCount) followers”
not
“I have 226 followers”
Credit to -gge for the icons in my signature | I condensed all this code into five lines using [p] tags, idk why
- linearlemur
- Scratcher
500+ posts
More HTML Questions
That works, but Use this code to display follower count:<script> fetch('https://scratchdb.lefty.one/v3/user/info/han614698') .then(response => response.json()) .then(data => followerCount = data["statistics"]["followers"])); </script>
This sets the “followerCount” variable to the number of followers you have.just displays<p>I have <span id="followerCount">(followerCount)</span> followers</p> <script> fetch('https://scratchdb.lefty.one/v3/user/info/han614698') .then(response => response.json()) .then(data => followerCount = data["statistics"]["followers"])); </script>
“I have (followerCount) followers”
not
“I have 226 followers”
You'll have to programmatically change an empty element:
<p id=followerCount></p> <script> fetch('https://scratchdb.lefty.one/v3/user/info/han614698') .then(response => response.json()) .then(data => followerCount = data["statistics"]["followers"])); document.getElementById("followerCount").innerHTML = followerCount; </script>
Last edited by linearlemur (May 28, 2021 15:11:27)
I found out how to put letters in cloud variables! https://turbowarp.org/526557379 (I really didn't feel like sharing the project, lol)
- Maximouse
- Scratcher
1000+ posts
More HTML Questions
This should work: That works, butjust displays<p>I have <span id="followerCount">(followerCount)</span> followers</p> <script> fetch('https://scratchdb.lefty.one/v3/user/info/han614698') .then(response => response.json()) .then(data => followerCount = data["statistics"]["followers"])); </script>
“I have (followerCount) followers”
not
“I have 226 followers”
<p>I have <span id="followerCount">(followerCount)</span> followers</p> <script> fetch('https://scratchdb.lefty.one/v3/user/info/han614698') .then(response => response.json()) .then(data => document.getElementById("followerCount").innerText = data.statistics.followers)); </script>
- Sheep_maker
- Scratcher
1000+ posts
More HTML Questions
<p>I have <span id="followerCount">(followerCount)</span> followers</p> <script> fetch('https://scratchdb.lefty.one/v3/user/info/han614698') .then(response => response.json()) .then(data => followerCount.textContent = data["statistics"]["followers"]); </script>
Edit: Ninja'd twice o_O
Last edited by Sheep_maker (May 28, 2021 15:16:07)
- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
- Discussion Forums
- » Advanced Topics
- » More HTML Questions