Format Link
Item media 2 screenshot
Item media 1 screenshot
Item media 2 screenshot
Item media 1 screenshot
Item media 1 screenshot
Item media 2 screenshot

Overview

Format a link and copy it to the clipboard.

## Why do I need it? To format the link of the active tab instantly to use in Markdown, reST, HTML, Text, Textile or other formats. ## How to use You can use keyboard shortcuts, context menus, or the toolbar button of Format Link extension to copy a link in the specified format. Before doing that, you can optionally select some text which may or may not contain a link. ### keyboard shortcut The keyboard shortcut for "Copy a link in the default format" is shortcut for clicking the toolbar button. The link is copied in the default format and the popup is shown under the toolbar button. Also there are shortcuts for copying in the link in the corresponding format regardless of the default format. You can change shortcuts at chrome://extensions/shortcuts ### context menu Open the context menu and select the "Format Link as XXX" menu item. "XXX" in the menu item label changes as you change the default format by clicking the "Set as default" button in the popup page for the toolbar button. If you check the "Create submenus" in the options page and save the options, submenus for each format are created under the "Format Link" context menu group. ### toolbar button When you press the toolbar button of "Format Link", the link is copied in the default format, the popup page becomes open, and the formatted text is shown in the text area. If you want to copy the link in different format, you can press one of the radio buttons. Also if you want to change the default format, you can press the "Set as default" button. ## Flexible settings You can modify formats in [Tools] -> [Extensions] -> Clik "Options" link in "Format Link" Extension. In format settings, you can use the mini template language. * {{variable}} * variable = title / url / pageUrl / text * The value of variable `title` is the HTML page title. * The value of variable `text` is the selected text if some text is selected, the link text if you open the context menu over a link (see KNOWN LIMITATION below for link text), or the page URL if no text is selected and you open the context menu not over a link. * The value of the variable `url` is the link if you open the context menu over a link, the first link if selection contains a link, or the HTML page URL otherwise. * The value of the variable `pageUrl` is always the page URL. * No spaces are allowed between variable name and braces. * {{variable.s("foo","bar")}} * Which means `variable.replace(new RegExp("foo", 'g'), "bar")` * You can use escape character \ in strings. * You must escape the first argument for string and regexp. For example, `.s("\\[","\\[")` means replacing `\[` with `\\[` * You can chain multiple .s("foo","bar") * You can use the escape character \ in strings. For example, you need to escape `\` with `\` like `\\`, and also you need to escape `{` with `\` like `\{`. See the LaTeX example below. * Other characters are treated as literal strings. Here are examples: * Markdown ``` [{{text.s("\\[","\\[").s("\\]","\\]")}}]({{url.s("\\(","%28").s("\\)","%29")}}) ``` * reST ``` {{text}} <{{url}}>`_ ``` * HTML ``` <a href="{{url.s("\"","&quot;")}}">{{text.s("<","&lt;")}}</a> ``` * Text ``` {{text}}\n{{url}} ``` * Redmine Texitile ``` "{{title.s("\"","&quot;").s("\\[","&#91;")}}":{{url}} ``` * LaTeX ``` \\href\{{{url}}\}\{{{text}}\} ``` ## License MIT License. Source codes are hosted at [Github](https://github.com/hnakamur/FormatLink-Chrome) ## KNOWN LIMITATIONS * Due to security reason, you cannot copy the URL on some pages like the Chrome Extension Gallary. * When you copy a link with a context menu after pointing mouse to a link, this extension manually searches the first link whose URL is equals to the link you pointed in the whole document, due to limitation of [chrome.contextMenus API](https://developer.chrome.com/extensions/contextMenus). So if there are multiple links of the same URL, and if you pointed to non-first link, the text is not what you want. However this is the best we can do right now. * Chrome allow each extension to have at most 4 keyboard shortcuts. One shortcut is used for copying a link with the default format, and the rest of three are used for copying a link with the corresponding format 1 to format 3. So format 4 to format 9 does not have keyboard shortcut.

4.5 out of 511 ratings

Google doesn't verify reviews. Learn more about results and reviews.

Review's profile picture

Ken WilliamApr 2, 2022

Fabulous - just what I was looking for. It would be great if you could also access the selected text variable (blank if nothing selected) and a current date variable :)

Review's profile picture

C. C.Jun 26, 2019

I dig it. One of the only ones I found that lets you customize the links with Regex, and there's a FF version as well.

Review's profile picture

林波Jun 16, 2019

It's great usefully! The menu item in the context menu, set my format string for text style of copy action.

Details

  • Version
    4.1.1
  • Updated
    March 30, 2022
  • Offered by
    hnakamur
  • Size
    56.26KiB
  • Languages
    English
  • Developer
    Email
    hnakamur@gmail.com
  • Non-trader
    This developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.

Privacy

The developer has disclosed that it will not collect or use your data.

This developer declares that your data is

  • Not being sold to third parties, outside of the approved use cases
  • Not being used or transferred for purposes that are unrelated to the item's core functionality
  • Not being used or transferred to determine creditworthiness or for lending purposes

Support

For help with questions, suggestions, or problems, visit the developer's support site

Related

Hyperlink from selected text

3.6(8)

Creates a hyperlink to the current page from the selected text in one click via the context (right click) menu

Rich URL

4.8(63)

Copy, save and share information in a convenient format.

copy 2 clipboard with ease

4.3(23)

a simple way to copy tab title and url with ease

Tab Link Copier

3.7(15)

Copies the current tab's url and title as a rich text link. Useful for pasting in Google Docs

Copy Link

3.8(81)

Copy links and page urls with text from context menu

Fix Copy Link Address

4.8(18)

Fix Copy Link Address in Google’s search results - both regular and image search.

Title & URL

4.6(12)

It's for copying current page's title and URL

Copy Link With Title

3.6(14)

This extension copies the current tab's link and title, formatted into Markdown, HTML, or a custom format.

Copy As Hyperlink

3.4(12)

Copy page title or selected text as a pasteable hyperlink

Copy URL with Title (plain text/markdown)

3.1(14)

Copy the title and URL in plain text/markdown format by keyboard shortcuts: Ctrl+C/Cmd+C for plain text, Alt+C/Opt+C for markdown.

Link With Context

3.8(8)

Copy the text of a link and its hyperlink as one.

Copy Real Url

4.2(33)

Provides an option to copy the real link on Google Search, Yahoo Search, Facebook Chat and Hangouts instead of redirecting url

Hyperlink from selected text

3.6(8)

Creates a hyperlink to the current page from the selected text in one click via the context (right click) menu

Rich URL

4.8(63)

Copy, save and share information in a convenient format.

copy 2 clipboard with ease

4.3(23)

a simple way to copy tab title and url with ease

Tab Link Copier

3.7(15)

Copies the current tab's url and title as a rich text link. Useful for pasting in Google Docs

Copy Link

3.8(81)

Copy links and page urls with text from context menu

Fix Copy Link Address

4.8(18)

Fix Copy Link Address in Google’s search results - both regular and image search.

Title & URL

4.6(12)

It's for copying current page's title and URL

Copy Link With Title

3.6(14)

This extension copies the current tab's link and title, formatted into Markdown, HTML, or a custom format.

Google apps