A PopClip extension that opens URLs spanning multiple lines by joining them into a single URL before opening.
When copying URLs from terminal applications or text editors, line breaks are often inserted into the URL, making it impossible to open with the standard "Open URL" action. For example:
https://example.com/very/long/path/
that/continues/on/next/line
The native PopClip URL action would fail because it treats this as invalid due to the line break.
This extension:
- Only appears when you select text that contains a URL pattern (
http://orhttps://) spanning multiple lines - Removes all line breaks from the selection
- Opens the resulting URL in your default browser
Smart Detection: The extension won't interfere with the native PopClip URL opener. It only shows when:
- The selected text contains
http://orhttps:// - The text spans multiple lines (contains line breaks)
- This ensures single-line URLs continue to use the native handler
The extension displays a link icon with a plus symbol (⛓️➕) to distinguish it from the native URL opener, indicating it will join the lines together.
- Download or clone this repository
- Double-click the
OpenMultilineURL.popclipextdirectory - PopClip will prompt you to install the extension
- Select a URL that spans multiple lines (e.g., in Terminal)
- The "Open Multiline URL" action will appear in the PopClip menu
- Click it to open the joined URL
Selected text:
https://github.com/pilotmoon/PopClip-Extensions/
blob/master/README.md
Result: The "Open Multiline URL" action appears with the link-plus icon. Clicking it opens https://github.com/pilotmoon/PopClip-Extensions/blob/master/README.md correctly in your browser.
Single-line URL (Extension Hidden)
Selected text:
https://github.com/pilotmoon/PopClip-Extensions/blob/master/README.md
Result: The extension doesn't appear. Use the native PopClip "Open URL" action instead.
- PopClip version 2021.5 or later (build 3895+)
- macOS
- Language: JavaScript
- Icon: Custom PNG (link with plus symbol)
- Detection Pattern:
(?s)(https?://.*[\r\n].*)- Matches URLs containing line breaks - Requirements: Text selection with URL pattern and line breaks
MIT