commit 85a627919f432330bbfddd6d088c0351de819db8
parent 99fbd93a2051b06072fe5a2375ef739177969090
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Thu, 31 Oct 2024 19:30:11 +0100
fix: do not use credentials in bookmarklet (will use cookie)
Diffstat:
3 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/index.php b/index.php
@@ -138,7 +138,7 @@
<header>
<!-- Buttons -->
- <?php top_navigation($user, $token, $category); ?>
+ <?php top_navigation(); ?>
<!-- Headline -->
<h1>Rememori</h1>
<!-- Search bar -->
diff --git a/lib/bookmarklet.php b/lib/bookmarklet.php
@@ -1,9 +1,6 @@
<?php
-function bookmarklet(
- string $user,
- string $token
-) {
+function bookmarklet() {
/* construct javascript bookmarklet */
echo "javascript:(function() {
@@ -14,9 +11,7 @@ var category = prompt(
if (category === null) { category = ''; }
remori_window = window.open(
'https://" . $_SERVER["SERVER_NAME"] . "/api/new.php
-?user=" . $user . "
-&token=" . $token . "
-&category=' + category + '
+?category=' + category + '
&return=html
&content=' + window.location.href
);
diff --git a/lib/menus.php b/lib/menus.php
@@ -1,9 +1,6 @@
<?php
-function top_navigation(
- string $user,
- string $token
-) {
+function top_navigation() {
?>
@@ -61,7 +58,7 @@ function top_navigation(
<!-- Bookmarklet -->
<a
class="likenavitem"
- href="<?php echo bookmarklet($user, $token); ?>"
+ href="<?php echo bookmarklet(); ?>"
onclick="window.alert('<?php echo $GLOBALS["i18n_bookmarklet_tp"];?>');"
title="<?php echo $GLOBALS["i18n_bookmarklet_tp"]; ?>"
>