<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"><channel><title>components</title><link>http://www.aypwip.org/webnote/components</link><description>Webnote RSS feed</description><lastBuildDate>Fri, 02 Jan 2009 17:28:47 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>This is just a test</title><description>This is just a test
</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note89</guid></item><item><title>&amp;lt;h2&amp;gt;Tony Chang's code for background colour control:&amp;lt;/h2&amp;gt;</title><description>&lt;h2&gt;Tony Chang's code for background colour control:&lt;/h2&gt;
000 =black, FFF=white
F00=pure red
0F0=pure green
00F=pure blue
888=mid grey
====================================
&lt;img src="images/new.gif" onload='document.body.style.backgroundColor="888"' /&gt;
=========================================</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note67</guid></item><item><title>&amp;lt;h2&amp;gt;Tony's Code for Note Colour Palette:&amp;lt;/h2&amp;gt;</title><description>&lt;h2&gt;Tony's Code for Note Colour Palette:&lt;/h2&gt;
colorMap = {
  '#dddddd': 'silver',
  '#f02121': 'whatever',
  '#ffffa0': 'pale yellow',
  '#cccccc: 'pale blue',
};



/* you don't need to change anything below this line */

bgColors = new Array();
for (var c in colorMap) {
  bgColors.push(c);
}


/*
&lt;img src="images/new.gif" onload='eval(this.parentNode.innerHTML.replace(/&lt;br&gt;/g,""))' /&gt;
*/</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note55</guid></item><item><title>Hello, </title><description>Hello, 

my name is Volker and i started this workspace.

 If you want to get in contact with me please use the &lt;a href="http://groups-beta.google.com/group/WebNote-Users-Group?hl=en"&gt;WebNote User Group&lt;/a&gt;. If you got some javascript snippets that can interact with webnote feel free to add them here.

</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note53</guid></item><item><title>&amp;lt;a href="http://ponderer.org/"&amp;gt;Tony&amp;lt;/a&amp;gt;'s code for time/date</title><description>&lt;a href="http://ponderer.org/"&gt;Tony&lt;/a&gt;'s code for time/date stamp:

&lt;input type='button' onclick='var n = workspace.notes[this.parentNode.id]; var txt = n.text.replace(/[t]imestamp:[^\n]*\n/, "time" + "stamp:" + new Date() +"\n"); n.setText(txt);' value='update' /&gt;

timestamp:Fri Dec 08 2006 00:28:24 GMT+0100 (Romance Standard Time)

</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note52</guid></item><item><title>Tony's code for time/date stamp:</title><description>Tony's code for time/date stamp:
&lt;input type='button' onclick='var n = workspace.notes[this.parentNode.id]; var txt = n.text.replace(/[t]imestamp:[^\n]*\n/, "time" + "stamp:" + new Date() +"\n"); n.setText(txt);' value='update' /&gt;timestamp:Fri Dec 08 2006 00:17:40 GMT+0100 (Romance Standard Time)
- Jeff Schallenberg</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note50</guid></item><item><title>3 May 2005</title><description>3 May 2005
Just dropped in to say Hi!

