Skip to content

Instantly share code, notes, and snippets.

javascript:(function(){var b="inurl:reddit.com",a="http://www.searchreddit.com/",c=/\/r\/[\w\.]+\//.exec(document.location.pathname);b=(c)?b+c[0]:"";window.location=a+"?s="+b})();
var el = null;
describe('Element.getRotation', {
before_each: function() { el = new Element('div'); },
'should return correct values': function() {
el.setStyle('-webkit-transform', 'rotate(0deg)');
value_of(el.getRotation()).should_be(0);
@cowlby
cowlby / Cleanclick.js
Created November 19, 2009 05:55
Collection of code snippets
(function() {
var keys = new Hash({ 16: false, 18: false }); // Shift + Option/Alt keys
if (Browser.Platform.win) { keys[17] = false; } // Control key
if (Browser.Platform.mac) { keys[91] = false; } // Command Key
window.addEvent('domready', function() {
$(document.body).addEvents({
'keydown': function(e) {
if (keys.has(e.code)) { keys[e.code] = true; }
},
/**
* Script:
* Screensaver.js - Screensaver functionality written in MooTools.
*
* License:
* MIT-style license.
*
* Author:
* Jose Prado
*
// Nano Loader
(function() {
nano = {
v: "1.0",
load: function(u, cb) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = u;
s.onload = cb;
s.onreadystatechange = function() {