SilverWav's Journal

The best is yet to come…

ShelveLogger 4.3.1

leave a comment »

ShelveLogger.html 4.3.1 – (Download).

Just click the download link to see a working example.
(It also allows you to see the lightning fast Filtering in action).

______________________________

Below is the sourcecode for ShelveLogger.html

Note: After the big changes in 4.3, 4.3.1 is mainly code clean-up.

<html>
    <head>
        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<!--
ShelveLogger Version 4.3.1 (for shelve 1.22+)
by silverwav - OpenPGP key:03187548 
Originally based on Slogger updated for Shelve.
Thanks to the Shelve Developer for the filter.

+ Added function to check multiple classes.
+ Added Footer.
+ Filter moved to footer.
+ Altered Filter behaviour (need to hit enter or click a button now.)
 - This helps reduce cpu usage and is more "Google like".
+ Added auto refresh toggle.
+ Added 5 intervals for auto refresh (can be altered via url as well).
+ Added startup
 - Auto refresh on startup (1min).
 - Filter now focused on startup.
 - JumptoBottom on startup.
+ Added setVisibility function and css.
+ Added Setup (hidden by default).
+ Added Help (hidden by default).
  - Shelve Help
  - ShelveLogger Help
 + Added various Filter Help (hidden by default).
  - Desc.
  - Date
  - Regex
 + Increased filter length to 100.
 + Enter on no text now reloads.
  - To show all rows its twice as fast to reload.
  - Handy reload shortcut if you are at the filter bar.
 + Limited keywords to 140 as some sites go OTT.
 + Tidy.
  - Renamed some functions for ease of use.
  - Code clean.

http://silverwav.wordpress.com/shelvelogger/


http://groups.google.com/group/shelve-firefox-addon/

Use with this template:


<tr>
<td class="date" nowrap="nowrap">%Y-%M-%D %h:%m</td>
<td class="description">
<div class="title">%[tcf]</div>
<div class="sup clip">%{clip?}</div>
<span class="sup host"> [%{hostbasename?}] </span>
<span class="sup keyw">Keywords: %140{keywords?}</span>
<div class="sup note">%{note?}</div>
</td>
<td class="links">
<a class="url" href="%{url?}">url</a>
<a class="local" href="file://%{outfile?}">local</a>
</td>
</tr>
-->
        <style type="text/css">
            body {
			font-size: 10pt;
			font-family: Arial, Helvetica,sans-serif;
            }
            p {
                margin: 0;
            }
            table {
			font-size: 10pt;
				background-color: black;
				margin-top: 1em;
			}
            th {
                padding: 3px 6px 3px 6px;
                background-color: #9acd32;
                text-align: left;
                vertical-align: top;
            }
            tr {
                background-color: white;
            }
            td {
                padding: 3px 6px 3px 6px;
                vertical-align: top;
            }
            td.label {
                background-color: #d5eaa8;
                text-align: right;
            }
            td.description {
                ;
            }
            div.title {
                font-weight: bold;
            }
            pre.sup {
                font-family: serif;
            }
            .sup {
                font-size: 0.9em;
                margin: 0;
            }
            span.checkboxLabel {
                margin-left: 0.4em;
                color: #555555;
            }
            .error {
                font-family: sans-serif;
                margin-left: 0.4em;
                padding: 0.1em 0.4em 0.1em 0.4em;
                display: none;
                background-color: red;
                color: yellow;
                font-weight: bold;
            }
            .controls {
                font-size: 0.8em;
            }
            #controls {
                background-color: white;
            }
            #filter {
                background-color: #f5f5f5;
                border: 1px solid #aaaaaa;
            }
            a.invalidFilter {
                background-color: red;
                color: yellow;
                font-weight: bold;
            }
            
            p.pagenav {
				text-align:right;
			}
			
			#refreshControl {
				position: relative;
				left: 55px;
			}
			
			div.hidden {
			background: lightblue;
			display: none;
			}


        </style>
<script type="text/javascript">

// +++ Date Time drop in +++

/*
 * Date Format 1.2.3
 * (c) 2007-2009 Steven Levithan <stevenlevithan.com>
 * MIT license
 *
 * Includes enhancements by Scott Trenda <scott.trenda.net>
 * and Kris Kowal <cixar.com/~kris.kowal/>
 *
 * Accepts a date, a mask, or a date and a mask.
 * Returns a formatted version of the given date.
 * The date defaults to the current date/time.
 * The mask defaults to dateFormat.masks.default.
 */

