Sunday, 18 August 2013

How to add large blocks of HTML to TamperMonkey

How to add large blocks of HTML to TamperMonkey

I'm creating a user script, and I need to create large blocks of HTML, I
just cannot accept the fact that I have to add all the HTML in a variable,
because it's JUST too huge. Let's say I want to add 1000 lines of HTML.
How do you recommend I do this?
I've tried the META tag @resource (i.e.
http://external-domain.com/my_resource.html), but it caches the content
and doesn't update it, since I keep making updates to the resource, it
makes the development very difficult. I've learned that if I use local
files as a @resource, it won't cache.
I hope I've made any sense, if you know a work around to add large HTML
blocks of code, be it via external resources, local resources or any other
way, but I need one to make it easier for me to continuously update while
I'm developing the script.
Wow! be gentle and looking forward to your feedback! Thanks in advance

No comments:

Post a Comment