From 6ccdb189c575e5f1c539e7fed9f39d2f683b16d4 Mon Sep 17 00:00:00 2001 From: Murphy McMahon Date: Thu, 14 Jul 2011 09:35:14 -0300 Subject: Added clipboard copying to linkHints mode (default binding: 'Y') --- background_page.html | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'background_page.html') diff --git a/background_page.html b/background_page.html index 71bbcf7a..5de86bca 100644 --- a/background_page.html +++ b/background_page.html @@ -81,6 +81,7 @@ upgradeNotificationClosed: upgradeNotificationClosed, updateScrollPosition: handleUpdateScrollPosition, copyToClipboard: copyToClipboard, + copyLinkUrl: copyLinkUrl, isEnabledForUrl: isEnabledForUrl, saveHelpDialogSettings: saveHelpDialogSettings }; @@ -261,6 +262,14 @@ chrome.tabs.create({ url: request.url, index: tab.index + 1, selected: request.selected }); }); } + + /** + * Copies url of selected link to the clipboard (wget ftw) + */ + function copyLinkUrl(request) { + Clipboard.copy(request.data); + } + /* * Returns the core CSS used for link hints, along with any user-provided overrides. */ -- cgit v1.2.3