var dateFormat = function () {
	var	token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
		timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
		timezoneClip = /[^-+\dA-Z]/g,
		pad = function (val, len) {
			val = String(val);
			len = len || 2;
			while (val.length < len) val = "0" + val;
			return val;
		};

	// Regexes and supporting functions are cached through closure
	return function (date, mask, utc) {
		var dF = dateFormat;

		// You can't provide utc if you skip other args (use the "UTC:" mask prefix)
		if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) {
			mask = date;
			date = undefined;
		}

		// Passing date through Date applies Date.parse, if necessary
		date = date ? new Date(date) : new Date;
		if (isNaN(date)) throw SyntaxError("invalid date");

		mask = String(dF.masks[mask] || mask || dF.masks["default"]);

		// Allow setting the utc argument via the mask
		if (mask.slice(0, 4) == "UTC:") {
			mask = mask.slice(4);
			utc = true;
		}

		var	_ = utc ? "getUTC" : "get",
			d = date[_ + "Date"](),
			D = date[_ + "Day"](),
			m = date[_ + "Month"](),
			y = date[_ + "FullYear"](),
			H = date[_ + "Hours"](),
			M = date[_ + "Minutes"](),
			s = date[_ + "Seconds"](),
			L = date[_ + "Milliseconds"](),
			o = utc ? 0 : date.getTimezoneOffset(),
			flags = {
				d:    d,
				dd:   pad(d),
				ddd:  dF.i18n.dayNames[D],
				dddd: dF.i18n.dayNames[D + 7],
				m:    m + 1,
				mm:   pad(m + 1),
				mmm:  dF.i18n.monthNames[m],
				mmmm: dF.i18n.monthNames[m + 12],
				yy:   String(y).slice(2),
				yyyy: y,
				h:    H % 12 || 12,
				hh:   pad(H % 12 || 12),
				H:    H,
				HH:   pad(H),
				M:    M,
				MM:   pad(M),
				s:    s,
				ss:   pad(s),
				l:    pad(L, 3),
				L:    pad(L > 99 ? Math.round(L / 10) : L),
				t:    H < 12 ? "a"  : "p",
				tt:   H < 12 ? "am" : "pm",
				T:    H < 12 ? "A"  : "P",
				TT:   H < 12 ? "AM" : "PM",
				Z:    utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
				o:    (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
				S:    ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
			};

		return mask.replace(token, function ($0) {
			return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
		});
	};
}();

// Some common format strings
dateFormat.masks = {
	"default":      "ddd mmm dd yyyy HH:MM:ss",
	shortDate:      "m/d/yy",
	mediumDate:     "mmm d, yyyy",
	longDate:       "mmmm d, yyyy",
	fullDate:       "dddd, mmmm d, yyyy",
	shortTime:      "h:MM TT",
	mediumTime:     "h:MM:ss TT",
	longTime:       "h:MM:ss TT Z",
	isoDate:        "yyyy-mm-dd",
	isoTime:        "HH:MM:ss",
	isoDateTime:    "yyyy-mm-dd'T'HH:MM:ss",
	isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};

// Internationalization strings
dateFormat.i18n = {
	dayNames: [
		"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
		"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
	],
	monthNames: [
		"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
		"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
	]
};

// For convenience...
Date.prototype.format = function (mask, utc) {
	return dateFormat(this, mask, utc);
};
// ___ Date Time drop in



// +++ Utilities +++
function isNumber(n) {
  return !isNaN(parseFloat(n)) && isFinite(n);
}

function cntClass(eClassName,NameToCheck) {
	if (eClassName != null) {
		if (eClassName.search(NameToCheck) != -1) {
			return true;
		} else {
			return false;
		}
	} 
}

 function JumptoTop() {
	    setRefreshOff();
    	window.scrollTo(0,1);
}

function JumptoBottom() {
    	window.scrollBy(0,99999999999);
}

function setFocus(id) {
	var es = document.getElementById(id);
	es.focus();
}
// ___ Utilities



