Compare commits

...

2 Commits

Author SHA1 Message Date
quenousimporte 145a0b279f fix search area font family 2024-01-31 13:55:45 +01:00
quenousimporte 7a4dd99834 drop link title feature 2024-01-31 13:55:25 +01:00
3 changed files with 2 additions and 39 deletions

View File

@ -35,17 +35,6 @@ else if (isset($_POST['action']))
}
break;
case 'title':
$result = array();
$str = file_get_contents($_POST['data']);
if(strlen($str) > 0)
{
preg_match("/\<title\>(.*)\<\/title\>/", $str, $title);
$result['title'] = $title[1];
}
echo json_encode($result);
break;
default:
echo '{"error": "unknown action ' . $action . '"}';
break;

29
main.js
View File

@ -34,7 +34,6 @@ var lastsaved = "";
var pending = false;
var settings = null;
var tags = null;
var titlemap = {};
var stat =
{
@ -773,32 +772,7 @@ function showlinkdialog(link)
a.setAttribute("href", link);
a.setAttribute("target", "_blank");
div.onclick = removelinkdialog;
if (settings.sync)
{
if (titlemap[link])
{
a.innerHTML = titlemap[link];
}
else
{
a.innerText = link;
queryremote({action: "title", data: link})
.then(res =>
{
if (res.title)
{
a.innerHTML = res.title;
titlemap[link] = res.title;
localStorage.setItem("titlemap", JSON.stringify(titlemap));
}
});
}
}
else
{
a.innerText = link;
}
a.innerText = link;
}
else
{
@ -1321,7 +1295,6 @@ function init()
if (settings.sync)
{
titlemap = JSON.parse(localStorage.getItem("titlemap")) || {};
if (localStorage.getItem("pgpkeys") && localStorage.getItem("pgpkeys").startsWith("-----BEGIN PGP PUBLIC KEY BLOCK-----"))
{
queryremote({action: "fetch"})

View File

@ -128,6 +128,7 @@ body::-webkit-scrollbar-thumb {
/* search file dialog */
#filter {
font-family: inherit;
color: black;
width: 100%;
}