Append reference link when sending selection

Add the original page/link as a Markdown reference when sending selected text via the context menu. background.js now appends `[Reference Link](...)` using info.linkUrl or info.pageUrl; manifest version bumped to 2026.03.06; README changelog updated to note the new right-click behavior.
This commit is contained in:
jonny
2026-03-05 10:21:55 +08:00
parent 1857504ee7
commit 52f06909f3
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ chrome.contextMenus.onClicked.addListener(info => {
let tempCont=''
switch(info.menuItemId){
case 'Memos-send-selection':
tempCont = info.selectionText + '\n'
tempCont = info.selectionText + '\n' + `[Reference Link](${info.linkUrl || info.pageUrl})` + '\n'
break
case 'Memos-send-link':
tempCont = (info.linkUrl || info.pageUrl) + '\n'