// +++ Footer +++
function setFooterCounts() {
	  var CountTR = 0;
	  var CountClip = 0;
	  var Nonclip = 0;
	  var DisplyText = "";

	  CountTR = getElementsCountTR();
	  CountClip = getElementsCountClip();
	  Nonclip = CountTR - CountClip;
	  DisplyText = "Total Rows " + (CountTR - 5) + " (Clips " + CountClip + ", Default " + (Nonclip - 5) + ").";
	  document.getElementById('AnchorCountsText').innerHTML= DisplyText;
}

function getElementsCountTR() {
	  var x=document.getElementsByTagName("tr");
	  return (x.length);
}

function getElementsCountClip() {
	  var trs = document.getElementsByTagName("DIV");
	  var supTotal = 0;

	  for (var i = 0; i < trs.length; i++) {
		if (trs[i].className.indexOf("clip") >= 0) {
			var supTotal = supTotal + 1;
		}
	  }
	  return (supTotal);
}

function setFooterTimeDate()
{
	var now = new Date();
	var fnow = now.format("yyyy-mm-dd HH:MM");
	var DisplyText = fnow;
	document.getElementById('AnchorTimeDateText').innerHTML= DisplyText;
}

function setFooterLocal() {
	var DisplyText = "url&nbsp;local";
	document.getElementById('AnchorLocalText').innerHTML= DisplyText;
}
// ___ Footer



// +++ Refresh +++
var refreshIntervalId = 0;

function refreshClickHandler () {
	var numSec = 0;
	var numMilSec = 0;
	numSec = getPrefSec();
	numMilSec = numSec * 1000;
	if (document.getElementById("autoRefreshButton").value == "Switch Refresh On") {
		// Start the timer 	
		document.getElementById("autoRefreshButton").value = "Switch Refresh Off";
			refreshIntervalId = setInterval ( "autoRefresh()", numMilSec );
	} else {
		setRefreshOff();
	}
}

function autoRefresh() {
	window.location.reload();
}

function setRefreshOff() {
		document.getElementById("autoRefreshButton").value = "Switch Refresh On";
		clearInterval ( refreshIntervalId );
}
	
function reload() {
	window.location.reload();
}

function setPrefSec(numSec) {
	var temp = location.href;
	var basehref = new Array();
	basehref = temp.split('?pref_sec');
	location.replace(basehref[0] + '?pref_sec' + numSec);
}

function getPrefSec() {
	var temp = location.href;
	var basehref = new Array();
	basehref[1] = 60;
	if (location.href.indexOf('pref_sec')!=-1) {
		basehref = temp.split('?pref_sec');
	}
	
	if (isNumber(basehref[1]) == false)  {
	basehref[1] = 60;
	}
	if (basehref[1] < 9) {
		basehref[1] = 60;
	}
	return basehref[1];
}
// ___ Refresh



// +++ Start +++
function startup() {
	refreshClickHandler();
	setFooterCounts();
	setFooterTimeDate();
	JumptoBottom();
	setFocus("filter");
}
// ___ Start


// +++ Set Visibility +++
function setVisibility(id) {
	// div.hidden {background: lightblue;display: none};
	var state = document.getElementById(id).style.display;
		if (state == 'block') {
			document.getElementById(id).style.display = 'none';
		} else {
			document.getElementById(id).style.display = 'block';
		}
	setRefreshOff();
	}


// +++ Toggle Details +++
function setSupDataVisibility(controlID) {
    var value = document.getElementById(controlID).checked;
    var display = value ? "block" : "none";
    setEltsSupDataVisibility(display, document.getElementsByTagName("div"));
    setEltsSupDataVisibility(display, document.getElementsByTagName("span"));
    setFooterLocal()
}
 
function setEltsSupDataVisibility(display, elts) {
    for (var idx = 0; idx < elts.length; idx++) {
        var e = elts[idx];
        if (cntClass(e.className,"sup") == true) {
            e.style.display = display;
        }
    }
}
// ___ Toggle Details



