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
// http://news.ycombinator.com/item?id=1536364 | |
// http://twitter.com/simonw/statuses/19238183056 | |
javascript:var dashes = ""; var num = 20; while(--num) dashes += "-"; setInterval(function() { window.history.replaceState("", "", dashes.slice(0, num % 20) + "foo" + dashes.slice(num % 20)); num++;}, 500) |
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
<!DOCTYPE html> | |
<title>FB Friend Locationer</title> | |
<style> | |
* {font-family: sans-serif;} | |
table th, table td{border: 1px solid #ccc; padding: 0 1em;} | |
</style> | |
<table id="loc"> | |
<thead> | |
<tr> | |
<th>Name</th><th>Current location</th> |
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
// Answer for http://twitter.com/DmitryBaranovsk/status/24339436227 | |
// Question: #jsquiz var a = …; Define a, so those alerts will work like that: alert(a + ""); // alerts "A"; alert(a); // alerts "B"; | |
var a={toString:function(){return 'B'},valueOf:function(){return 'A'}}; |
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
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
/* Bigger type for Location and Search Bar */ | |
#nav-bar[iconsize=large] #urlbar, | |
#nav-bar[iconsize=large] #searchbar .searchbar-textbox{ | |
-moz-box-shadow: 0 0 transparent !important; | |
} | |
#nav-bar[iconsize=large] #urlbar .textbox-input-box, | |
#nav-bar[iconsize=large] #searchbar .textbox-input-box{ |
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
body, #search input, #edit-dialog input {font-size: 14px;} | |
.dialog-text {font-size: 15px;} |
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
<!DOCTYPE html> | |
<style> | |
body{ | |
width: 400px; | |
} | |
p, div{ | |
-webkit-transition-duration: 3s; | |
} | |
p:hover{ | |
background-color: yellow; |
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 MceEditor() {} | |
MceEditor.prototype = { | |
init: function (b, c) { | |
this.canvasId = b.id; | |
this.settings = c; | |
var a = c.plugins; | |
if (a && a.search('AtD') !== -1) this.settings.atd_rpc_id = $('post_form_id').value; | |
if (this.is_visible || !this.settings.delay_initialization) this.startEditor(); | |
}, | |
startEditor: function () { |
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 floatImages() | |
{ | |
// adapted from http://www.dithered.com/javascript/browser_detect/ | |
//**************************************************************// | |
// sniff user agent | |
var userAgent = navigator.userAgent.toLowerCase(); | |
// if Mozilla 1.4 then quit | |
if ((userAgent.indexOf('gecko') != -1) && (userAgent.indexOf('gecko/') + 14 == userAgent.length) && (parseFloat(userAgent.substring(userAgent.indexOf('rv:') + 3)) == '1.4')) return; |
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
// from http://www.onlineaspect.com/2010/01/15/backwards-compatible-postmessage/ | |
var XD = function(){ | |
var interval_id, | |
last_hash, | |
cache_bust = 1, | |
attached_callback, | |
window = this; | |
return { |
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
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
.urlbar-origin-label{ | |
display: none !important; | |
} | |
.urlbar-over-link-box{ | |
background-image: none !important; | |
color: -moz-fieldtext !important; | |
padding-left: 4px !important; |