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 () { | |
| var ua = /iPhone|iP[oa]d/.test(navigator.userAgent) | |
| ? 'iOS' | |
| : /Android/.test(navigator.userAgent) | |
| ? 'Android' | |
| : 'PC' | |
| ; | |
| document.addEventListener('DOMContentLoaded', function (event) { | |
| if(ua == 'PC'){ |
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 doc = document, | |
| root = doc.documentElement, | |
| positions = { | |
| 'top-left': function(node, target){ | |
| return { | |
| fit: node.height <= target.top && | |
| target.left >= 0, | |
| top: target.top, | |
| left: target.left, |
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
| // This case: | |
| <x-deck id="foo"> | |
| <x-card>Card 1</x-card> | |
| <x-card>Card 2</x-card> | |
| <x-card>Card 3</x-card> | |
| </x-deck> | |
| <menu> | |
| <x-command label="Tab 1" targets="#foo x-card:nth-child(1)"></x-command> |
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
| xtag.register('bb-header', { | |
| lifecycle: { | |
| created: function() { Helpers.created.call(this, 'header'); } | |
| }, | |
| accessors: { | |
| 'nav': { | |
| attribute: {} | |
| }, | |
| 'navId': { | |
| // the attribute: {} declaration here auto-links |
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
| xtag.mixins.responsive = { | |
| lifecycle: { | |
| created: function(){ | |
| // do stuff based on anything you add to | |
| // this tag via: xtag.tags['x-foo'] | |
| } | |
| }, | |
| methods: { | |
| foo: 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
| .resize-triggers { | |
| visibility: hidden; | |
| } | |
| .resize-triggers, .resize-triggers > div, .contract-trigger:before { | |
| content: " "; | |
| display: block; | |
| position: absolute; | |
| top: 0; | |
| left: 0; |
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
| { | |
| "activities": { | |
| "crypto-payment": { | |
| "href": "./pay.html", | |
| "disposition": "inline", | |
| "filters": { | |
| "type": ["bitcoin", "litecoin", "namecoin"] | |
| }, | |
| "returnValue": true | |
| } |
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 activity = new MozActivity({ | |
| name: "crypto-payment", | |
| data: { | |
| type: "bitcoin", | |
| price: "0.50", | |
| currency: "USD", | |
| wallet: "1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj", | |
| callback: "https://somegame.com/reciepts.html" | |
| } | |
| }); |
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(){ | |
| var attachEvent = document.attachEvent; | |
| if (!attachEvent) { | |
| var requestFrame = (function(){ | |
| var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || | |
| function(fn){ return window.setTimeout(fn, 20); }; | |
| return function(fn){ return raf(fn); }; | |
| })(); |
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 prefix = (function () { | |
| var styles = window.getComputedStyle(document.documentElement, ''), | |
| pre = (Array.prototype.slice | |
| .call(styles) | |
| .join('') | |
| .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o']) | |
| )[1]; | |
| return { | |
| dom: pre == 'ms' ? 'MS' : pre, | |
| lowercase: pre, |