added: conversjs integration
changed: press review note name fixed: open md links in new tab
This commit is contained in:
parent
5b173f74b8
commit
2c157e4962
|
@ -10,6 +10,10 @@
|
|||
<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" 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>
|
||||
|
||||
<body onload="init()" onkeydown="mainkeydownhandler()" onresize="resize()">
|
||||
|
|
File diff suppressed because one or more lines are too long
18
main.js
18
main.js
|
@ -15,7 +15,8 @@ var defaultsettings =
|
|||
tagautocomplete: false,
|
||||
titleinaccentcolor: false,
|
||||
enablenetwork: false,
|
||||
titlebydefault: false
|
||||
titlebydefault: false,
|
||||
chat: true
|
||||
};
|
||||
|
||||
//builtin
|
||||
|
@ -344,7 +345,7 @@ var commands = [
|
|||
action: downloadallvaults
|
||||
},
|
||||
{
|
||||
hint: "Open revue de presse",
|
||||
hint: "Open press review",
|
||||
action: loadreview,
|
||||
shortcut: "ctrl+r"
|
||||
}];
|
||||
|
@ -1234,6 +1235,14 @@ function init()
|
|||
md.focus();
|
||||
}
|
||||
}
|
||||
|
||||
if (settings.chat)
|
||||
{
|
||||
converse.initialize({
|
||||
bosh_service_url: 'https://conversejs.org/http-bind/',
|
||||
show_controlbox_by_default: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function togglepassword()
|
||||
|
@ -1641,6 +1650,7 @@ function md2html(content)
|
|||
converter.setOption("simplifiedAutoLink", true);
|
||||
converter.setOption("simpleLineBreaks", true);
|
||||
converter.setOption("metadata", true);
|
||||
converter.setOption("openLinksInNewWindow", true);
|
||||
|
||||
var html = converter.makeHtml(content);
|
||||
|
||||
|
@ -1991,7 +2001,7 @@ function loadtodo()
|
|||
|
||||
function loadreview()
|
||||
{
|
||||
loadnote("Revue de presse");
|
||||
loadnote("press review");
|
||||
}
|
||||
|
||||
function loadquicknote()
|
||||
|
@ -2483,7 +2493,7 @@ function loadnote(name)
|
|||
localdata.unshift(note);
|
||||
}
|
||||
|
||||
if (!preview.hidden || (preview.hidden && note.title == "Revue de presse"))
|
||||
if (!preview.hidden || (preview.hidden && note.title == "press review"))
|
||||
{
|
||||
togglepreview();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue