erosman / firemonkey

FireMonkey is a totally new combined user-script and user-style manager
Mozilla Public License 2.0
16 stars 0 forks source link

Firemonkey does not allow saving the script with @match http://localhost:3000/* #1

Open deevroman opened 1 month ago

deevroman commented 1 month ago
// ==UserScript==
// @name         Better osm.org
// @version      0.5.1
// @match        https://openstreetmap.org/*
// @match        http://localhost:3000/*
// ==/UserScript==

Log: Uncaught (in promise) Meta Data Error

As I understand it, the problem is that @match does not support specifying the port. For example, Tampermonkey simply ignores it https://github.com/Tampermonkey/tampermonkey/issues/218#issuecomment-2002087303

I don't know if this needs to be supported, but it would be nice to show a clear message in the code editor, and not a strange message in the console.

erosman commented 1 month ago

As I understand it, the problem is that @match does not support specifying the port.

That is correct.

Match patterns host must not include a port number.

The error is generated from Firefox and not from FireMonkey. Checking for match/exclude-match/include/exclude for errors is not performed by the userscript managers at the moment. Tampermonkey manually injects the userscript while FireMonkey uses the dedicated API to inject the script and the dedicated API throws the error.