Skip to content
Sign upLog in
Profile icon

DREWNOLT

@DREWNOLT
Hello! I am DREWNOLT from scratch! I mainly program using Scratch, HTML, Javascript, Python, Node.js, or PHP.
  • oneclick

    Cover page
    Made with HTML, CSS, JS
    Recent comments (0)
  • Cobble

    Cover page
    Made with HTML, CSS, JS
    Recent comments (2)
    Chewyblockguy
    Chewyblockguy
    2 years ago
  • ShortJS

    Cover page
    Made with HTML, CSS, JS
    Recent comments (0)
  • games

    Cover page
    Made with HTML, CSS, JS
    Recent comments (0)
  • quickchat

    Cover page
    Made with Node.js
    Recent comments (0)
Repls
Community
DREWNOLT
DREWNOLT
shared a Post
1 year ago
1
How to set cloud variables using the scratch-api package?
I am trying to make a time API that would send the current time to a scratch project, setting the cloud variables to the time. The package used is htt
ch1ck3n
ch1ck3n
https://github.com/trumank/scratch-api#CloudSession.set1 year ago
DREWNOLT
DREWNOLT
Here is the scratch project id: 5465254631 year ago
DREWNOLT
DREWNOLT
shared a Post
1 year ago
1
I am trying to make a module to simplify the node-fetch module in node.js. This is what I have so far: const fetch = require('node-fetch') module.exp
TAL0S
TAL0S
node-fetch takes time to run, because it takes time to communicate over the web, but js won't wait for it, so you need to use a Promise. You are currently just returning to the "fetch()" function, not your actual function. Here is the correct code to make it work: const fetch = require("node-fetch"); module.exports = function(url) { return new Promise((resolve, reject) => { try { fetch(url).then(res => res.text()).then(text => { return resolve(fetch); 1 year ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
2
I want to make a program to fetch repl file contents using node-fetch in node.js. Is there a URL format I can use to find repl file contents(like repl
DREWNOLT
DREWNOLT
shared a Post
2 years ago
5
I am trying to make a replit API using node-fetch in node.js, but I only get Cloudflare errors. How do I fix this?
RayhanADev
RayhanADev
Hello @DREWNOLT ! Pinging @ch1ck3n @EpicGamer007 @RicksNext to help ya'll out too ;D Okay so you're trying to query the replit API at https://replit.com/graphql I presume? I built a Replit API a while back and had to revamp it recently to make it work. My solution Instead of bypassing the Cloudflare, send requests to staging.replit.com/graphql. Use the X-Requested-With header (any value) and Referrer header (https://replit.com/). That will fix all your problems.2 years ago
EpicGamer007
EpicGamer007
@DREWNOLT ok, so you CAN DO IT WITH NODEJS. There is an api client made by @RayhanADev for thh graphql api made in nodejs which can be found here. Additionally, you can make requests to https://replit.com/data/profiles/{username} in nodejs but with https requests. Check out this. This is the code from it: router.get("/user-info", (req, res) => { if (!req.query.username) { res.render("error", errors[405]); return; } // const vals = userInfoCache.map(v => v.username.toLowerCase() === req.2 years ago
RicksNext
RicksNext
Have you tried adding headers like User-Agent, Host, etc to pretend that the request you're making is coming from a browser?2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
1
All of my replit sites, both servers and HTML, are coming up as dangerous on Google Chrome. Why is this and how do I fix it?
Coder100
Coder100
Make sure your site isn't a 'clone' of other sites because that is what phishing sites do. Maybe also because you have a login/signup form that looks like some website you have visited before?2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
2
I have noticed on repl.it, that when you create or go to one of your repls, it changes the page, but doesn't involve refreshing or any browser loading
19wintersp
19wintersp
This uses the History API, more specifically pushState. pushState allows you to create an entry in the page's history (what you see when holding down the back or forward buttons) without actually reloading to that page. The JavaScript code is expected to load the content, possibly using something like fetch. If the user presses back or forwards, you will receive a popState event, and are expected to load back the other content. The traditional way of doing this (as used in HackTalk) was with URI2 years ago
xxpertHacker
xxpertHacker
Node.js is slow, it's a weird, non-standard JavaScript runtime. First of all, write faster JS, and your server will run faster. I've got an HTTP server over here, , and it goes pretty fast; but it's not a fair comparison, since I didn't use JS. As for your bug, you probably forgot to send data back, can you link the Repl? And lastly, as for how Repl.it loads pages quickly, it uses client-side JavaScript to intercept button presses and loads without reloading the web page. Similar to a SPA.2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
1
I have been working on an account system, lately, and I want to make a way for users to sign out of the Replit Auth System. I am using a node js serve
PhillipConrad
PhillipConrad
I'm trying to do the same thing, but with Flask. It is not working for me. This is what I'm trying: @app.route("/logout") @web.authenticated def logout(): resp = make_response("You are logged out") resp.setcookie('REPLAUTH', expires=0) return resp; I also tried: resp.deletecookie('REPLAUTH') In both cases, the page returned just fine, but when I went back to the home page, I was still logged in.2 months ago
19wintersp
19wintersp
The Repl Auth session is stored in a cookie called "REPL_AUTH". If you can clear that cookie, the user should be logged out.2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
1
I'm trying to make a repl involving a login(with repl.it) system, and I want it to show the user's icon. Is there a base url I need to use?(such as, r
tussiez
tussiez
Solution I am also lazy :/ so here is the code that should work: (according to @19wintersp ) Note: This is browser JavaScript function getProfilePic(username){ fetch('https://repl.it/data/profiles/'+username).then((response) => response.json()).then((content) => { // content.icon.url }) } `2 years ago
19wintersp
19wintersp
You were surprisingly close. You can request to "https://repl.it/data/profiles/", and then the profile picture URL is "icon.url". Here's some pseudocode: getProfilePicture(username) { responseBody = httpRequest("https://repl.it/data/profiles/" + username) responseBody = parseJSON(responseBody) return responseBody.icon.url }2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
no, i don't think that's possible. You can't do that using code. Sorry.2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
1
I saw at http://themysteryofgravityfalls.com/pilot , there is a double prompt when it asks you to enter a username and password. I checked the source;
19wintersp
19wintersp
That is generated by the browser in response to the WWW-Authenticate header. You can't do that with JavaScript.2 years ago
tussiez
tussiez
The site appears to be down.2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
If this is in js, here's a link. https://zellwk.com/blog/frontend-login-system/2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
2
1click CAPTCHA This is a simple CAPTCHA I've been working on. It works by checking the coordinates of your mouse. You can implement it in your own pr
oneclick
HTML, CSS, JS
Chewyblockguy
Chewyblockguy
could I join cobble? I asked in scratch in the forums too so you can look at that2 years ago
DREWNOLT
DREWNOLT
https://cobble.drewnolt.repl.co2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
1
I'm trying to make a server for a localhost site where only I can see it, on my network, but for some reason it isn't working. Is there a way to fix t
localhost
Node.js
RYANTADIPARTHI
RYANTADIPARTHI
express.js works.2 years ago
EpicGamer007
EpicGamer007
try using expressjs.2 years ago
JBloves27
JBloves27
Wdym its not working? I think it is2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
1
My two most used node.js servers are not working. They start only for a little bit, and then stop. This didn't happen earlier today, and I did not cha
programmeruser
programmeruser
Which repls are they?2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
1
I'm hoping to make a repl that you can subscribe to and get realtime notifications when I set one to go out. The repl would NOT be a node.js, it would
19wintersp
19wintersp
If you want to have notifications occur even when the user is not on your website, you should look into Service Workers and Push Notifications. Chrome Developers Lab has a good tutorial on setting it up on the frontend. If you want to push these notifications, you will either have to do it manually using a tool, or setup a server in a language like Node and use a library. Otherwise, you can use WebSockets to communicate from a server (yes, you need a server) and the Notifications API to actually2 years ago
SixBeeps
SixBeeps
I won't just give you the script, but the Mozilla Documentation for notifications has some good example code for the API.2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
1
I'm trying to find a good user agent parser in JS that will return the browser, OS, and browser version. if you know any, paste the script in a commen
Baconman321
Baconman321
If you are talking about the browser that is running the program, the navigator object has a lot of the browser/OS system. In fact, to get the user agent, use navigator.userAgent, which returns the user agent of the web browser a person visiting your website is using. DISCLAIMER: A lot of times, the navigator may not give accurate information on purpose, because people were using the navigator to block browsers, so if you were using IE, they could say "Oh, you need to use chrome or safari". Bec2 years ago
Coder100
Coder100
sure the headers are inside the User-Agent fetch('...').then(res => console.log(res.headers['User-Agent'])) just like that!2 years ago
RYANTADIPARTHI
RYANTADIPARTHI
You can go to the templates section, and find something that suits your needs.2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
1
So I'm trying to make a web browser, and I want to manipulate the Ctrl-U keyboard shortcut so it shows the source of the browser window. To do this, I
JosephHypes
JosephHypes
Are you trying to Make a website or a search Engine?2 years ago
xxpertHacker
xxpertHacker
There isn't a way, but there is a future API that may be standardized, that allows one to programmatically control one's keyboard... but I doubt it'll allow you to do this anyways :) Also, if you're making a web browser, just do what Chromium does: provide some section of JS access to privileged C++ code or something.2 years ago
Coder100
Coder100
oh, but if it has cors, you could just fetch it and print out the code. Here's an example: fetch("https://cors-anywhere.herokuapp.com/").then(res => res.text()).then(console.log); check ur console2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
14
A countdown to Christmas with snowflakes, music, and graphics! https://Christmas-Countdown.drewnolt.repl.co/ You will have to click on the page to sta
Christmas Countdown
HTML, CSS, JS
ComputingSquid
ComputingSquid
this got featured in a repl.it email thingy? good for you.2 years ago
InvisibleOne
InvisibleOne
Noice2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
3
I have a repl website,(view it here: https://cobble.drewnolt.repl.co ) and I was looking at its SSL certificate data, and it says that it will expire.
RYANTADIPARTHI
RYANTADIPARTHI
Nothing has to be done.2 years ago
Baconman321
Baconman321
Yes, they auto update it. You don't have to do anything. Also, all SSL certificates expire at some point.2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
1
So I am currently working on a search engine that will branch into several other things, like google. I want to make a "Not Found" Screen specifically
ch1ck3n
ch1ck3n
If you use node.js or some other back-end language like flask (I'm not sure about flask lol), you can.2 years ago
Coder100
Coder100
https://repl.it/@Coder100/SilkyImprobableNumbers2 years ago
Coder100
Coder100
Nope, but if you are willing to have a backend, you can.2 years ago
DREWNOLT
DREWNOLT
shared a Post
2 years ago
3
This is a basic Perlin Noise Generated 3D World. Look around using mouse and move using WASD
3D open world
HTML, CSS, JS