// +++ Filter +++
function filterRows(id) {
    var value = document.getElementById(id).value;
    if (value.length < 1 ) {
        reload();
        return;
    }
    var rx = new RegExp(value, 'i');
    var matchDate = document.getElementById('filterMatchDate').checked;
    var matchDesc = document.getElementById('filterMatchDesc').checked;
    var matchUrl = document.getElementById('filterMatchUrl').checked;
    var matchLocal = document.getElementById('filterMatchLocal').checked;
    var trs = document.getElementsByTagName("tr");
    var invalidFilter = document.getElementById("invalidFilter");
    if (invalidFilter.style.display != "none") {
        invalidFilter.style.display = "none";
    }
    for (var tri = 0; tri < trs.length; tri++) {
        var tr = trs[tri];
        var setDisplay = false;
        var display = "none";
        var tds = tr.childNodes;
SetDisplay:
        for (var tdi = 0; tdi < tds.length; tdi++) {
            var td = tds[tdi];
            if ((matchDesc && cntClass(td.className,"description") == true) ||
            (matchDate && cntClass(td.className,"date") == true) ||
            ((matchLocal || matchUrl) && cntClass(td.className,"links") == true)) {
                var elts = td.childNodes;
                for (var elti = 0; elti < elts.length; elti++) {
                    var elt = elts[elti];
                    var text = null;
                    if (cntClass(elt.className,"title") == true || cntClass(elt.className,"sup") == true) {
                        text = elt.innerHTML;
                    } else if (elt.nodeName == "A") {
                        if ((matchUrl && cntClass(elt.className,'url') == true) || (matchLocal && cntClass(elt.className,'local') == true)) {
                            text = elt.href;
                        }
                    } else if (elts.length == 1 && elt.nodeName == "#text") {
                        text = elt.data;
                    }
                    if (text != null) {
                        setDisplay = true;
                        try {
                            if (text.match(rx)) {
                                display = "";
                                break SetDisplay;
                            }
                        } catch (e) {
                            invalidFilter.style.display = "inline";
                            return;
                        }
                    }
                }
            }
        }
        if (setDisplay && tr.style.display != display) {
            tr.style.display = display;
        }
    }
}
// ___ Filter



</script>
</head>
 
