Ask coding questions

← Back to all posts
Repl Spotlight Run Button
RYANTADIPARTHI

Hi,

Could someone tell me how to make the spotlight run button you see on someone's repl. The huge green button with a white play button. If someone could show me the code for it, i would appreciate it.

Also it should be the exact colors, and should also do the action it does when i hover on the button. Thanks!

Also this is another question but could someone give a chatroom? that chatroom should save the messages put in it. So if I went back to it after closing, the messages should be there. It can be in any language, but i would prefer node.js. So you can make it in a repl, and give the link.

Thanks!

Voters
RYANTADIPARTHI
Comments
hotnewtop
InvisibleOne

Here's the code for a little chat room I built a while ago

NODE.JS FILE:

HTML FILE

RYANTADIPARTHI

@InvisibleOne thanks, but could you tell me the correct files to put the code in, cause it says Error: ENOENT: no such file or directory, stat '/home/runner/CaringConsiderateCurrencies/index.html'. Or an easier way is to make a reply on your own, and just give me the link. Your choice.

Thanks!

InvisibleOne
RYANTADIPARTHI

@InvisibleOne thanks, this is good, but could you do my last requirement? The saving? So it should save whatever messages I put in there. until I click clear chat. So if I come back to it after any time, the chat messages I put in there should still be there. Saving. Could you do thaT? Thanks!

InvisibleOne

Yeah sure, that will just be writing and reading from a text file using 'fs' @RYANTADIPARTHI

RYANTADIPARTHI

@InvisibleOne could you do that? I don't know node.js. Thanks!

InvisibleOne

Ok, it's finally done, took me way longer than it should of because I realized I wasn't filtering my chats for any new lines, which causes issues in the file reading and writing. @RYANTADIPARTHI

RYANTADIPARTHI

@InvisibleOne ok thanks. Sorry for the troubles. So is it the same link?

InvisibleOne
RYANTADIPARTHI

@InvisibleOne ok thanks! It works, also do you know the answer to my first question? IF you don't it's ok. Also I noticed when I type in really long chat messages, it breaks off, and goes somewhere. Can you make it so that it breaks onto different lines, and stays in the green box? Like a paragraph? Thanks! I'll mark your answer once you do that. Thanks!

RYANTADIPARTHI

@InvisibleOne so did you?

InvisibleOne

Oh, sorry, I haven't got around to that yet, I might work on it again on Monday. @RYANTADIPARTHI

RYANTADIPARTHI

@InvisibleOne ok no problem.

InvisibleOne

Chat room in python: while 1:import os;z=os.getenv("REPL_OWNER")+": ";print("\x1B[2J"+str(open('c','a').write(z+input(z)+'\n'))+" ".join([l for l in open('c')]))
As for the run button, you should be able to inspect the page and see what the code for it is. I'm guessing it's an svg or image.

RYANTADIPARTHI

@InvisibleOne sorry by chatroom, i don't mean a console one. I meant an actual web chatroom.

InvisibleOne

I know, I was joking around, I'm gonna grab the code for a little one I built a while ago. @RYANTADIPARTHI

RYANTADIPARTHI

@InvisibleOne oh ok thanks!

LAMAQDAHODWALA

I'm not a CSS pro, but i would imagine that you would have a button with an svg inside it. Or, you could make the whole button svg and with no CSS required. Then, just make an onclick element in your javascript.

RYANTADIPARTHI

@LAMAQDAHODWALA can you give me an example?

LAMAQDAHODWALA

Uh, so you could probably use something like Figma to make the SVG, then you can add it to the HTML, and add an onclick element.

script.js:

@RYANTADIPARTHI

RYANTADIPARTHI

@LAMAQDAHODWALA thanks, but i said i want the exact thing, this doesn't really fulfill that. Could you give the exact button with colors and hover? Also if you could do my second question too.

LAMAQDAHODWALA

Ok, let me try. @RYANTADIPARTHI

RYANTADIPARTHI
RoBlockHead

@RYANTADIPARTHI spoon feeding ain’t cool. Don’t ask for exact answers if you aren’t putting in work to get them. Try to make it yourself first or use inspect element or somethin.

RYANTADIPARTHI

@RoBlockHead inspect is blocked for me. And I don't really know css, so there's nothing I can do.

RYANTADIPARTHI

@LAMAQDAHODWALA hi are you done with the button? Please let me know when you are. Thanks!