Posted by Shane O'Sullivan on April 18, 2009
A feature of some websites that really annoys me are so called “Welcome Screens”, otherwise known as full page advertisements that you have to click through to see the real page. (e.g. Forbes.com). This apparently annoys plenty of other people too, so I decided to write a simple GreaseMonkey script that will automatically get past the majority of these pages.
It is called “SkipWelcomeScreen”, funnily enough, and you can install it on Firefox 3 from it’s homepage at http://chofter.com/apps/?n=skipwelcomescreen
If you’re not interested in technical details, you can stop reading now.
Using Sizzle with Greasemonkey
To very quickly search the page for anchor tags, I used John Resigs very cool standalone query selector engine, Sizzle. However, it had to be modified very slightly to work in GreaseMonkey.
At the end of the Sizzle.js file, there is the line:
window.Sizzle = Sizzle;
which had to be changed to
unsafeWindow.Sizzle = Sizzle;
due to GreaseMonkey’s use of a sandbox.
Also, when calling Sizzle, it wasn’t possible to call it directly, like:
instead it has to be called using the unsafeWindow parameter:
Otherwise, it works perfectly, and is blisteringly fast.
Posted in greasemonkey, Technical | Tagged: sizzle | 3 Comments »
Posted by Shane O'Sullivan on April 16, 2009
A quick note to say that yesterday Pete Higgins (Dojo Ajax toolkit lead) asked me to be a committer on the project, and I very happily accepted.
Not much will change really, I continue to own the components I’ve already committed to Dojo, such as the image widgets, calendar, numerous data stores etc. However, it enables me to participate in more of the conversations that drive the focus of the project, and should make the whole development process a bit smoother without me having to nag people continuously to check in my patches.
Congrats also to the other two new committers, Nicola Rizzo and the other whose name escapes me right now🙂
Posted by Shane O'Sullivan on April 4, 2009
One of the features of the Dojo Ajax Toolkit‘s TabContainer that always bugged me was that, once there were too many tabs to fit horizontally in the widget, they’d wrap around, like you can see in the picture below.
It would have been far nicer for them to not wrap, and instead smoothly scroll, using either a menu to select them (like Firefox), or providing buttons to make the list of tabs slide right and left.
So, after much work, I’m just about finished upgrading the TabContainer with two new TabControllers:
- dijit.layout.TabController – the default widget, which places a single button to the right of the tabs, and shows a menu when you click it. This is very similar to how many browsers deal with tabs.
- dijit.layout.SlidingTabController – an optional widget, which places a button to left and right of the tabs, and slides the list left and right.
The video below shows the two widgets in action.
The upgrade is almost complete, and should hopefully make it into the upcoming 1.3.1 release of Dojo.
Update: the changes could not be put into 1.3.1, as that was only for bug fixes. It will be in 1.4 instead</b
Posted in Ajax, dijit, Dojo, tab, Technical | 46 Comments »