Update scripts/neocities-edit-button.js

This commit is contained in:
agnes 2026-06-11 09:19:09 +00:00
parent 0741f6fec9
commit dccf7c6077

View file

@ -2,7 +2,7 @@
// logged in to neocities clicks it, it will take them to the edit page of their own account // 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. // for the file that corresponds to whatever url you were visiting. it's very basic lol.
<script> <div class="editlink"> <script>
function url_replace() { function url_replace() {
const path = window.location.pathname.replace(/\//g, '') ; const path = window.location.pathname.replace(/\//g, '') ;
@ -10,7 +10,7 @@ function url_replace() {
const base_url = 'https://neocities.org/site_files/text_editor?filename=' + path + html; const base_url = 'https://neocities.org/site_files/text_editor?filename=' + path + html;
document.querySelector('.editlink').innerHTML = document.querySelector('.editlink').innerHTML =
`<a href="${base_url}">Edit</a>`; `<a href="${base_url}">🛸</a>`;
} }
url_replace(); url_replace();
</script> </script></div>