Closed luciopaiva closed 4 years ago
As of v2.1, this is probably a bug now, since the @include
directive processor is running the same logic for both js and css files. Must verify and fix this.
Hi Lúcio. How can I use this to include external JS files like jQuery or Firebase in my scripts?
I've tried: / @include https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js / But when I try to use in my code the variable doesn't not exists.
With greasemonkey it's possible to do: // @require https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
Loving Witchcraft, just what I needed, if I get this to work it would be perfect! Obrigado!
Hi @infostatus,
Witchcraft currently only loads local scripts. To work around your problem, simply download jquery.min.js
to your local folder and then:
// @include jquery.min.js
It will work just fine.
Also notice it must be a single line comment. Multi line comments are not supported yet.
Please let me know if it worked. Meanwhile, I'll open a ticket to allow for including resources from the web.
The same that exists for JS, but for CSS. Something in the lines of
/* @include foo.css */
.