Allmaps

Allmaps Editor

Opens the current address in the Allmaps Editor.

Installation

Drag the button below to the favorites bar of your browser in order to install this bookmarklet. Alternatively, you can copy the code below and paste it in the address or URL field of a new bookmark.

Open in Allmaps Editor

Source code

javascript:location=`https://editor.allmaps.org/#/collection?url=${encodeURIComponent(window.location)}`

Allmaps Viewer

Opens the current address in the Allmaps Viewer.

Installation

Drag the button below to the favorites bar of your browser in order to install this bookmarklet. Alternatively, you can copy the code below and paste it in the address or URL field of a new bookmark.

Open in Allmaps Viewer

Source code

javascript:location=`https://viewer.allmaps.org/?url=${encodeURIComponent(window.location)}`

Allmaps Annotation

Checks if an Allmaps Annotation exists for the current address, and if not, prompts the user to open the address in the Allmaps Editor.

Installation

Drag the button below to the favorites bar of your browser in order to install this bookmarklet. Alternatively, you can copy the code below and paste it in the address or URL field of a new bookmark.

Open Allmaps Annotation

Source code

javascript: (async function () {
    // Encode the current url in the address bar 
    const encodedManifestUrl = encodeURIComponent(window.location.href);
    // Construct url to check for annotation
    const annotationUrl = `https://annotations.allmaps.org/?url=${encodedManifestUrl}`;
    // Base url to open manifest in the Allmaps Editor
    const editorBase = "https://editor.allmaps.org/#/collection?url=";
    // Try to fetch annotation
    const response = await fetch(annotationUrl).then((response) => response.json());
    // If it doesn't exist, prompt user to open it in the Allmaps Editor
    if (response.error) {
        if (window.confirm("Annotation not found. Would you like to open the manifest in the Allmaps Editor?")) {
            location = editorBase + encodedManifestUrl
        }
    } else {
        // If it does exist, open the annotation
        location = annotationUrl
    }
})()