mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	sharing fixes
This commit is contained in:
		@@ -5,10 +5,10 @@
 | 
			
		||||
 */
 | 
			
		||||
async function fetchNote(noteId = null) {
 | 
			
		||||
    if (!noteId) {
 | 
			
		||||
        noteId = document.getElementsByName("body")[0].getAttribute("data-note-id");
 | 
			
		||||
        noteId = document.body.getAttribute("data-note-id");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const resp = await fetch(`share/api/notes/${noteId}`);
 | 
			
		||||
    const resp = await fetch(`api/notes/${noteId}`);
 | 
			
		||||
 | 
			
		||||
    return await resp.json();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
    <% } else { %>
 | 
			
		||||
    <link rel="shortcut icon" href="../favicon.ico">
 | 
			
		||||
    <% } %>
 | 
			
		||||
    <script src="app/share.js"></script>
 | 
			
		||||
    <script src="../app/share.js"></script>
 | 
			
		||||
    <% if (!note.hasLabel("shareOmitDefaultCss")) { %>
 | 
			
		||||
        <link href="../libraries/normalize.min.css" rel="stylesheet">
 | 
			
		||||
        <link href="../stylesheets/share.css" rel="stylesheet">
 | 
			
		||||
@@ -19,7 +19,7 @@
 | 
			
		||||
        <link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet">
 | 
			
		||||
    <% } %>
 | 
			
		||||
    <% for (const jsRelation of note.getRelations("shareJs")) { %>
 | 
			
		||||
        <script src="api/notes/<%= jsRelation.value %>/download"></script>
 | 
			
		||||
        <script type="module" src="api/notes/<%= jsRelation.value %>/download"></script>
 | 
			
		||||
    <% } %>
 | 
			
		||||
    <%- header %>
 | 
			
		||||
    <title><%= note.title %></title>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user