Labs/Jetpack/Reboot/JEP/107: Difference between revisions

Line 29: Line 29:
<pre class="brush:js;">
<pre class="brush:js;">
var myMods = new pageMod({
var myMods = new pageMod({
   'matches': ['*.google.com', 'jetpack.mozillalabs.com'],
   'include': ['*.google.com', 'jetpack.mozillalabs.com'],
   'ignores': ['https://mail.google.com/*'],
   'exclude': ['https://mail.google.com/*'],
   'includes': {
   'files': {
       'script': ['http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools.js'],
       'javascript': ['http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools.js'],
       'styles': ['http://yui.yahooapis.com/3.0.0/build/cssbase/base-min.css']
       'stylesheet': ['http://yui.yahooapis.com/3.0.0/build/cssbase/base-min.css']
   },
   },
   'styles': {
   'styles': ['body { background: #ffffff; font-family: Trebuchet MS; }'],
      'body': {
   'scripts': [function(){
          'background': '#ffffff',
          'font-family': 'Trebuchet MS'
      }
  },
   'script': function(){
       $('container').addEvents({
       $('container').addEvents({
           'click:relay(ul li)': function(){ this.setStyles('background','#000') },
           'click:relay(ul li)': function(){ this.setStyles('background','#000') },
Line 47: Line 42:
           'mouseleave:relay(ul li)': function(){ this.tween('background','#fff') }
           'mouseleave:relay(ul li)': function(){ this.tween('background','#fff') }
       });
       });
   }
    }
   ]
});
});
</pre>
</pre>
1,273

edits