I came across a Firefox Add-On today by Matthias Tylkowski, that lets user to modify the browser view of his/her preferred web pages. For example, user can modify the appearance of cnn.com to suit his/her needs.
The add-on or the web rules is a JSON-based rule language, where each rule is a JSON object. In addition, Javascript is used for method calls. The web rules use Drools-like condition language:
{
"id":"rule101", "appliesTo": [
"http://www.cnn.com"],
"condition": "$X:Element( class == 'note', $Y:firstChild ) &&
($Y.nodeName == 'ul')",
"actions":[ "changeBackground($Y, 'blue')" ]
}
For all elements of class note having as first child an ul, change the first child background color to blue.
I think its a quite cool add-on.
Resources:
JSON RuleS