Update: Google Reader AIR app

Download GReader-0_1_2.air

I updated the app to work in Leopard. I have no idea why but using the url, http://www.google.com/reader/view, instead of http://reader.google.com fixed it. I think that might mean there is a redirect issue? I changed the dock icon unread count to just show the number in the top right. Also I added an option to enable the hicksdesign google reader theme. I had to mess with it since apparently AIR webkit doesn’t support the css data uri scheme, which is annoying.

I apply the style through the javascript bridge:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
    [Embed(source="/assets/styles/greader/greader.css", mimeType="application/octet-stream")]
    private var cssClass:Class;

    private var html:HTML;
    ...

    public function applyStyle(e:Event):void {
      var cssByteArray:ByteArrayAsset = ByteArrayAsset(new cssClass());
      var css:String = cssByteArray.readUTFBytes(cssByteArray.length);
      
      var document:JavaScriptObject = html.htmlControl.window.document;
      
      var head:JavaScriptObject = document.getElementsByTagName("head")[0];
      var node:JavaScriptObject = document.createElement("style");
      node.type = "text/css";
      node.appendChild(document.createTextNode(css));
      head.appendChild(node); 
    }

Tags: ,

Leave a Reply