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
function convertSVG4Everbody () { | |
var items = Array.from(document.querySelectorAll('use')) | |
items.map(function (use) { | |
var svgParent = use.parentNode | |
var url = use.href.baseVal | |
var id = /#\S*/.exec(url)[0].replace('#', '') | |
console.log('url: ', url) | |
var xml = httpGetXML(url) | |
var symbol = xml.getElementById(id) | |
// Grab all of the original's attributes, and pass them to the replacement |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
date: new Date() | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
/* eslint global-require: 0, consistent-return: 0 */ | |
const Filter = require('broccoli-persistent-filter'); | |
const CLIEngine = require('eslint').CLIEngine; | |
const md5Hex = require('md5-hex'); | |
const stringify = require('json-stable-stringify'); | |
const path = require('path'); | |
const chalk = require('chalk') | |
const escapeStringRegexp = require('escape-string-regexp'); | |
const BUILD_DIR_REGEXP = new RegExp('(' + escapeStringRegexp(path.sep) + ')?build(' + escapeStringRegexp(path.sep) + ')?$'); |
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
'use strict'; | |
/* eslint global-require: 0, consistent-return: 0 */ | |
var Filter = require('broccoli-persistent-filter'); | |
var CLIEngine = require('eslint').CLIEngine; | |
var md5Hex = require('md5-hex'); | |
var stringify = require('json-stable-stringify'); | |
var path = require('path'); | |
var escapeStringRegexp = require('escape-string-regexp'); |
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
/usr/local/lib/node_modules/slimerjs/lib/slimer/xulrunner/xulrunner | |
/usr/local/lib/node_modules/slimerjs/lib/slimer | |
--profile /tmp/slimerjs.V4xazCt0 | |
System JS : WARNING resource://gre/modules/Preferences.jsm:378 - mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create | |
2016-07-12T15:37:04.139Z [DEBUG] Gecko version: 33.1.1 | |
2016-07-12T15:37:04.139Z [DEBUG] script args: vendor/phantomjs-launcher.js http://localhost:7357/3064/tests/index.html?hidepassed | |
2016-07-12T15:37:04.139Z [DEBUG] Configuration: error-log-file=error.log | |
2016-07-12T15:37:04.140Z [DEBUG] Configuration: debug=true | |
2016-07-12T15:37:04.140Z [DEBUG] Configuration: Script=/localdisk/workspace/ember-frost-core/vendor/phantomjs-launcher.js | |
2016-07-12T15:37:04.140Z [DEBUG] Configuration: workingDirectory=/localdisk/workspace/ember-frost-core |
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
Array.from(document.querySelectorAll('use')).forEach(function (use) { | |
var | |
svg = use.parentNode, | |
url = use.getAttribute('xlink:href').split('#'), | |
url_root = url[0], | |
url_hash = url[1], | |
xhr = new XMLHttpRequest() | |
if (!xhr.s) { |
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
[].forEach.call(document.querySelectorAll('use'), function (use) { | |
function replaceTargetWith( target, html ){ | |
/// find our target | |
var i, tmp, elm, last = target; | |
/// create a temporary div or tr (to support tds) | |
tmp = document.createElement(html.indexOf('<td')!=-1?'tr':'div'); | |
/// fill that div with our html, this generates our children | |
tmp.innerHTML = html; | |
/// step through the temporary div's children and insertBefore our target | |
i = tmp.childNodes.length; |
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
/* Testem usage | |
'launchers': { | |
'slimerjs': { | |
'command': 'slimerjs slimerjs-launcher.js <url>', | |
'protocol': 'browser' | |
} | |
} | |
*/ | |
// Doesn't exit on Linux for some reason | |
'use strict' |
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
import Ember from 'ember' | |
export default Ember.Component.extend({ | |
tagName: 'button', | |
classNames: ['navigation', 'user-menu'], | |
myService: Ember.inject.service('my-service'), | |
contexts: Ember.computed.oneWay('myService.contexts'), | |
actions: { | |
openHelp(){ | |
console.log(this.get('contexts')) |
NewerOlder