creating a style for mowser.com - a mobile proxy

edited October 2009 in userstyles.org
I'm writing a style for mowser.com - a mobile proxy.

Mowser - Mobilizing the web
http://mowser.com/

I'm going to use the proxy to try to quickly and easily use stylish on *any* page I end up on.

example

[link via the mowser.com mobile proxy] - Listen to the Crazy Vocal Talents Behind Clone Wars - Star Wars - io9
http://mowser.com/web/http://io9.com/5372379/listen-to-the-crazy-vocal-talents-behind-clone-wars?skyline=true&s=x

[original link] - Listen to the Crazy Vocal Talents Behind Clone Wars - Star Wars - io9
http://io9.com/5372379/listen-to-the-crazy-vocal-talents-behind-clone-wars?skyline=true&s=x

Note that mowser automatically encodes the url...
http://mowser.com/web/http%3A%2F%2Fio9.com...
...so I use the ordinary url and the encoded url for url-prefix in my "site specific" stylish code. But the code doesn't work. Nothing happens.

@-moz-document url-prefix("http://mowser.com/web/http://io9.com/"), url-prefix("http://mowser.com/web/http%3A%2F%2Fio9.com") { *, stub { background:red !important; } }

_________
edit

Stylish doesn't like the second use of http

this works
@namespace url(http://www.w3.org/1999/xhtml); @-moz-document url-prefix("http://mowser.com/web/http") { *, stub { background:red !important; } }
but if you add a colon and make it http://mowser.com/web/http: it fails
@namespace url(http://www.w3.org/1999/xhtml); @-moz-document url-prefix("http://mowser.com/web/http:") { *, stub { background:red !important; } }

Comments

  • If you press Preview, does Stylish report an error? It's possible that Firefox's CSS parser doesn't like the URL formatted like that.
  • edited October 2009
    I clicked Preview - but I don't understand how it works.

    I don't know where the error message would be sent to. To
    - the error console?
    - a pop up (or something)?

    The error console was empty - and there was no message.

    If it indeed doesn't work - will you eventually allow those sorts of urls? My javascript is total crap - but I'll see if I can figure out some sort of hack for stylish. I think I can. Did I just say "I think I can"? - don't remind me I said that.
  • edited October 2009
    I'm amazed - I figured out a greasemonkey hack. It creates an attribute - site_specific - based on the original link.

    <div id="mmmcontent" site_specific="http://io9.com/5372379/listen-to-the-crazy-vocal-talents-behind-clone-wars?skyline=true&s=x">
    Is there any sort of character that might appear in a url that might cause bugs being in site_specific?

    Unless site_specific could be somehow buggy I'll probably expand include for my hack so that it works on many other sites. Allowing a style to regex on the url as easily as as styles regex href or src stuff might prove very useful.

    Example stylish can judge if the original link is
    http://example.com/article/
    -or-
    http://example.com/dont_format_this_link/
    -or-
    http://example.com/.../....html
    -or-
    http://example.com/.../....jpg
Sign In or Register to comment.