23

GUYS I BUILT A FUCKING URL BAR AND IT EXISTS, IT'S ALIGNED, AND IT FUCKING WORKS

It doesn't have a very good check for what is a valid url tho, it is currently working checking for subreddits like /r/<whatever> and it checks if the link begins with http:// or https://. At some point in the near future I want to clean it up a bit, maybe write some regex (oh god kill me now) that'll actually check for a valid url

Comments
  • 8
    Just wanna apologize to anyone who's getting tired of me posting my web dev adventures whenever some shit happens, I'm just really excited about this stuff working
  • 5
    Awesome! I wish you luck with the regex though. There are so many exploits out there which are based on wrong matching of URLs...
  • 5
    @EaZyCode Yeah I plan on researching that a fair amount before I actually write the regex. But for now, I sleep. I need to be up in ~6 hours which is the only reason I'm halting development at this very moment.
  • 5
    Congrats! I know the feeling. Everytime I figure out a road block I clap my hands together and give a good ol "yes!" at my desk. I love figuring stuff out and getting it to work. Keep it up!

    I had the same moment tonight when I got my APIs hooked up to upload images.
  • 2
    https://regex101.com/ take this, it's dangerous to go alone
  • 1
    Love it! Keep posting!
  • 3
    Since you're probably anyway are using an input element, may I suggest using The url type: https://developer.mozilla.org/en-US...

    It allready does some validations for you (however be sure to check the input in the backend, as you can't trust any input!(
Add Comment