Archive for the ‘javascript’ Category
Wednesday, October 1st, 2008
After a week of mostly testing and fine-tuning the code I finally released the windowName transport plugin for jQuery. You can get the plugin here but I suggest you first check the plugin page.
I need help testing
If you have an obscure browser / OS combination that is supported by jQuery I urge you to test the plugin. There are no good test pages yet so my temporary test page will have to do. The test page POSTs the querystring passed to it to a nonlocal domain and should open a JavaScript alert with the same querystring plus php=true.
On a sidenote – I figured out that the page looks better without the background images. So I changed the theme – let me know what you think.
Posted in ajax, browsers, design, firefox, ie, interface, javascript, opera, redesign, safari, software, technology | No Comments »
Thursday, September 18th, 2008
As nowadays less and less development goes on in Internet Explorer and the versions that are currently available and widely used have some quirks — to be fair they are by the book and others aren’t — I’m starting this post to have a list of stuff that you need to keep in mind if you don’t want problems when testing in IE.
-
Trailing comma in object literals
This is very common in multiline object definitions. someObject = {a:17,b:19,};
looks wrong but when you have a newline after everything it’s hard to find. Firefox lets it be, IE breaks silently. This one is easy to catch with JSLint.
-
String is not an array
Even though many languages treat it this way. Using str[i].charCodeAt()
breaks while str.charCodeAt(i)
doesn’t.
-
Element ownership matters.
This means that you have to take care when creating elements and attaching them to different documents. If you’re using jQuery beware – jQuery(someElement).append(someHtml);
is ok since it will check what the owner document is but jQuery(someHtml).appendTo(someElement);
might break if execution and someElement are in different documents. You can use jQuery(someHtml, someElement.ownerDocument).appendTo(someElement);
though.
What I do before testing in any browser other than Firefox (Opera is sometimes even stricter) is to check with JSLint how damaged the code is. It will catch all the weirdly written code that might break a browser. And it catches that trailing comma I mentioned.
I’m quite sure the list should be longer but these are the things I encountered in the last few days. When I find more I’ll add them to the list. If you know any that are not on the list add a comment.
Posted in browsers, companies, ie, javascript, microsoft, software, technology | No Comments »
Thursday, August 28th, 2008
Image by Edd Dumbill via Flickr I’ve just received two books about JavaScript that will keep me entertained over the weekend. The first one is from the father of JSON, JSLint and JSmin Douglas Crockford, whose series of lectures on JavaScript is really a great video introduction from beginner to intermediate and sometimes even pro level and is called Javascript: The Good Parts. I haven’t even tried to look at it because I’m scared I’ll start reading it and won’t get any sleep.
The other one is from the new kid on the block, the jQuery author and JavaScripter extraordinaire John Resig, called Pro Javascript Techniques. Reading the jQuery code is always one of the most fascinating parts of work, so I just had to order it.
I’ll try to post a review of both of them as soon as possible, but it might be later than I hope since I have a lot to do in these coming weeks.
Posted in blurps, javascript, technology | 1 Comment »
Friday, August 15th, 2008
Image via Wikipedia I’ve been rediscovering the joy of Greasemonkey scripts lately. For those who don’t know, Greasemonkey is one of the best extensions for Firefox ever made (the other being Zemanta of course:) that allows you to run JavaScripts on specified pages. This doesn’t really mean much to the non-technical crowd, but to us geeks this means you can do almost whatever you want with the page. As I make more and more of these I decided to share them here.
For my Slovenian readers
- Finance unfixed is a script that will unfix the header of finance.si. This means the header will scroll and you’ll get more space to read the article.
- RTVSlo OI is a script that will remove the header from the OI page on rtvslo.si again leaving you with more real estate for reading.
- Delo is a script that will help your eyes when reading delo.si news site since it’s small default line-height might make them hurt.
Developers
- JSLint highlighter will help you read the JSLint results. If you write JavaScript and don’t know what JSLint is you should go check!
How to work it
Well first you have to have Greasemonkey installed. After that installing a user script should be as simple as a click of a link. When a script activates you’ll see a little green box that will say ‘Greased’ in the top right corner. Clicking it will toggle the script – either it’s on and active (green) or off and the page looks as it would in the first place (red). You can also toggle the script with alt+g.
Posted in browsers, css, design, firefox, greasemonkey, interface, javascript, layout, software, technology, typography | 1 Comment »
Tuesday, June 24th, 2008
So I’ll be talking at Firefox 3 Release Event at Kiberpipa today. Feel free to come listen to the talks or just come to the party. If you can’t come you can watch the whole thing online (the link is likely to be available somewhere on the event page).
Posted in browsers, css, design, events, firefox, firefox3releaseparty, general, html, javascript, microformats, services, software, standards, technology, whatwg | No Comments »