Announce and Discuss the Latest Theme and Extension Releases.
AlexVallat
Posts: 90Joined: September 30th, 2006, 8:53 am
Posted March 26th, 2017, 1:55 am
I wanted to get this out there before AMO stops accepting unrestricted addons in April - modifying Firefox behaviour like this can't be done as a WebExtension. This addon enhances Firefox's native Open Plain Text Links behaviour to work automatically for simple http and ftp links. Firefox can already open plain text links if you fully select them first, but that's a bit of a pain to do. With this addon installed you just need to right click on one and it will give you the normal link opening menu items just as if you had selected it first. Less easily-recognizable links (for example, missing the http:// scheme prefix) can still be opened by selecting them first; the standard Firefox behaviour. https://addons.mozilla.org/en-GB/firefox/addon/auto-plain-text-links/This has been delisted by Mozilla, and is now available as a UserChromeJS script from https://github.com/xiaoxiaoflood/firefo ... js-scripts( autoPlainTextLinks.zip). Installation instructions: https://github.com/xiaoxiaoflood/firefo ... structions
Last edited by AlexVallat on October 19th, 2020, 11:21 am, edited 1 time in total.
grahamperrin
Posts: 78Joined: July 19th, 2009, 3:56 pm
Posted January 29th, 2018, 3:16 pm
Version 0.4 tested with Waterfox 56.0.3_4 on FreeBSD-CURRENT. In isolation, the extension works. With my everyday profile, which has around eighty extensions, Auto Plain Text Links does not work. The http:// URL in line 23 of https://pastebin.com/sd0fVJHW for example. I don't see anything relevant in the browser console or web console when I right-click the plain text. If it's an extension conflict: is there any way to identify the issue without disabling other extensions?
AlexVallat
Posts: 90Joined: September 30th, 2006, 8:53 am
Posted January 30th, 2018, 1:22 am
It sounds most likely a conflict with another extension which has modified BrowserUtils.getSelectionDetails in an un-cooperative way. You may be able to obtain a clue as to which extension that is by going to the Browser Content Toolbox (note, not the Browser Toolbox) and entering: - Code: Select all
Components.utils.import("resource://gre/modules/BrowserUtils.jsm").BrowserUtils.getSelectionDetails.toSource()
If AutoPlainTextLinks is not installed, it should start: - Code: Select all
getSelectionDetails(topWindow, aCharLen) { // selections of more than 150 characters aren't useful const kMaxSelectionLen = 150; const charLen = Math.min(aCharLen || kMaxSelectionLen, kMaxSelectionLen); ...
If it is installed, it will be: - Code: Select all
(function() { let onBeforeResult = null; if (onBeforeFunction) { onBeforeResult = onBeforeFunction.apply(this, arguments); } let originalResult = replacementFunction.originalFunction.apply(this, arguments); if (onAfterFunction) { return onAfterFunction.call(this, onBeforeResult, arguments, originalResult); } else { return originalResult; } })
If it's anything else, then it's been modified by a different extension. Alex
grahamperrin
Posts: 78Joined: July 19th, 2009, 3:56 pm
Posted January 31st, 2018, 12:16 pm
Thanks, https://developer.mozilla.org/Firefox/M ... me_scripts> The Browser Content Toolbox is only available if you're running Firefox in multiprocess mode. – I have a number of extensions that are not compatible with multi-process, so I might look into this at a later date.
AlexVallat
Posts: 90Joined: September 30th, 2006, 8:53 am
Posted February 1st, 2018, 1:02 am
If you have multiprocess disabled then you can just paste the command into the Browser Toolbox instead of the Browser Content Toolbox. This wouldn't work with multiprocess (as it would give you the result for the chrome process, not the content process) but if you've only got one process then they are one and the same, so it's fine.
grahamperrin
Posts: 78Joined: July 19th, 2009, 3:56 pm
Posted March 27th, 2018, 10:02 am
I get: TypeError: Components.utils is undefined [ Learn More]
AlexVallat
Posts: 90Joined: September 30th, 2006, 8:53 am
Posted March 27th, 2018, 10:46 am
Thanks for the notification. I've uploaded v0.7 which restores compatibility with Nightly 61, keep an eye out for it passing review.
AlexVallat
Posts: 90Joined: September 30th, 2006, 8:53 am
Posted March 28th, 2018, 6:21 am
It doesn't work in quite the same way as TextPlain, but provides similar functionality for links. It doesn't have any special support for email addresses like TextPlain did, though. The way it works is to have Firefox provide the same menu commands that would have been present if you had manually selected the entire plain text link before right-clicking. At present, these are: - Open Link
- Open Link in New Tab
- Open Link in New Window
- Open Link in New Private Window
- Bookmark This Link
- Save Link As
Those are subject to change at any time - until recently there was also the ability to open in a new container, for example. Because it is integrated with Firefox rather than providing its own duplicate commands, the commands available will always reflect the current functionality made available by Firefox.
AlexVallat
Posts: 90Joined: September 30th, 2006, 8:53 am
Posted September 17th, 2018, 11:55 pm
AutoPlainTextLinks won't make a URL out of something that Firefox (or Waterfox) wouldn't ordinarily treat as one when manually selected. If you try select it manually and then right click, then if you don't get the "Open Link" context menu items, AutoPlainTextLinks wouldn't be able to add them.
grahamperrin
Posts: 78Joined: July 19th, 2009, 3:56 pm
Posted September 18th, 2018, 10:15 am
OK, thanks. As a side note, whilst neither type of URL is recognised (by Waterfox) as a link, an about: URL e.g. about:config?filter=general.useragent.override.addons.mozilla.org – is recognised as a link by Link Properties Plus (but can not be followed).
Return to Extension/Theme Releases
Who is online
Users browsing this forum: No registered users and 4 guests
|