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
<html> | |
<head> | |
<title>IIFE App</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
</head> | |
<body> | |
<input type="button" id="idButton" value="Click Me!"> | |
<div id="idOutput"></div> | |
<script type="text/javascript" src="LoadIIFE.js"></script> | |
</body> |
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
<html> | |
<head> | |
<title>IIFE App</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
</head> | |
<body> | |
<input type="button" id="idButton" value="Click Me!"> | |
<div id="idOutput"></div> | |
<script type="text/javascript" src="LoadIIFE.js"></script> | |
</body> |
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 require = function(require){ | |
var NM = function(){ | |
var src = process.binding('natives'); | |
src = Object.keys(src).reduce(function(ret, key){ | |
ret[key] = src[key]; | |
return ret; | |
}, {}); | |
var NM = function NativeModule(id) { | |
this.filename = id + '.js'; |
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 locations = JSON.parse(body); | |
locations = _.first(locations, 10); | |
_.map(locations, function(loc) { | |
geocoder.geocode(loc.loc_address + ',' + loc.loc_city + ',' + loc.loc_state + ',' + loc.loc_zip, function(err, data) { | |
if (err) | |
errorHandler(err); | |
// console.log(data.results[0].geometry.location); | |
loc.location = data.results[0].geometry.location; | |
// done(); | |
return loc; |
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
// current scope is global.. | |
function Test(n) { | |
this.test = n; | |
var bob = function (n) { | |
this.test = n; | |
}; | |
this.fn = function (n) { |
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 width = null; | |
var height = null; | |
window.onload = function () { | |
var windowSize = getSize(); | |
width = windowSize['width']; | |
height = windowSize['height']; | |
window.onscroll = function(){ alert("Hello"); } | |
}; |
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
// ==UserScript== | |
// @name Tatoeba Flexible Linker | |
// @namespace http://userscripts.org/users/515236 | |
// @description Inserts a box below a Tatoeba sentence that the user can fill with the number or URL of a sentence, as well as buttons that allow the user to visit the new sentence or link it to the first one. Extends Zifre's "Tatoeba Linker" script. | |
// @author AlanF_US | |
// @include http://tatoeba.org/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js | |
// @version 1.0 | |
// ==/UserScript== | |
// NOTE: All functions used in the script must be added to the line below |
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 isMobile = { | |
tests:[ | |
function() { | |
return navigator.userAgent.match(/Android/i); | |
}, | |
function() { | |
return navigator.userAgent.match(/BlackBerry/i); | |
}, | |
function() { | |
return navigator.userAgent.match(/iPhone|iPad|iPod/i); |
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 a = 'Going down to brown town'; | |
String.prototype.lerp = function(n){ | |
var ai = Math.floor(n); | |
var t = n - ai; | |
var a = this.charCodeAt(ai); | |
var b = this.charCodeAt(ai + 1); | |
return String.fromCharCode(a + (b - a) * t); | |
} |
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
player.src({ | |
"src": "movie.mpd", | |
"type":"application/dash+xml", | |
"keySystemOptions": [ | |
{ | |
"name": "com.widevine.alpha", | |
"options": { | |
"licenseUrl": "https://example.com/license" | |
} | |
} |
OlderNewer