Skip to content


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.


my ideas for a browser os are coming true.

Yes, I know that the title is lowercase with a period in the end. It’s totally strange and inconsistent but it feels right.

Google’s working on a notification API for Chrome. Chrome has a Pin Tab feature. Firefox has Faviconize Tab. Gears has a basic privledge escalation (not very fine grained yet). Firefox shows UAC-type privledge escalation for storing data and Geolocation.

To review the old post, this is how I think Chrome OS might work. All user facing applications (all apps other than the window manager, kernel, browser, should be user facing) should operate in Tabs. There are two types of tabs, “pinned” tabs and normal browsing tabs. Pinned tabs are automatically loaded when the user is logged in, are only a tiny icon, but are still always visible.

There will be a unified and consistent way for the user to voluntarily grant privledges to a web site that requests it. It won’t be a catch-all i-totally-trust-this-app-to-every-bit-of-data-on-my-HDD sort of system that most operating systems use. It will be very fine grained, you can grant access to XHRs to a certain domain and huge warnings if the site requires access to the wildcard *. The privledges can extend from just accessing the notification API, cross domain XHR, geolocation, and communicating with other tabs. Communication with other tabs should be dome something like cross domain XHR, by allowing the user to grant a tab access to a certain domain/url. I would prefer the permissions dialog to be something less of a modal window that is employed by Gears or the little thing that pops up on the top for Firefox, and more of a icon that subtly appears somewhere that the user can click voluntarily. I think a UAC type stop-what-youre-doing-to-show-a-scary-message dialog is horrible and makes the user incapable of deciding intelligently. If there were a button which would make a box filled with checkboxes and a green/red gradient safety bar with messages, and educating the user that he or she really does not have to give the site permissions).

A typical application such as a mail notifier would be as follows

<!doctype html>
<html>
<head><script src="jquery.js"></script></head><body>
<script>
if(navigator.requestPermission){
navigator.requestPermission("xhr","http://site.com/api.json")
navigator.requestPermission("notify")
}
setInterval(function(){
if(navigator.hasPermission && navigator.hasPermission("xhr","http://site.com/api.json" && navigator.hasPermission("notify")){
$("#status").html("YAYNESS! You granted Awesomeness!").css("background-color","green")
$.ajax("http://site.com/api.json", {user: $("#userid").val(), pass: $("#pass").val()}, function(data){
$.each(data,function(message){
notify(message.summary)
})
})
}else{
$("#status").html("no permissions!")
},1000);
</script>
<div id="status" style="background-color: red">No Permissions, please give me some super-powers?</div>
<input id="userid" type="text" value="USERNAME" />
<input id="pass" type="password" value="PASSWORD" />
<h1>Super Insanely Awesome Notifier!</h1>
<p>
This is a super awesome notifier, if this doesnt work then you are an idiot or
the internet isnt in the future yet. Here is where the about stuff and other stuff
and stuffs that are stuffs can be put in! And if its not in the future, we all know
the easiest way out is to blame microsoft for all our problems and say that at
least google tried fixing our problems but it was all microsoft's fault.
</p>
</body>
<html>

The great thing about the thing above is that it gracefully degrades into a functionless web page if its not running in my imaginary super browser OS of the future. It’s quite easy to make and requrires no API documentation (or at least for me since there’s only 2 API calls and I just totally made them up). It’s similar to the Jetpack and Chrome extensions idea in which the developer has little to learn for making an extension, but lowers the barrier even more: There’s nothing to learn. Whats above is just a standard html5 web page with jQuery. The only thing different is the hasPermission and requestPermission functions which don’t exist so I made them up. It’s not that it has anythign different, its just that the developer is thinking of the web page as a background process instead of thinking of it as static content.

It’s the same idea is Google Wave, it could be a Wiki, IM, or Email, all depending on how you think about it.

For the permissions system, it really doesn’t matter how it’s implemented but it really has to eventually be done. The web is getting new abilities, and things like Geolocation, Local Storage, Offline SQL DB, Saving to disk, Reading files, and such all require special permissions (You wouldn’t want any random site uploading your SAM file from your hard disk). Each of them have their own modal type dialog which queries the user if they want to grant the permission. Eventually, things like Audio from microphone, Video from webcam, cross-domain XHR,  and other peripherals like toasters get their own implementation, requiring special user granted permissions, an application may want 3 or more permissions simultaneously, it becomes very obvious a more consistent UI is needed for delegating these abilities.

For the interface, its easier for both users and developers. Developers dont need to do something like write complex xml manifests showing which location the file which shows the about text is and which one is the help. Here, you just have a web page that you put stuff in. Since the interface is the page. The tab/web page is a unified Install Page, Help Page, About Dialog, Credits, Donation Box, everything, but unified (sure you could split it into multiple pages if you wanted like with any other web page). Installing is just right-clicking on the tab and selecting the menu button that says “Pin Tab”. If the application requires special privledges, the user can click the icon which show you what the site wants, and you just check off whatever you feel the site deserves.

Posted in Computing, Uncategorized.

Tagged with , , , .


New Default Colors?

Since the project started  almost 3 years ago, the color scheme had been Red fill, Black stroke, and a stroke width of 1px. Is it time to change?

One idea is White for the fill, Black for stroke (same), and a 5px line instead. This makes lines more easily manipulated, but it tends to make rectangles large (and the canvas is small). The normal Black/Red/1px is the same used by Flash (as far as I know), and numerous other editing tools (including svg-edit).

So what do you think?

Posted in Ajax Animator.

Tagged with , .