Jetpack 0.9 pageMod how to add CSS

52 views
Skip to first unread message

Nabor

unread,
Nov 11, 2010, 4:00:27 PM11/11/10
to mozilla-labs-jetpack
Hi,

is there an easy way to add a content.css like adding a content.js?
Currently I insert my CSS as text string from the client.js...

Nabor

Dietrich Ayala

unread,
Nov 15, 2010, 11:49:37 AM11/15/10
to mozilla-la...@googlegroups.com
Hi Nabor,

Jetpack content scripts do not currently have that functionality AFAIK.

It would be cool to be able to do that though. You should write a
module that does that!

-d

> --
> You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
> To post to this group, send email to mozilla-la...@googlegroups.com.
> To unsubscribe from this group, send email to mozilla-labs-jet...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mozilla-labs-jetpack?hl=en.
>
>

Alexandre poirot

unread,
Feb 21, 2011, 8:26:13 AM2/21/11
to mozilla-la...@googlegroups.com
Just a small note to highlight patch provided on this:
  Allow adding CSS stylesheets to page with page-mod API
  https://bugzilla.mozilla.org/show_bug.cgi?id=634764

Any comment on this is welcomed!

2010/11/15 Dietrich Ayala <auto...@gmail.com>

pd

unread,
Feb 21, 2011, 4:45:47 PM2/21/11
to mozilla-labs-jetpack
Vote +1

I'm astounded this doesn't already exist.

Doesn't the existence and popularity of the Stylish, Aardvark and
Greasemonkey extensions demonstrate that this sort of feature would be
crucial to any page-mod API?

Fingers crossed this can be included ASAP!

On Feb 22, 12:26 am, Alexandre poirot <poirot.a...@gmail.com> wrote:
> Just a small note to highlight patch provided on this:
>   Allow adding CSS stylesheets to page with page-mod API
>  https://bugzilla.mozilla.org/show_bug.cgi?id=634764
>
> Any comment on this is welcomed!
>
> 2010/11/15 Dietrich Ayala <auton...@gmail.com>
>
> > Hi Nabor,
>
> > Jetpack content scripts do not currently have that functionality AFAIK.
>
> > It would be cool to be able to do that though. You should write a
> > module that does that!
>
> > -d
>
> > On Fri, Nov 12, 2010 at 4:00 AM, Nabor <nabor.gilga...@googlemail.com>

Matěj Cepl

unread,
Feb 22, 2011, 8:42:27 AM2/22/11
to mozilla-la...@googlegroups.com
Dne 21.2.2011 14:26, Alexandre poirot napsal(a):

> Just a small note to highlight patch provided on this:
> Allow adding CSS stylesheets to page with page-mod API
> https://bugzilla.mozilla.org/show_bug.cgi?id=634764
>
> Any comment on this is welcomed!

I am working on porting on
http://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript right now,
and it seems to be pretty trivial to do. Of course,
pageMod.contentScriptFile would be awesome as well, but I don't think it
should be that difficult.

For now I have compltely untested
http://gitorious.org/addon-sdk/bugzilla-triage-scripts/commit/7711a600699a0b51d06ab069cfbef2fbb578449c

Let me know, if it helps.

Matěj

Reply all
Reply to author
Forward
0 new messages