Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
The way to keep the alert display when viewing the production web page

I'm trying to create a program to keep the alert display when viewing the production web page.

For example, I have two pages as follows:

  • TEST environment ) https://example.com/123
  • PROD environment ) https://example.com/456

Only when viewing the PROD page, I'd like to display the alert that covers the content. Please see the image I attached.

enter image description here

As I'm beginner of programing, I have no idea how to realize it. Could anyone give me an advice for this? I have basic knowledges of HTML/CSS/Java/JS.

Thank you!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Let's define a function like this:

function alertProd(url, prodPattern) {
    if (url.indexOf(prodPattern) >= 0) alert("PROD!");
}

alertProd(window.location.href, "stacksnippets");

Note that I have used stacksnippets as pattern, you will need to change it to 456 when you call the function.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!