My day 2010-10-07

Today i made a greasmonkey-script for putting shared notes on websites.
One persson can add a note to a webpage they visiting, when that persson or
someone else in the same sharing-group visit that website, the note will apear.

// ==UserScript==
// @name           url_notes
// @namespace      url_notes
// @description    keep notes on urls
// ==/UserScript==

var category = GM_getValue('url_note_category', '');

if(!category)
{
	change_category();
	category = GM_getValue('url_note_category', 'test');
}

function change_category()
{
	category = prompt("Välj en kategori/grupp", GM_getValue('url_note_category', ''));
	GM_setValue('url_note_category', category);
}

GM_registerMenuCommand("Change note category", change_category);
GM_registerMenuCommand("Add a note to this page", add_note);

get_notes(category, document.location.href, false);

function add_note()
{
	var category = GM_getValue('url_note_category', 'test');
	get_notes(category, document.location.href, true);
}

function get_notes(category, url, force)
{
	GM_xmlhttpRequest(
	{
		method: "POST",
		url: "https://www.exemple.se/url_notes.php",
		data: "category=" + urlencode(category) + "&url=" + urlencode(url) + "&",
		headers:
		{
			"Content-Type": "application/x-www-form-urlencoded"
		},
		onload: function(response)
		{
			var text = "";
			text += "<div style='float: right; cursor: pointer;' onclick=\"document.getElementById('note_box_div').parentNode.removeChild(document.getElementById('note_box_div'))\"><b>X</b></div>";
			text += "<div onmousedown='dragStart(event, \"note_box_div\")' style='background-color: orange; height: 15px;'>Antekningar</div>";
			if(response.responseText.length > 2)
			{
				var notes = eval("(" + response.responseText + ")");
				for(key in notes)
				{
					text += notes[key]['note'] + " <br /> /" + notes[key]['author'] + "<br/> " + notes[key]['birth'] + "<br /><hr />";
				}
				force = true;
			}
			if(force)
			{
				text += "<form action='https://www.exemple.se/url_notes.php' method='post'>";
				text += "<textarea name='note'></textarea><br/>";
				text += "<input type='submit' value='spara'/>";
				text += "<input type='hidden' name='url' value='" + urlencode(url) + "'/>";
				text += "<input type='hidden' name='category' value='" + urlencode(category) + "'/>";
				text += "</form>";
				var notes_div = document.createElement('div');
				notes_div.setAttribute('style', 'position: absolute; left: ' + (document.body.clientWidth -350) + 'px; right: auto; top: 100px; bottom: auto; width: 300px; height: auto; background-color: yellow; border: solid black 3px;');
				notes_div.innerHTML = text;
				notes_div.id = 'note_box_div';
				document.getElementsByTagName('body')[0].appendChild(notes_div);
				var dyn_script = document.createElement('script');
				dyn_script.src = "https://www.interfaceways.se/src/js/dynamic_boxes.js";
				document.getElementsByTagName('body')[0].appendChild(dyn_script);
			}
		}
	});
}

function urlencode(str)
{
   return escape(str).replace('+', '%2B').replace('%20', '+').replace('*', '%2A').replace('/', '%2F').replace('@', '%40');
}

Written by Puggan, 2010-10-07 19:10:11 CEST (+0200)

