Code Monkey home page Code Monkey logo

open-in-firefox's People

Contributors

andy-portmen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

open-in-firefox's Issues

domain matching does not work on relative links

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.

cannot match address with question mark ? in URL (pattern matching with URL pattern)

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.