<body onLoad="startup()">
    <h2>ShelveLogger 4.3.1</h2>
	<strong>ShelveLogger is a Log for the Firefox Add-on Shelve.</strong><br/><br/>
	Save a web page to disk and add its details to a log file from which you can reopen it at any time.
	<ul>
		<li>Date, Title and Keywords are saved by default.</li>
		<li>Clip (any selected text is added to the log).</li>
		<li>A link is created to your saved copy (local) and to the web (url).</li>
		<li>Lightning fast Filtering.</li>
	</ul>
	<p>Get ShelveLogger.html <a href="http://silverwav.wordpress.com/tag/version/">here</a>
	 and Shelve <a href="https://addons.mozilla.org/en-US/firefox/addons/versions/8282">here</a>.</p>
	<h3>ShelveLogger Usage</h3>
	<p>Add the Shelve Button to the Firefox Toolbar.<br/>
	Use this button (or F9) to save a page via a popupbox or hit (F8) to do it automatically.<br/>
	Bookmark ShelveLogger.html for ease of use.<br/></p>
	
	<br/>
	<p><a href="javascript:setVisibility('Setup')">Setup</a><p/>
	<div  id="Setup" class="hidden">
		<h3>ShelveLogger Setup</h3>
		<p><b>(This takes about 5 minutes as it is mainly cutting and pasting).</b></p><br/>
		<p><b>1. Install <a href="https://addons.mozilla.org/en-US/firefox/addons/versions/8282">Shelve</a> (1.22+) and <a href="http://silverwav.wordpress.com/tag/version/">ShelveLogger</a>.</b></p><br/>
		<p><b>2. Create Folders</b></p>
		<p>/home/[user]/data/Shelve/saved (Linux)<br/>
		c:\data\Shelve\saved (windows)</p><br/>
		<p><b>3. Create a Shelve for ShelveLogger</b></p> 	 	
		<p>Tools > Addons (resize the Add-ons Dialogue Box so you can still see the help).<br/>
		Extensions > Shelve > preferences (popup "Shelve Preferences")<br/>
		On the tab "Shelves" > Click "New" (popup "Shelve: Edit Shelf")<br/>
		<br/>
		<b>On the tab "Shelf"</b> enter the following:<br/>
		<u>Name</u>:<br/>
		ShelveLogger<br/>
		<br/>
		<u>Filename Template</u>:<br/>		
		/home/%{$USER}/data/Shelve/saved/%Y/%Y-%M-%D/%B/%Y-%M-%D_%h-%m-%s-%l.html (Linux)<br/>
		c:\data\Shelve\saved\%Y\%Y-%M-%D\%B\%Y-%M-%D_%h-%m-%s-%l.html (windows)<br/>
		<br/>
		<u>MIME</u>:<br/>
		Web page, complete<br/>
		<br/>
		<u>Hotkey</u>:<br/>
		F8<br/>
		<br/>
		<b>On the tab "Log"</b> enter the following:<br/>
		<u>Log file</u>:<br/>
		/home/%{$USER}/data/Shelve/ShelveLogger.html (Linux)<br/>
		c:\data\Shelve\ShelveLogger.html (windows)<br/></p>
		<br/>
		<p><u>Template</u>:<br/>
			<span>&lt;tr&gt;</span><br/>
			<span>&lt;td class=&quot;date&quot; nowrap=&quot;nowrap&quot;&gt;%Y-%M-%D %h:%m&lt;/td&gt;</span><br/>
			<span>&lt;td class=&quot;description&quot;&gt;</span><br/>
			<span>&lt;div class=&quot;title&quot;&gt;%[tcf]&lt;/div&gt;</span><br/>
			<span>&lt;div class=&quot;sup clip&quot;&gt;%{clip?}&lt;/div&gt;</span><br/>
			<span>&lt;span class=&quot;sup host&quot;&gt; [%{hostbasename?}] &lt;/span&gt;</span><br/>
			<span>&lt;span class=&quot;sup keyw&quot;&gt;Keywords: %140{keywords?}&lt;/span&gt;</span><br/>
			<span>&lt;div class=&quot;sup note&quot;&gt;%{note?}&lt;/div&gt;</span><br/>
			<span>&lt;/td&gt;</span><br/>
			<span>&lt;td class=&quot;links&quot;&gt;</span><br/>
			<span>&lt;a class=&quot;url&quot; href=&quot;%{url?}&quot;&gt;url&lt;/a&gt;</span><br/>
			<span>&lt;a class=&quot;local&quot; href=&quot;file://%{outfile?}&quot;&gt;local&lt;/a&gt;</span><br/>
			<span>&lt;/td&gt;</span><br/>
			<span>&lt;/tr&gt;</span><br/>
		</p><br/>
		<p><b>4. Move ShelveLogger.html:</b></p>
		<p>/home/%{$USER}/data/Shelve/ShelveLogger.html (Linux)<br/>
		c:\data\Shelve\ShelveLogger.html (windows)<br/></p><br>
		<p><b>Setup Complete!</b></p>
	</div>
	<br/>
	<p><a href="javascript:setVisibility('Help')">Help</a></p>
	<div  id="Help" class="hidden">
		<h3>Shelve Help</h3>
	    <p><a href="http://shelve.sourceforge.net/">Homepage</a></p>
	    <p><a href="https://addons.mozilla.org/en-US/firefox/addons/versions/8282">Latest Version</a></p>
		<p>If you have any Shelve related issues report them <a href="http://groups.google.com/group/shelve-firefox-addon">here</a>.<p>
	    <h3>ShelveLogger Help</h3>  
	    <p><a href="http://silverwav.wordpress.com/shelvelogger/">Homepage</a><p>
	    <p><a href="http://silverwav.wordpress.com/tag/version/">Latest Version</a></p>
		<p>If you have any ShelveLogger.html related issues report them <a href="http://silverwav.wordpress.com/shelvelogger/shelvelogger-support/">here</a>.</p>
		<br/>
	</div>
	<br/>
    <p><a href="javascript:JumptoBottom()">Jump to bottom</a></p>
    <table cellspacing="1">
        <thead>
            <tr>
                <th>Date/Time</th>
                <th>
                    Description <span class="controls"
                        onclick="setSupDataVisibility('checkSupDataVisibility1')">(<input id="checkSupDataVisibility1" checked="true" type="checkbox" accesskey="S"><span class="checkboxlabel"><u>S</u>how details</span>)</span>
                </th>
                <th>Links</th>
            </tr>
        </thead>
        
        <tfoot>
			<tr>
				<td colspan="1"><a id="AnchorTimeDateText" >New...</a></td>
				<td colspan="1">&nbsp;</td>
				<td colspan="1"><a id="AnchorLocalText" ></a></td>
			</tr>
			<tr>
                <th>Date/Time</th>
                <th>
                    Description <span class="controls"
                        onclick="setSupDataVisibility('checkSupDataVisibility2'); JumptoBottom()">(<input id="checkSupDataVisibility2" checked="true" type="checkbox" accesskey="S">
                        <span class="checkboxlabel"><u>S</u>how details</span>)</span>
                </th>
                <th>Links</th>
            </tr>
            <tr>
				<td colspan="3">
					<p class="pagenav"><a href="javascript:JumptoTop()">Jump to top</a></p>
					<p><h2>ShelveLogger 4.3.1</h2></p>	
			
		<table id="controls">
			<tr>
				<td><u>F</u>ilter:</td>
				<td>				
				<p>
					<input class="controls" accesskey="F" id="filter" name="filter" type="text" size="60" maxlength="100" onkeydown="if (event.keyCode == 13) document.getElementById('setFilter').click()">
					<input type="button" id="setFilter" value="Filter" onclick="setRefreshOff(); filterRows('filter'); JumptoBottom()"/>
					<input type="button" id="ReloadButton" value="Reload" onclick="reload()" />
					<span><a href="javascript:setVisibility('HelpDesc'); JumptoBottom()">Desc</a></span>
					<span><a href="javascript:setVisibility('HelpDates'); JumptoBottom()">Dates</a></span>
					<span><a href="javascript:setVisibility('HelpRegex'); JumptoBottom()">Regex</a></span>
					<span id="invalidFilter" class="error">
						<a class="invalidFilter" href="https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide:Regular_Expressions">Invalid regular expression</a>
					</span>
				</p>
				<p>
					<input onclick="scheduleFilter('filter')" id="filterMatchDesc" checked="true" type="checkbox"><span class="checkboxlabel">Desc</span>
					<input onclick="scheduleFilter('filter')" id="filterMatchDate" type="checkbox"><span class="checkboxlabel">Date</span>
					<input onclick="scheduleFilter('filter')" id="filterMatchUrl" type="checkbox"><span class="checkboxlabel">URL</span>
					<input onclick="scheduleFilter('filter')" id="filterMatchLocal" type="checkbox"><span class="checkboxlabel">Local filename</span>
				</p>	
				</td>
			</tr>
		</table>
		
			<div id="HelpDesc" class="hidden">
				<h3>Description</h3>
				<p><u>Ensure Desc is ticked.</u><br/>
				<br/>
				one or two.<br/>
				<b>word1|word2</b><br/>
				<br/>
				one and two.<br/>
				<b>(?=.*?\bWord1\b)(?=.*?\bWord2\b)</b><br/>
				<br/>
				Find two words near each other, allow 10 words between them.<br/>
				<b>\b(?:word1\W+(?:\w+\W+){0,10}?word2|word2\W+(?:\w+\W+){0,10}?word1)\b</b><br/>
				<br/>
				<p/>
			</div>
			
			<div id="HelpDates" class="hidden">
				<h3>Dates</h3>
				<p><u>Ensure Date is ticked.</u><br/>
				<br/>
				<b>2010-02</b><br/>
				Returns all rows saved on February 2010.<br/>
				e.g. 2010-02-28, 2010-02-27 etc.<br/>
				<br/>
				<b>-02</b><br/>
				Returns all rows saved on February in any year.<br/>
				e.g. 2010-02-28, 2010-02-27, 2004-02-01, 2011-02-09 etc.<br/>
				<br/>
				<b>19:</b><br/>
				Returns rows saved at 7pm on any day.<br/>
				e.g. 19:23, 19:40 19:00 etc.<br/>
				<br/>
				<b>28&nbsp;</b><br/>
				(Note: Thats 28 followed by a space).<br/>
				Returns all rows saved on the 28th of any month in any year.<br/>
				e.g. 2009-10-28 23:45, 2010-06-28 18:16, 2005-01-28 06:20 etc.<br/>
				<br/>
				<b>2009-...28</b><br/>
				(Note: This works as "." stand for any 1 character).<br/>
				Returns all rows saved on the 28th of any month in 2009.<br/>
				e.g. 2009-10-28, 2009-07-28, 2009-03-28 etc.<br/>
				<br/>
				<br/>
			</div>		
			
			<div id="HelpRegex" class="hidden">
				<h3>Regex</h3>
				<u>Dot And Star Use.</u><br/>
				<br/>
				<b>bbc firefox</b><br/>
				Returns a result if the two words are separated by a space.<br/>
				<b>bbc.firefox</b><br/>
				Returns a result if the two words are separated by any one character.<br/>
				<b>bbc.*firefox</b><br/>
				Returns a result if the two words are separated by any number of characters.<br/>
				Returns no result if the target is "firefox bbc".<br/>
				<br/>
				<u>Alternative Use.</u><br/>
				<br/>
				<b>bbc.*firefox|firefox.*bbc</b> <br/>
				Using | we can check for both posible word orders.<br/>
				Returns a result if the target is "firefox bbc", "bbc firefox", "firefox browser bbc" or "bbc news firefox".<br/>
				<br/>
				<p> - Tip: To show all rows, use the reload button.<p>
				<p> - Tip: reWork is an online regular expression workbench see <a href="http://osteele.com/tools/rework/">here</a>.</p>
				<p> - Tip: Regular-Expressions.info is a great resource see <a href="http://www.regular-expressions.info">here</a>.</p>
				<p> - Tip: A guide by Mozilla on using Regular Expressions see <a href="https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide:Regular_Expressions">here</a>.</p>
				<br/>
			</div>	
			
				<br/>
				<span id="refreshControl">
					<span>
						<input type="button" id="autoRefreshButton" value="Switch Refresh On" onclick="refreshClickHandler()"/>
						&nbsp;Refresh every: 
						<input type="button" id="setPrefSecButton1" value="30s" onclick="setPrefSec(30)"/>
						<input type="button" id="setPrefSecButton1" value="M" onclick="setPrefSec(60)"/>
						<input type="button" id="setPrefSecButton2" value="5m" onclick="setPrefSec(300)"/>
						<input type="button" id="setPrefSecButton3" value="10m" onclick="setPrefSec(600)"/>
						<input type="button" id="setPrefSecButton3" value="H" onclick="setPrefSec(3600)"/>
					</span>
				</span>
				<p class="pagenav"><a id="AnchorCountsText" >Count</a></p>
			</tr>
		</tfoot>
        <tbody>
