From 5007ec470331b969c61d32a422772447a0aa6f18 Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 29 Oct 2022 14:55:26 +0200 Subject: [PATCH] remove username from options --- manifest.json | 6 +++--- options/options.html | 9 +-------- options/options.js | 9 ++------- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/manifest.json b/manifest.json index d3f1dcced..197a99544 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Trilium Web Clipper (dev)", - "version": "0.3.1", + "version": "1.0.0", "description": "Save web clippings to Trilium Notes.", "homepage_url": "https://github.com/zadam/trilium-web-clipper", "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'", @@ -60,8 +60,8 @@ "default": "Alt+Shift+S" } }, - "saveScreenshot": { - "description": "Take a screenshot of the current page", + "saveCroppedScreenshot": { + "description": "Take a cropped screenshot of the current page", "suggested_key": { "default": "Ctrl+Shift+E" } diff --git a/options/options.html b/options/options.html index 7180bb6bd..2363567a5 100644 --- a/options/options.html +++ b/options/options.html @@ -41,13 +41,6 @@ Trilium server URL: - - Username: - - - - Note: Username is needed only for Trilium v0.49 and earlier - Password: @@ -58,7 +51,7 @@ -

Note that the entered credentials are not stored anywhere, they will be only used to retrieve an authorization token from the server instance which will be then used to send the clipped notes.

+

Note that the entered password is not stored anywhere, it will be only used to retrieve an authorization token from the server instance which will be then used to send the clipped notes.

diff --git a/options/options.js b/options/options.js index 1462d858d..03c05822c 100644 --- a/options/options.js +++ b/options/options.js @@ -1,5 +1,4 @@ const $triliumServerUrl = $("#trilium-server-url"); -const $triliumServerUsername = $("#trilium-server-username"); const $triliumServerPassword = $("#trilium-server-password"); const $errorMessage = $("#error-message"); @@ -19,9 +18,8 @@ async function saveTriliumServerSetup(e) { e.preventDefault(); if ($triliumServerUrl.val().trim().length === 0 - || $triliumServerUsername.val().trim().length === 0 || $triliumServerPassword.val().trim().length === 0) { - showError("One or more mandatory inputs are missing. Please fill in server URL, username and password."); + showError("One or more mandatory inputs are missing. Please fill in server URL and password."); return; } @@ -36,7 +34,6 @@ async function saveTriliumServerSetup(e) { 'Content-Type': 'application/json' }, body: JSON.stringify({ - username: $triliumServerUsername.val(), password: $triliumServerPassword.val() }) }); @@ -57,7 +54,6 @@ async function saveTriliumServerSetup(e) { showSuccess("Authentication against Trilium server has been successful."); - $triliumServerUsername.val(''); $triliumServerPassword.val(''); browser.storage.sync.set({ @@ -116,7 +112,6 @@ async function restoreOptions() { $successMessage.hide(); $triliumServerUrl.val(''); - $triliumServerUsername.val(''); $triliumServerPassword.val(''); if (triliumServerUrl && authToken) { @@ -137,4 +132,4 @@ async function restoreOptions() { $triliumDesktopPort.val(triliumDesktopPort); } -$(restoreOptions); \ No newline at end of file +$(restoreOptions);