Be sure to drop in to the WebNote User Group on Google Groups:
&lt;a/ href="http://groups-beta.google.com/group/WebNote-Users-Group"&gt;WebNote Users' Group&lt;/a&gt;
- Jeff Schallenberg</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note48</guid></item><item><title>These are notes on steroids. Woahh!</title><description>These are notes on steroids. Woahh!
</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note30</guid></item><item><title>&amp;lt;button onclick="javascrip:eval(workspace.notes['note10'].te</title><description>&lt;button onclick="javascrip:eval(workspace.notes['note10'].text);RequestRssWorkspace(prompt('Which workspace RSS feed should be loaded? (You may try sample or test)'));"&gt;webnote workspace RSS feeds&lt;/button&gt;</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note23</guid></item><item><title>&amp;lt;em&amp;gt;&amp;lt;a href="javascript:with(window.open(%22%22,%22_blank%22</title><description>&lt;em&gt;&lt;a href="javascript:with(window.open(%22%22,%22_blank%22,%22width=%22+screen.width*.6+%22,left=%22+screen.width*.35+%22,height=%22+screen.height*.9+%22,resizable%22)){document.write(%22&lt;!DOCTYPE HTML PUBLIC \%22-//W3C//DTD HTML 4.01//EN\%22 \%22http://www.w3.org/TR/html4/strict.dtd\%22&gt;\n\n&lt;html&gt;\n&lt;head&gt;\n&lt;meta http-equiv=\%22Content-Type\%22 content=\%22text/html; charset=iso-8859-1\%22&gt;\n&lt;title&gt;JavaScript Shell 0.8.1&lt;/title&gt;\n\n&lt;script type=\%22text/javascript\%22&gt;\nvar \nhistList = [\%22\%22], \nhistPos = 0, \n_scope = {}, \n_win, // a top-level context\nquestion;\n\nfunction refocus()\n{\n  _in.blur(); // Needed for Mozilla to scroll correctly.\n  _in.focus();\n}\n\nfunction init()\n{\n  _in = document.getElementById(\%22input\%22);\n  _out = document.getElementById(\%22output\%22);\n\n  _win = window;\n\n  if (opener &amp;&amp; !opener.closed)\n  {\n    println(\%22Using bookmarklet version of shell: commands will run in opener's context.\%22, \%22message\%22);\n    _win = opener;\n  }\n\n  _win.Shell = window;\n\n  refocus();\n\n  \n  if (window.getSelection &amp;&amp; document.addEventListener)\n  {\n    // Unless the user is selected something, refocus the textbox.\n    // (requested by caillon, brendan, asa)\n    function keepFocusInTextbox(e) \n    {\n      g = e.target; \n      while (!g.tagName) \n        g = g.parentNode; \n      t = g.tagName.toUpperCase(); \n      if (t!=\%22A\%22 &amp;&amp; t!=\%22INPUT\%22 &amp;&amp; !String(window.getSelection())) \n        refocus(); \n    }\n    document.addEventListener(\%22click\%22, keepFocusInTextbox, false);\n  }\n}\n\nfunction println(s, type)\n{\n  if(s=String(s))\n  {\n    var newdiv = document.createElement(\%22div\%22);\n    newdiv.appendChild(document.createTextNode(s));\n    newdiv.className = type;\n    _out.appendChild(newdiv);\n    return newdiv;\n  }\n}\n\nfunction printWithRunin(h, s, type)\n{\n  var div = println(s, type);\n  var head = document.createElement(\%22strong\%22);\n  head.appendChild(document.createTextNode(h + \%22: \%22));\n  div.insertBefore(head, div.firstChild);\n}\n\n\nshellCommands = \n{\nload : function load(url)\n{\n  var s = _win.document.createElement(\%22script\%22);\n  s.type = \%22text/javascript\%22;\n  s.src = url;\n  _win.document.getElementsByTagName(\%22head\%22)[0].appendChild(s);\n  println(\%22Loading \%22 + url + \%22...\%22, \%22message\%22);\n},\n\nprint : function print(s) { println(s, \%22print\%22); },\n\n// the normal function, \%22print\%22, shouldn't return a value\n// (suggested by brendan; later noticed it was a problem when showing others)\npr : function pr(s) \n{ \n  shellCommands.print(s); // need to specify shellCommands so it doesn't try window.print()!\n  return s;\n},\n\nprops : function props(e)\n{\n  var ns = [\%22Methods\%22, \%22Fields\%22, \%22Unreachables\%22];\n  var as = [[], [], []]; // array of (empty) arrays of arrays!\n\n  var protoLevels = 0;\n\n  for (var p = e; p; p = p.__proto__)\n  {\n    for (var i=0; i&lt;ns.length; ++i)\n      as[i][protoLevels] = [];\n    ++protoLevels;\n  }\n\n  for(var a in e)\n  {\n    // Shortcoming: doesn't check that VALUES are the same in object and prototype.\n\n    var protoLevel = -1;\n    try\n    {\n      for (var p = e; p &amp;&amp; (a in p); p = p.__proto__)\n        ++protoLevel;\n    }\n    catch(er) { protoLevel = 0; } // \%22in\%22 operator throws when param to props() is a string\n\n    var type = 1;\n    try\n    {\n      if ((typeof e[a]) == \%22function\%22)\n        type = 0;\n    }\n    catch (er) { type = 2; }\n\n    as[type][protoLevel].push(a);\n  }\n\n  function times(s, n) { return n ? s + times(s, n-1) : \%22\%22; }\n\n  for (var j=0; j&lt;protoLevels; ++j)\n    for (var i=0;i&lt;ns.length;++i)\n      if (as[i][j].length) \n        printWithRunin(ns[i] + times(\%22 of prototype\%22, j), as[i][j].join(\%22, \%22), \%22propList\%22);\n},\n\n// Blink is very Mozilla-only...\nblink : function blink(e)\n{\n  if (!e)                         throw(\%22blink: e is null or undefined.\%22);\n  if (!e.TEXT_NODE)               throw(\%22blink: e must be a node.\%22);\n  if (e.nodeType == e.TEXT_NODE)  throw(\%22blink: e must not be a text node\%22);\n  if (e.documentElement)          throw(\%22blink: e must not be the document object\%22);\n\n  function setOutline(e,o) { e.style.MozOutline = o; }\n  function focusIt(a) { a.focus(); }\n\n  if (e.ownerDocument)\n    setTimeout(focusIt, 0, e.ownerDocument.defaultView.top);\n\n  for(var i=1;i&lt;7;++i) \n    setTimeout(setOutline, i*100, e, (i%252)?'3px solid red':'none');\n\n  setTimeout(focusIt, 800, window);\n},\n\nscope : function scope(sc)\n{\n  if (!sc) sc = {};\n  _scope = sc;\n  println(\%22Scope is now \%22 + sc + \%22.  If a variable is not found in this scope, window will also be searched.  New variables will still go on window.\%22, \%22message\%22);\n},\n\nmathHelp : function mathHelp()\n{\n  printWithRunin(\%22Math constants\%22, \%22E, LN2, LN10, LOG2E, LOG10E, PI, SQRT1_2, SQRT2\%22, \%22propList\%22);\n  printWithRunin(\%22Math methods\%22, \%22abs, acos, asin, atan, atan2, ceil, cos, exp, floor, log, max, min, pow, random, round, sin, sqrt, tan\%22, \%22propList\%22);\n},\n\nans : undefined\n};\n\n\nfunction hist(keycode)\n{\n  // Use onkeydown because IE doesn't support onkeypress for arrow keys\n  // But because it's onkeydown and not onkeypress, we can't return false to prevent the\n  // cursor from moving :(  That's what the setTimeout hack is for.\n\n  // histList[0] = first command entered, [1] = second, etc.\n  // type something, press up --&gt; thing typed is now in \%22limbo\%22\n  // (last item in histList) and should be reachable by pressing \n  // down again.\n\n  var L = histList.length;\n\n  if (L == 1)\n    return;\n\n  if (keycode == 38 || keycode == 57373) // 'up' key, 57373 is opera\n  {\n    if (histPos == L-1)\n    {\n      // Save this entry in case the user hits the down key.\n      histList[histPos] = _in.value;\n    }\n\n    if (histPos &gt; 0)\n    {\n      histPos--;\n      // Use a timeout to prevent up from moving cursor within new text\n      // Set to nothing first for the same reason\n      setTimeout(\%22_in.value = ''; _in.value = histList[histPos];\%22, 0);\n    }\n  } \n  if (keycode == 40 || keycode == 57374) // 'down' key\n  {\n    if (histPos &lt; L-1)\n    {\n      histPos++;\n      _in.value = histList[histPos];\n    }\n    else if (histPos == L-1)\n    {\n      // Already on the current entry: clear but save\n      if (_in.value)\n      {\n        histList[histPos] = _in.value;\n        ++histPos;\n        _in.value = \%22\%22;\n      }\n    }\n  }\n}\n\nfunction printQuestion(q) { println(q, \%22input\%22); }\nfunction printAnswer(a) { if (a!==undefined) { println(a, \%22normalOutput\%22); shellCommands.ans = a; } }\nfunction printError(er)\n{ \n  if (er.name)\n    println(er.name + \%22: \%22 + er.message, \%22error\%22); // Because IE doesn't have error.toString.\n  else\n    println(er, \%22error\%22); // Because security errors in Moz /only/ have toString.\n}\n\nfunction go (s)\n{\n  _in.value = \n    question = s ? s : _in.value;\n  \n  if (question == \%22\%22)\n    return;\n\n  histList[histList.length-1] = question;\n  histList[histList.length] = \%22\%22;\n  histPos = histList.length - 1;\n\n  // Because of differences in timing among browsers, \n  // this should be the last statement in go().\n  _win.location.href = \%22javascript:Shell._in.value=''; Shell.printQuestion(Shell.question); try{ with(Shell._scope) with(Shell.shellCommands) Shell.printAnswer(eval(Shell.question)); } catch(er) { Shell.printError(er); }; setTimeout(Shell.refocus, 0); void 0\%22;\n}\n&lt;/script&gt;\n\n&lt;style type=\%22text/css\%22&gt;\nbody { background: white; color: black; }\n\n#output { white-space: -moz-pre-wrap; } /* Preserve newlines but wrap */\nh3 { margin-top: 0; margin-bottom: 0em; }\nh3 + div { margin: 0; }\n\nform { margin: 0; padding: 0; }\n#input { width: 100%25; border: none; padding: 0; }\n\n.input { color: blue; background: white; font: inherit; font-weight: bold; margin-top: .5em; }\n.normalOutput { color: black; background: white; }\n.print { color: brown; background: white; }\n.error { color: red; background: white; }\n.propList { color: green; background: white; }\n.message { color: green; background: white; }\n&lt;/style&gt;\n\n&lt;/head&gt;\n\n\n&lt;body onload=\%22init()\%22&gt;\n\n&lt;div id=\%22output\%22&gt;&lt;h3&gt;JavaScript Shell 0.8.1&lt;/h3&gt;&lt;div&gt;Features: print(string), &lt;a accesskey=P href=\%22javascript:go('props(ans)')\%22&gt;props(object)&lt;/a&gt;, &lt;a accesskey=B href=\%22javascript:go('blink(ans)')\%22&gt;blink(node)&lt;/a&gt;, load(scriptURL), scope(object), &lt;a accesskey=M href=\%22javascript:go('scope(Math); mathHelp();');\%22&gt;Math&lt;/a&gt;, ans, &lt;a accesskey=H href=\%22http://www.squarefree.com/shell/?ignoreReferrerFrom=shell0.8.1\%22&gt;help&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;\n\n&lt;form name=\%22frm\%22 onsubmit=\%22try{go();}catch(er){alert(er);} return false;\%22 action=\%22javascript:void 0\%22&gt;\n&lt;div&gt;&lt;input type=\%22text\%22 id=\%22input\%22 class=\%22input\%22 onkeydown=\%22hist(event.keyCode);\%22&gt;&lt;/div&gt;\n&lt;/form&gt;\n\n&lt;/body&gt;\n&lt;/html&gt;\n%22);document.close();}[].v" title="javascript shell"&gt;Jesse Ruderman's JavaScript Shell&lt;/a&gt;&lt;/em&gt;
&lt;a href="http://www.aypwip.org/webnote/docs/jsdoc/" title="Webnote JSDoc Documentation" target="inline"&gt;Webnote JSDoc Documentation&lt;/a&gt;
&lt;a href="http://groups-beta.google.com/group/WebNote-Users-Group?hl=en" target="inline"&gt;WebNote  User's Group&lt;/a&gt;</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note18</guid></item><item><title>// &amp;lt;button onclick="javascript:eval(unescape(workspace.notes</title><description>// &lt;button onclick="javascript:eval(unescape(workspace.notes['note16'].text));"&gt;Hello World&lt;/button&gt;

alert("Hello World.");

</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note16</guid></item><item><title>You can easily run scripts saved in other notes:</title><description>You can easily run scripts saved in other notes:
&lt;pre&gt;
&lt;button onclick="javascript:eval(workspace.notes['note10'].text);NoteInfos();"&gt;
Run a script from another note.
&lt;/button&gt;
&lt;/pre&gt;

&lt;button onclick="javascript:eval(workspace.notes['note10'].text);NoteInfos();"&gt;Run a script from another note.&lt;/button&gt;
</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note13</guid></item><item><title>// &amp;lt;h3&amp;gt;The ticker script source.&amp;lt;/h3&amp;gt;</title><description>// &lt;h3&gt;The ticker script source.&lt;/h3&gt;

// &lt;button onclick="javascript:eval(workspace.notes['note10'].text);RequestRssWorkspace(prompt('which workspace should be loaded?'));"&gt;load a workspace rss feed&lt;/button&gt;&lt;pre&gt;
// just played around with &lt;a target="inline"   href="http://jibbering.com/2002/4/httprequest.html"&gt;http://jibbering.com/2002/4/httprequest.html&lt;/a&gt;
// unfortunally we are limited to relative urls
 

function ProcessFeed (feed)  {
   inline = document.getElementById('inline');
   doc = inline.contentDocument.open();
   feedtitle = feed.getElementsByTagName('title')[0].firstChild.nodeValue;
  doc.writeln( "&lt;h1&gt;" + feedtitle + "&lt;/h1&gt;");
  items = feed.getElementsByTagName('item');
  for ( var i = 0 ; i &lt; items.length; i++ ) {
    try {
       title = items[i].getElementsByTagName('title')[0].firstChild.nodeValue;
       description= items[i].getElementsByTagName('description')[0].firstChild.nodeValue;
    } catch ( e ) {
       description = "empty";
    }
    doc.writeln( '&lt;div id="RssItem" style="display: block; margin: 1em; padding: 1em; border: 1px solid black; background-color: white;"&gt;' + description  + "&lt;/div&gt;");
  }
 doc.writeln('rss feed from &lt;a target="top" href="/webnote/' + feedtitle + '"&gt;'+feedtitle+' workspace&lt;/a&gt;');
  doc.close();
  doc.body.style.fontFamily = 'sans-serif';
}

function RequestRssWorkspace( name ) {  
   var xmlhttp=false;
   if (!xmlhttp &amp;&amp; typeof XMLHttpRequest!='undefined') {
     xmlhttp = new XMLHttpRequest();
     xmlhttp.open("GET","/webnote/" + name + ".xml",true);
     xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4) 
        {
           if (xmlhttp.status==200)
           { 
              ProcessFeed(xmlhttp.responseXML);
           }   
           else if (xmlhttp.status==404) 
           {
                   alert("URL doesn't exist!");
            }
           else 
           {
           alert("Status is "+xmlhttp.status);
            }
        }
     }
    xmlhttp.send(null);
   }
}


