<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Using YUI in Greasemonkey Scripts</title>
	<atom:link href="http://www.yuiblog.com/blog/index.php/2007/01/03/yui-greasemonkey/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/</link>
	<description>The official blog of the YUI Project.</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:46:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Paulo Eduardo Neves</title>
		<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/comment-page-1/#comment-596812</link>
		<dc:creator>Paulo Eduardo Neves</dc:creator>
		<pubDate>Wed, 29 Dec 2010 01:17:17 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2007/01/03/yui-greasemonkey/#comment-596812</guid>
		<description>Here is the correct URL for the sample code: https://gist.github.com/297364</description>
		<content:encoded><![CDATA[<p>Here is the correct URL for the sample code: <a href="https://gist.github.com/297364" rel="nofollow">https://gist.github.com/297364</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: binky</title>
		<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/comment-page-1/#comment-332810</link>
		<dc:creator>binky</dc:creator>
		<pubDate>Sun, 30 Mar 2008 01:04:33 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2007/01/03/yui-greasemonkey/#comment-332810</guid>
		<description>eric, that might be due to the latest version of the GM extension having tightened its security up. it no longer lets you call the GM_ built in functions like gm_xmlhttprequest from within the unsafewindow scope.</description>
		<content:encoded><![CDATA[<p>eric, that might be due to the latest version of the GM extension having tightened its security up. it no longer lets you call the GM_ built in functions like gm_xmlhttprequest from within the unsafewindow scope.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/comment-page-1/#comment-306265</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Fri, 15 Feb 2008 23:37:25 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2007/01/03/yui-greasemonkey/#comment-306265</guid>
		<description>This does not work for me. Has something new in Greasemonkey or YUI broken this? I just get a regular text, but no panel formatting whatsoever.

Thanks.</description>
		<content:encoded><![CDATA[<p>This does not work for me. Has something new in Greasemonkey or YUI broken this? I just get a regular text, but no panel formatting whatsoever.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Where Are The Wise Men? &#187; Blog Archive &#187; Mike Dives Into Greasemonkey</title>
		<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/comment-page-1/#comment-213027</link>
		<dc:creator>Where Are The Wise Men? &#187; Blog Archive &#187; Mike Dives Into Greasemonkey</dc:creator>
		<pubDate>Fri, 19 Oct 2007 18:55:44 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2007/01/03/yui-greasemonkey/#comment-213027</guid>
		<description>[...] Dive Into Greasemonkey, which is really his Greasemonkey Hacks book online.&#160; Next step: Using YUI in GreaseMonkey Scripts.&#160; Then the outside-world website hacking will begin!!Powered by [...]</description>
		<content:encoded><![CDATA[<p>[...] Dive Into Greasemonkey, which is really his Greasemonkey Hacks book online.&nbsp; Next step: Using YUI in GreaseMonkey Scripts.&nbsp; Then the outside-world website hacking will begin!!Powered by [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Annesley Newholm</title>
		<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/comment-page-1/#comment-190127</link>
		<dc:creator>Annesley Newholm</dc:creator>
		<pubDate>Thu, 13 Sep 2007 14:43:03 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2007/01/03/yui-greasemonkey/#comment-190127</guid>
		<description>Hi,

The code in the last post didn&#039;t come out too well! Here is the address of a GreaseMonkey script that uses the GM_IncludeOnce loader:

http://dharmafly.com/hackhud/hackhud.user.js

Enjoy!

Annesley</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>The code in the last post didn&#8217;t come out too well! Here is the address of a GreaseMonkey script that uses the GM_IncludeOnce loader:</p>
<p><a href="http://dharmafly.com/hackhud/hackhud.user.js" rel="nofollow">http://dharmafly.com/hackhud/hackhud.user.js</a></p>
<p>Enjoy!</p>
<p>Annesley</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Annesley Newholm</title>
		<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/comment-page-1/#comment-187576</link>
		<dc:creator>Annesley Newholm</dc:creator>
		<pubDate>Sat, 08 Sep 2007 10:09:42 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2007/01/03/yui-greasemonkey/#comment-187576</guid>
		<description>Hi,

I wanted to create a more generic version of this script (GM_includeOnce for example) which was able to be more secure (not use unsafeWindow) if required. Also I wanted to remove what I believe is un-necessary polling in this script.

Here is what I came up with (please tear it to bits/make it better):

try {test=GM_includeOnce;}
catch (err) {
    GM_log(&#039;adding GM_includeOnce function&#039;);
    function GM_includeOnce(assets, callbackOnComplete, callbackOnTimeout, timeout, context) {
        /*
            GM_includeOnce(assets[, callbackOnComplete[, callbackOnTimeout[, timeout[, context]]]])
            assets = [{url:&#039;&#039;, existenceTest:func[, type: typeEnum]}] type is calculated from extension if not included
            no callback is made without callbackOnComplete
            default timeout is 10000 (10 seconds)
            context is the object that the scripts are run on, defaults to this
            callbackOnComplete is sent a closure style function as its only parameter which allows access to the variables 
            created in the scripts
        */
        
        //private functions
        var numAssets=assets.length, numJSAssets=0, numJSLoaded=0;
        var timeoutTimer=setTimeout(callbackOnTimeout, timeout&#124;&#124;10000);
        var allScript=&#039;&#039;, allCSS=&#039;&#039;, importScript=&#039;&#039;;
        var asset, type, styleLink;
        
        function accessFunc(localVar) {try{return eval(localVar);} catch (err) {}}
        
        function allScriptsLoaded() {
            GM_log(&#039;allScriptsLoaded&#039;);
            clearTimeout(timeoutTimer);
            //it may be better to add these scripts immediately rather than compiling the big string in some circumstances
            GM_log(&#039;compiling scripts&#039;);
            for (var a=0;a</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I wanted to create a more generic version of this script (GM_includeOnce for example) which was able to be more secure (not use unsafeWindow) if required. Also I wanted to remove what I believe is un-necessary polling in this script.</p>
<p>Here is what I came up with (please tear it to bits/make it better):</p>
<p>try {test=GM_includeOnce;}<br />
catch (err) {<br />
    GM_log(&#8216;adding GM_includeOnce function&#8217;);<br />
    function GM_includeOnce(assets, callbackOnComplete, callbackOnTimeout, timeout, context) {<br />
        /*<br />
            GM_includeOnce(assets[, callbackOnComplete[, callbackOnTimeout[, timeout[, context]]]])<br />
            assets = [{url:'', existenceTest:func[, type: typeEnum]}] type is calculated from extension if not included<br />
            no callback is made without callbackOnComplete<br />
            default timeout is 10000 (10 seconds)<br />
            context is the object that the scripts are run on, defaults to this<br />
            callbackOnComplete is sent a closure style function as its only parameter which allows access to the variables<br />
            created in the scripts<br />
        */</p>
<p>        //private functions<br />
        var numAssets=assets.length, numJSAssets=0, numJSLoaded=0;<br />
        var timeoutTimer=setTimeout(callbackOnTimeout, timeout||10000);<br />
        var allScript=&#8221;, allCSS=&#8221;, importScript=&#8221;;<br />
        var asset, type, styleLink;</p>
<p>        function accessFunc(localVar) {try{return eval(localVar);} catch (err) {}}</p>
<p>        function allScriptsLoaded() {<br />
            GM_log(&#8216;allScriptsLoaded&#8217;);<br />
            clearTimeout(timeoutTimer);<br />
            //it may be better to add these scripts immediately rather than compiling the big string in some circumstances<br />
            GM_log(&#8216;compiling scripts&#8217;);<br />
            for (var a=0;a</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2007-04-17 &#171; Joost&#8217;s weblog</title>
		<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/comment-page-1/#comment-93027</link>
		<dc:creator>links for 2007-04-17 &#171; Joost&#8217;s weblog</dc:creator>
		<pubDate>Tue, 17 Apr 2007 09:01:33 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2007/01/03/yui-greasemonkey/#comment-93027</guid>
		<description>[...] Using YUI in Greasemonkey Scripts (Yahoo! User Interface Blog) Title says it all, interesting! (tags: api code webdev YUI yahoo javascript greasemonkey) [...]</description>
		<content:encoded><![CDATA[<p>[...] Using YUI in Greasemonkey Scripts (Yahoo! User Interface Blog) Title says it all, interesting! (tags: api code webdev YUI yahoo javascript greasemonkey) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: miles</title>
		<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/comment-page-1/#comment-65734</link>
		<dc:creator>miles</dc:creator>
		<pubDate>Wed, 14 Mar 2007 23:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2007/01/03/yui-greasemonkey/#comment-65734</guid>
		<description>For those reading this post Feb 2007, Yahoo does now host the yui files:
http://developer.yahoo.com/yui/articles/hosting/</description>
		<content:encoded><![CDATA[<p>For those reading this post Feb 2007, Yahoo does now host the yui files:<br />
<a href="http://developer.yahoo.com/yui/articles/hosting/" rel="nofollow">http://developer.yahoo.com/yui/articles/hosting/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/comment-page-1/#comment-29178</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Fri, 05 Jan 2007 22:20:26 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2007/01/03/yui-greasemonkey/#comment-29178</guid>
		<description>I had a go at this a while back and got distracted apparently. The issue I was grappling with was the use of the unsafeWindow - which as I understand it potentially opens a hole allowing a page author to gain access to the greater privileges Greasemonkey has on your machine. 

I went down a rat-hole loading the files via GM_xmlhttprequest and trying to eval them (in the protected userscript scope). But I see now that even if that could work, the need to load CSS into the document puts you back where you (I) started. 

I think the power of loading in a library like YUI (or Dojo via AOL&#039;s CDN) is /huge/ and should drive the design of future versions of Greasemonkey if there&#039;s not a safe and elegant way to do it now. I know the topic has been aired in the Greasemonkey mailing list. 

Btw. I&#039;m right there with you on prototyping and testing out new ideas on applications and pages. Even though I might in theory have access to those apps&#039; code, in practice its much easier (and cooler) this way.</description>
		<content:encoded><![CDATA[<p>I had a go at this a while back and got distracted apparently. The issue I was grappling with was the use of the unsafeWindow &#8211; which as I understand it potentially opens a hole allowing a page author to gain access to the greater privileges Greasemonkey has on your machine. </p>
<p>I went down a rat-hole loading the files via GM_xmlhttprequest and trying to eval them (in the protected userscript scope). But I see now that even if that could work, the need to load CSS into the document puts you back where you (I) started. </p>
<p>I think the power of loading in a library like YUI (or Dojo via AOL&#8217;s CDN) is /huge/ and should drive the design of future versions of Greasemonkey if there&#8217;s not a safe and elegant way to do it now. I know the topic has been aired in the Greasemonkey mailing list. </p>
<p>Btw. I&#8217;m right there with you on prototyping and testing out new ideas on applications and pages. Even though I might in theory have access to those apps&#8217; code, in practice its much easier (and cooler) this way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Internet Vibes &#187; Blog Archive &#187; Using YUI in GreaseMonkey Scripts</title>
		<link>http://www.yuiblog.com/blog/2007/01/03/yui-greasemonkey/comment-page-1/#comment-28816</link>
		<dc:creator>Internet Vibes &#187; Blog Archive &#187; Using YUI in GreaseMonkey Scripts</dc:creator>
		<pubDate>Thu, 04 Jan 2007 08:36:15 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2007/01/03/yui-greasemonkey/#comment-28816</guid>
		<description>[...] You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. [...]</description>
		<content:encoded><![CDATA[<p>[...] You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

