Skip to content

Instantly share code, notes, and snippets.

View darkwing's full-sized avatar

David Walsh darkwing

View GitHub Profile
function PromoteMDNLinks(userSettings) {
// For the time being, we are not gonna do anything if querySelectorAll is not available in the browser
if (!'querySelectorAll' in document) {
return;
}
var defaults = {
searchElements: ['p', 'div', 'span'],
trackingString: '?utm_source=js%20snippet&utm_medium=content%20link&utm_campaign=promote%20mdn',
.item
transition-delay 4s
.expanded .item
transition-delay 0
/*
When I add the "expanded" class to the parent, the item transition should happen immediately
When I remove the "expanded" class from the parent, the item should wait 4s and then transition
======================================================================
FAIL: test_get_summary (vagrant.apps.wiki.tests.test_models.DeferredRenderingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/vagrant/vendor/packages/mock/mock.py", line 196, in patched
return func(*args, **keywargs)
File "/vagrant/apps/wiki/tests/test_models.py", line 1111, in test_get_summary
ok_(mock_kumascript_get.called)
File "/vagrant/vendor/packages/nose/nose/tools.py", line 25, in ok_
assert expr, msg
[default] VM already created. Booting if it's not already running...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Exporting NFS shared folders...
[vagrant] Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
<p>
{{FXOSUXRepoDownloads(&quot;https://github.com/mozilla-b2g/gaia/raw/master/shared/style_unstable/drawer.css&quot;, &quot;https://github.com/mozilla-b2g/gaia/tree/master/shared/style_unstable/drawer&quot;)}}</p>
<p>
{{Draft()}}</p>
<p>
Here you can find examples of how to create a drawer on Firefox OS, as well as downloads for the CSS and image resources used by the built-in apps on Firefox OS. You can copy these resources into your app and make use of them to build apps that match these apps&#39; appearances.</p>
<h2 id="Implementing_a_drawer">
Implementing a drawer</h2>
<p>
To implement a tab bar using the style shown here, place the CSS and media files into your app and then import the CSS using the {{cssxref(&quot;@import&quot;)}} at-rule:</p>
dwalsh-08215:kuma dwalsh$ vagrant provision
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with /tmp/vagrant-puppet/manifests/dev-vagrant.pp...
stdin: is not a tty
notice: /Stage[hacks]/Dev_hacks/Exec[locale-gen]/returns: executed successfully
notice: /Stage[hacks]/Dev_hacks/Exec[update-locale]/returns: executed successfully
notice: /Stage[pre]/Update_repos/Exec[apt-update]/returns: executed successfully
notice: /Stage[langs]/Python_modules/Exec[pip-install-dev]/returns: executed successfully
notice: /Stage[langs]/Python_modules/Exec[pip-install-compiled]/returns: executed successfully
notice: /Stage[main]/Kuma_config/Exec[kuma_sql_migrate]/returns: executed successfully
function boolSet(attr) {
return function(state) {
!!state ? this.setAttribute(attr, null) : this.removeAttribute(attr);
}
}
function boolGet(attr) {
return function() {
return typeof this.getAttribute(attr) != 'undefined';
}
var xhr = new XMLHttpRequest({
mozSystem: true
});
// To enable xhr.abort if user cancels
outReq.xhr = xhr;
outReq.oncancel = function() {
this.xhr.abort();
}
// Line 525
dialog.setValueOf('info', 'txtUrl', "{{ ImageAttachment('" + value + "'}}");
@darkwing
darkwing / gist:4575399
Created January 19, 2013 21:43
Test gist!
(function($) {
var $el = $('someNode');
})(jQuery;