One response to “My day 2010-10-07”

  1. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Thank you! I enjoy this.

    viagra cialis generic genaric viagra cheap
    viagra without a doctor prescription
    viagra trh pharmacy – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  2. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Seriously lots of superb advice!

    when cialis and viagra don’t work viagra search edinburgh ago hours
    generic viagra 100mg
    buy viagra in stoke on trent – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  3. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Regards, Valuable information.

    viagra strips review generic sales viagra
    viagra pills
    us sales of generic viagra – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  4. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Great info. Thank you!

    buy viagra in uk long term effects of viagra
    generic viagra 100mg
    buy viagra phentermine online pharmacy – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  5. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Great write ups. Cheers.

    buy viagra las vegas gold viagra 3000mg
    viagra generic
    premier spot tv viagra – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  6. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Many thanks. I enjoy it!

    will viagra go generic soon viagra online for wemen
    viagra pills
    viagra in nashville – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  7. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Position well regarded!.

    venta de viagra viagra without a perscription
    viagra online
    herb supplements that react with viagra – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  8. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Cheers! A lot of forum posts.

    viagra plus somrthing else generic pal pay viagra
    viagra for women
    perscription drug viagra – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  9. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Incredible plenty of wonderful data.

    cialis vs viagra dosage equivalents key acheter viagra en ligne
    buy viagra online
    cheaper viagra levitra apcalis – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  10. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    This is nicely put! .

    viagra heart attacks legitimate suppliers of viagra
    viagra pills
    viagra sexual enhancements – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  11. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Position nicely used!.

    i been using viagra everyday how viagra woirks
    buy generic viagra
    does viagra delay orgasms – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  12. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    You said it very well.!

    78 zenegra viagra dose maker of viagra
    viagra online
    viagra lexipro difference info – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  13. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    This is nicely said! !

    websites for generic viagra tablets caustion funny viagra
    viagra online
    subaction showcomments viagra start from newest – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  14. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Superb content. With thanks!

    viagra slicer viagra pay after delivery
    generic viagra online
    what is viagra professional – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  15. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Awesome forum posts. Many thanks!

    laws and dispensing of viagra viagra online
    viagra generic
    viagra falls off broadway play – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  16. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Kudos, Plenty of tips!

    viagra funny viagra logo picture
    viagra without a doctor prescription
    viagra strength – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  17. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Thank you! Lots of material!

    viagra unsuccessful entry redtube viagra
    buy viagra online
    drinking alcohol and viagra – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  18. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Seriously lots of awesome data.

    joke viagra ads viagra sites which accept paypal
    generic viagra online
    effects of expired viagra – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  19. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Reliable postings. Appreciate it.

    weak indian viagra legit viagra
    generic viagra
    levitra viagra vs – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  20. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Superb write ups, With thanks!

    silagra penegra brand name viagra cumwithuscom viagra pharmaceutical company
    viagra without a doctor prescription
    viagra on line pharmacy – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  21. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Reliable write ups. Regards!

    how to buy viagra from home heart failure viagra
    viagra pills
    50 mg viagra – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  22. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Thank you! Great information!

    edinburgh viagra find pages sites search viagra gay men
    viagra for women
    wordpress viagra – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  23. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    You actually said this adequately!

    us made viagra viagra and seizures
    viagra pills
    pharmacy online viagra – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  24. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Beneficial info. Thank you!

    wal-mart viagra price viagra in vegas
    buy generic viagra
    viagra from us sellers – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  25. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Helpful forum posts. Thanks!

    viagra hernia viva las vegas and viagra
    viagra generic
    viagra diaries radio 10 23 09 – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  26. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    This is nicely said! !

    viagra in the waters cocaine with viagra
    viagra without a doctor prescription
    silagra vs viagra – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  27. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Cheers. Valuable stuff!

    viagra in the water song viagra vs cilias
    viagra generic
    white rabbit and viagra – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  28. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Thanks, Wonderful information.

    viagra blindness lawsuit news trial viagra
    cheap viagra
    buy generic viagra si br – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  29. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Useful information. Kudos!

    buy viagra cheap fed ex online prescription for viagra
    generic viagra 100mg
    vision problems while using viagra – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  30. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    You said it very well!

    viagra gif mixing vicodin valium viagra
    viagra for sale uk
    viagra handstand commercial – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  31. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    You’ve made your point quite well!.

    aspirin and viagra together viagra switzerland online
    generic viagra 100mg
    help paying for viagra – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  32. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Good postings. Cheers.

    viagra parties derivation of word viagra
    buy viagra online
    copd viagra afib – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  33. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Position very well used..

    ntg interaction with viagra coreg and viagra
    generic viagra 100mg
    sildenafil citrate generic viagra uprima – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  34. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Thank you. Quite a lot of forum posts!

    altenative for viagra viagra dallas
    buy viagra
    viagra differences – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  35. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Helpful info. Many thanks!

    history viagra viagra drugs
    viagra pills
    viagra burnout – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  36. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    This is nicely put. .

    cost comparison for viagra viagra versus birth control
    generic viagra
    viagra site search edinburgh find soft – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  37. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    You said that effectively!

    viagra lolo ace inhibitors and viagra
    viagra for sale uk
    is there a viagra for woman – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  38. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    You said this terrifically!

    buy viagra low cost overseas viagra
    generic viagra 100mg
    viagra on line us – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  39. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Perfectly voiced truly! !

    does viagra go stale viagra and masturbation
    viagra for women
    viagra and indigestion – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  40. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Many thanks! Good information.

    free trial viagra pharmacy on line viagra
    buy generic viagra
    from uk viagra – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  41. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    With thanks! Quite a lot of write ups!

    jelq on viagra use of viagra in porn industry
    generic viagra
    viagra from uk – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  42. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Thank you! A good amount of tips.

    viagra and relationships best time to take viagra 50mg
    viagra generic
    taking viagra and using tens – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  43. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    You actually mentioned this perfectly!

    what is viagra used for gt viagra oral gel
    generic viagra online
    viagra lung problems – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  44. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Good stuff. Thanks!

    viagra levitra review female viagra facts
    viagra online
    walmart viagra price – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  45. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Thanks! I like it!

    natural viagra kava kava generic cialis and viagra combo
    viagra pills
    legitimate viagra generic – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  46. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Wonderful information. Regards.

    buy generic viagra without prescription explain viagra
    buy viagra
    buying cheap viagra pill – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  47. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Superb postings, Cheers.

    viagra tabs 100mg getting the most from viagra
    viagra online
    lowest price for viagra online – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  48. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Nicely put, Cheers.

    viagra sublinqual buy phentermine viagra online xanax
    buy viagra
    i took two viagra – https://genericviagrantx.com

    Geraldnek
    DwayneRen
    Kevinhab

  49. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Thanks a lot, An abundance of information!

    viagra popitka viagra associated with hearing loss
    cheap viagra
    viagra levitra cialis comparison – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  50. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Effectively expressed truly! !

    viagra for womenhot for sale viagra
    viagra generic
    what works as well as viagra – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

  51. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    You’ve made the point.

    over the conter viagra connecticut meltabs generic viagra
    generic viagra 100mg
    clonazepam and viagra – https://genericviagramsl.com

    Geraldnek
    DwayneRen
    Kevinhab

  52. Larryrarge says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Nicely put. Thanks a lot!

    viagra with no prescription discounts for viagra cialis
    buy viagra online
    forced feminization viagra – https://genericviagrarcp.com

    Geraldnek
    DwayneRen
    Kevinhab

Leave a Reply

Your email address will not be published. Required fields are marked *