2026-06-09 12:31:43 +00:00
|
|
|
// 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.
|
|
|
|
|
|
2026-06-11 09:19:09 +00:00
|
|
|
<div class="editlink"> <script>
|
2026-06-09 12:31:43 +00:00
|
|
|
|
|
|
|
|
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 =
|
2026-06-11 09:19:09 +00:00
|
|
|
`<a href="${base_url}">🛸</a>`;
|
2026-06-09 12:31:43 +00:00
|
|
|
}
|
|
|
|
|
url_replace();
|
2026-06-11 09:19:09 +00:00
|
|
|
</script></div>
|