<!-- -----8<---------------- Log starts here -----8<---------------- -->


______________________________

Next is the example table data:


<tr>
<td class="date" nowrap="nowrap">2010-03-14 13:34</td>
<td class="description">
<div class="title">ShelveLogger.html - Homepage</div>
<div class="sup clip">ShelveLogger is a Log for the Firefox Add-on Shelve. :: Save a web page to disk and add its details to a log file from which you can reopen it at any time.    * Date, Title and Keywords are saved by default.    * Clip (any selected text is added to the log).    * A link is created to your saved copy (local) and to the web (url).    * Lightning fast Filtering.
</div>
<span class="sup host"> [silverwav.wordpress.com] </span>
</td>
<td class="links">
<a class="url" href="http://silverwav.wordpress.com/shelvelogger/">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/silverwav.wordpress.com/2010-03-14_13-34-53-949.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 14:17</td>
<td class="description">
<div class="title">ShelveLogger.html - Latest Version</div>
<div class="sup clip">The latest version of ShelveLogger.html will always be available here.</div>
<span class="sup host"> [silverwav.wordpress.com] </span>
</td>
<td class="links">
<a class="url" href="http://silverwav.wordpress.com/tag/version/">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/silverwav.wordpress.com/2010-03-14_14-17-12-764.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 15:39</td>
<td class="description">
<div class="title">ShelveLogger.html - Support</div>
<div class="sup clip">If you have any ShelveLogger.html related issues report them here.</div>
<span class="sup host"> [silverwav.wordpress.com] </span>
</td>
<td class="links">
<a class="url" href="http://silverwav.wordpress.com/shelvelogger/shelvelogger-support/">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/silverwav.wordpress.com/2010-03-14_15-39-26-913.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 15:41</td>
<td class="description">
<div class="title">SilverWav's Journal</div>
<div class="sup clip">A Web Presence for SilverWave. This site is part of an ongoing project to create a permanent web presence for my articles. Everything looks to be off to a flying start with this beautiful theme and a very professional publishing tool in WordPress. As well as technical articles there will be opinion pieces and comment on the latest news. To simplify my life I am going to host all my ShelveLogger.html code here as well.</div>
<span class="sup host"> [silverwav.wordpress.com] </span>
</td>
<td class="links">
<a class="url" href="http://silverwav.wordpress.com/">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/silverwav.wordpress.com/2010-03-14_15-41-09-701.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 15:45</td>
<td class="description">
<div class="title">Shelve Install - Add-ons for Firefox</div>
<div class="sup clip">Shelve Version 1.22+</div>
<span class="sup host"> [addons.mozilla.org] </span>
<span class="sup keyw">Keywords: add-ons,addons,extensions,themes,firefox,thunderbird,sunbird,seamonkey,fennec,plugins,customization,mozilla,browser</span>
</td>
<td class="links">
<a class="url" href="https://addons.mozilla.org/en-US/firefox/addons/versions/8282">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/addons.mozilla.org/2010-03-14_15-45-18-357.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 16:25</td>
<td class="description">
<div class="title">Shelve Homepage</div>
<div class="sup clip">Configuration, Usage and Demo.</div>
<span class="sup host"> [shelve.sourceforge.net] </span>
<span class="sup keyw">Keywords: firefox, extension, download, archive, utility</span>
</td>
<td class="links">
<a class="url" href="http://shelve.sourceforge.net/">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/shelve.sourceforge.net/2010-03-14_16-25-12-986.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 16:47</td>
<td class="description">
<div class="title">Shelve Support Group</div>
<div class="sup clip">This is the support group for users of the shelve firefox add-on.</div>
<span class="sup host"> [groups.google.com] </span>
</td>
<td class="links">
<a class="url" href="http://groups.google.com/group/shelve-firefox-addon">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/groups.google.com/2010-03-14_16-47-22-326.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 16:50</td>
<td class="description">
<div class="title">Shelve Source Code</div>
<div class="sup clip">The source code is available here. tomtom's shelve - GitHub</div>
<span class="sup host"> [github.com] </span>
</td>
<td class="links">
<a class="url" href="http://github.com/tomtom/shelve/">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/github.com/2010-03-14_16-50-38-653.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 17:33</td>
<td class="description">
<div class="title">SilverWav (silverwaav) on Twitter</div>
<span class="sup host"> [twitter.com] </span>
</td>
<td class="links">
<a class="url" href="http://twitter.com/silverwaav">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/twitter.com/2010-03-14_17-33-12-916.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 17:35</td>
<td class="description">
<div class="title">silverwavs Music Profile at Last.fm</div>
<span class="sup host"> [last.fm] </span>
</td>
<td class="links">
<a class="url" href="http://www.last.fm/user/silverwav">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/last.fm/2010-03-14_17-35-45-213.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 17:37</td>
<td class="description">
<div class="title">Silverwav's Collections - Add-ons for Firefox</div>
<span class="sup host"> [addons.mozilla.org] </span>
<span class="sup keyw">Keywords: add-ons,addons,extensions,themes,firefox,thunderbird,sunbird,seamonkey,fennec,plugins,customization,mozilla,browser</span>
</td>
<td class="links">
<a class="url" href="https://addons.mozilla.org/en-US/firefox/search?q=silverwav&cat=collections&appid=1&pp=5">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/addons.mozilla.org/2010-03-14_17-37-17-356.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 17:38</td>
<td class="description">
<div class="title">Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns</div>
<span class="sup host"> [regular-expressions.info] </span>
</td>
<td class="links">
<a class="url" href="http://www.regular-expressions.info/">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/regular-expressions.info/2010-03-14_17-38-56-942.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 17:39</td>
<td class="description">
<div class="title">reWork: a regular expression workbench</div>
<span class="sup host"> [osteele.com] </span>
</td>
<td class="links">
<a class="url" href="http://osteele.com/tools/rework/">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/osteele.com/2010-03-14_17-39-02-269.html">local</a>
</td>
</tr>

<tr>
<td class="date" nowrap="nowrap">2010-03-14 17:39</td>
<td class="description">
<div class="title">Regular Expressions - MDC</div>
<span class="sup host"> [developer.mozilla.org] </span>
</td>
<td class="links">
<a class="url" href="https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide:Regular_Expressions">url</a>
<a class="local" href="file:///home/sil/data/Shelve/saved/2010/2010-03-14/developer.mozilla.org/2010-03-14_17-39-06-484.html">local</a>
</td>
</tr>



______________________________

About these ads

Written by SilverWav

March 16, 2010 at 12:43 pm

Posted in Project

Tagged with , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: