added: conversjs integration

changed: press review note name
fixed: open md links in new tab
This commit is contained in:
quenousimporte 2023-04-26 17:58:06 +02:00
parent 5b173f74b8
commit 2c157e4962
3 changed files with 36559 additions and 4 deletions

View File

@ -10,6 +10,10 @@
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Droid+Serif" /> <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Droid+Serif" />
<link rel='stylesheet' href='//cdn.jsdelivr.net/npm/hack-font@3.3.0/build/web/hack-subset.css'> <link rel='stylesheet' href='//cdn.jsdelivr.net/npm/hack-font@3.3.0/build/web/hack-subset.css'>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Josefin+Sans" /> <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Josefin+Sans" />
<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.conversejs.org/10.1.2/dist/converse.min.css">
<script src="libsignal-protocol.js"></script>
<script src="https://cdn.conversejs.org/10.1.2/dist/converse.min.js" charset="utf-8"></script>
</head> </head>
<body onload="init()" onkeydown="mainkeydownhandler()" onresize="resize()"> <body onload="init()" onkeydown="mainkeydownhandler()" onresize="resize()">

36541
libsignal-protocol.js Normal file

File diff suppressed because one or more lines are too long

18
main.js
View File

@ -15,7 +15,8 @@ var defaultsettings =
tagautocomplete: false, tagautocomplete: false,
titleinaccentcolor: false, titleinaccentcolor: false,
enablenetwork: false, enablenetwork: false,
titlebydefault: false titlebydefault: false,
chat: true
}; };
//builtin //builtin
@ -344,7 +345,7 @@ var commands = [
action: downloadallvaults action: downloadallvaults
}, },
{ {
hint: "Open revue de presse", hint: "Open press review",
action: loadreview, action: loadreview,
shortcut: "ctrl+r" shortcut: "ctrl+r"
}]; }];
@ -1234,6 +1235,14 @@ function init()
md.focus(); md.focus();
} }
} }
if (settings.chat)
{
converse.initialize({
bosh_service_url: 'https://conversejs.org/http-bind/',
show_controlbox_by_default: true
});
}
} }
function togglepassword() function togglepassword()
@ -1641,6 +1650,7 @@ function md2html(content)
converter.setOption("simplifiedAutoLink", true); converter.setOption("simplifiedAutoLink", true);
converter.setOption("simpleLineBreaks", true); converter.setOption("simpleLineBreaks", true);
converter.setOption("metadata", true); converter.setOption("metadata", true);
converter.setOption("openLinksInNewWindow", true);
var html = converter.makeHtml(content); var html = converter.makeHtml(content);
@ -1991,7 +2001,7 @@ function loadtodo()
function loadreview() function loadreview()
{ {
loadnote("Revue de presse"); loadnote("press review");
} }
function loadquicknote() function loadquicknote()
@ -2483,7 +2493,7 @@ function loadnote(name)
localdata.unshift(note); localdata.unshift(note);
} }
if (!preview.hidden || (preview.hidden && note.title == "Revue de presse")) if (!preview.hidden || (preview.hidden && note.title == "press review"))
{ {
togglepreview(); togglepreview();
} }