$(window).bind('mousemove mousedown mouseup scroll keydown keyup focus', debounce(10E3, function() {
// idle
}));
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isNativeObject = (function( window ){ | |
var a = "Boolean Number String Function Array Date RegExp Object".split(" "), | |
natives = {}, | |
hostTypes = { | |
"object": 1, | |
"function": 1 | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Private() { | |
var val, NADA = {}; | |
return { | |
open: function( safe, ret ) { | |
val = NADA; | |
safe(); | |
if ( val !== NADA ) { | |
ret = val; | |
val = NADA; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cross-browser but not absolutely strong. | |
function isArguments( obj ) { | |
return typeof obj === "object" && ( "callee" in obj ) && typeof obj.length === "number"; | |
} | |
// Ideally strong, but broken on Opera... | |
var isArguments = (function( undefined ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery._Deferred = function() { | |
var // callbacks list | |
callbacks = [], | |
// stored [ context , args ] | |
fired, | |
// to avoid firing when already doing so (or it is halted) | |
firing, | |
// flag to know if the deferred has been cancelled | |
cancelled, | |
// the deferred itself |
###Reddddit
Auto appends things scrolling down the page eliminating the need to click the next link.
To toggle Auto Appending, click on the respective link near your username (above the login form). The asteriks near that toggler opens this page so you can easily check for new versions (specially if reddit changes).
Script will also check daily if there is a new version of it worth of user attention.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.checkVersion = function( min, max ) { | |
var current = jQuery.fn.jquery + 'zz'; | |
max = ( max || min ) + 'zz'; | |
min += '0.0.0zz'.substr( min.length ); | |
return min <= current && current <= max; | |
}; | |
// This one will also handle 'pre' suffix as minor of 'alpha' and 'beta'. | |
jQuery.checkVersion = (function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
var expando = "jQuery" + (new Date).getTime(), | |
hasOwnProperty = Object.prototype.hasOwnProperty, | |
_data = $.data, | |
_removeData = $.removeData; | |
$.data = function( obj, name, data ) { | |
if ( obj.nodeType ) { | |
return _data( obj, name, data ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.each(["live", "die"], function( i, name ) { | |
var method = $.fn[ name ]; | |
$.fn[ name ] = function( types, data, fn, origSelector ) { | |
if ( typeof types === "object" && !types.preventDefault ) { | |
for ( var key in types ) { | |
method.call( this, key, data, types[key], origSelector ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
var hasOwnProperty = Object.prototype.hasOwnProperty | |
$.eachProperty = function( obj, func, context ) { | |
for ( var i in obj ) { | |
// Own properties are enumerated firstly, so no need to continue on first not own. | |
if ( !hasOwnProperty.call(obj, i) || func.call( context, i, obj[i] ) === false ) { | |
break; | |
} |