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
Element.implement({ | |
unsetStyle: function(property){ | |
if (property == 'float') property = (Browser.Engine.trident) ? 'styleFloat' : 'cssFloat'; | |
property = property.camelCase(); | |
delete this.style[property]; | |
return this; | |
}, | |
unsetStyles: function(properties){ |
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
Request.Twitter = new Class({ | |
Extends: Request.JSONP, | |
options: { | |
linkify: true, | |
url: 'http://twitter.com/statuses/user_timeline/{term}.json', | |
data: { | |
count: 5 | |
} |
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 chromeFrameIsAvailable = (function(){ | |
var ua = navigator.userAgent.toLowerCase(); | |
if (ua.indexOf('chromeframe') >= 0 || ua.indexOf('x-clock') >= 0) return true; | |
if (typeof window.ActiveXObject != 'undefined') try { | |
if (new ActiveXObject('ChromeTab.ChromeFrame')) return true; | |
} catch(e) {}; | |
return false; | |
})(); |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("facebook.com") { | |
.UIStory .UIStory_Hide{ | |
display: none !important; | |
} | |
.UIStory[data-ft*=app_id] .UIStory_Hide{ | |
display: block !important; | |
} | |
.UIStory[data-ft*=app_id] .UIActionMenu_Menu .UISelectList .UISelectList_Item:first-child{ |
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
.post pre{ | |
overflow: auto; /* IE might not like this, but who cares? */ | |
padding: 1em; | |
color: inherit; | |
background-color: #FAFAFA; | |
} |
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
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Color { | |
public static function hex_to_rgb($hex){ | |
$pattern = '/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/'; | |
preg_match($pattern, $hex, $matches); | |
$matches = array_slice($matches, 1); | |
if (!function_exists('map')){ | |
function map($value){ |
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
// Port of Kohana3's Text::limit_chars helper | |
String.implement({ | |
limitChars: function(limit, options){ | |
var opts = { | |
endChar: null, | |
preserveWords: false | |
}; | |
$extend(opts, options); |
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
// http://pushingbuttons.net/?ArrayinsensitiveSort_in_MooTools | |
Array.implement({ | |
insensitiveSort: function(){ | |
return this.sort(function(a, b){ | |
return a.toString().toLowerCase()>b.toString().toLowerCase(); | |
}); | |
} | |
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 moveContent = function(element){ | |
var nodes = $A(element.childNodes); | |
var parent = element.parentNode; | |
for (var i=0, l=nodes.length; i<l; i++){ | |
parent.insertBefore(nodes[i], element); | |
} | |
}; |
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
String.implement({ | |
getLength: function(){ | |
return this.length; | |
} | |
}); | |
Array.implement({ | |
getLength: function(){ | |
return this.length; | |
} |