Skip to content


Who wants a Wave invite?

I have enough to give away to some people. I guess I’ll designate ~20 to people who go to my blog or something. Leave a comment and I’ll take your plea into consideration.

Posted in Uncategorized.


Wave uses Closure

Closure Tools were recently released by Google to allow for others to use the same rich libraries that Google uses internally. Its used by Gmail, Google Docs and Google Maps, but interestingly also used by Google Wave. While they don’t actually announce that Closure is used in Wave, the view-source obfuscated mess from Wave does strongly show it.The reason why its use in wave is more interesting than most others is that Wave is in GWT, while the rest are pure JS. This implies that an interface to the Closure Library may be coming to GWT. While the interface doesn’t seem to be made from Closure, there are references to “closure_hashCode” and “goog.net.BrowserChannel”.

Posted in Uncategorized.

Tagged with , , , .


Wave Search Pause Button

An issue now with the floods (is there any post about wave complete without a pun?) of people in wave, the with:public channel (of waves!) is becoming a unusable tsunami (har har har) of waves where clicking on one will end up opening up something else totally randomly as it has shifted down several by the time you click it.

So what is there to stop it? Well, I made this insanely great, floodwall: the Wave Pause button. It’s a simple bookmarklet that if you click, it stops all incoming updates to the search panel and clicking it again restores it.

The functional bookmarklet can be found at http://antimatter15.com/misc/wave/pause.html which is a rather hideous looking page hacked together quickly.

How does that work? Well, it turns out it’s actually not that easy. My first idea was to just find the function which updated things (it turned out to be Vwh) and replace it with function(){} and restore it later. That worked fine… But I remembered some evil crap that google said, about GWT source being browser-targeted. Incidentally that means Wave gets dfferent versions of the code with different function names, and if they ever update wave, all the function names screw up too!

Oh noes! What now? Well, it uses a sort of pseudo-heuristic approach. It searches for a big characteristic which is .style[w2g]. BUUT, w2g is fwg in chrome! So first it iterates through all variables and finds one whose value equals “display”. Then it takes that variable name, and searches for functions which have .style[name of string which equals display] twice. That reduces the pool significantly. Then it checks to make sure it has the string .innerHTML in it, and has 4 arguments. After that, well, you are reduced to a single function and you can use the same method described above.

Posted in Uncategorized.

Tagged with .


Auto Offline Manifest Generator Bookmarklet

I have a new and insanely great idea which I will try implementing tomorrow. Basically, its going to be a bookmarklet and clicking it will parse the page and extract all the files used, generate a HTML5 Cache Manifest, encode it as a Data URL and open up a iframe or window with the manifest parameter set and then the site will be cached for offline!

Actually, this looks technically impossible. That sucks. Same Origin rules suck.

Posted in Uncategorized.


XPath Bookmark Bookmarklet

