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

preview in browser tabs #544

Open
divinity76 opened this issue Dec 30, 2023 · 1 comment
Open

preview in browser tabs #544

divinity76 opened this issue Dec 30, 2023 · 1 comment

Comments

@divinity76
Copy link

I wanted to preview everything in a dedicated browser tab, that wasn't easy to do, came up with

// run on https://leaflet-extras.github.io/leaflet-providers/preview/
// then scroll to bottom of page, hold down CTRL and click 100 times.
[...document.querySelectorAll("[name=leaflet-base-layers]")].map((ele) => ele.parentNode.textContent.trim()).forEach(function(filterString) {
    let a = document.createElement("a");
    a.href = "#filter=" + encodeURIComponent(filterString);
    a.textContent = filterString;
    a.appendChild(document.createElement("br"));
    a.target = "_blank";
    a.addEventListener("click", () => a.parentNode.removeChild(a));
    document.body.appendChild(a);
});
@brunob
Copy link
Member

brunob commented Jan 2, 2024

Do you mean preview all overlays ? What do you mean by "then scroll to bottom of page, hold down CTRL and click 100 times" ? Is it a rant, a call for help, a enhancement idea ?

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