Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: reset/clear/delete loaded #93

Open
MkMan opened this issue Feb 11, 2021 · 1 comment
Open

Feature request: reset/clear/delete loaded #93

MkMan opened this issue Feb 11, 2021 · 1 comment

Comments

@MkMan
Copy link

MkMan commented Feb 11, 2021

Hi,

I am looking at upgrading to the latest version from our current one (v3.2.1) and noticed that the ability to unload the API is no longer there as it was before. It would be nice to re-introduce something similar.

Thanks for the awesome library 😃

@p3pp8
Copy link

p3pp8 commented Jun 15, 2022

just use this script:

if (window.google?.maps) {
  delete google.maps

  document.querySelectorAll("script").forEach((script) => {
    if (
      script.src.includes("googleapis.com/maps") ||
      script.src.includes("maps.gstatic.com") ||
      script.src.includes("earthbuilder.googleapis.com")
    ) {
      script.remove()
    }
  })
}

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants