<?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>Ladysign Dev Blog &#187; userscripts</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/userscripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 12 Dec 2011 16:58:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery for IE7Pro userscripts or Greasemonkey</title>
		<link>http://www.ladysign-apps.com/blog/code/javascript/jquery-for-ie7pro-userscripts-or-greasemonkey/</link>
		<comments>http://www.ladysign-apps.com/blog/code/javascript/jquery-for-ie7pro-userscripts-or-greasemonkey/#comments</comments>
		<pubDate>Wed, 20 May 2009 14:12:18 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[IE7PRO]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[userscripts]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=705</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Some weeks ago I made a <a href="http://ladysign-apps.com/blog/archives/522">blog post, about IE7Pro userscripts</a>, the Greasemonkey-like plugin for Internet Explorer 7.<br />
I&#821[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/javascript/jquery-for-ie7pro-userscripts-or-greasemonkey/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Some weeks ago I made a <a href="http://ladysign-apps.com/blog/archives/522">blog post, about IE7Pro userscripts</a>, the Greasemonkey-like plugin for Internet Explorer 7.<br />
I&#8217;m still deeply in love with userscripts for both IE7Pro and Greasemonkey, but what a waste of time for spending<br />
hours on writing big userscripts with DOM javascripting to extend that &#8220;untouchable&#8221; website/webapplication.<br />
This should be different! Why not use jQuery for IE7Pro userscripts.</p>
<p>The idea is to load first the jQuery script and then the userscript.<br />
Unfortunately a javascript include script like this will not work:</p>
<pre class="brush: jscript; title: ;">
//load jQuery
inc(&quot;jquery.js&quot;);

/* jsHandler.js */
function inc(filename)
{
  var body = document.getElementsByTagName('body').item(0);
  script = document.createElement('script');
  script.src = filename;
  script.type = 'text/javascript';
  body.appendChild(script)
}
</pre>
<p>However, it&#8217;s still very easy to let jQuery run for userscripts.<br />
First <a href="http://docs.jquery.com/Downloading_jQuery">download the latest jQuery</a> lib.</p>
<p><strong>Incase of IE7Pro:</strong><br />
Rename the downloaded jQuery script to: <strong>jquery.ieuser.js</strong> and place it<br />
in the userscript folder. (<strong>path\IEPro\userscripts</strong>).</p>
<p>Open the jquery.ieuser.js file and add the following comment block on the top of javascript lib file:</p>
<pre class="brush: jscript; title: ;">
// ==UserScript==
// @name           jQuery
// @namespace      jQuery
// @include        *
// ==/UserScript==
</pre>
<p>Now you can reload the jQuery file from the preferences &#8211; userscript screen in IE7Pro, and enable jQuery.<br />
To test it, create a new userscript with the following jQuery code. As soon as it runs, you know<br />
that you can use jQuery for every page.</p>
<pre class="brush: jscript; title: ;">
// ==UserScript==
// @name           Test
// @namespace      Test
// @include        *
// @author Lee Boonstra
// ==/UserScript==

$(document).ready(function(){
  alert(&quot;jQuery in userscripts do work!&quot;);
});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/javascript/jquery-for-ie7pro-userscripts-or-greasemonkey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

