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
| /*----------------------- OMG TWITTER -------------------------------------*/ | |
| twttr.mediaType('twttr.media.types.Twitter') | |
| .matcher(/\b(?:(?:https?\:\/\/)?(?:www\.)?)?twitter\.com\/(?:(?:#|#!)\/)?(?:\w{1,20})\/status\/(\S+)/gi) | |
| .icon("generic") | |
| .favicon("http://twitter.com/phoenix/favicon.ico") | |
| .url('http://twitter.com') |
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
| twttr.klass('twttr.util.Location', function(url) { | |
| if (url.match(/^\/\//)) { | |
| url = 'http:' + url; | |
| } else if (!url.match(/^[a-z]+:\/\//)) { | |
| url = 'http://' + url; | |
| } | |
| var m = url.match(/^([a-z]+:)\/\/([\w\-\.]+)(\:\d+)?(.+)?/); | |
| this.href = url; | |
| this.protocol = m[1]; | |
| this.hostname = m[2]; |
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() { | |
| window.twttr = window.twttr || {}; | |
| aug(twttr, { | |
| klass: function(ns, init) { | |
| var c = function() { | |
| init.apply(this, arguments); | |
| }; |
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
| new TWTR.Widget({ | |
| version: 2, | |
| type: 'profile', | |
| rpp: 20, | |
| interval: 6000, | |
| width: 'auto', | |
| height: 300, | |
| theme: { | |
| shell: { |
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
| /** | |
| * requires twttr.klass | |
| */ | |
| twttr.klass('twttr.Throttler', function(interval, callback) { | |
| this.interval = interval; | |
| this.callback = callback; | |
| this._items = []; | |
| }) |
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 table = ['i', 'v', 'x', 'l', 'c', 'd', 'm']; | |
| var map = { | |
| 4: "01", | |
| 5: "1", | |
| 6: "10", | |
| 7: "100", | |
| 8: "1000", | |
| 9: "02" | |
| }; |
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
| document.domain = 'dustindiaz.com'; | |
| function fn () { | |
| document.write = ""; | |
| window.top.location = window.self.location; | |
| setTimeout(function() { | |
| document.body.innerHTML = ''; | |
| }, 0); | |
| window.self.onload = function(evt) { | |
| document.body.innerHTML = ''; | |
| }; |
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 r(f){/in/(document.readyState)?setTimeout(r,9,f):f()} |
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
| /** | |
| * usage | |
| * DIR='public/js' node directory-size.js | |
| * => "size of public/js is: 12,432 | |
| */ | |
| var fs = require('fs'), | |
| _ = require('./underscore'); // requires underscore for _.flatten() | |
| function format(n) { |
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.prototype.supplant = function (o) { | |
| return this.replace(/{([^{}]*)}/g, function (a, b) { | |
| var r = o[b]; | |
| return typeof r === 'string' || typeof r === 'number' ? r : a; | |
| }); | |
| }; |
OlderNewer