Hacking Netvibes UWA

12 April 2007

UWA is the new Netvibes API. Through it, your Netvibes widgets will be available on every widget platforms or blog systems: Netvibes of course, but also Google IG, Apple Dashboard and many more…

Cool, but there is a little problem. UWA API don’t support window and document object. No way it can’t be … aha! there is a solution :)

Script tag:

onLoadPlus = function(window) {
  var content = "URL: "+window.document.URL;
  content += "Location: "+window.location;
  content += "Title: "+window.document.title;
  widget.setBody(content);
}

widget.onLoad = function() {
  widget.body.getElementsByTagName("a")[0].onclick()
}

Body tag:

<a style="display:none" onclick="onLoadPlus(window)"></a>

This example works only with netvibes, with google window point to iframe :/

Check out example module here.