From 80d9e02ea47bfb783cc2033162ae9231551e5654 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Tue, 9 Nov 2021 20:47:01 +0000 Subject: Delete files that are no longer needed --- make_bookmarklet/index.php | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 make_bookmarklet/index.php (limited to 'make_bookmarklet/index.php') diff --git a/make_bookmarklet/index.php b/make_bookmarklet/index.php deleted file mode 100644 index 67dea14..0000000 --- a/make_bookmarklet/index.php +++ /dev/null @@ -1,36 +0,0 @@ - { - async function bookmarkPage(page) { - const response = await fetch('{$config['site']}/add/', { - method: 'POST', - mode: 'cors', - cache: 'no-cache', - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Authorization': 'Bearer {$config['bearer_token']}', - }, - redirect: 'follow', - referrerPolicy: 'no-referrer', - body: page - }); - return response; - } - - bookmarkPage(`url=\${encodeURIComponent(window.location.href)}`) - .then(data => { - if (data.status === 201) { - alert('Page bookmarked'); - } else { - alert(`Failed with status \${data.status} \${data.statusText}`); - } - }); -})(); -EOF_JS; - -echo $booklet; -- cgit v1.2.3-13-gbd6f