<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>umkk.eu &#187; javascript json</title>
	<atom:link href="http://umkk.eu/tag/javascript-json/feed/" rel="self" type="application/rss+xml" />
	<link>http://umkk.eu</link>
	<description>you can also go there !</description>
	<lastBuildDate>Fri, 25 Jun 2010 16:00:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Greasemonkey, create a options panel using jQuery</title>
		<link>http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/</link>
		<comments>http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 07:06:20 +0000</pubDate>
		<dc:creator>sergiu</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[javascript cookie]]></category>
		<category><![CDATA[javascript json]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[mousehunt]]></category>

		<guid isPermaLink="false">http://umkk.eu/?p=181</guid>
		<description><![CDATA[Hi, this tutorial is also based on the mouse hunt script "facebook mousehunt improvements" created by me, and in this one i will explain how to create an options panel (only check boxes at this time) and save it.
Here is my final result with this script :
If you want to try this, remember to load [...]


Related posts:<ol><li><a href='http://umkk.eu/greasemonkey-jquery-and-the-greatest-mouse-hunt-script/10/' rel='bookmark' title='Permanent Link: GreaseMonkey, Jquery and the greatest mouse hunt script.'>GreaseMonkey, Jquery and the greatest mouse hunt script.</a></li>
<li><a href='http://umkk.eu/autoupdate-on-greasemonkey-script/10/' rel='bookmark' title='Permanent Link: Autoupdate on greasemonkey script, example from &#8220;mousehunt improvements&#8221; script.'>Autoupdate on greasemonkey script, example from &#8220;mousehunt improvements&#8221; script.</a></li>
<li><a href='http://umkk.eu/jquery-popups-wizard-web-2-0-ideea-and-usability/10/' rel='bookmark' title='Permanent Link: jQuery popups wizard, web 2.0 ideea and usability'>jQuery popups wizard, web 2.0 ideea and usability</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div id="attachment_197" class="wp-caption aligncenter" style="width: 263px"><a href="http://umkk.eu/wp-content/uploads/2009/10/2009-10-22_1010.png"><img class="size-full wp-image-197" title="2009-10-22_1010" src="http://umkk.eu/wp-content/uploads/2009/10/2009-10-22_1010.png" alt="greasemonkey options panel with jquery" width="253" height="222" /></a><p class="wp-caption-text">greasemonkey options panel with jquery</p></div>
<p>Hi, this tutorial is also based on the mouse hunt script "facebook mousehunt improvements" created by me, and in this one i will explain how to create an options panel (only check boxes at this time) and save it.</p>
<p>Here is my final result with this script :</p>
<p>If you want to try this, remember to load jquery correctly as described in <a title="how to load jquery in greasemonkey" href="http://umkk.eu/greasemonkey-jquery-and-the-greatest-mouse-hunt-script/10/" target="_self">this post</a> at number #4.</p>
<p>First of all, the data is saved in a cookie as JSON, i have an object where i save all my data and i save that object as JSON on a cookie. Because javascript does not know to convert an object to a json string i used a class which does that, the class is not created by me, I just use it as it is, here is the fie : <a href="http://umkk.eu/wp-content/uploads/2009/10/json.js">json </a><br />
I copied the content of the file inside my script so i don't have to load it remotely, anyway it's just a line <img src='http://umkk.eu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , so you should also copy this at the beginning of your greasemonkey script.</p>
<p>As i said the data is saved as cookie, here is the functions which will create, and read a cookie :</p>
<pre class="javascript"><span style="color: #003366; font-weight: bold;">function</span> createCookie<span style="color: #66cc66;">&#40;</span><span style="color: #000066;">name</span>,value,days<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>days<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> date = <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		date.<span style="color: #006600;">setTime</span><span style="color: #66cc66;">&#40;</span>date.<span style="color: #006600;">getTime</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #66cc66;">&#40;</span>days*<span style="color: #CC0000;">24</span>*<span style="color: #CC0000;">60</span>*<span style="color: #CC0000;">60</span>*<span style="color: #CC0000;">1000</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #003366; font-weight: bold;">var</span> expires = <span style="color: #3366CC;">&quot;; expires=&quot;</span>+date.<span style="color: #006600;">toGMTString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #003366; font-weight: bold;">var</span> expires = <span style="color: #3366CC;">&quot;&quot;</span>;
	document.<span style="color: #006600;">cookie</span> = <span style="color: #000066;">name</span>+<span style="color: #3366CC;">&quot;=&quot;</span>+value+expires+<span style="color: #3366CC;">&quot;; path=/&quot;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> readCookie<span style="color: #66cc66;">&#40;</span><span style="color: #000066;">name</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> nameEQ = <span style="color: #000066;">name</span> + <span style="color: #3366CC;">&quot;=&quot;</span>;
	<span style="color: #003366; font-weight: bold;">var</span> ca = document.<span style="color: #006600;">cookie</span>.<span style="color: #006600;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">';'</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000066; font-weight: bold;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i=<span style="color: #CC0000;">0</span>;i &amp;lt; ca.<span style="color: #006600;">length</span>;i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> c = ca<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
		<span style="color: #000066; font-weight: bold;">while</span> <span style="color: #66cc66;">&#40;</span>c.<span style="color: #006600;">charAt</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #66cc66;">&#41;</span>==<span style="color: #3366CC;">' '</span><span style="color: #66cc66;">&#41;</span> c = c.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;">1</span>,c.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>c.<span style="color: #006600;">indexOf</span><span style="color: #66cc66;">&#40;</span>nameEQ<span style="color: #66cc66;">&#41;</span> == <span style="color: #CC0000;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> c.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>nameEQ.<span style="color: #006600;">length</span>,c.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">null</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p>Also in my program i read the cookie when the script starts so the data object "myData" in my case will be populated and available in the entire script :</p>
<pre class="javascript"><span style="color: #003366; font-weight: bold;">var</span> myData = <span style="color: #003366; font-weight: bold;">new</span> Object<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000066; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>readCookie<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;gm_pl_data&quot;</span><span style="color: #66cc66;">&#41;</span>!=<span style="color: #003366; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		myData = JSON.<span style="color: #006600;">parse</span><span style="color: #66cc66;">&#40;</span>readCookie<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;gm_pl_data&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">else</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #009900; font-style: italic;">//if there is no cookie we initialize it</span>
		initCookie<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span><span style="color: #000066; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span>err<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	initCookie<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p>In my case gm_pl_data is the name of the cookie in which i save the data. Here is the initCookie() function, this will just initialize the objects inside the myData object :</p>
<pre class="javascript"><span style="color: #003366; font-weight: bold;">function</span> initCookie <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	myData = <span style="color: #003366; font-weight: bold;">new</span> Object<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	myData.<span style="color: #006600;">allLogs</span> = <span style="color: #003366; font-weight: bold;">new</span> Object<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	myData.<span style="color: #006600;">allChese</span> = <span style="color: #003366; font-weight: bold;">new</span> Object<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	savePersistentData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">//will be valid 1000000 days</span>
<span style="color: #003366; font-weight: bold;">function</span> savePersistentData <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	createCookie<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;gm_pl_data&quot;</span>,JSON.<span style="color: #006600;">stringify</span><span style="color: #66cc66;">&#40;</span>myData<span style="color: #66cc66;">&#41;</span>,<span style="color: #CC0000;">1000000</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p>I let in there all my init objects so io can see how to initialize them if you have more.  You can also notice the savePersistentData function which will update the cookie and save the persistent data <img src='http://umkk.eu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Until here we only had generic information about how data is saved and the functions which save the data. Now I'll go in more details for the actual options panel. The panel is actually a div in which you can enter any thing you want, but the values of the check boxes will be saved  and their status restored when the page reloads.</p>
<p>So here is how my panel looks like :</p>
<pre class="javascript">jQuery<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;#gm_pl_options_container&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Show the timer
&lt;input id=&quot;</span>gm_pl_check_show_timer<span style="color: #3366CC;">&quot; type=&quot;</span>checkbox<span style="color: #3366CC;">&quot; /&gt;
&quot;</span><span style="color: #66cc66;">&#41;</span>;
	jQuery<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;#gm_pl_options_container&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Automaticaly sound the horn
&lt;input id=&quot;</span>gm_pl_check_sound_horn<span style="color: #3366CC;">&quot; type=&quot;</span>checkbox<span style="color: #3366CC;">&quot; /&gt;
&quot;</span><span style="color: #66cc66;">&#41;</span>;
	jQuery<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;#gm_pl_options_container&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;&lt;strong&gt;Kings rewared options&lt;/strong&gt;
&quot;</span><span style="color: #66cc66;">&#41;</span>;
	jQuery<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;#gm_pl_options_container&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Play youtube on kings reward
&lt;input id=&quot;</span>gm_pl_play_sound_on_reward<span style="color: #3366CC;">&quot; type=&quot;</span>checkbox<span style="color: #3366CC;">&quot; /&gt;
&quot;</span><span style="color: #66cc66;">&#41;</span>;
	jQuery<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;#gm_pl_options_container&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Play midi on kings reward
&lt;input id=&quot;</span>gm_pl_play_sound_midi_on_reward<span style="color: #3366CC;">&quot; type=&quot;</span>checkbox<span style="color: #3366CC;">&quot; /&gt;
&quot;</span><span style="color: #66cc66;">&#41;</span>;
	jQuery<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;#gm_pl_options_container&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;Show alert on kings rewared
&lt;input id=&quot;</span>gm_pl_show_alert_on_reward<span style="color: #3366CC;">&quot; type=&quot;</span>checkbox<span style="color: #3366CC;">&quot; /&gt;
&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	setOptions<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
jQuery<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;#gm_pl_options_container input&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>saveOptions<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>in this case the id of the div inside which i enter the options is "gm_pl_options_container", and i you can see that setOptions() is called, this will set the default options for the check boxes based on the myData object, here's the code :</p>
<pre class="javascript"><span style="color: #003366; font-weight: bold;">function</span> setOptions <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> myData<span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">&quot;options&quot;</span><span style="color: #66cc66;">&#93;</span> == <span style="color: #3366CC;">&quot;object&quot;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">for</span><span style="color: #66cc66;">&#40;</span>i <span style="color: #000066; font-weight: bold;">in</span> myData<span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">&quot;options&quot;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			jQuery<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;#&quot;</span>+i<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">attr</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;checked&quot;</span>,myData<span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">&quot;options&quot;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre>
<p>In my case the options are saved in myData["options"] the myData object is the main script object and all the scripts data is saved there, not just the options.</p>
<p>And after the setOptions function is called we also have an intresting line, this will add an onclick function to each input on that div, and in this function we call saveOptions(), this function will get all the inputs in that div, and save the values in myData['options'] object, and also write the cookie to make sure that the values are not lost on page refresh :</p>
<pre class="javascript"><span style="color: #003366; font-weight: bold;">function</span> saveOptions <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>!<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> myData<span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">&quot;options&quot;</span><span style="color: #66cc66;">&#93;</span> == <span style="color: #3366CC;">&quot;object&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		myData<span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">&quot;options&quot;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #003366; font-weight: bold;">new</span> Object<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	jQuery.<span style="color: #006600;">each</span><span style="color: #66cc66;">&#40;</span>jQuery<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;#gm_pl_options_container input&quot;</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">checked</span> == <span style="color: #003366; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			myData<span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">&quot;options&quot;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #003366; font-weight: bold;">true</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #000066; font-weight: bold;">else</span>
		<span style="color: #66cc66;">&#123;</span>
			myData<span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">&quot;options&quot;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #003366; font-weight: bold;">false</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
	savePersistentData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p>Every thing you have to do now is use those options, there are 2 ways to do this, you can check the status of the check box or you can get the value from the myData['options'] object, they are the same, i use the object :</p>
<pre class="javascript"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>myData<span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">&quot;options&quot;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">'gm_pl_show_alert_on_reward'</span><span style="color: #66cc66;">&#93;</span> == <span style="color: #003366; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;You have a king's reward!&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span></pre>
<p>And this is it, if you have any questions let me know, and remember, if you use mouse hunt don't forget to use my script :<a href="http://userscripts.org/scripts/show/57446" target="_blank"> Facebook mousehunt improvements</a></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-caring">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/&amp;title=Greasemonkey%2C+create+a+options+panel+using+jQuery" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/&amp;title=Greasemonkey%2C+create+a+options+panel+using+jQuery" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/&amp;title=Greasemonkey%2C+create+a+options+panel+using+jQuery&amp;desc=%0D%0A%0D%0AHi%2C%20this%20tutorial%20is%20also%20based%20on%20the%20mouse%20hunt%20script%20%22facebook%20mousehunt%20improvements%22%20created%20by%20me%2C%20and%20in%20this%20one%20i%20will%20explain%20how%20to%20create%20an%20options%20panel%20%28only%20check%20boxes%20at%20this%20time%29%20and%20save%20it.%0D%0A%0D%0AHere%20is%20my%20final%20result%20with%20this%20script%20%3A%0D%0A%0D%0AIf%20you%20want%20to%20try%20this%2C%20remember%20" rel="nofollow" class="external" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/&amp;t=Greasemonkey%2C+create+a+options+panel+using+jQuery" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-gmail">
			<a href="https://mail.google.com/mail/?ui=2&amp;view=cm&amp;fs=1&amp;tf=1&amp;su=Greasemonkey%2C+create+a+options+panel+using+jQuery&amp;body=Link: http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A %0D%0A%0D%0AHi%2C%20this%20tutorial%20is%20also%20based%20on%20the%20mouse%20hunt%20script%20%22facebook%20mousehunt%20improvements%22%20created%20by%20me%2C%20and%20in%20this%20one%20i%20will%20explain%20how%20to%20create%20an%20options%20panel%20%28only%20check%20boxes%20at%20this%20time%29%20and%20save%20it.%0D%0A%0D%0AHere%20is%20my%20final%20result%20with%20this%20script%20%3A%0D%0A%0D%0AIf%20you%20want%20to%20try%20this%2C%20remember%20" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/&amp;title=Greasemonkey%2C+create+a+options+panel+using+jQuery" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-misterwong">
			<a href="http://www.mister-wong.com/addurl/?bm_url=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/&amp;bm_description=Greasemonkey%2C+create+a+options+panel+using+jQuery&amp;plugin=sexybookmarks" rel="nofollow" class="external" title="Add this to Mister Wong">Add this to Mister Wong</a>
		</li>
		<li class="shr-mixx">
			<a href="http://www.mixx.com/submit?page_url=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/&amp;title=Greasemonkey%2C+create+a+options+panel+using+jQuery" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/&amp;title=Greasemonkey%2C+create+a+options+panel+using+jQuery" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/&amp;title=Greasemonkey%2C+create+a+options+panel+using+jQuery" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Greasemonkey%2C+create+a+options+panel+using+jQuery+-+http://b2l.me/6hn7t&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>



<p>Related posts:<ol><li><a href='http://umkk.eu/greasemonkey-jquery-and-the-greatest-mouse-hunt-script/10/' rel='bookmark' title='Permanent Link: GreaseMonkey, Jquery and the greatest mouse hunt script.'>GreaseMonkey, Jquery and the greatest mouse hunt script.</a></li>
<li><a href='http://umkk.eu/autoupdate-on-greasemonkey-script/10/' rel='bookmark' title='Permanent Link: Autoupdate on greasemonkey script, example from &#8220;mousehunt improvements&#8221; script.'>Autoupdate on greasemonkey script, example from &#8220;mousehunt improvements&#8221; script.</a></li>
<li><a href='http://umkk.eu/jquery-popups-wizard-web-2-0-ideea-and-usability/10/' rel='bookmark' title='Permanent Link: jQuery popups wizard, web 2.0 ideea and usability'>jQuery popups wizard, web 2.0 ideea and usability</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://umkk.eu/greasemonkey-create-a-options-panel-using-jquery/10/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
