<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Viewports based on gadgets.views" description="" screenshot="" author="" author_email="" author_location="" author_affiliation="" height="200">
<Require feature="opensocial-0.7" />
<Require feature="views" />
</ModulePrefs>
  <Content type="html">
  <![CDATA[
<script type="text/javascript">
	function init() {
		var currentview = gadgets.views.getCurrentView().getName();
		var availableviews = gadgets.views.getSupportedViews();
	
		var sContent = "";
		if(availableviews[currentview] == availableviews['home']) {
		
			sContent += '<p>This sentence is shown at the home view</p>';
		
		} else if(availableviews[currentview] == availableviews['profile']) {
		
			sContent += '<p>This sentence is shown at the profile view</p>';
			
		} else if(availableviews[currentview] == availableviews['canvas']) {
		
			sContent += '<p>This sentence is shown at the canvas view</p>';
			
		}
	    sContent += '<p>This sentence is shown at all views</p>';
	
		document.getElementById('content').innerHTML = sContent;
	}
	gadgets.util.registerOnLoadHandler(init);
</script>
<div id="content"></div>
  ]]>
  </Content>
</Module>