diff --git a/js/settings.js b/js/settings.js index bf626f3..287affb 100644 --- a/js/settings.js +++ b/js/settings.js @@ -30,4 +30,9 @@ document.querySelectorAll('input,select').forEach(function (el) { }) }) +// Open keyboard shortcut +document.querySelector('#mastodon-keyboard-shortcut').addEventListener('click', function() { + chrome.tabs.create({ url: 'chrome://extensions/shortcuts#:~:text=Share%20to%20Mastodon' }) +}) + loadSettings() \ No newline at end of file diff --git a/manifest.json b/manifest.json index 8ed3b83..6dc5d09 100644 --- a/manifest.json +++ b/manifest.json @@ -17,6 +17,12 @@ }, "default_title": "Share this page to Mastodon" }, + "commands": { + "_execute_action": { + "suggested_key": "Ctrl+Shift+S", + "description": "Share current page on Mastodon" + } + }, "permissions": [ "contextMenus", "storage", diff --git a/settings.html b/settings.html index 3e306c3..d81b12c 100644 --- a/settings.html +++ b/settings.html @@ -17,14 +17,18 @@
-