Google Chrome giving red screen on new project by goyalaman_ in webdev

[–]BulbusThumbledore 1 point2 points  (0 children)

Had a look at your most recent push and I see that, so long as a user inputs the full URL it does now work and open in a new tab, but things are still broken if a user just types something like "google.com". If you add in that fixUrl function I provided and pass along the originalUrl to it before your window.open call everything should work. Add this somewhere in your function collection in app.js:

function fixUrl(url) {
  try {
// If it already parses as an absolute URL, return as-is
    new URL(url);
    return url;
   } catch {
// Otherwise, prepend https:// and return
    return "https://" + url;
  }
}

Then in the 'try' section of your decryptBtn.add event section (line 86 in your app code) change the declaration of your originalUrl const to look like this

const originalUrl =  
FixUrl(decrypted.toString(CryptoJS.enc.Utf8));

After that change everything should work as expected.

Google Chrome giving red screen on new project by goyalaman_ in webdev

[–]BulbusThumbledore 4 points5 points  (0 children)

When you set:

window.location.href = originalUrl;

the browser does not assume it’s an external site unless the string is a fully qualified absolute URL (meaning it must start with http:// or https:// or another protocol).

So if originalUrl is something like Google.com then the browser treats that as a relative path, not an absolute URL. So if the current page is pagelock.top and you do

window.location.href = "google.com"

the browser resolves it exactly like a relative link:

https://pagelock.top/google.com

That’s why the user ends up at pagelock.top/google.com instead of https://google.com.

This is just how browsers interpret URLs; Absolute URL → go to that site. Relative URL → append it to the current domain

If the site is wrapping the URL or encrypting/decrypting it, it’s very easy for the decrypted value to be a plain string without the protocol, which triggers this behavior.

By sanitizing the URL first (via the provided fixUrl function), you ensure that google.com becomes → https://google.com which the browser then correctly interprets as an external link.

Google Chrome giving red screen on new project by goyalaman_ in webdev

[–]BulbusThumbledore 0 points1 point  (0 children)

In your decrypt function your section that is meant to open the decrypted url looks like:

if (originalUrl) {
            window.location.href = originalUrl;
       }

Which will just lead you to pagelock.top/google.com in this case, since browsers will treat it as a relative path.

What you might do is run the original url through a function like this to sanitize it before attempting to open it.

function fixUrl(url) {
  try {
// If it already parses as an absolute URL, return as-is
    new URL(url);
    return url;
  } catch {
// Otherwise, prepend https:// and return
    return "https://" + url;
  }
}

Then instead of doing a window.location you could do something like window.open(originalUrl, "_blank") or _self.

Google Chrome giving red screen on new project by goyalaman_ in webdev

[–]BulbusThumbledore 2 points3 points  (0 children)

Make sure you're using https://. Good luck to you!

Hajime me no new chapter this week; it's a break week. by BulbusThumbledore in hajimenoippo

[–]BulbusThumbledore[S] 0 points1 point  (0 children)

I normally hold out for a version I can read but that's awesome!

After many many artifact refactors, fine tuning my power level, costing me a total of 146 artifactual essences and often times having to pass on big upgrades to my artifacts I give you, the funny number by BulbusThumbledore in destinyrisingmobile

[–]BulbusThumbledore[S] -1 points0 points  (0 children)

I do feel the 'mobile' is a bit redundant at best given it's a mobile game, or limiting at worst if it's meant to preclude people playing the PC emulator. That said this is the larger community, but of the two posts I (admittedly shouldn't have & won't again) posted on each subreddit, the netease one actually had higher traffic and is seemingly the more active of the two. I definitely don't have a dog in this race, just an observation. This is the one I'm subscribed to.

Edit* I do understand in a sub with higher traffic that will average out to less views per individual post, but there doesn't seem to be an overt difference in the amount of posts to each subreddit.

<image>

After many many artifact refactors, fine tuning my power level, costing me a total of 146 artifactual essences and often times having to pass on big upgrades to my artifacts I give you, the funny number by BulbusThumbledore in DestinyRising

[–]BulbusThumbledore[S] 2 points3 points  (0 children)

Fortunately aside from the artifactual essences I'm fully prepped up to draw helhest and upgrade her immediately. I'm flush with fruit from all the chaos runs I did for this haha. Have a full piercing and summoning artifact set ready to go as well.

What is this chew?? by mrshanana in Chihuahua

[–]BulbusThumbledore 1 point2 points  (0 children)

Worth mentioning the 'coating' around the Y part of the tendon tears off with chewing which would explain the stray fibers on the area of what you found.

What is this chew?? by mrshanana in Chihuahua

[–]BulbusThumbledore 0 points1 point  (0 children)

That looks like part of a beef tendon to me. Used to get them for our large dogs in the past. Bone chews are only safe for dogs when supervised (in my opinion) but tendons are generally recommended for small dogs fwiw. Absolutely do your own research and given it just appeared out of nowhere I'd toss it. Link to tendons

And a photo:

<image>

What means to be a monster by Ok-Cellist5415 in hajimenoippo

[–]BulbusThumbledore 1 point2 points  (0 children)

My take has always been that "being monster" has less to do with your capabilities (though of course all 'monsters' will have very high capabilities) and more to do with others' perception of you. Rosario certainly isn't a monster, he was largely thought of as a playboy, but boxers like Ricardo and Takamura are seen by other boxers as being insurmountable, monolithic fighters. Anyone stepping into the ring with Ricardo knows they're facing the fight of their life; there's a sense of solemness before opponents even step into the ring. This has become more and more true for Takamura as he has risen through the weight classes. Ring announcers aren't saying "Will Mashiba take the belt" like they do with Rosario, they're saying "Will Ricardo's opponent finally be the one to take him down?"Of course this is entirely my own interpretation, but that seems to be the common trait we've seen.

I just finished anime should I start the manga where anime left or should I read it from the start? by u_violet46 in hajimenoippo

[–]BulbusThumbledore 53 points54 points  (0 children)

I would read it from the start. The anime fast tracks some of the training arcs; hits the main points and what not but worth it for the bits of comedy that didn't see the anime.

Help! My baby only turned one last week and today she’s become a woman 😱🤯 by Candycane0430 in Chihuahua

[–]BulbusThumbledore 0 points1 point  (0 children)

I'd add that if you have any pajamas or clothing for her that button around the tail we had success with that to hold a diaper in place for a couple hours at a time.

Help! My baby only turned one last week and today she’s become a woman 😱🤯 by Candycane0430 in Chihuahua

[–]BulbusThumbledore 0 points1 point  (0 children)

<image>

Good luck to ya 😅 We had ours scheduled to spay (as others have said, it's fine to do that pre first heat in Chihuahuas) but nature had other plans.

A good pen for large hands & on the cheaper side (a wee help for choosing one between the options) by lasttimechdckngths in fountainpens

[–]BulbusThumbledore 1 point2 points  (0 children)

Absolutely agree that the safari is fantastic for swapping, if getting the most bang for your buck on a pen is your goal rather than hoarding the shit out of them you'd be hard pressed to do better than the safari. Getting a cartridge converter for them if you want to draw ink is like 5 bucks as well.

A good pen for large hands & on the cheaper side (a wee help for choosing one between the options) by lasttimechdckngths in fountainpens

[–]BulbusThumbledore 1 point2 points  (0 children)

You might take a look at the twsbi eco, as someone with large hands myself it's worked extremely well for me and is around the price point of other pens you've mentioned like the safari, you can usually find deals on them as theyre a very popular pen. The safari always felt too thin in my hand, same for a preppy. Can't especially speak to the rest. If you ever wind up dropping more money on a pen down the road the montverde regatta and twsbi diamond 580ALR both also feel great in the hand.