﻿<?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; DOM</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/dom/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 01 Feb 2010 09:44:28 +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>]]></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;">
//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;">
// ==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;">
// ==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>
		<item>
		<title>Add a external icon and link target dynamicly</title>
		<link>http://www.ladysign-apps.com/blog/code/css/add-a-external-icon-and-link-target-dynamicly/</link>
		<comments>http://www.ladysign-apps.com/blog/code/css/add-a-external-icon-and-link-target-dynamicly/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 17:52:00 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[external link]]></category>
		<category><![CDATA[external link icon]]></category>
		<category><![CDATA[link target]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=646</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Setting target=&#8221;_blank&#8221; is not strict valid (x)html. But you want to open all your external URL&#8217;s in an[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Setting target=&#8221;_blank&#8221; is not strict valid (x)html. But you want to open all your external URL&#8217;s in another window. And have you seen that nice icon on <a href="http://en.wikipedia.org/wiki/Hyperlink">Wikipedia</a> for all the external hyperlinks, which are created dynamicly?<br />
Well today I wrote a Javascript function which does this functionality for you.</p>
<p>Just implement this Javascript (file) between your <head> tags:</p>
<pre class="brush: jscript;">
/**
 * Ladysign Standard Javascript
 */
function externalLinks() {
    var host = window.location.host;

    var anchors = document.getElementsByTagName(&quot;a&quot;);
    for (var i=0; i&lt;=anchors.length; i++) {
        var domain = getDomain(anchors[i]);
        if (domain != undefined &amp;&amp; anchors[i].href &amp;&amp; host != domain){
           anchors[i].target = &quot;_blank&quot;;
           anchors[i].className = &quot;external&quot;;
        }
    }
}

function getDomain(url){
    var urlStr = url + &quot;&quot;;
    var split_domain = new Array();
    split_domain = urlStr.split(&quot;/&quot;);
    return split_domain[2];
}

window.onload = externalLinks;
</pre>
<p>And add a stylesheet class &#8220;external&#8221; together with a nice icon:</p>
<pre class="brush: css;">
  .external { background: transparent url(_img/external.png) no-repeat scroll right center; padding: 0 13px 0 0; }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/css/add-a-external-icon-and-link-target-dynamicly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GreaseMonkey for IE7</title>
		<link>http://www.ladysign-apps.com/blog/code/javascript/greasemonkey-for-ie7/</link>
		<comments>http://www.ladysign-apps.com/blog/code/javascript/greasemonkey-for-ie7/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 15:48:47 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[addon]]></category>
		<category><![CDATA[clientside scripting]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[IE7PRO]]></category>
		<category><![CDATA[iepro]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[userscript]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=522</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Today I will write only good stuff about <a href="http://www.ie7pro.com/" target="_blank">IE7Pro</a>, the ultimate add-on / plug-in for Internet Explorer 7. Cause beside the [......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Today I will write only good stuff about <a href="http://www.ie7pro.com/" target="_blank">IE7Pro</a>, the ultimate add-on / plug-in for Internet Explorer 7. Cause beside the handy features such as spelling checks and auto pre-fill on forms, download manager, clear privacy data option and session manager, it also contains the option to work with user scripts, just like <a href="https://addons.mozilla.org/en-US/firefox/addon/748" target="_blank">GreaseMonkey</a> for Mozilla Firefox does! </p>
<p>And that&#8217;s a good thing. Do you remember those, crappy and dirty websites, which only work for Internet Explorer. (Goodbye Firefox, Opera and Chrome).<br />
You can easily change these websites, with your own client-side code and logics. With just a bit of DOM Javascript experience you can change (clientside) every page you want, that&#8217;s because IE7Pro (or GreaseMonkey) directly loads your script after the original page is loaded, so you can access page elements by Javascripting to page ID&#8217;s and tags.</p>
<p>1. Just install the plugin.<br />
2. Go the the folder where you installed IE7Pro: <strong>C:\Program Files\IEPro\userscripts\</strong><br />
and create a new file with .ieuser.js extension: <strong>myFirstUserScript.ieuser.js</strong><br />
3. Make sure your userscript contains an //==UserScript== comment, with a @nam, @namespace,  @description and @include  comment.<br />
Specially the include is needed, so Internet Explorer knows when your script should be loaded -before- the requested page is loaded.<br />
Let&#8217;s say you want to modify Ebay.com. Then write down with the asterisk regex, that all pages within the ebay.com range should load your script first.<br />
Such a comment header can look like this:</p>
<pre class="brush: jscript;">
// ==UserScript==
// @name           myFirstUserScript
// @namespace      myFirstUserScript
// @description    My First User Script mods Ebay.com
// @include        *ebay.com*
// ==/UserScript==

//... here comes all your DOM Javascript coding.
</pre>
<p>4. Rightclick on the blue IE7Pro circle (statusbar &#8211; right bottom), and click on &#8220;Preferences (CTRL + F7) > User Scripts&#8221;.<br />
Tick &#8220;enable userscripts&#8221;.<br />
5. Press the &#8220;Reload All Scripts&#8221; button, and tick your newly created file.<br />
6. Start coding in your myFirstUserScript.ieuser.js file!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/javascript/greasemonkey-for-ie7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
