To try answer the second part you probably don't have to worry about
it too much, if the CSS <link or <style you insert into <head has the
media attribute set to print then you should be able to surf normally
and that 'file' will be downloaded (or at least the logo will only be
downloaded) only when you go to print.  If you try to embed the image
in your script as a base64 png then it might a little, but if you host
the image remotely and its just another URL that doesn't get
downloaded until you print then I don't think you have to worry about
it since browser level caching will almost certainly take care of it.
You shouldn't experience any noticeable slowdown.

This example might work for you... notice the type attribute is set,
so all you have to do is add another attribute essentially that says
.media='print' most likely...
http://diveintogreasemonkey.org/patterns/add-css.html

On Wed, Mar 24, 2010 at 11:53 AM, ppgl <[email protected]> wrote:
> Thanks Anthony for this answer. 2 questions:
>
> - can you point me to a working example of greasemonkey using CSS
> media queries that achieves this?
>
> - if I want to add a logo only for print, then this method will add
> the logo to the page (and use bandwidth to download it) in any case,
> even normal viewing. It is just that in normal viewing the logo is
> hidden, right? If so, it is not so efficient because I print less than
> 1 page in 200 pages viewed and don't want to be slowed down for 199
> pages for a logo that is hidden.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "greasemonkey-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/greasemonkey-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to