Wiki Links support

This commit is contained in:
2026-04-21 19:50:16 +02:00
parent 9639a70572
commit e0d2fb0b41
7 changed files with 478 additions and 5 deletions
+25
View File
@@ -0,0 +1,25 @@
function movePage() {
const current = window.location.pathname;
const target = prompt('Move this page to (absolute path):', current);
if (target === null) return;
const clean = target.trim();
if (!clean || !clean.startsWith('/')) {
alert('Move target must be an absolute path starting with /');
return;
}
const form = document.createElement('form');
form.method = 'POST';
form.action = current + '?move=' + encodeURIComponent(clean);
document.body.appendChild(form);
form.submit();
}
function deletePage() {
const current = window.location.pathname;
if (!confirm('Delete ' + current + ' and everything inside it?')) return;
const form = document.createElement('form');
form.method = 'POST';
form.action = current + '?delete=1';
document.body.appendChild(form);
form.submit();
}