Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8606635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:08:41+00:00 2026-06-12T03:08:41+00:00

I noticed that stackoverflow has some JS code which generates: a warning with Stack

  • 0

I noticed that stackoverflow has some JS code which generates: a warning with “Stack Overflow requires external JavaScript from another domain, which is blocked or failed to load.”. This happened to me a moment ago when Google Analytics didn’t load correctly.

How would I do something like this?

Note: I could have a but all other JS loads correctly this is only for google analytics which sometimes either never loads or takes forever.

When I check the code they have:

StackExchange.init = function () {
    var e = function (a) {
        if (!window.jQuery) if ("complete" != document.readyState) setTimeout(function () {
            e(a)
        }, 1E3);
        else {
            var d = document.createElement("div");
            d.id = "noscript-padding";
            var g = document.createElement("div");
            g.id = "noscript-warning";
            g.innerHTML = a + " requires external JavaScript from another domain, which is blocked or failed to load.";
            document.body.insertBefore(d, document.body.firstChild);
            document.body.appendChild(g)
        }

But I am not sure what is going on with the setTimeout()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:08:42+00:00Added an answer on June 12, 2026 at 3:08 am

    With setTimeout they wait until the page is loaded completely. The function e calls itself until document.readyState is complete where 1E3 is 1000 => 1 second:

    if ("complete" != document.readyState) setTimeout(function () { e(a) }, 1E3);
    

    If you like to do the same for Google Analytics check out: javascript – Detect if Google Analytics is loaded yet?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Stackoverflow has a nifty badge system. One thing I noticed is that badges are
im trying to create a badge system similar to stackoverflows. i noticed that stackoverflow
Notice how StackOverflow displays some nice Status Bar message based on your activity? (That
I noticed that the <td align=center> code works differently on the MediaWiki.org page and
I noticed that the first creation of an image from an uri takes pretty
I noticed that median of boxplot (constructed with restricted ylim-parameter) may differ from the
I have noticed that if an element, such as span or p, has a
After taking help from StackOverflow, I found the solution that I have implemented below.
I noticed that https://stackoverflow.com//////////questions/4659504/ is a valid URL. However https://www.google.com//////////analytics/settings is not. Are there
For some time I noticed that MySQL would append comments to InnoDB tables that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.