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 outerHTML plugin with ownerDocument fix | |
See: http://www.briangrinstead.com/blog/jquery-outerhtml-snippet | |
Based off of: http://brandonaaron.net/blog/2007/06/17/jquery-snippets-outerhtml/ | |
*/ | |
$.fn.outerHTML = function() { | |
var doc = this[0] ? this[0].ownerDocument : document; | |
return $('<div>', doc).append(this.eq(0).clone()).html(); | |
}; |
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://lanitdev.wordpress.com/2009/06/08/extending-jquery-to-select-asp-controls/ | |
Enables $(":asp(id)") selector in jQuery for dealing with ASP Server IDs in JavaScript | |
Example: $(":asp(txtPhoneNumber)") | |
*/ | |
jQuery.expr[':'].asp = function(elem, i, match) { | |
return (elem.id && elem.id.match(match[3] + "$")); | |
}; |
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
# npm install -g replace | |
# back up the patch | |
cp .hg/patches/PATCHNAME ~/Desktop/PATCHNAME.patch | |
replace 'browser/devtools/' 'devtools/client/' .hg/patches/PATCHNAME | |
replace 'toolkit/devtools/server/' 'devtools/server/' .hg/patches/PATCHNAME | |
replace 'toolkit/devtools/' 'devtools/shared/' .hg/patches/PATCHNAME | |
replace 'browser/themes/shared/devtools/' 'devtools/client/themes/' .hg/patches/PATCHNAME |
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
/* | |
An implementation of: http://javascriptweblog.wordpress.com/2010/11/29/json-and-jsonp/ | |
that handles multiple connections at once (don't want to replace the global callback if second | |
request is sent after the first, but returns before. | |
*/ | |
(function(global) { | |
var callbackCounter = 0; | |
var evalJSONP = function(callback) { |
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> | |
<style> | |
html,body {height:100%;margin:0;padding:0;} | |
#app { | |
height:100%; | |
display: -webkit-box; | |
-webkit-box-orient: vertical; | |
-webkit-box-align:stretch; |
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
https://docs.google.com/presentation/d/1Eyns40c5J6n2ep7NUMid7ipSuR-jATF1pdWQNuuwp-4/edit |
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
// For instance: http://paulgraham.com/growth.html | |
// Copy the following into devtools console, then you should see note contents when hovering the link | |
[].forEach.call(document.querySelectorAll("a[href*='#f']"), function(l) { | |
var to = document.querySelector('[name=' + l.href.split('#')[1] + ']'); | |
var text = ''; | |
while ((to = to.nextSibling) && to.tagName !== "A") { | |
text+= to.textContent.replace(/\n/g, ' ') + '\n'; | |
} | |
text = text.replace(/^\s*\]\s*/, '').replace(/\s*\[\s*/, '').replace(/\n{2,}/g, '\n\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
// Create a sizzle expression using jQuery 1.8 style and older style. | |
// This one returns elements which have an ID that ends with a string passed in. | |
// <div id="prefix_test"></div> | |
// $(":asp(test)") | |
if ($.expr.createPseudo) { | |
jQuery.expr[':'].asp = $.expr.createPseudo(function( id ) { | |
return function(elem) { | |
return elem.id && elem.id.match(id + "$") |
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
data:text/html,<meta charset='UTF-8'> | |
<iframe src="data:text/html,<meta charset='UTF-8'><button id='button1'>button1</button>" id="frame-1"></iframe> | |
<iframe src="data:text/html,<meta charset='UTF-8'><button id='button2'>button2</button>" id="frame-2"></iframe> | |
<script> | |
var frame1 = document.querySelectorAll("iframe")[0]; | |
var frame2 = document.querySelectorAll("iframe")[1]; | |
var frame1Button = null; | |
var frame2Button = null; |
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
hg bookmark -r 98920f7f8a71 bug-xxx-fix | |
hg update bug-xxx-fix | |
hg pull mozilla-inbound | |
hg rebase -b . -d mozilla-inbound | |
# make sure you're pushing the correct patch :) | |
hg out -r . mozilla-inbound | |
hg push -r . mozilla-inbound |