andy-portmen / open-in-firefox Goto Github PK
View Code? Open in Web Editor NEWOpen links in Firefox browser
Home Page: https://add0n.com/open-in.html?from=firefox
Open links in Firefox browser
Home Page: https://add0n.com/open-in.html?from=firefox
Host matching (using a domain in "Open with Left-Click" > "Comma-separated list of domains") does not work on some websites such as Notion, all clicks are open externally (or internally in reverse mode).
Interestingly, URL pattern matching (using URLs in "Open with Left-Click" > "Comma-separated list of URLs") works (apart from de bug described here).
This could be due to the fact that for host matching a.hostname
is used and it is undefined on apps like Notion for some reason that use relative links such as <a href="/foo">
, whereas URL pattern matching method uses a.href
.
see code here https://github.com/andy-portmen/open-in-firefox/blob/74b3c2fe08d42a225db4dc77c07963d83a359f0f/v3/data/inject.js#LL21C1-L40C6
edit: added reason why hostname
can be undefined.
I use this extension in reverse mode in order to open all links in Firefox except the links on one domain, using a pattern in "Open with Left-Click" > "Comma-separated list of URLs" (since when using a domain name in "Comma-separated list of domains" it does not work on some websites as described here).
It works except for URLs that contain a question mark (URL with query parameters), ex. https://www.domain.com/foo?bar=1
Here are the patterns I tried:
https://www.domain.com/(.*)
https://www.domain.com/(.*\?.*)
https://www.domain.com/([\/a-zA-Z\d\?=]*)
I read the URL pattern doc but I think this is an issue with the extension.
edit: after testing the URLPattern API in Chrome console, this is the default behaviour. Using chrome 114.0.5735.110.
When "Reverse Mode" is enabled, could the extension use the combination set in "Open With Keyboard and Mouse Click Combinations" to open a link normally (the same way a left-click would if the extension is absent)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.