This file contains 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 MyApp = { | |
addPlaceholders: function(props) { | |
// default configuration | |
var config = { | |
'class': 'placeholder' // apply CSS classes to an input displaying a placeholder | |
}; | |
// if any properties were supplied, apply them to the config object |
This file contains 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
if(typeof _scriptsRecorded == "undefined"){ | |
var scriptBodies = {} | |
var scripts = document.querySelectorAll("script"); | |
for(var i = 0, len = scripts.length;i<len;i++){ | |
var script = scripts[i]; | |
(function(src){ | |
$.get(src, function(data){ | |
scriptBodies[src] = data; | |
}) | |
})(script.src) |
This file contains 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
return; |
This file contains 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
class Mixin(value: Int){ | |
def myCrazyNameOperator(f: Int => Int) : Int = f(value) | |
} | |
implicit def toWTF(value: Int) = new Mixin(value); | |
def double(int: Int) = {2 * int} | |
def triple(int:Int) = {3 * int} |
This file contains 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 __temp_trigger = $.fn.trigger; | |
$.fn.trigger = function(){console.log(arguments, " triggered on element ", this); return __temp_trigger.apply(this,arguments);} |
This file contains 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 options_to_add = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,"20+"]; | |
var event = document.createEvent("MouseEvents"); | |
event.initMouseEvent("click", true, true, window, | |
0, 0, 0, 0, 0, false, false, false, false, 0, null); | |
for(var i=0,len=options_to_add.length;i<len;i++){ | |
$$(".option_add")[0].dispatchEvent(event) | |
var empty_element = $$(".option_editor_row").filter(function(el){return el.firstChild.value == ""})[0]; |
This file contains 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
div{ | |
background:url(http://img850.imageshack.us/img850/2400/rowofstars.gif) repeat; | |
} |
This file contains 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
.original-background{ | |
background:url(http://img850.imageshack.us/img850/2400/rowofstars.gif) repeat; | |
} | |
.diagonal-background:before{ | |
content:""; | |
background:url(http://img850.imageshack.us/img850/2400/rowofstars.gif) repeat; | |
width:200%; | |
height:200%; | |
position:absolute; |
This file contains 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 getComputedStyleCssText(element){ | |
var cssObject = window.getComputedStyle(element), | |
prop, | |
cssText, | |
cssAccumulator = []; | |
if(cssObject.cssText != ""){ | |
return cssObject.cssText; | |
} |
This file contains 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(window, undefined){ | |
window.getComputedStylePropertyValue = function(el,cssProperty){ | |
if(!window.getComputedStyle){ | |
if(document.defaultView && document.defaultView.getComputedStyle){ | |
return document.defaultView.getComputedStyle.getPropertyValue(cssProperty); | |
} | |
else{ | |
var camelCasedCssProperty = getCamelCasedCssProperty(cssProperty); | |
if(el.currentStyle){ | |
return el.currentStyle(camelCasedCssProperty); |
OlderNewer