javascript:(function(){
//inspired by http://userscripts.org/scripts/show/8924
var s = document.createElement(’script’);
s.setAttribute(’src’,'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js’);
if(typeof jQuery==’undefined’) document.getElementsByTagName(’head’)[0].appendChild(s);
(function() {
if(typeof jQuery==’undefined’) setTimeout(arguments.callee, 100)
else{
jQuery(”*”).one(”click”,function(event){
//http://snippets.dzone.com/posts/show/4349
for(var path = ”, elt = jQuery(this)[0]; elt && elt.nodeType==1; elt=elt.parentNode){
var idx = jQuery(elt.parentNode).children(elt.tagName).index(elt)+1;
idx>1 ? (idx=’['+idx+']‘) : (idx=”);
path=’/'+elt.tagName.toLowerCase()+idx+path;
}
window.location.hash = “#xpath:”+path
event.stopImmediatePropagation()
})
}
})();
})()

Sometimes you want to link to a certain part of a web page. That’s great and works well if its a nice site that clearly defines anchor tags to link to, but what if there isn’t?

Today I just remembered something and I thought that I saw something earlier with a xpath URL hash. I googled it and couldn’t find anything native to the browser (please correct me if I’m wrong) but found this script: http://userscripts.org/scripts/show/8924 which is basically what I was thinking about. But it was allegedly hard to make those URLs, so I thought why not make a bookmarklet to make linking to those URLs simple? So I quickly hacked this together

XPathLink (Just drag it over to your bookmarks bar as with any other bookmarklet). To use, just click on the bookmark, and click on the element you want to link to. You should see the URL will update with a xpath hash showing you the copy-pastable link to that element. The code is quite simple and should work on Firefox, Chrome and all the other browsers (maybe even IE) but the ability to auto-scroll and actually use the links is only available to Firefox and potentially Opera and Chrome.

And I’m working on a Chrome Extension for the original userscript (which should work with Chrome’s userscript support, but I’m going to try packaging it as a chrome extension file) But sadly chromium for linux isnt up to speed especially with extension development.

The source can be found http://gist.github.com/223708.

Update: Fixed the link for the path and added some stuff. Update 2: Fixed bookmarklet, now scrolls to clicked, executes only once, prevents default

Posted in Other, Uncategorized.

Tagged with , , , , , , , , , .


Firebug Console Error Stack

I noticed that unlike errors thrown otherwise in the page, when there is an error executing something in the console, you get an error with a link to an object on the DOM browser and have to parse a non-line-delimited mess of the error object instead of the nice looking stuff in the console saying line numbers.

To get around that and have the nice parsed out pretty error messages, wrap the code in the console with try{/*code here*/}catch(e){console.error(e)} though I hope that its just a tiny issue that they will eventually resolve in a later version

Posted in Uncategorized.


Real Wave Desktop Reader

Some people have probably heard of WaveBoard, the application for iPhone and OS X that claims to be a desktop client for wave. However, it’s really just a webkit browser that has some extra triggers for some better desktop integration. But it’s still not a real Wave client. Obviously cause doing so would be insanely hard and since the Client/Server protocol isn’t released, has to be reverse engineered.

So I reverse engineered part of Wave that allows an entire wave to be downloaded and parsed into blips with tree structure.

I’m careful to title this a Wave desktop reader because it only does reading and in the crudest of forms.

http://static-bot.appspot.com/view/?id=googlewave.com!w+Ze3l0mj0A

Posted in Uncategorized.


with:public not working

It seems that after a recent update to wave, with:public only shows the waves which are already in your inbox. A simple remedy is to use group:public@a.gwave.com instead of with:public. I found it on http://www.google.com/support/forum/p/wave/thread?tid=10eaba86d62c005c&hl=en

Posted in Uncategorized.

Tagged with , , .


Word Association Net

Word Association is a nice little game where you associate the word above yours to some other word. I felt like making it a sort of net where any part could connect to any other and associate a word from any point to another point.

Based on the Raphael Graffle Demo

Based on the Raphael Graffle Demo

I think it would be an interesting collaborative gadget on Google Wave but I have no idea how to implement it (well I sorta do but I dont know what’s the best way).

http://antimatter15.com/misc/wordassoc/graffle.html

You can double-click on any element to associate something to it, if you type the same thing as another element, it links from each other.

Posted in Uncategorized.


wave: URI Scheme

One of my major gripes against Wave is that there is no good way to link. If you copy and paste the URL, it never autolinks, and if it does, then it totally epic fails in the process for most content systems. The URLs are insanely long, and totally ignores the federated nature. If you want a federated protocol you shouldn’t do links by copy and pasting client URLs.

Similar to the mailto: protocol used in HTML. I think a wave: protocol would be far more suitable. HTML5 has this feature called navigator.registerProtocolHandler which while part of the recommendation, is only implemented by Firefox 3.0+

How awesome is this new linking system? Well, the great thing is that Extracting the URL is totally easy:

https://wave.google.com/wave/#restored:search:with%253Apublic,restored:wave:googlewave.com!w%252BAf00O-Y67

That’s the URL, copy and paste it to a browser and it will open in google wave (well the software can be configured to open up in any wave client which is why this is so important)! You get to totally get rid of all the stuff before that makes it specific to the Google Wave client.

Link to the wave discussion of this yes and obviously the link is linked using MY protocol handler.

Well, browsers don’t come out of the box with support for the wave: protocol, so how do I get it to work? Well, there are a few issues that make it harder.

  • Wave IDs are double-escaped
  • %s auto escapes
  • registerProtocolHandler only registers URls for sites for their own site (antimatter15.com can not register wave: handler for wave.google.com)
  • Inconsistency with using the unescaped, or single escaped or double escaped wave IDs

So first I tried hacking it together with jsbin, but it gave errors. After re-reading documentation on mozilla’s devwiki. I tried making a bookmarklet. After that made issues with esaping, I started making a redirect server for it.

So the now working thing is here: http://antimatter15.com/misc/wave/uri/install.htm

It still has linkability issues because nobody can rely on the autolinking scripts as they all probably ban the wave: protocol (and with many sites, manual linking would also be banned).

Posted in Uncategorized.