// Link click counter
// version 0.1 
// 2005-05-16
// Copyright (c) 2005, Mark Langenhoven
// Released under the GPL license
// http://www.gnu.org/copyleft/gpl.html
//
// ==UserScript==
// @name          Link click counter
// @namespace     Localhost
// @description   Count the number of times we click on each link
// @include       file:///c:/Documents%20and%20Settings/langenm.000/My%20Documents/bookmarks.htm
// ==/UserScript==




document.addEventListener('click', function(event) {
var click_count;

    // event.target is the element that was clicked

  if (event.target != '' ) {

    //find out how many times we have clicked this link 
    //click_count = getval(event.target);
    click_count = GM_getValue(event.target, 0);

    //Increment the counter
    click_count = click_count + 1;

    //Save the value
    GM_setValue(event.target, click_count);

  }
}, true);




