// use this to create a quick link to edit whatever page of the site you're currently visiting. if a user of your site who isnt you but is
// logged in to neocities clicks it, it will take them to the edit page of their own account 
// for the file that corresponds to whatever url you were visiting. it's very basic lol.

<div class="editlink"> <script>

function url_replace() {
        const path = window.location.pathname.replace(/\//g, '') ;
        let html = ".html"
        const base_url = 'https://neocities.org/site_files/text_editor?filename=' + path + html;
        
    document.querySelector('.editlink').innerHTML =
        `<a href="${base_url}">🛸</a>`;
        }
      url_replace();
</script></div>