function NoteInfos () {
doc = document.getElementById('inline').contentDocument
doc.open()
doc.writeln('&lt;table border=1px&gt;')
strInsert = '&lt;th&gt;id:&lt;/th&gt;'
strInsert += '&lt;th&gt;zIndex:&lt;/th&gt;'
strInsert += '&lt;th&gt;pos (top/left):&lt;/th&gt;'
strInsert += '&lt;th&gt;length (chars):&lt;/th&gt;'
strInsert += '&lt;th&gt;enable/disable:&lt;/th&gt;'
strInsert += '&lt;th&gt;show/hide:&lt;/th&gt;'
doc.write(strInsert);
for ( note in workspace.notes ) {
  note = workspace.notes[note]
  strInsert = '&lt;tr&gt;&lt;td bgcolor='+note.bgColor+'&gt;'+note.id+'&lt;/td&gt;'
  strInsert += '&lt;td&gt;'+document.getElementById(note.id).style.zIndex+'&lt;/td&gt;'
  strInsert += '&lt;td&gt;'+document.getElementById(note.id).style.top+'/'+document.getElementById(note.id).style.left+'&lt;/td&gt;'
  strInsert += '&lt;td&gt;'+note.text.length+'&lt;/td&gt;'
 if (!note.editable )
  strInsert += '&lt;td&gt; &lt;button onclick="javascript:var n = parent.workspace.notes[\''+note.id+'\']; n.enable();eval(parent.workspace.notes[\"note10\"].text);NoteInfos();"&gt;enable&lt;/button&gt;&lt;/td&gt;'
else  
  strInsert += '&lt;td&gt; &lt;button onclick="javascript:var n = parent.workspace.notes[\''+note.id+'\']; n.disable();eval(parent.workspace.notes[\"note10\"].text);NoteInfos();"&gt;disable&lt;/button&gt;&lt;/td&gt;'
  strInsert += '&lt;/tr&gt;'
  doc.write(strInsert);
}
doc.writeln('&lt;/table&gt;');
doc.close();
doc.body.style.fontFamily = "sans-serif";
}

// i want textarea with a fixed font
document.styleSheets[0].cssRules[2].style.fontFamily = 'fixed';
workspace.notes['note1'].editable = false;
// &lt;iframe onload="javascript:eval(unescape(workspace.notes['note10'].text));" src="about:blank" width="1" height="1" &gt;
</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note10</guid></item><item><title>&amp;lt;div &amp;gt;&amp;lt;input size="80"  type="text" id="loc" name="location"</title><description>&lt;div &gt;&lt;input size="80"  type="text" id="loc" name="location" onfocus="this.value=''" value="enter url or workspace name here"&gt; &lt;button onclick="javascript:document.getElementById('inline').src = document.getElementById('loc').value"&gt;go&lt;/button&gt;&lt;button onclick="javscript:document.getElementById('inline').src = 'about:blank';"&gt;clear&lt;/button&gt;
&lt;iframe id="inline" name="inline" src="about:blank" scroll="auto"  width="700" height="650" /&gt;&lt;/div&gt;
</description><guid isPermaLink="true">http://www.aypwip.org/webnote/components#note1</guid></item></channel></rss>