muzuiget / monkey-support

Lightweight userscript manager
6 stars 1 forks source link

I don't understand URL setup #5

Closed hirntot closed 1 month ago

hirntot commented 3 months ago

hi! thanks for this lightweight script monkey, that's exactly what I'm looking for since greasemonkey is too heavy for my small purpose. my script is running nicely when activated - but it doesn't activate automatically.

in the readme you wrote: "URL patterns to execute the code automatically." so I added '', when that wasn't working, I asked chatGPT and added ':///' and 'https:///', but after reloading the page, it never started automatically. What am I doing wrong?

muzuiget commented 3 months ago

Hi

The Urls pattern is one pattern per line.

Screenshot_20240703_164212

hirntot commented 3 months ago

I'm sorry, there was a formatting problem with my initial post, due to markdown support. I would like to start the script automatically on every URL. what do I insert in the URL section? I tested following lines.

*
*://*/*
https://*/*
http://*/*

without success.

also, you wrote <all_urls>. won't be supported, but what would be supported?

muzuiget commented 3 months ago

The current Match Pattern implementation does not support this syntax.

If you are a skilled script writer, you can actually write it as a standalone extension directly, which only requires two files, a manifest.json and your script.

raingart commented 2 weeks ago

@muzuiget and how to apply it to iframe?

raingart commented 2 weeks ago

I tried to apply globally the rules

but they don't work

Screenshot from 2024-09-22 00-51-58

muzuiget commented 1 week ago

As I said above, if you need these features, just write a browser extension.

You only need two files:

{
    "manifest_version": 3,
    "name": "hello",
    "version": "0.1.0",
    "content_scripts": [
        {
            "matches": [
                "<all_urls>"
            ],
            "css": [
                "styles.css"
            ]
        }
    ]
}

https://developer.chrome.com/docs/extensions/reference/manifest/content-scripts