aboutsummaryrefslogtreecommitdiffstats
path: root/static/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'static/scripts')
-rw-r--r--static/scripts/purge.js15
-rw-r--r--static/scripts/rebuild.js14
2 files changed, 29 insertions, 0 deletions
diff --git a/static/scripts/purge.js b/static/scripts/purge.js
new file mode 100644
index 0000000..5ee34f0
--- /dev/null
+++ b/static/scripts/purge.js
@@ -0,0 +1,15 @@
+$(() => {
+ $('#confirm').click(() => {
+ let page = $('#confirm').data('page');
+ $.ajax({
+ type: 'GET',
+ url: `/special/purge/${page}/confirm`,
+ success: () => {
+ $('#response').html('<div class=\'box\'>Successfully purged page.</div>');
+ },
+ error: () => {
+ $('#response').html('<div class=\'box\'>Could not purge page. Try again later.</div>');
+ }
+ });
+ });
+});
diff --git a/static/scripts/rebuild.js b/static/scripts/rebuild.js
new file mode 100644
index 0000000..8fd0e2e
--- /dev/null
+++ b/static/scripts/rebuild.js
@@ -0,0 +1,14 @@
+$(() => {
+ $('#confirm').click(() => {
+ $.ajax({
+ type: 'GET',
+ url: `/special/rebuild/confirm`,
+ success: () => {
+ $('#response').html('<div class=\'box\'>Successfully rebuilt page directory.</div>');
+ },
+ error: () => {
+ $('#response').html('<div class=\'box\'>Could not rebuild page directory. Try again later.</div>');
+ }
+ });
+ });
+});