FallenGods.com

Finished Changing Hosts

January 13, 2007

Everything looks like it works. Hopefully I didn’t break anything.


Changing Hosts

January 11, 2007

I’m changing where FallenGods.com is hosted. The site may be down a bit while I set everything up and the DNS changes propagate.


foo_explorer 1.31 released

September 19, 2006

foo_explorer has been updated to version 1.31 and now works with the latest version of Foobar2000. Get it here.


Boost Spirit CSS-like Validator

April 3, 2006

I’ve created a validator for CSS-like stylesheets written using the Boost Spirit library. It is intended to serve as a starting point and example for writing a parser for CSS-like stylesheets. It is based on the W3 CSS 2.1 grammar though it includes several differences as noted in the source code and is not complete.

Download it here.

Posted in C/C++ No Comments »

More getElementsBySelector

August 25, 2005

I’ve made an another update to my getElementsBySelector function. The following changes/fixes have been made:

  • Added grouping support. (ex. .blue, .white)
  • Added attribute “|=” (starts-with, hyphen-separated) support. (ex. div[lang|=”en”])
  • Also added additional test cases and improved commenting a bit.

Download it here or take a look at the test page.


getElementsBySelector Update

August 14, 2005

I’ve made an update to my getElementsBySelector function. The following changes/fixes have been made:

  • Added support for sibling selectors (ex. div + p).
  • Fix issue with attribute selector values containing “]” (close bracket) failing. (ex. a[href=”javascript:alert(’[ some text ]’);”])
  • Improved error handling and testing.
  • Removed unused parts of supporting utils.js file.

Download it here.


getElementsBySelector

August 9, 2005

I’ve released my getElementsBySelector function/library under Apache 2 license today. It is similar in functionality to Simon Willson’s function of the same name. I wrote it because I wanted a getElementsBySelector function that was easy to extend and that had a definite license.

It currently supports the following CSS selectors:

  • ID selectors (#header)
  • Class selectors (.divider)
  • Type selectors (TABLE)
  • Descendant selectors (DIV A)
  • Child selectors (DIV > A)
  • Universal selectors (*)
  • Attribute selectors (a[href^=”http://”])
  • :root pseudo-element

The getElementsBySelector function returns an array of elements that match a given CSS selector. It is built upon two functions: getCompiledSelector and getElementsByCompiledSelector. The getCompiledSelector function does all the parsing of the CSS selector and returns an array describing the selector. The getElementsByCompiledSelector function accepts this array and returns a matching element list. Seperating the parsing from the processing makes extending the functionality easy.

Download the code or view the test page.


Javascript Function Overloading

August 7, 2005

I have released a library for doing function overloading in Javascript. It allows functions to be overloaded by type and number of arguments, similar to Java. This is more of a toy than it is useful, but here it is under Apache license. There is also an example page.


No CSS Hacks Update

August 7, 2005

I made a major update of the No CSS Hacks page. It includes a complete rewrite of the browser sniffer, some improvements to the description of the methods used, and a new alpha backaground example. Here is the code.

Posted in CSS No Comments »

Javascript Behavior Update

July 24, 2005

I’ve updated my behavior.js to support having multiple selectors for a single behavior.

var myrules =
{
’#somewhat, #somewhere, #somehow’ :
{
onclick : function()
{
alert(this.innerHTML);
}
}
};
Behaviour.register(myrules);

The changes are backwards compatible. Download it or read more about it in the original post.


Copyright © 2005-2007 H. Adam Mill II