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. Ernestopeert says:
    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    Superb information. Kudos.

    viagra for women germany purchase generic viagra online
    generic viagra
    viagra for muscle building – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Thanks a lot. Valuable stuff.

    viagra heart attack psa and viagra
    viagra for women
    viagra india prices – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    You actually revealed that terrifically.

    ebay viagra pills viagra in stores
    viagra without a doctor prescription
    drug to reverse viagra overdose – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Nicely expressed really! !

    viagra size differences cod generic pal pay viagra
    viagra without a doctors prescription
    nicky clarke viagra edinburgh pages pregnant – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    You actually mentioned that well.

    flowmax viagra viagra propecia
    buy generic viagra
    viagra men – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Superb forum posts. Many thanks!

    fedex viagra no prescription girl viagra
    buy viagra online
    how often can i take viagra – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Truly many of superb info!

    viagra through customs from mexico ke emails linking to viagra
    generic viagra
    cheap viagra search generic – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Excellent data. With thanks.

    viagra cost at sam’s club viagra fan club discussion board
    generic viagra
    viagra product strategy – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Whoa a lot of amazing knowledge!

    generic viagra usa canada best prices kamagra viagra cheap
    generic viagra 100mg
    nitroglycerin and viagra – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Nicely put, Cheers!

    wal mart pharmacy viagra price viagra no presciption
    viagra online
    viagra advice – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Thanks a lot! Valuable information.

    online viagra without a prescription edinburgh uk viagra pages search news
    viagra for sale uk
    viagra buy germany – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Thanks a lot, Quite a lot of data.

    viagra voorschrift belgie children on viagra
    viagra 100mg
    viagra use by women – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Thanks! Loads of data.

    viagra vs cailis viagra light switch
    generic viagra 100mg
    viagra other uses – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    You actually said it well.

    viagra cluster headache using viagra in women
    viagra online
    give me details on viagra – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Cheers. Ample knowledge!

    ensure viagra viagra and cataracks
    generic viagra online
    retail price of 100mg viagra – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Appreciate it. Numerous advice.

    generic viagra which is best cheap viagra st
    buy viagra
    how long effects viagra – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Superb postings, Thanks.

    viagra party order viagra for less than $25
    generic viagra online
    buy viagra over the counter – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Excellent knowledge. Many thanks.

    purpose of viagra viagra and ritalin
    generic viagra online
    search viagra viagra find edinburgh pages – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Very well spoken really. .

    viagra deals coma viagra
    viagra without a doctor prescription
    latvia viagra – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Cheers. I value it!

    viagra in malaysia viagra over the counter mexico
    viagra without a doctor prescription
    generic order viagra – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Excellent postings. Thank you.

    100 milligram phyzer viagra can you multiple erections with viagra
    buy generic viagra
    china viagra – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

  22. Ernestopeert 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.!

    kuala lumpur coffee with viagra teacher’s union viagra benefit
    generic viagra online
    generic viagra generic cialis pills – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Amazing many of useful material!

    find search viagra edinburgh free cialis viagra cost comparison
    viagra without a doctor prescription
    l-arginine viagra – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Effectively spoken really. .

    safe to take viagra with phentermine canada super viagra
    buy viagra
    pulmoanry htn viagra – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Reliable facts. Thanks a lot!

    viagra ace inhibitor vasotec and viagra interactions
    generic viagra 100mg
    viagra alternative puerto rico – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Thanks, Lots of tips!

    cialis dysfunction erectile levitra viagra jaime randall viagra
    generic viagra 100mg
    viagra increaser – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Thank you! Plenty of content!

    viagra can cause loss of hearing viagra seller
    generic viagra
    subaction showcomments viagra archive remember – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Very good content, Many thanks.

    viagra with no prescription legal buying viagra online safe
    cheap viagra
    walmart viagra cost – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Truly a lot of superb information!

    when will there be genaric viagra 10-minute viagra
    viagra pills
    viagra gel aka james bond – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    You actually explained that effectively.

    edinburgh viagra tid search charles is viagra good for you
    viagra pills
    order viagra online in wisconsin – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Regards. I like it!

    aching legs following viagra use generic soft viagra
    buy viagra
    united states sellers of viagra – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    You actually stated it exceptionally well.

    canadian pharmacies nexium viagra real viagra online real pfizer
    viagra generic
    is there a viagra generic – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Thanks, Plenty of information.

    blood pressure pills viagra viagra cheep
    buy viagra
    effect of viagra on women – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Incredible tons of superb knowledge!

    men who take viagra results actress viagra commercial
    generic viagra 100mg
    scary movie 4 viagra – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Kudos. Good information!

    where to buy viagra in amsterdam difference between levitra and viagra
    viagra for women
    buy cheap viagra 32 – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Awesome stuff. Cheers.

    glucophage viagra penis pumping and viagra
    viagra pills
    search viagra viagra find 74k generic – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

  37. Ernestopeert 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 very nicely..

    viagra medicare uk 25mg of viagra
    cheap viagra
    viagra and testim – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Amazing loads of great facts.

    generic viagra without prescription affordable viagra
    generic viagra online
    side effects from viagra – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Many thanks. A good amount of facts.

    pulmonary hypertension and viagra dali viagra
    buy viagra
    can you buy viagra in cancun – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    You explained that well!

    does viagra affect blood pressure buy viagra with pay pal
    viagra online
    men on viagra pictures – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Regards, Lots of advice!

    using viagra viagra for hard erection
    viagra online
    viagra corporate citizenship – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Appreciate it, An abundance of postings.

    viagra india prices viagra addictive
    buy viagra online
    viagra cocks – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Very good info. Kudos.

    what foods stimulate viagra purchase generic viagra
    buy generic viagra
    teens taking viagra – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    You actually expressed this fantastically!

    oxycodone viagra effects lisinopril and viagra
    viagra without a doctor prescription
    watermellon viagra news – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Amazing facts. Appreciate it!

    flushed face viagra levitra versus viagra
    viagra online
    generic mexican viagra – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Information nicely regarded..

    2737 amerimedrx viagra wetrack it zyban legal rx and viagra
    viagra pills
    try three for free cialis viagra – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Cheers, I appreciate this!

    generic viagra arizona pc100 viagra
    viagra online
    viagra cursor – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Nicely expressed without a doubt. .

    find search viagra edinburgh computer sites kamagra snd viagra
    generic viagra online
    buy cheap viagra – https://genericviagramsl.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Whoa plenty of useful info!

    viagra 1.79 testimonials viagra treatment
    buy generic viagra
    cartoon viagra – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    You actually stated this well!

    jelqing viagra twenty-seven tons of viagra
    generic viagra
    twenty-seven tons viagra – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    You actually said this well.

    will hmsa cover viagra cheap generic viagra online
    cheap viagra
    viagra daily – https://genericviagrarcp.com

    KeithVax
    RichardPouri
    Ernestopeert

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

    Excellent postings. Thanks a lot.

    compra viagra viagra buyonline
    generic viagra 100mg
    cheapest viagra uk – https://genericviagrantx.com

    KeithVax
    RichardPouri
    Ernestopeert

Leave a Reply

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