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
jQuery.getScript('http://code.jquery.com/jquery-latest.min.js', function(){ | |
$('iframe#appFrame').contents().find('button[name|="No, thanks"]').click(); | |
}); |
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
jQuery.extend(jQuery.browser, | |
{ | |
IOS : navigator.userAgent.toLowerCase().match(/iP(hone|ad|od)/i) | |
} | |
); | |
// ... | |
if ($.browser.IOS) { | |
// Do something IOS-y |
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($){ | |
var ns = {}; | |
ns.snoop = function(defaultStreamID){ | |
if (window.location.pathname == "/"){ | |
window.location = "https://plus.google.com/stream/cicles/" + defaultStreamID; | |
} else { | |
// | |
} | |
}; | |
$(window).ready(function(){ |
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
String.prototype.ellipsis = function(numOfWords, _text, wordCount ) { | |
_text = this; | |
wordCount = _text.trim().replace(/\s+/g, " ").split(' ').length; | |
_text = _text.trim().split(' '); | |
_text.splice(numOfWords, wordCount, "..."); | |
return _text.join(' '); | |
} |
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($, undefined){ | |
var ns = {}, db = openDatabase('learning_js', | |
'1.0', | |
'Database to create on tinkerbin', | |
2 * 1024 * 1024); | |
ns.createDB = function(){ | |
db.transaction(function(tx) { | |
tx.executeSql("CREATE TABLE IF NOT EXISTS 'primary' (id unique, text)"); | |
}); | |
}; |
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
<?php | |
// $environment = 'dev'; | |
if (isset($_GET['jsconsole']) $termID = $_GET['jsconsole']; | |
?> | |
<!DOCTYPE html> | |
<head> | |
<title>Remote Debugging on Facebook</title> | |
<?php if ($environment === 'dev' && isset($termID)) { ?> | |
<script src="http://jsconsole.com/remote.js?<?php echo $termID; ?>"></script> | |
<?php } ?> |
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
[user] | |
name = John Doe | |
email = user@email.place | |
[color] | |
ui = true | |
status = auto | |
branch = auto | |
[alias] | |
st = status |
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 newYear = new Date(new Date().getFullYear() + 1, 1 - 1, 1); | |
$(document).ready(function(){ | |
$('#defaultCountdown').countdown({until: newYear}); | |
$('#removeCountdown').toggle(function() { | |
$(this).text('Re-attach'); | |
$('#defaultCountdown').countdown('destroy'); | |
}, function() { | |
$(this).text('Remove'); |
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 lt IE 9]> | |
<script> | |
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { | |
"use strict"; | |
if (this === void 0 || this === null) { | |
throw new TypeError(); | |
} | |
var t = Object(this); | |
var len = t.length >>> 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
jQuery.extend({ | |
getScript: function(url, callback) { | |
var head = document.getElementsByTagName("head")[0], | |
script = document.createElement("script"); | |
script.src = url; | |
// Handle Script loading | |
{ | |
var f = false; |