drop clip feature

This commit is contained in:
quenousimporte 2024-10-07 08:58:59 +02:00
parent ffc90cf9fa
commit fb84c7f4ea
3 changed files with 1 additions and 10 deletions

View File

@ -2,7 +2,6 @@
<div>
<input hidden type="submit" name="search" value="search" accesskey="s">
<input type="submit" name="open" value="open" accesskey="o">
<input type="submit" name="clip" value="clip" accesskey="c">
<input type="submit" name="download" value="download" accesskey="d">
<br>
<input placeholder="search..." autofocus autocomplete="off" class="title" name="param" value="<?php if (!isset($_GET['home']) && !isset($_POST['home'])) echo $param; ?>">

View File

@ -80,7 +80,7 @@
$path = $dir . '/' . $title;
$lastchanged = filemtime($path);
$previous = $_POST['lastchanged'];
if (!isset($_GET['clip']) && (int)$lastchanged > (int)$previous)
if ((int)$lastchanged > (int)$previous)
{
$tempcontent = file_get_contents($path . '.md');
if ($tempcontent != $content)
@ -130,12 +130,6 @@
{
downloadall();
}
else if (isset($_GET['clip']) && $_GET['param'])
{
$content = $_GET['param'] . "\r\n" . file_get_contents($dir . '/todo.md');
savenote('todo', $content);
$_GET['param'] = '';
}
else if (isset($_POST['save']) || isset($_POST['home']) || isset($_POST['links']) || isset($_POST['stats']) || isset($_POST['download']))
{
$title = $_POST['title'];

View File

@ -14,7 +14,6 @@ No javascript.
|------------------------|----------------------------------|-------------------------------|--------|
| search (default action)| full text search | reload home | alt-s |
| open | open if exists, or create | create with timestamp as title| alt-o |
| clip | insert in todo | | alt-c |
| download | download all notes in a zip file | | alt-d |
| Note page | action with param | hotkey |
@ -29,6 +28,5 @@ No javascript.
| Url params | action |
|------------------------|--------------------------|
| reindex | force notes reindex |
| clip+param | same as button |
| open+param | same as button |
| search+param | same as button |