Format a link and copy it to the clipboard.

Latest Version

Version
5.0.2
Update
August 17, 2024
Size
53.32KiB
Developer
Category
Users
1,000+
Rating
4.5 ★
Manifest Version
3
Web Store Status
Languages Support
English
See more
Permissions
ActiveTab
ClipboardWrite
ContextMenus
Storage
See more

Format Link Extension

## 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

```
{{text.s(\"<\",\"<\")}}
```

* Text

```
{{text}}\
{{url}}
```

* Redmine Texitile

```
\"{{title.s(\"\\\"\",\""\").s(\"\\\\[\",\"[\")}}\":{{url}}
```

* LaTeX

```
\\\\href\\{{{url}}\\}\\{{{text}}\\}
```

## Permissions required by this extension

* To use this extension, the following two permissions are required:
* \"Read and change all your data on all websites\"
* This permission is needed for this extension to run the [\"content script\"](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts?hl=en) into the content of pages you visit in order to get the page title, the selected text, the page URL, or the link URL.
* \"Modify data you copy and paste\"
* This permission is needed to copy a URL and a text to the clipboard.

For technical details, see the following pages:

* [Declare permissions](https://developer.chrome.com/docs/extensions/develop/concepts/declare-permissions?hl=en)
* [\"content_scripts.matches\"](https://developer.chrome.com/docs/extensions/develop/concepts/match-patterns?hl=en)
* This extension uses `\"\"`.
* [Permissions](https://developer.chrome.com/docs/extensions/reference/permissions-list?hl=en)
* This extension requires the following permissions:
* \"activeTab\"
* \"clipboardWrite\"
* \"contextMenus\"
* \"storage\"

## 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.
* 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.
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "name": "Format Link", "version": "5.0.2", "manifest_version": 3, "description": "Format a link and copy it to the clipboard.", "icons": { "16": "icon16.png", "48": "icon48.png", "128": "icon128.png" }, "background": { "service_worker": "background.js" }, "content_scripts": [ { "matches": [ "" ], "js": [ "content.js" ] } ], "action": { "default_popup": "popup.html" }, "options_page": "options.html", "commands": { "format-link-format-default": { "suggested_key": { "default": "Shift+Alt+C" }, "description": "Copy a link in the default format" }, "format-link-format1": { "suggested_key": { "default": "Shift+Alt+1" }, "description": "Copy a link in format 1" }, "format-link-format2": { "suggested_key": { "default": "Shift+Alt+2" }, "description": "Copy a link in format 2" }, "format-link-format3": { "suggested_key": { "default": "Shift+Alt+3" }, "description": "Copy a link in format 3" } }, "permissions": [ "activeTab", "clipboardWrite", "contextMenus", "storage" ]}
Read more

How to download and manually install Format Link extension for Chrome

Looking for a way to install Format Link extensions for Chrome, you can search for them in the Chrome Web Store, clicking the "Add to Chrome" button, and following the straightforward process.

However, you may need to install Format Link extensions manually, this article outlines two simple methods to effortlessly install Format Link extensions, whether they come as unpacked folders in compressed formats like .zip or as .crx files.

Method 1: Download Format Link extension and manually install through Drag &Drop

If you ever need to manually install a Format Link extension for Chrome, don't worry, it's a simple process. Just follow these easy steps, and you will have your extension ready to use in no time.

Step 1: Download the Format Link Extension by clicking the "Download CRX" button on the website.

Look for the Format Link extension you wish to install. Go to the website and download the Format Link extension package, which is usually a .CRX file and comes in a zipped file. Here ".crx" file is the format for Format Link extension that contains all the data.

Step 2: Extract &Arrange Files

Once the file is downloaded, extract that file into its own folder. Similarly, give that extension files a permanent home. In other words, keep it in a folder that you don't accidentally delete it because these files will be needed to make that extension work.

Step 3: Go to the Chrome Extensions Page

Open Google Chrome and in the address bar, type chrome://extensions; it will open the Google Chrome extensions page. Make sure that "My extensions" is selected in the sidebar.

Step 4: Drag and Drop the Extension

Now, go to the folder where you extracted the Format Link extension and drag &drop the extension file from there anywhere onto the extension page within Google Chrome.

Step 5: Complete the Installation

Once you drag and drop the extension file, follow the steps that Google Chrome takes you through. Similarly, if the extension file is of .crx file format, you will be required to review the permissions and then add the extension.

Now, you can manage that added extension as you would like to with any other Chrome extension that you added through Chrome Webstore. Its icon will also appear in the Google Chrome Menu on the right side of the address bar once you activate it.

Method 2: Download Format Link extension for Chrome and install in Developer Mode

This is another method to install Format Link extension manually, but the twist is that here, you install by enabling the developer mode option provided in Google Chrome. This mode is commonly used for testing extensions or running unpublished tools.

Step 1: Download the Format Link extension file

Select and download the Format Link extension by clicking the 'Download CRX' button on the website.

Step 2: Extract the downloaded contents

Convert the file to a ZIP file if it is in CRX format then extract the Format Link extension zip file or folder that you downloaded. Make sure you extract it using the same folder name and keep it safely in another folder, so you don't delete it by mistake. The extracted folder will be needed to keep your Format Link extension running.

Step 3: Open Chrome Extension Setting Page

In the address bar of Google Chrome, type chrome://extensions and open the Chrome Extension Page.

Step 4: Enable Developer Mode

After opening the Chrome Extension page, look at the top right side, and you will find the toggle option of "Developer mode."Simply enable that developer mode option.

Step 5: Load the Unpacked Extension

Once you enable the developer mode option, you will see the menu of Load Unpacked, Pack Extensions and Update. From that, select the option "Load unpacked."

Step 6: Select the Extension Folder

Once the pop-up opens upon clicking Load unpacked, select the Format Link extension directory and click on the "Select Folder "button.

Step 7: Confirm and Install

After you select an extension folder of a Google Chrome extension you're installing manually, confirm its installation for the final time and let the installation complete.

Conclusion

Here we've made a step-by-step guide on How to manually install Format Link extension in 2 ways. We hope this guide proves helpful.

Similar Extensions

icon

Copy Link Extension · Productivity 1,000+ 87 ★ 996KiB

icon

Fix Copy Link Address Extension · Productivity 1,000+ 19 ★ 22.21KiB

icon

Title & URL Extension · Productivity 1,000+ 12 ★ 40.95KiB

icon

Copy Link With Title Extension · Developer Tools 1,000+ 15 ★ 58.18KiB

icon

Copy As Hyperlink Extension · Productivity 1,000+ 14 ★ 38.12KiB

icon

Copy URL with Title (plain text/markdown) Extension · Productivity 1,000+ 14 ★ 16.72KiB

icon

Link With Context Extension · Productivity 1,000+ 8 ★ 9.59KiB

icon

Copy Real Url Extension · Productivity 1,000+ 33 ★ 40.15KiB

icon

Hyperlink from selected text Extension · Productivity 1,000+ 8 ★ 33.01KiB

icon

Rich URL Extension · Productivity 1,000+ 76 ★ 750KiB

icon

copy 2 clipboard with ease Extension · Accessibility 1,000+ 23 ★ 390KiB

icon

Tab Link Copier Extension · Productivity 1,000+ 17 ★ 19.26KiB

icon

Copy title & URL Extension · Accessibility 1,000+ 5 ★ 9.95KiB

icon

Copy Cat Extension · Productivity 1,000+ 18 ★ 58.19KiB

icon

Copy URL To Clipboard Extension · Productivity 1,000+ 44 ★ 160KiB

icon

Copy-URL Extension · Productivity 1,000+ 8 ★ 3.68KiB

icon

Copy URL+ Extension · Productivity 1,000+ 45 ★ 35.59KiB

icon

Copy Link Name Extension · Productivity 1,000+ 115 ★ 10.84KiB

icon

Copy Url (from TabInfoCopy) Extension · Productivity 1,000+ 10 ★ 17.52KiB

icon

Create Link Extension · Social & Communication 1,000+ 170 ★ 32.25KiB

icon

Copy Title and Url as Markdown Style Extension · Accessibility 1,000+ 40 ★ 7.09MiB

icon

Copy page title and url Extension · Productivity 1,000+ 13 ★ 9.86KiB

icon

CopyTabTitleUrl Extension · Accessibility 1,000+ 20 ★ 66.61KiB

icon

BlogLinkClipper Extension · Productivity 1,000+ 15 ★ 49.76KiB

User reviews

icon

Ken William (ID: 0000006ca0aad814) Voted 5 ★ - Updated 04/02/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 :)

icon

Григорий Врачёв (ID: 000000c8f820f342) Voted 2 ★ - Updated 09/15/2020 Хотелось бы чтобы из описания под роликами в ютубе можно было скопировать текст с полной, оригинальной ссылкой, без лишних хвостов. https://www.youtube.com/watch?v=AubAiHSHRgs&t=476s

icon

C. C. (ID: 000000a9031a563d) Voted 5 ★ - Updated 06/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.

icon

林波 (ID: 0000001e829a2dfd) Voted 5 ★ - Updated 06/17/2019 It's great usefully! The menu item in the context menu, set my format string for text style of copy action.

icon

eye blue (ID: 0000000066340792) Voted 3 ★ - Updated 11/04/2018 Doesn't work with Windows Chrome 71.0.3578.30