luciopaiva / witchcraft

Inject Javascript and CSS right from your file system. Think GreaseMonkey for more advanced users.
https://luciopaiva.com/witchcraft
MIT License
254 stars 18 forks source link

Wildcard support? #45

Open johnaweiss opened 2 years ago

johnaweiss commented 2 years ago

Hi

Is it possible to match ALL websites, ALL domains?

Thx

mjuksel commented 2 years ago

_global.js (and _global.css) will load on any domain :) !

/edit: also in _global you can easily say something like this:

if (document.querySelector('video')) {
    // @include lib/videos.js
};
// or match a domain 👍🏼 
if (location.href.match('https://github.com/user/helloworld')) {
        // @include helloworld.js
}
johnaweiss commented 2 years ago

great!

johnaweiss commented 2 years ago

Suggestion: Add a wysiwyg for all domains. Maybe could be just a checkbox "Apply to all domains", or maybe a button "Add CSS/JS for all domains"