Older blog entries for mglazer (starting at number 28)

Here's one of the most useful bookmarklets I have:
   Go Wayback  (Explorer 4+ and Netscape 4+)
Trigger it when you run into a 404. As time goes by, there will be increasingly more documents in the past than we have in the present. So the value of a service that solves 404s, such as Wayback (which archives old webpages) will increase.
Another good Wayback bookmarklet:
   Wayback Undo  (Explorer 4+ and Netscape 4+)
which is necessary because once you go into Wayback you stay in Wayback... this allows you to escape to the present.
To push this a bit further, I'll bring up the topic of XMLHTTP (Microsoft's documents and Mozilla's documents).
This allows scripts on a page to request data from other pages, so you can get a bookmarklet like:
  

<A
href="javascript:if(location.href.indexOf('http://web.archive.org/web/*')==0){h='';x=new 
ActiveXObject('Microsoft.XMLHTTP');W=open('','','width=500,height=300,scrollbars,resizable,status');W.status='Looking...';L=document.links;for(i=0;i<L.length;i++){if(L[i].href.lastIndexOf('http:')>1)try{x.open('GET',L[i].href,false);x.send();r=x.responseText;h+=r.length+' 
- '+L[i].innerText.link(L[i].href)+'<br>';W.document.body.innerHTML=h}catch(e){}}W.status='Done'}else{alert('Go 
Wayback first')}void(null)">Wayback Analyze</A> 
 (Explorer 5+ version)
which, if triggered on a result of Go Wayback, will list the sizes of the archived documents. This gives some sense of the overall variation in the page over time. It would be easy to modify this to allow other analyses of the archived pages... allowing searches or summarizations, etc.
The idea of XMLHTTP could be used in other ways. For example, this bookmarklet:
<A 
href="javascript:html='<head><base target=_blank></head><body>';str='';xmlhttp=new 
ActiveXObject('Microsoft.XMLHTTP');W=open('','','width=500,height=300,scrollbars,resizable,status');W.status='Looking...';lnks=document.links;for(i=0;i<lnks.length;i++){if(lnks[i].host.replace(/:.*/,'').indexOf(location.host)!=-1&amp;&amp;str.indexOf(lnks[i].href)==-1)try{xmlhttp.open('GET', 
lnks[i].href, false);xmlhttp.send();r=xmlhttp.responseText;html+=r.substring(r.search(/<title>/i)+7,r.search(/<\/title>/i)).link(lnks[i].href)+'<br>';str+=lnks[i].href;W.document.body.innerHTML=html}catch(e){}}W.status='Done';void(null)">Self-Link 
Titles</A>
 (Explorer 5+ version)
lists the titles of all pages that link off the current page into the same domain. Again, search and summarization are fairly easy. So you get a way to analyze the "cloud of meaning" around the current page.
From http://bookmarklets.com

XML and arrays are uniquely different.

While XML can have duplicate rows identified by the same value string an array cannot, each array row must have a unique name or integer while XML does not accept integers as identifiers.

UserDat XML stores

Location: C:\WINDOWS\Application Data\Microsoft\Internet Explorer\UserData

Reference: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/behaviors/reference/behaviors/userdata.asp

Concept: The userData behavior persists information across sessions by writing to a UserData store. This provides a data structure that is more dynamic and has a greater capacity than cookies. The capacity of the UserData store depends on the security zone of the domain. The following table shows the maximum amount of UserData storage that is available for an individual document and also the total available for an entire domain, based on the security zone.

Security Zone Document Limit (KB) Domain Limit (KB) 
Local Machine 128 1024 
Intranet 512 10240 
Trusted Sites 128 1024 
Internet 128 1024 
Restricted 64 640 

The userData behavior persists data across sessions, using one UserData store for each object. The UserData store is persisted in the cache using the save and load methods. Once the UserData store has been saved, it can be reloaded even if Microsoft® Internet Explorer has been closed and reopened.

JS onload unload timer

<HTML>
<HEAD>
<TITLE>Detecting User's Time on a Page</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function person_in() {
   enter=new Date();
}
function person_out() {
   exit=new Date();
   time_dif=(exit.getTime()-enter.getTime())/1000;
   time_dif=Math.round(time_dif);
   alert ("You've only been here for: " + time_dif + " seconds!!")
}
</SCRIPT>
</HEAD>
<BODY bgcolor=ffffff onLoad='person_in()' onUnLoad='person_out()'>
</BODY>
</HTML>
PHPortal 0.2.1 todos

  1. Transition XPC inline tag references.

  2. Members App Clean up.

  3. Add Default methods and Default Access Permissions.

  4. Organize Stats Date views.

  5. Standardize Format transitions Modules lib format.

I have created a userData small client-side app that uses the pop up box version 4.0 over at dynamicdrive.com.

For those that don't know the userData behaviour in MSIE allows you to create client-side XML Stores that are larger than cookies.

I comibend multipel pop up windows that have minmize, maximize, drag, and resize with the userData Behaviour methods of load existing, save as current, remove as current, with editable glyphs content areas.

Basically each pop up window can be its own WYSIWYG window with its own persistence and data store all local of course.

A simple use of this would be a networked tag board to leave a current task or top priority message(s). You can have multiple data stores but each data store only retains memory for the last saved item.

userData stores can be used to set prefences as persistent qialities to the end user. They can be used to store posted submitted userData from forms or the editable glyphs regions i mentioned above.

So what is the advantage, for me it allows for a simple local dynamic data store quality to html pages.

Editable Content WYSWIYG regions in MSIE

<SCRIPT>
function chgSpan() {
    currentState = oSpan.isContentEditable;
    newState = !currentState;
    oSpan.contentEditable = newState;
    oCurrentValue.innerText = newState;
    newState==false ? oBtn.innerText="Enable Editing" :
        oBtn.innerText="Disable Editing"
}
</SCRIPT>
</HEAD>
<BODY onload="oCurrentValue.innerText = oSpan.isContentEditable;">

Click the button to enable or disable SPAN content editing.

<BUTTON ID="oBtn" onclick="chgSpan()">Enable Editing</BUTTON>

<SPAN ID="oSpan">You can edit this text.</SPAN> SPAN can be edited: <SPAN ID="oCurrentValue"></SPAN> </BODY>

By simply adding persistence and a save this link to each editable region. You can now have a localised wiki. Without persistence the save can be uses with JSRS to save remotely withotu reloadign the page for a real wiki.

I am cleaning up the ever-growing PHPortal format core lib.

I will outsoruce the individual content type functions to individual folders and files in the adjacent lib directory so as to unclutter the existing larger than life lib and allow for easier future additions in a preformatted standardized manner.

WAP Emulator (http://www.wapsilon.com/)

WAP Query Strings:

<wml> 
<card> 
    <do type="accept"> 
        <go href="http://foo.com/stock.cgi?stk=$(stock)"/> 
    </do> 
  

Enter stock: <input name="stock" format="4A"/> </card> </wml>

WAP Post Method and Post field elements:

<wml> 
<card> 
    <do type="accept"> 
        <go href="http://foo.com/stock.cgi" method="post"> 
            <postfield name="stock" value="$(stock)"/> 
    </do> 
  

Enter stock: <input name="stock" format="4A"/> </card> </wml>

19 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!