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(top != self) { | |
top.onbeforeunload = function() {}; | |
top.location.replace(self.location.href); | |
} |
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 (top.location != self.location) { | |
top.location = self.location.href; | |
} |
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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="ss-message"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
<!-- index.html --> | |
<input id='abc'/> | |
<script> | |
var input = document.getElementById('abc'); | |
input.addEventListener('change', function(event) { | |
// .. only triggers on input loss of focus | |
}); | |
input.addEventListener('keyup', function(event) { | |
// .. triggers on any keyboard interaction |
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 strip = function(string, characters) { | |
if(!characters) { | |
if(typeof String.prototype.trim !== undefined) { | |
// Simply use the String.trim as a default | |
return String.prototype.trim.call(string); | |
} else { | |
// set characters to whitespaces | |
characters = "\s\uFEFF\xA0"; | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html;charset=utf-8"/> | |
<!-- Online here: http://ejohn.org/files/bugs/isObjectLiteral/ --> | |
<title>isObjectLiteral</title> | |
<style> | |
li { background: green; } li.FAIL { background: red; } | |
iframe { display: none; } | |
</style> |
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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
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(win, undefined) { | |
var applicationName = "My Broken App"; | |
libs = { one : 'jQuery', two : 'Underscore', three : 'Backbone' }; | |
BioSync.Common.loadLibs = function( libraries ) { | |
"use strict"; | |
var e = 0, r; | |
BioSync.Common.applicationName = applicationName; |
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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
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 fs = require('fs'); | |
var rmdirAsync = function(path, callback) { | |
fs.readdir(path, function(err, files) { | |
if(err) { | |
// Pass the error on to callback | |
callback(err, []); | |
return; | |
} | |
var wait = files.length, | |
count = 0, |
OlderNewer