Answer the question
In order to leave comments, you need to log in
How does @resource work in userscript?
Good day, I decided to upload userscripts to a couple of sites, for this I installed tampermonkey in chrome. I wanted on one of the film sites instead of a carousel of general popularity to stick my series that I always watch (with the release of each series) and SUCH A QUESTION arose!
So how can you still use @resource while wondering how to properly connect a local file to it?
I tried it as described in the article on Habré , but for some reason it doesn't work! Yes, the article is for GreaseMonkey, not Tampermonkey - but in the documentation there is a resource call with the same prefix!
And yet nothing happens - instead of connecting the resource in plain text, it is written like this: GM_getResourceText("my_resource") !
after doing $('.overview').html('GM_getResourceText("my_resource")');
this is what I end up seeing
<ul class="overview" style="width: 4320px; left: -160px;">GM_getResourceText("my_resource")</ul>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question