commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
e04ca3b0e41a521422876cfdc0d81f2afb7791ad
app/components/Icon/index.js
app/components/Icon/index.js
// @flow import styles from './Icon.css'; type Props = { /** Name of the icon can be found on the webpage*/ name: string, scaleOnHover?: boolean, className?: string, size?: number, style?: Object, }; /** * Render an Icon like this with the name of your icon: * * <Icon name="add" /> * * Names can be ...
// @flow import styles from './Icon.css'; type Props = { /** Name of the icon can be found on the webpage*/ name: string, scaleOnHover?: boolean, className?: string, size?: number, style?: Object, }; /** * Render an Icon like this with the name of your icon: * * <Icon name="add" /> * * Names can be ...
Move className onto a div wrapping ion-icon
Move className onto a div wrapping ion-icon This is to avoid overwriting ion-icons own classnames that it sets on itself. Overwriting these causes the icon to become invisible.
JavaScript
mit
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
--- +++ @@ -29,16 +29,16 @@ ...props }: Props) => { return ( - <ion-icon - name={name} - class={className} + <div + className={className} style={{ fontSize: `${size.toString()}px`, - lineHeight: 2, ...style, }} {...(props: Object)} - ></ion-...
ade2364d04762c5a1e15db674117905f179a2d52
jest/setupEnv.js
jest/setupEnv.js
require('babel-polyfill'); // jsdom doesn't have support for localStorage at the moment global.localStorage = require('localStorage'); // Tests should just mock responses for the json API // so let's just default to a noop var RequestUtil = require('mesosphere-shared-reactjs').RequestUtil; RequestUtil.json = function...
require('babel-polyfill'); // jsdom doesn't have support for localStorage at the moment global.localStorage = require('localStorage'); // Tests should just mock responses for the json API // so let's just default to a noop var RequestUtil = require('mesosphere-shared-reactjs').RequestUtil; RequestUtil.json = function...
Implement a better requestAnimationFrame polyfill
Implement a better requestAnimationFrame polyfill
JavaScript
apache-2.0
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
--- +++ @@ -7,3 +7,37 @@ // so let's just default to a noop var RequestUtil = require('mesosphere-shared-reactjs').RequestUtil; RequestUtil.json = function () {}; + +// jsdom doesn't have support for requestAnimationFrame so we polyfill it. +// https://gist.github.com/paulirish/1579671 +(function() { + var lastTi...
09a1b1c34a39fcc8ba432614e976aed2c7798123
app/components/bd-arrival.js
app/components/bd-arrival.js
import Ember from 'ember'; import moment from 'moment'; import stringToHue from 'bus-detective/utils/string-to-hue'; var inject = Ember.inject; export default Ember.Component.extend({ tagName: 'li', clock: inject.service(), attributeBindings: ['style'], classNames: ['arrival'], classNameBindings: ['isPast:ar...
import Ember from 'ember'; import moment from 'moment'; import stringToHue from 'bus-detective/utils/string-to-hue'; var inject = Ember.inject; export default Ember.Component.extend({ tagName: 'li', clock: inject.service(), attributeBindings: ['style'], classNames: ['timeline__event'], classNameBindings: ['i...
Change the class name on the arrival component container
Change the class name on the arrival component container
JavaScript
mit
bus-detective/web-client,bus-detective/web-client
--- +++ @@ -7,7 +7,7 @@ tagName: 'li', clock: inject.service(), attributeBindings: ['style'], - classNames: ['arrival'], + classNames: ['timeline__event'], classNameBindings: ['isPast:arrival--past'], timeFromNow: Ember.computed('clock.time', function() {
17591c67c2d59f6f19395068d40a144ce041aa96
ember-cli-build.js
ember-cli-build.js
/*jshint node:true*/ /* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { var app = new EmberApp(defaults, { // Add options here }); // Use `app.import` to add additional libraries to the generated // output files. // // If you ...
/*jshint node:true*/ /* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); module.exports = function(defaults) { var app = new EmberApp(defaults, { // Add options here }); // Use `app.import` to add additional libraries to the generated // output files. // // If you ...
Add lodash to production build.
Add lodash to production build.
JavaScript
mit
jga/capmetrics-web,jga/capmetrics-web
--- +++ @@ -21,6 +21,7 @@ // along with the exports of each module as its value. app.import('bower_components/d3/d3.js'); + app.import('bower_components/lodash/lodash.min.js'); // Customized version of nvd3 app.import('vendor/nvd3/build/nv.d3.css'); app.import('vendor/nvd3/build/nv.d3.js');
a4c9f3032bbaafc2a7b33161f33fa8bcc536c88f
lib/cucumber/cli/argument_parser/feature_path_expander.js
lib/cucumber/cli/argument_parser/feature_path_expander.js
var fs = require('fs'); var glob = require('glob'); var _ = require('underscore'); var FeaturePathExpander = { expandPaths: function expandPaths(paths) { var Cucumber = require('../../../cucumber'); var PathExpander = Cucumber.Cli.ArgumentParser.PathExpander; var expandedPaths = PathExpander.ex...
var FeaturePathExpander = { expandPaths: function expandPaths(paths) { var Cucumber = require('../../../cucumber'); var PathExpander = Cucumber.Cli.ArgumentParser.PathExpander; var expandedPaths = PathExpander.expandPathsWithGlobString(paths, FeaturePathExpander.GLOB_FEATURE_FILES_IN_DIR_STRING); ...
Remove unneeded requires from FeaturePathExpander
Remove unneeded requires from FeaturePathExpander
JavaScript
mit
cucumber/cucumber-js,bluenergy/cucumber-js,mhoyer/cucumber-js,vilmysj/cucumber-js,arty-name/cucumber-js,AbraaoAlves/cucumber-js,richardmcsong/cucumber-js,vilmysj/cucumber-js,bluenergy/cucumber-js,eddieloeffen/cucumber-js,tdekoning/cucumber-js,Telogical/CucumberJS,cucumber/cucumber-js,MinMat/cucumber-js,arty-name/cucumb...
--- +++ @@ -1,7 +1,3 @@ -var fs = require('fs'); -var glob = require('glob'); -var _ = require('underscore'); - var FeaturePathExpander = { expandPaths: function expandPaths(paths) { var Cucumber = require('../../../cucumber');
a32ef2c72b98383682a6e8810133612af512cac5
init.js
init.js
const chalk = require('chalk'); const fs = require('fs'); const path = require('path'); const tilde = require('tilde-expansion'); const shell = require('shelljs'); const appRootDir = require('app-root-dir').get(); const setConfigProp = require('./setConfigProp'); const newTodoMonth = require('./newTodoMonth'); const i...
const chalk = require('chalk'); const fs = require('fs'); const path = require('path'); const tilde = require('tilde-expansion'); const shell = require('shelljs'); const appRootDir = require('app-root-dir').get(); const setConfigProp = require('./setConfigProp'); const newTodoMonth = require('./newTodoMonth'); const i...
Add check for existing /todo folder in path
Add check for existing /todo folder in path
JavaScript
mit
zweck/todo_cmd
--- +++ @@ -12,7 +12,9 @@ if (!fs.existsSync(expandedDir)) return console.log(chalk.red('Directory for workbook doesnt exist')); console.log(chalk.green(`Initializing new todo workbook in ${dir}`)); const configPath = path.join(appRootDir, 'config.json'); - const todoRoot = path.join(expandedDir, 't...
d3f36d8906a4adc4454c4f499f4f2d4514eec981
examples/simple.js
examples/simple.js
$( document ).ready(function() { var typer = $('.typeahead'); var genders = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.whitespace, queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch: 'https://raw.githubusercontent.com/anne-decusatis/genderamender/master/genders.json' }); typer.typ...
$( document ).ready(function() { var typer = $('.typeahead'); var genders = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.whitespace, queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch: 'https://raw.githubusercontent.com/anne-decusatis/genderamender/master/genders.json', sorter: f...
Make typeahead sort-- promoting identical matches, or just naturally.
Make typeahead sort-- promoting identical matches, or just naturally.
JavaScript
mit
anne-decusatis/genderamender
--- +++ @@ -1,15 +1,28 @@ $( document ).ready(function() { var typer = $('.typeahead'); - var genders = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.whitespace, queryTokenizer: Bloodhound.tokenizers.whitespace, - prefetch: 'https://raw.githubusercontent.com/anne-decusatis/genderamender/master/ge...
81713ce1ad6ed20505d7bd6c57d404f68c971f43
src/server/api/gallery-api.js
src/server/api/gallery-api.js
import Post from 'src/models/PostModel'; import { buildGalleryPost } from 'src/server/modules/build'; export default (req, res, next) => { Post.paginate({}, { page: req.query.page, limit: req.query.limit, sort: '-postDate', select: 'title images postDate', }) .then((data) => { const posts...
import Post from 'src/models/PostModel'; import { buildGalleryPost } from 'src/server/modules/build'; export default (req, res, next) => { let dataRequest; if (req.query.page) { dataRequest = Post.paginate({}, { page: req.query.page, limit: req.query.limit, sort: '-postDate', select: 't...
Handle paged requests differently than get-all requests
Handle paged requests differently than get-all requests
JavaScript
mit
tuelsch/bolg,tuelsch/bolg
--- +++ @@ -2,14 +2,25 @@ import { buildGalleryPost } from 'src/server/modules/build'; export default (req, res, next) => { - Post.paginate({}, { - page: req.query.page, - limit: req.query.limit, - sort: '-postDate', - select: 'title images postDate', - }) + let dataRequest; + if (req.query.page) ...
9b20a73621e58aa8907c382891996be188c17b85
examples/with-multiple-dates.js
examples/with-multiple-dates.js
import React from 'react'; import {render} from 'react-dom'; import InfiniteCalendar, { Calendar, defaultMultipleDateInterpolation, withMultipleDates, } from 'react-infinite-calendar'; import 'react-infinite-calendar/styles.css'; render( <InfiniteCalendar Component={withMultipleDates(Calendar)} /* ...
import React from 'react'; import {render} from 'react-dom'; import InfiniteCalendar, { Calendar, defaultMultipleDateInterpolation, withMultipleDates, } from 'react-infinite-calendar'; import 'react-infinite-calendar/styles.css'; const MultipleDatesCalendar = withMultipleDates(Calendar); render( <InfiniteCa...
Update withMultipleDates HOC example usage
Update withMultipleDates HOC example usage
JavaScript
mit
clauderic/react-infinite-calendar
--- +++ @@ -7,9 +7,11 @@ } from 'react-infinite-calendar'; import 'react-infinite-calendar/styles.css'; +const MultipleDatesCalendar = withMultipleDates(Calendar); + render( <InfiniteCalendar - Component={withMultipleDates(Calendar)} + Component={MultipleDatesCalendar} /* * The `interpolate...
ec15a4d069fcf835970171ca9e5b79b064c1fdd8
src/app/login/login.component.e2e-spec.js
src/app/login/login.component.e2e-spec.js
describe('Login', function () { beforeEach(function () { browser.get('/login'); }); it('should have <my-login>', function () { var login = element(by.css('my-app my-login')); expect(login.isPresent()).toEqual(true); login.element(by.name("email")).sendKeys("test@gmail.com"); login.element(by.name("passwo...
describe('Login', function () { beforeEach(function () { browser.get('/login'); }); it('should have <my-login>', function () { var login = element(by.css('my-app my-login')); expect(login.isPresent()).toEqual(true); login.element(by.name("email")).sendKeys("test@gmail.com"); login.element(by.name("passwo...
Update login component test e2e
Update login component test e2e
JavaScript
mit
JunkyDeLuxe/angular4-starter,JunkyDeLuxe/angular4-starter,JunkyDeLuxe/angular4-starter
--- +++ @@ -8,7 +8,7 @@ expect(login.isPresent()).toEqual(true); login.element(by.name("email")).sendKeys("test@gmail.com"); - login.element(by.name("password")).sendKeys("azerty1988"); + login.element(by.name("password")).sendKeys("mptest"); login.element(by.className("btn")).click();
02df584af6d6070cef63d42d2c8f39d696d4cfac
red/storage/index.js
red/storage/index.js
/** * Copyright 2013 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
/** * Copyright 2013 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
Allow storage module to be set explicitly
Allow storage module to be set explicitly Rather than just by name
JavaScript
apache-2.0
HiroyasuNishiyama/node-red,PaGury/node-red,mw75/node-red,whummer/node-red,codeaudit/node-red,dojot/mashup,PaGury/node-red,mikestebbins/node-red,whoGloo/node-red,btsimonh/node-red,michaelsteenkamp/node-red,anusornc/node-red,rntdrts/node-red,lucciano/node-red,gbraad/node-red,cgvarela/node-red,lostinthestory/node-red,anus...
--- +++ @@ -17,7 +17,18 @@ var settings = require('../red').settings; -var storageType = settings.storageModule || "localfilesystem"; +var mod; -module.exports = require("./"+storageType); +if (settings.storageModule) { + if (typeof settings.storageModule === "string") { + // TODO: allow storage mod...
b7d1fe2fb94dd62fc41b594ac6bdae01d2831da2
command_handlers/purge.js
command_handlers/purge.js
const messageHelpers = require('../lib/message_helpers'); const handler = async function(message) { const args = message.content.split(' ').slice(1); // the first argument is non-optional, fail if not provided if (args.length < 1) { await messageHelpers.sendError(message, 'You must specify a number of...
const messageHelpers = require('../lib/message_helpers'); const handler = async function(message) { const args = message.content.split(' ').slice(1); // the first argument is non-optional, fail if not provided if (args.length < 1) { await messageHelpers.sendError(message, 'You must specify a number of...
Fix typo in help text
Fix typo in help text
JavaScript
bsd-3-clause
ciarancrocker/sgs_bot,ciarancrocker/sgs_bot
--- +++ @@ -32,6 +32,6 @@ bind: 'purge', handler: handler, help: 'Purge the last <n> messages from the channel this command' + - 'is invoked in.', + ' is invoked in.', administrative: true, };
ab25026fe59624f1da1716e52ffd399f4707c846
lib/init/authenticated.js
lib/init/authenticated.js
'use strict'; /** * @fileoverview Login check middleware */ const config = require('config'); /* * Check authenticated status. Redirect to login page * * @param {object} req Express HTTP request * @param {object} res Express HTTP response * @param {object} next Express callback * */ const authenticated = (re...
'use strict'; /** * @fileoverview Login check middleware */ const config = require('config'); /* * Check authenticated status. Redirect to login page * * @param {object} req Express HTTP request * @param {object} res Express HTTP response * @param {object} next Express callback * */ const authenticated = (re...
Remove login redirect for APIs
:bug: Remove login redirect for APIs
JavaScript
apache-2.0
Snugug/punchcard,punchcard-cms/punchcard,scottnath/punchcard,scottnath/punchcard,Snugug/punchcard,poofichu/punchcard,punchcard-cms/punchcard,poofichu/punchcard
--- +++ @@ -14,7 +14,7 @@ * */ const authenticated = (req, res, next) => { - if ((!req.isAuthenticated || !req.isAuthenticated()) && req.url !== config.authentication.login.path && !req.url.startsWith('/css') && !req.url.startsWith('/js') && !req.url.startsWith('/images') && !req.url.startsWith('/favicon')) { +...
172aee6f75877779da2511d236d8d3b708ac2b79
index.js
index.js
"use strict"; var tester = /^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/; // Thanks to: // http://fightingforalostcause.net/misc/2006/compare-email-regex.php // http://thedailywtf.com/Articles/Validating_Email_Addresses.aspx // http://...
'use strict'; var tester = /^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/; // Thanks to: // http://fightingforalostcause.net/misc/2006/compare-email-regex.php // http://thedailywtf.com/Articles/Validating_Email_Addresses.aspx // http://...
Apply total length of RFC-2821
Apply total length of RFC-2821
JavaScript
unlicense
Sembiance/email-validator
--- +++ @@ -1,30 +1,25 @@ -"use strict"; +'use strict'; var tester = /^[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/; // Thanks to: // http://fightingforalostcause.net/misc/2006/compare-email-regex.php // http://thedailywtf.com/Ar...
9a34051841343f41ce56122ceaf7fd9ce785281c
index.js
index.js
var Database = require('./lib/database') var mongodb = require('mongodb') module.exports = function (connString, cols, options) { var db = new Database(connString, cols, options) if (typeof Proxy !== 'undefined') { var handler = { get: function (obj, prop) { // Work around for event emitters to w...
var Database = require('./lib/database') var mongodb = require('mongodb') module.exports = function (connString, cols, options) { var db = new Database(connString, cols, options) if (typeof Proxy !== 'undefined') { var handler = { get: function (obj, prop) { // Work around for event emitters to w...
Return the created proxy instead of assigning it to a var p
Return the created proxy instead of assigning it to a var p
JavaScript
mit
mafintosh/mongojs,lionvs/mongojs
--- +++ @@ -16,8 +16,8 @@ return db[prop] } } - var p = Proxy.create === undefined ? new Proxy({}, handler) : Proxy.create(handler) - return p + + return Proxy.create === undefined ? new Proxy({}, handler) : Proxy.create(handler) } return db
e6458ee26f18fa1f87601297d595ea7e2aa6e81d
index.js
index.js
"use strict"; var windows = process.platform.indexOf("win") === 0; function clear() { var i,lines; var stdout = ""; if (windows === false) { stdout += "\033[2J"; } else { lines = process.stdout.getWindowSize()[1]; for (i=0; i<lines; i++) { stdout += "\r\n"; } } // Reset cursur stdout +=...
"use strict"; var windows = process.platform.indexOf("win") === 0; function clear() { var i,lines; var stdout = ""; if (windows === false) { stdout += "\x1B[2J"; } else { lines = process.stdout.getWindowSize()[1]; for (i=0; i<lines; i++) { stdout += "\r\n"; } } // Reset cursur stdout +=...
Update octal literal to hex
Update octal literal to hex Strict mode in later versions of node caused programs that use this to crash due to the octal literal with ``` diffie-hellman-explained/node_modules/cli-clear/index.js:26 stdout += "\033[0f"; ^^ SyntaxError: Octal literals are not allowed in strict mode. at exports.runInT...
JavaScript
mit
stevenvachon/cli-clear
--- +++ @@ -10,7 +10,7 @@ if (windows === false) { - stdout += "\033[2J"; + stdout += "\x1B[2J"; } else { @@ -23,7 +23,7 @@ } // Reset cursur - stdout += "\033[0f"; + stdout += "\x1B[0f"; process.stdout.write(stdout); }
1b8041a62976420705a942c91d47195472d89798
index.js
index.js
'use strict'; var condenseKeys = require('condense-keys'); var got = require('got'); module.exports = function (buf, cb) { got.post('https://api.imgur.com/3/image', { headers: {authorization: 'Client-ID 34b90e75ab1c04b'}, body: buf }, function (err, res) { if (err) { cb(err); return; } res = JSON.pa...
'use strict'; var condenseKeys = require('condense-keys'); var got = require('got'); module.exports = function (buf, cb) { got.post('https://api.imgur.com/3/image', { json: true, headers: {authorization: 'Client-ID 34b90e75ab1c04b'}, body: buf }, function (err, res) { if (err) { cb(err); return; } ...
Use `json` option in `got`
Use `json` option in `got`
JavaScript
mit
kevva/imgur-uploader
--- +++ @@ -4,6 +4,7 @@ module.exports = function (buf, cb) { got.post('https://api.imgur.com/3/image', { + json: true, headers: {authorization: 'Client-ID 34b90e75ab1c04b'}, body: buf }, function (err, res) { @@ -12,7 +13,6 @@ return; } - res = JSON.parse(res); res = condenseKeys(res.data)...
ed3597688b01f666ec716108bf7c348338ef14af
index.js
index.js
'use strict' var detect = require('acorn-globals'); var lastSRC = '(null)'; var lastRes = true; var lastConstants = undefined; module.exports = isConstant; function isConstant(src, constants) { src = '(' + src + ')'; if (lastSRC === src && lastConstants === constants) return lastRes; lastSRC = src; lastConst...
'use strict' var detect = require('acorn-globals'); var lastSRC = '(null)'; var lastRes = true; var lastConstants = undefined; module.exports = isConstant; function isConstant(src, constants) { src = '(' + src + ')'; if (lastSRC === src && lastConstants === constants) return lastRes; lastSRC = src; lastConst...
Use a safer test for isExpression
Use a safer test for isExpression It is now safe to use `isConstant` on un-trusted input, but it is still not safe to use `toConstant` on un-trusted input.
JavaScript
mit
ForbesLindesay/constantinople
--- +++ @@ -13,7 +13,7 @@ lastSRC = src; lastConstants = constants; try { - Function('return (' + src + ')'); + isExpression(src); return lastRes = (detect(src).filter(function (key) { return !constants || !(key.name in constants); }).length === 0); @@ -30,3 +30,13 @@ return const...
2cb1550e0783bbf4a4cbc63a40fc07dd7cc73bb9
index.js
index.js
var digio_api = require('../digio-api') , config = require('./config') var api = new digio_api(config.token) // api.droplets.list_droplets(function (err, data) { // console.log(data); // }); // // api.domains.list_all_domains(function (err, data) { // console.log(data); // }) // // api.domains.create_domain_reco...
var digio_api = require('../digio-api') , config = require('./config') var api = new digio_api(config.token) // api.droplets.list_droplets(function (err, data) { // console.log(data); // }); // // api.domains.list(function (err, data) { // console.log(data); // }) // // api.domains.create('tmn2.io', '191.168.0.1...
Add calls to domains get functionality
Add calls to domains get functionality
JavaScript
mit
tmn/digio-api-test
--- +++ @@ -8,10 +8,14 @@ // console.log(data); // }); // -// api.domains.list_all_domains(function (err, data) { +// api.domains.list(function (err, data) { // console.log(data); // }) // -// api.domains.create_domain_record('tmn2.io', '191.168.0.1', function (err, data) { +// api.domains.create('tmn2.io',...
340fc24f9a88ef82c22d7670805900cbd6e12592
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-moment-range', included: function () { this._super.included.apply(this, arguments); this.import('bower_components/moment-range/dist/moment-range.min.js'); } };
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-moment-range', included: function (app) { this._super.included.apply(this, arguments); while (app.app) { app = app.app; } this.import(app.bowerDirectory + '/moment-range/dist/moment-range.min.js'); } };
Add safeguard for nested addons && fix import path
Add safeguard for nested addons && fix import path
JavaScript
mit
hankfanchiu/ember-cli-moment-range,hankfanchiu/ember-cli-moment-range
--- +++ @@ -4,9 +4,13 @@ module.exports = { name: 'ember-cli-moment-range', - included: function () { + included: function (app) { this._super.included.apply(this, arguments); - this.import('bower_components/moment-range/dist/moment-range.min.js'); + while (app.app) { + app = app.app; + }...
b7ab57293fe36f13d1a09aa1eabab16ace9ac204
index.js
index.js
export default class { constructor (win, keys) { this.keys = keys this.win = win this.id = 'keypad' this.buttons = [] for (var key in this.keys) { this.buttons[this.keys[key]] = {pressed: false} } this.onkey = function (event) { if (event.which in this.keys) { let pre...
export default class { constructor (win, keys) { this.keys = keys this.win = win this.id = 'keypad' this.mapping = 'standard' this.buttons = [] for (var key in this.keys) { this.buttons[this.keys[key]] = {pressed: false} } this.onkey = function (event) { if (event.which i...
Set mapping to standard for gamepad object.
Set mapping to standard for gamepad object.
JavaScript
mit
matthewbauer/keypad,matthewbauer/keypad
--- +++ @@ -3,6 +3,7 @@ this.keys = keys this.win = win this.id = 'keypad' + this.mapping = 'standard' this.buttons = [] for (var key in this.keys) {
b3eae797efde9cb483ce45b340795799ed1faaf9
index.js
index.js
module.exports = isbnValidator; function isbnValidator(isbnCode){ var self = this; if (typeof(isbnCode) !== "string") return false; self.replaceDashes = function format(sequence){ return sequence.replace(/\-/g, ''); } self.sumOfSequence = function hasRemainder(sequence){ var numberTenInISBN = "...
module.exports = isbnValidator; function isbnValidator(isbnCode){ var self = this; if (typeof(isbnCode) !== "string") return false; self.replaceDashes = function format(sequence){ return sequence.replace(/\-/g, ''); } self.sumOfSequence = function hasRemainder(sequence){ var numberTenInISBN = "...
Use regex search for format type
Use regex search for format type
JavaScript
mit
thewazir/isbn-validator
--- +++ @@ -29,8 +29,8 @@ return sum; }; - self.isCorrectLength = function correctFormat(isbn){ - return (isbn.length === 10) ? true : false; + self.isCorrectFormat = function correctFormat(isbn){ + return isbn.match(/\d\d\d\d\d\d\d\d\d[0-9|xX]$/); }; self.validate = function validate(sequen...
b1915009d392fd29419462b26afa5d45eb5563cc
index.js
index.js
/*! * global-prefix <https://github.com/jonschlinkert/global-prefix> * * Copyright (c) 2015 Jon Schlinkert. * Licensed under the MIT license. */ 'use strict'; /** * This is the code used internally by npm to * resolve the global prefix. */ var isWindows = require('is-windows'); var path = require('path'); va...
/*! * global-prefix <https://github.com/jonschlinkert/global-prefix> * * Copyright (c) 2015 Jon Schlinkert. * Licensed under the MIT license. */ 'use strict'; /** * This is the code used internally by npm to * resolve the global prefix. */ var isWindows = require('is-windows'); var path = require('path'); va...
Fix "isWindows is not a function" on electron
Fix "isWindows is not a function" on electron Fix "isWindows is not a function" on electron
JavaScript
mit
kuksikus/global-prefix,jonschlinkert/global-prefix
--- +++ @@ -18,7 +18,7 @@ if (process.env.PREFIX) { prefix = process.env.PREFIX; -} else if (isWindows()) { +} else if (isWindows === true || isWindows()) { // c:\node\node.exe --> prefix=c:\node\ prefix = path.dirname(process.execPath); } else {
399deb8c1741ca993179387c6944e502cac9d4f7
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-l10n', included: function(app) { // @see: https://github.com/ember-cli/ember-cli/issues/3718 this._super.included.apply(this, arguments); if (typeof app.import!=='function' && app.app) { app = app.app; } app.import('b...
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-l10n', isDevelopingAddon: function() { // @see: https://ember-cli.com/extending/#link-to-addon-while-developing return true; }, included: function(app) { // @see: https://github.com/ember-cli/ember-cli/issues/3718 this._sup...
Add development mode for live-reload on develop
Add development mode for live-reload on develop
JavaScript
mit
Cropster/ember-l10n,Cropster/ember-l10n,Cropster/ember-l10n
--- +++ @@ -3,6 +3,11 @@ module.exports = { name: 'ember-l10n', + + isDevelopingAddon: function() { + // @see: https://ember-cli.com/extending/#link-to-addon-while-developing + return true; + }, included: function(app) { // @see: https://github.com/ember-cli/ember-cli/issues/3718
6065a6c41dc182f6b915a61eeb8a6a271cfe0d17
index.js
index.js
/** * index.js * Client entry point. * * @author Francis Brito <fr.br94@gmail.com> * @license MIT */ 'use strict'; /** * Client * Provides methods to access PrintHouse's API. * * @param {String} apiKey API key identifying account owner. * @param {Object} opts Contains options to be passed to the clien...
/** * index.js * Client entry point. * * @author Francis Brito <fr.br94@gmail.com> * @license MIT */ 'use strict'; /** * Client * Provides methods to access PrintHouse's API. * * @param {String} apiKey API key identifying account owner. * @param {Object} opts Contains options to be passed to the clien...
Add default API version to client.
Add default API version to client.
JavaScript
mit
francisbrito/ph-node
--- +++ @@ -32,6 +32,14 @@ */ Client.DEFAULT_API_URL = 'http://printhouse.io/api'; +/** + * Default API version. + * Used if no API version is passed in opts parameter when constructing a client. + * + * @type {String} + */ +Client.DEFAULT_API_VERSION = 1; + module.exports = { Client: Client };
fb32c704b149f0bd134144bc58f8ed9a07d79758
index.js
index.js
/* @flow */ type GiftCategory = 'Electronics' | 'Games' | 'Home Decoration'; type GiftWish = string | Array<GiftCategory>; type User = { firstName: string, lastName?: string, giftWish?: GiftWish, }; export type Selection = { giver: User, receiver: User, }; const selectSecretSanta = ( users: Array...
/* @flow */ type GiftCategory = 'Electronics' | 'Games' | 'Home Decoration'; type GiftWish = string | Array<GiftCategory>; type User = { firstName: string, lastName?: string, giftWish?: GiftWish, }; export type Selection = { giver: User, receiver: User, }; const selectSecretSanta = ( users: Array...
Fix variable name, add comment
Fix variable name, add comment
JavaScript
mit
WhosMySanta/app,WhosMySanta/app,WhosMySanta/whosmysanta
--- +++ @@ -23,6 +23,7 @@ // TODO: Think of adding restrictions as a parameter, such as: // - User X cannot give to User Y // - User A must give to User B + // - User N only receives, doesn't give ): Array<Selection> => { const givers = [...users]; @@ -30,8 +31,8 @@ // Possible givers only for th...
0f4102735bd5ca3cc09815e6b3c543a1b76829da
index.js
index.js
var fs = require('fs'); module.exports = function (repl, file) { try { var stat = fs.statSync(file); repl.rli.history = fs.readFileSync(file, 'utf-8').split('\n').reverse(); repl.rli.history.shift(); repl.rli.historyIndex = 0; } catch (e) {} var fd = fs.openSync(file, 'a'), reval = repl.eval; ...
var fs = require('fs'); module.exports = function (repl, file) { try { var stat = fs.statSync(file); repl.rli.history = fs.readFileSync(file, 'utf-8').split('\n').reverse(); repl.rli.history.shift(); repl.rli.historyIndex = -1; // will be incremented before pop } catch (e) {} var fd = fs.openSyn...
Fix historyIndex to actually get the last command on key-up
Fix historyIndex to actually get the last command on key-up
JavaScript
mit
tmpvar/repl.history,eush77/repl.history
--- +++ @@ -5,11 +5,11 @@ var stat = fs.statSync(file); repl.rli.history = fs.readFileSync(file, 'utf-8').split('\n').reverse(); repl.rli.history.shift(); - repl.rli.historyIndex = 0; + repl.rli.historyIndex = -1; // will be incremented before pop } catch (e) {} var fd = fs.openSync(file,...
e66b0ec7d644a566b9aca31ec10469d64a596eda
index.js
index.js
/* Copyright 2013 Twitter, Inc. Licensed under The MIT License. http://opensource.org/licenses/MIT */ define( [ './lib/advice', './lib/component', './lib/compose', './lib/logger', './lib/registry', './lib/utils' ], function(advice, component, compose, logger, registry, utils) { 'use...
/* Copyright 2013 Twitter, Inc. Licensed under The MIT License. http://opensource.org/licenses/MIT */ define( [ './lib/advice', './lib/component', './lib/compose', './lib/debug', './lib/logger', './lib/registry', './lib/utils' ], function(advice, component, compose, debug, logger, r...
Add the debug module to the entry file
Add the debug module to the entry file
JavaScript
mit
giuseppeg/flight,david84/flight,joelbyler/flight,Shinchy/flight,icecreamliker/flight,joelbyler/flight,icecreamliker/flight,robertknight/flight,KyawNaingTun/flight,margaritis/flight,robertknight/flight,flightjs/flight,Shinchy/flight,KyawNaingTun/flight,flightjs/flight,david84/flight
--- +++ @@ -6,18 +6,20 @@ './lib/advice', './lib/component', './lib/compose', + './lib/debug', './lib/logger', './lib/registry', './lib/utils' ], - function(advice, component, compose, logger, registry, utils) { + function(advice, component, compose, debug, logger, registry, ut...
85c06f64cdb2a7934177a812bd514e3bcc267c49
index.js
index.js
/** * Generates a new {@link Point} feature, given coordinates * and, optionally, properties. * * @module turf/point * @param {number} longitude - position west to east in decimal degrees * @param {number} latitude - position south to north in decimal degrees * @param {Object} properties * @return {Point} outpu...
/** * Generates a new {@link Point} feature, given coordinates * and, optionally, properties. * * @module turf/point * @param {number} longitude - position west to east in decimal degrees * @param {number} latitude - position south to north in decimal degrees * @param {Object} properties * @return {Point} outpu...
Make example work with rpl
Make example work with rpl
JavaScript
mit
Turfjs/turf-point
--- +++ @@ -8,7 +8,8 @@ * @param {Object} properties * @return {Point} output * @example - * var pt1 = turf.point(-75.343, 39.984) + * var pt1 = turf.point(-75.343, 39.984); + * //=pt1 */ module.exports = function(x, y, properties){ if(x instanceof Array) {
c56834a5822af1821299d868173b748ea3989544
index.js
index.js
var elixir = require('laravel-elixir'); var gulp = require('gulp'); var imagemin = require('gulp-imagemin'); var pngquant = require('imagemin-pngquant'); var notify = require('gulp-notify'); var _ = require('underscore'); var utilities = require('laravel-elixir/ingredients/commands/Utilities'); /* |------------------...
var elixir = require('laravel-elixir'); var gulp = require('gulp'); var imagemin = require('gulp-imagemin'); var pngquant = require('imagemin-pngquant'); var notify = require('gulp-notify'); var _ = require('underscore'); var utilities = require('laravel-elixir/ingredients/commands/Utilities'); /* |------------------...
Remove success message, only show error message.
Remove success message, only show error message.
JavaScript
mit
nathanmac/laravel-elixir-imagemin,waldemarfm/laravel-elixir-imagemin
--- +++ @@ -36,10 +36,10 @@ return gulp.src(src) .pipe(imagemin(options)) .pipe(gulp.dest(output || 'public/img')) - .pipe(notify({ - title: 'ImageMin Complete!', - message: 'All images have be optimised.', - icon: __dirname + ...
6a391ec9dc6a9fe2a34a67fc65f1e07c88790de6
app/http.js
app/http.js
var express = require('express'); var serveStatic = require('serve-static'); var bodyParser = require('body-parser'); var session = require('express-session'); var RedisStore = require('connect-redis')(session); function appCtor(cfg, pool) { var app = express(); app.set('trust proxy', true); app.set('view engin...
var express = require('express'); var serveStatic = require('serve-static'); var bodyParser = require('body-parser'); var session = require('express-session'); var RedisStore = require('connect-redis')(session); function appCtor(cfg, pool) { var app = express(); app.set('trust proxy', true); app.set('view engin...
Fix app constructor not being exported
Fix app constructor not being exported
JavaScript
mit
dingroll/dingroll.com,dingroll/dingroll.com
--- +++ @@ -36,3 +36,5 @@ return app; } + +module.exports = appCtor;
c21f621b2f0ca63bef1ca210e85a8f0d4b8a572b
fan/tasks/views/TaskItemView.js
fan/tasks/views/TaskItemView.js
jsio('from shared.javascript import Class') jsio('import fan.ui.Button') jsio('import fan.ui.RadioButtons') jsio('import fan.tasks.views.View') exports = Class(fan.tasks.views.View, function(supr) { this._className += ' TaskItemView' this._minWidth = 370 this._maxWidth = 740 this.init = function(itemId) { su...
jsio('from shared.javascript import Class') jsio('import fan.ui.Button') jsio('import fan.ui.RadioButtons') jsio('import fan.tasks.views.View') exports = Class(fan.tasks.views.View, function(supr) { this._className += ' TaskItemView' this._minWidth = 390 this._maxWidth = 740 this.init = function(itemId) { su...
Make the minimum width of a task item view 20 pixels wider to fit the discussion view in there comfortably and not have horizontal scrollbars appear
Make the minimum width of a task item view 20 pixels wider to fit the discussion view in there comfortably and not have horizontal scrollbars appear
JavaScript
mit
marcuswestin/Focus
--- +++ @@ -6,7 +6,7 @@ exports = Class(fan.tasks.views.View, function(supr) { this._className += ' TaskItemView' - this._minWidth = 370 + this._minWidth = 390 this._maxWidth = 740 this.init = function(itemId) {
a26a5bf49f41ed034f96ea3498fc1bfdd22d9eae
Resources/public/scripts/master-slave-inputs.js
Resources/public/scripts/master-slave-inputs.js
$(document).ready(function () { var showSlave = function ($master, showOn) { if ($master.is(':checkbox')) { return (+$master.is(':checked')).toString() === showOn; } var value = $master.val().toString(); if ($master.is('select') && $master.prop('multiple')) { ...
$(document).ready(function () { var showSlave = function ($master, showOn) { if ($master.is(':checkbox')) { return (+$master.is(':checked')).toString() === showOn; } var value = $master.val().toString(); if ($master.is('select') && $master.prop('multiple')) { ...
Add slave option support to the master-slave inputs JS.
Add slave option support to the master-slave inputs JS.
JavaScript
mit
DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle
--- +++ @@ -14,11 +14,17 @@ }; var toggleSlaveContainer = function ($slaveContainer, $master, showOn) { $master.val() && showSlave($master, showOn) ? $slaveContainer.show() : $slaveContainer.hide(); + + if ($slaveContainer.is('option')) { + $slaveContainer.closest('select').trigge...
d9817ae2aee7bbf7621cd967ea7b57b9ffda94d1
app/javascript/mixins/mixin-responsive.js
app/javascript/mixins/mixin-responsive.js
export default { data () { return { windowWidth: 0, currentBreakpoint: '', breakpoints: { small: 767, // MUST MATCH VARIABLES IN assets/stylesheets/_settings medium: 1024, large: 1200 } } }, created () { this.updateWindowSize() // allow for multipl...
export default { data () { return { windowWidth: 0, currentBreakpoint: '', breakpoints: { small: 767, // MUST MATCH VARIABLES IN assets/stylesheets/_settings medium: 1024, large: 1200 } } }, created () { this.updateWindowSize() // allow for multipl...
Fix bug where stickybar height was not being adjusted on page resize
Fix bug where stickybar height was not being adjusted on page resize
JavaScript
bsd-3-clause
unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet
--- +++ @@ -15,7 +15,7 @@ this.updateWindowSize() // allow for multiple functions to be called on window resize - // window.addEventListener('resize', () => this.$eventHub.$emit('windowResized')) + window.addEventListener('resize', () => this.$eventHub.$emit('windowResized')) this.$eventHub.$...
bcfd1dcf3b4854c867ab0db3b5f34a9d6a7f13c5
src/pretix/plugins/statistics/static/pretixplugins/statistics/statistics.js
src/pretix/plugins/statistics/static/pretixplugins/statistics/statistics.js
/*globals $, Morris, gettext*/ $(function () { $(".chart").css("height", "250px"); new Morris.Area({ element: 'obd_chart', data: JSON.parse($("#obd-data").html()), xkey: 'date', ykeys: ['ordered', 'paid'], labels: [gettext('Placed orders'), gettext('Paid orders')], ...
/*globals $, Morris, gettext*/ $(function () { $(".chart").css("height", "250px"); new Morris.Area({ element: 'obd_chart', data: JSON.parse($("#obd-data").html()), xkey: 'date', ykeys: ['ordered', 'paid'], labels: [gettext('Placed orders'), gettext('Paid orders')], ...
Adjust label angle to 30°
Statistics: Adjust label angle to 30°
JavaScript
apache-2.0
Flamacue/pretix,Flamacue/pretix,Flamacue/pretix,Flamacue/pretix
--- +++ @@ -32,6 +32,6 @@ labels: [gettext('Placed orders'), gettext('Paid orders')], barColors: ['#000099', '#009900'], resize: true, - xLabelAngle: 60 + xLabelAngle: 30 }); });
0a2a695eb8f985a3b3573165e1df2571858ba2ed
openfisca_web_ui/static/js/components/send-feedback-button.js
openfisca_web_ui/static/js/components/send-feedback-button.js
/** @jsx React.DOM */ 'use strict'; var React = require('react'), ReactIntlMixin = require('react-intl'); var SendFeedbackButton = React.createClass({ mixins: [ReactIntlMixin], propTypes: { testCase: React.PropTypes.object.isRequired, }, render: function() { var sendFeedbackBody = ` Bonjour, Je vo...
/** @jsx React.DOM */ 'use strict'; var React = require('react'), ReactIntlMixin = require('react-intl'); var SendFeedbackButton = React.createClass({ mixins: [ReactIntlMixin], propTypes: { testCase: React.PropTypes.object.isRequired, }, render: function() { var sendFeedbackBody = ` Bonjour, Je vo...
Use btn-link for send feedback
Use btn-link for send feedback
JavaScript
agpl-3.0
openfisca/openfisca-web-ui,openfisca/openfisca-web-ui,openfisca/openfisca-web-ui
--- +++ @@ -25,7 +25,7 @@ var sendFeedbackHref = `mailto:contact@openfisca.fr?subject=Retours sur OpenFisca&body=${encodeURIComponent(sendFeedbackBody)}`; // jshint ignore:line return ( - <a className='btn btn-default' href={sendFeedbackHref}> + <a className='btn btn-link' href={sendFeedbackHref...
e99a0ecedc7109634c16fa47bb365146d9dabe9a
bin/flos.js
bin/flos.js
#!/usr/bin/env node const flos = require('../lib/api'); const FlosRunner = flos.Runner; // load config const config = {}; // load linters const linters = []; // create runner const runner = new FlosRunner(linters); // configure runner runner.configure(config); // flos runner.run();
#!/usr/bin/env node // must do this initialization *before* other requires in order to work if (process.argv.indexOf("--debug") > -1) { require("debug").enable("flos:*"); } const flos = require('../lib/api'); const FlosRunner = flos.Runner; // load config const config = {}; // load linters const linters = []; // c...
Enable debug mode with CLI option
Enable debug mode with CLI option
JavaScript
mit
abogaart/flos
--- +++ @@ -1,4 +1,9 @@ #!/usr/bin/env node + +// must do this initialization *before* other requires in order to work +if (process.argv.indexOf("--debug") > -1) { + require("debug").enable("flos:*"); +} const flos = require('../lib/api'); const FlosRunner = flos.Runner;
9feb7573074410e8be405dfb54c7b586448b7a5f
e2e/scenario.js
e2e/scenario.js
'use strict'; describe('pattyApp', function() { beforeEach(function() { browser.get('index.html'); }); it('should have patty title', function() { expect(browser.getTitle()).toMatch('Project Patty Visualisation'); }); describe('initial state', function() { it('should have zero search results', ...
'use strict'; describe('pattyApp', function() { beforeEach(function() { browser.get('index.html'); }); it('should have patty title', function() { expect(browser.getTitle()).toMatch('Project Patty Visualisation'); }); describe('initial state', function() { it('should have zero search results', ...
Add e2e test for toggling settings panel.
Add e2e test for toggling settings panel.
JavaScript
apache-2.0
NLeSC/PattyVis,NLeSC/PattyVis
--- +++ @@ -14,7 +14,10 @@ it('should have zero search results', function() { expect(element.all(by.css('.search-result')).count()).toBe(0); }); - + it('should not show settings panel', function() { + var panel = element(by.css('.settings-panel')); + expect(panel.isDisplayed()).toBe(fals...
f60a1676ea68fece10c6579e49732fa479adace4
grunt/sassTasks.js
grunt/sassTasks.js
module.exports = function(grunt){ grunt.config('sass', { sass: { options: { sourceMap: 'true' }, //options dist: { files: { 'dist/css/main.css': 'src/scss/main.scss', } } } }) //config grunt.loadNpmTasks('grunt-sass'); grunt.registerTask('compile...
module.exports = function(grunt){ grunt.config('sass', { options: { sourceMap: true }, //options dist: { files: { 'dist/css/main.css': 'src/scss/main.scss', } } }) //config grunt.loadNpmTasks('grunt-sass'); grunt.registerTask('compileSass', 'sass'); }
Repair - Fixed up SASS compilation.
Repair - Fixed up SASS compilation.
JavaScript
mit
joeHillman/boilerplate,joeHillman/boilerplate
--- +++ @@ -1,13 +1,11 @@ module.exports = function(grunt){ grunt.config('sass', { - sass: { - options: { - sourceMap: 'true' - }, //options - dist: { - files: { - 'dist/css/main.css': 'src/scss/main.scss', - } + options: { + sourceMap: true + }, //option...
2862ddc1c0e8eb8132929c167059a5eb9634f5f0
js/game.js
js/game.js
/* * game.js * All of the magic happens here */ YINS.Game = function(game) { this.music; }; YINS.Game.prototype = { create: function() { /* TODO: transition smoothly from mainmenu music to this */ this.music = YINS.game.add.audio('gameMusic'); this.music.loopFull(0.5); }, update: function() { ...
/* * game.js * All of the magic happens here */ YINS.Game = function(game) { this.music; this.player; }; YINS.Game.prototype = { create: function() { /* TODO: transition smoothly from mainmenu music to this */ this.music = YINS.game.add.audio('gameMusic'); this.music.loopFull(0.5); /* Add sprit...
Add player and enable physics
Add player and enable physics
JavaScript
mpl-2.0
Vogeltak/YINS,Vogeltak/YINS
--- +++ @@ -5,6 +5,7 @@ YINS.Game = function(game) { this.music; + this.player; }; YINS.Game.prototype = { @@ -15,6 +16,32 @@ this.music = YINS.game.add.audio('gameMusic'); this.music.loopFull(0.5); + /* Add sprites to the game world */ + this.player = YINS.game.add.sprite(YINS.game.world.centerX, ...
ec625b35cc589d006ee43882abad45d3c291df37
tests/__mocks__/rc-trigger.js
tests/__mocks__/rc-trigger.js
import React from 'react'; let Trigger; // eslint-disable-line if (process.env.REACT === '15') { const ActualTrigger = require.requireActual('rc-trigger'); const { render } = ActualTrigger.prototype; ActualTrigger.prototype.render = () => { const { popupVisible } = this.state; // eslint-disable-line le...
import React from 'react'; let Trigger; // eslint-disable-line if (process.env.REACT === '15') { const ActualTrigger = require.requireActual('rc-trigger'); // cannot use object destruction, cause react 15 test cases fail const render = ActualTrigger.prototype.render; // eslint-disable-line ActualTrigger.prot...
Fix test case in react 15
:bug: Fix test case in react 15
JavaScript
mit
zheeeng/ant-design,ant-design/ant-design,elevensky/ant-design,icaife/ant-design,elevensky/ant-design,ant-design/ant-design,icaife/ant-design,zheeeng/ant-design,icaife/ant-design,ant-design/ant-design,elevensky/ant-design,ant-design/ant-design,elevensky/ant-design,icaife/ant-design,zheeeng/ant-design,zheeeng/ant-design
--- +++ @@ -4,7 +4,8 @@ if (process.env.REACT === '15') { const ActualTrigger = require.requireActual('rc-trigger'); - const { render } = ActualTrigger.prototype; + // cannot use object destruction, cause react 15 test cases fail + const render = ActualTrigger.prototype.render; // eslint-disable-line Ac...
8be5f534f42691942e74ed98f5eaa327df684fe6
js/main.js
js/main.js
function openCourse(Course) { var i, x; x = document.getElementsByClassName("schedule"); for(i=0;i<x.length;i++){ x[i].style.display = 'none'; } document.getElementById(Course).style.display = "block"; }
function openCourse(Course) { var i, x, y; x = document.getElementsByClassName("schedule"); y = document.getElementById(Course); for(i=0;i<x.length;i++){ x[i].style.display = 'none'; } y.style.display = "block"; y.className = y.className + ' ' + Course.toLowerCase(); }
Add change of tab color on click to schedule
Add change of tab color on click to schedule
JavaScript
cc0-1.0
FatecSorocaba/semana-da-tecnologia,FatecSorocaba/semana-da-tecnologia
--- +++ @@ -1,8 +1,10 @@ function openCourse(Course) { - var i, x; + var i, x, y; x = document.getElementsByClassName("schedule"); + y = document.getElementById(Course); for(i=0;i<x.length;i++){ x[i].style.display = 'none'; } - document.getElementById(Course).style.display = "bloc...
9cad1c51285b18da82c376989d079d47c20e96a3
lib/export-geojson.js
lib/export-geojson.js
var exportGeoJson = require('osm-p2p-geojson') var pump = require('pump') var defork = require('osm-p2p-defork') var collect = require('collect-transform-stream') var userConfig = require('./user-config') var presets = userConfig.getSettings('presets') var matchPreset = require('./preset-matcher')(presets.presets) va...
var exportGeoJson = require('osm-p2p-geojson') var pump = require('pump') var defork = require('osm-p2p-defork') var collect = require('collect-transform-stream') var userConfig = require('./user-config') var presets = userConfig.getSettings('presets') || {} var matchPreset = require('./preset-matcher')(presets.prese...
Fix crash when user has no presets loaded.
Fix crash when user has no presets loaded.
JavaScript
mit
digidem/ecuador-map-editor,digidem/ecuador-map-editor
--- +++ @@ -4,7 +4,7 @@ var collect = require('collect-transform-stream') var userConfig = require('./user-config') -var presets = userConfig.getSettings('presets') +var presets = userConfig.getSettings('presets') || {} var matchPreset = require('./preset-matcher')(presets.presets) var isPolygonFeature = requ...
30343d093cd2424d849e3c36d5021a82b09222a6
js/game.js
js/game.js
/* * Author: Jerome Renaux * E-mail: jerome.renaux@gmail.com */ var Game = {}; Game.init = function(){ game.stage.disableVisibilityChange = true; }; Game.preload = function() { game.load.tilemap('map', 'assets/map/example_map.json', null, Phaser.Tilemap.TILED_JSON); game.load.spritesheet('tileset', 'a...
/* * Author: Jerome Renaux * E-mail: jerome.renaux@gmail.com */ var Game = {}; Game.init = function(){ game.stage.disableVisibilityChange = true; }; Game.preload = function() { game.load.tilemap('map', 'assets/map/example_map.json', null, Phaser.Tilemap.TILED_JSON); game.load.spritesheet('tileset', 'a...
Remove the name input after you use it
Remove the name input after you use it
JavaScript
mit
marycourtland/pyramid-sea-game,marycourtland/pyramid-sea-game
--- +++ @@ -33,4 +33,5 @@ Game.clickJoin = function() { var name = document.getElementById('input-name').value; Game.initPlayer(name); + document.getElementById('name').remove(); }
d43a75538b768a317e25542cb186c5df51add217
lib/negotiate.js
lib/negotiate.js
function parseQString(qString) { var d = /^\s*q=([01](?:\.\d+))\s*$/.exec(qString); if (!!d) { return 1; } return Number(d[1]); } function sortQArrayString(content) { var entries = content.split(','), sortData = []; entries.forEach(function(rec) { var s = rec.spl...
function parseQString(qString) { var d = /^\s*q=([01](?:\.\d+))\s*$/.exec(qString); if (!!d) { return 1; } return Number(d[1]); } function sortQArrayString(content) { var entries = content.split(','), sortData = []; entries.forEach(function(rec) { var s = rec.spl...
Split out the different headers into their own methods for greater flexibility.
Split out the different headers into their own methods for greater flexibility.
JavaScript
mit
foxxtrot/connect-conneg
--- +++ @@ -27,25 +27,25 @@ }); } -module.exports = function negotiate(config) { - config || config = {}; - - // Connect-conneg will only handle Languages, Accept, and Charset - // The gzip module handles the Accept-Encoding header - // Accept-Range is outside the scope of this module - ...
d273c211916541bc2a9fd7e4edb5f3260a0d3d26
src/chat/ui/room/SupportGroup.js
src/chat/ui/room/SupportGroup.js
import React from 'react'; import { View, Text, } from 'react-native'; // import { Actions } from 'react-native-router-flux'; import { RoomView } from './RoomView'; import { AppStyles, AppSizes } from '../../../theme/'; import Network from '../../../network'; import t from '../../../i18n'; export default class Su...
import React from 'react'; import { View, Text, } from 'react-native'; // import { Actions } from 'react-native-router-flux'; import RoomView from './RoomView'; import { AppStyles, AppSizes } from '../../../theme/'; import Network from '../../../network'; import t from '../../../i18n'; export default class Suppor...
Support import was throwing exceptions
Support import was throwing exceptions
JavaScript
apache-2.0
elarasu/roverz-chat,elarasu/roverz-chat
--- +++ @@ -4,7 +4,7 @@ Text, } from 'react-native'; // import { Actions } from 'react-native-router-flux'; -import { RoomView } from './RoomView'; +import RoomView from './RoomView'; import { AppStyles, AppSizes } from '../../../theme/'; import Network from '../../../network';
38f0c75f83c1d864adee5f7006eb66446228406a
src/providers.js
src/providers.js
import { randomId } from './util'; const s = typeof Symbol === 'function'; export const vueFormConfig = s ? Symbol() : `VueFormProviderConfig${randomId}`; export const vueFormState = s ? Symbol() : `VueFormProviderState${randomId}`;
import { randomId } from './util'; export const vueFormConfig = `VueFormProviderConfig${randomId()}`; export const vueFormState = `VueFormProviderState${randomId()}`;
Fix a bug when using symbols in iOS 8.1
Fix a bug when using symbols in iOS 8.1 For some reason, injecting objects with symbols as keys in Vue won’t work in iOS 8.1. To replicate this, simply create a <vue-form> and run it in the on iOS 8.1 or the iOS 8.1 simulator.
JavaScript
mit
fergaldoyle/vue-form,fergaldoyle/vue-form
--- +++ @@ -1,5 +1,4 @@ import { randomId } from './util'; -const s = typeof Symbol === 'function'; -export const vueFormConfig = s ? Symbol() : `VueFormProviderConfig${randomId}`; -export const vueFormState = s ? Symbol() : `VueFormProviderState${randomId}`; +export const vueFormConfig = `VueFormProviderConfig${...
f9c6df86c3998f1d7625ad472b57f8c0a34df0ec
src/components/Avatar/index.js
src/components/Avatar/index.js
import cx from 'classnames'; import React from 'react'; import PropTypes from 'prop-types'; const Avatar = ({ className, user }) => ( <div className={cx('Avatar', className)}> <img className="Avatar-image" src={user.avatar || `/a/${encodeURIComponent(user._id)}`} alt={user.username} /> </...
import cx from 'classnames'; import React from 'react'; import PropTypes from 'prop-types'; const Avatar = ({ className, user }) => ( <div className={cx('Avatar', className)}> <img className="Avatar-image" src={user.avatar || `https://sigil.cupcake.io/uwave-${encodeURIComponent(user._id)}`} alt...
Revert "[WLK-INSTANCE] use locally generated avatars as default instead of cupcake.io"
Revert "[WLK-INSTANCE] use locally generated avatars as default instead of cupcake.io" This reverts commit 92c531beca630b1aff75712360a3bae3e158420e.
JavaScript
mit
welovekpop/uwave-web-welovekpop.club,welovekpop/uwave-web-welovekpop.club
--- +++ @@ -6,7 +6,7 @@ <div className={cx('Avatar', className)}> <img className="Avatar-image" - src={user.avatar || `/a/${encodeURIComponent(user._id)}`} + src={user.avatar || `https://sigil.cupcake.io/uwave-${encodeURIComponent(user._id)}`} alt={user.username} /> </div>
0a8f1e5704a56eddeac9a7d3ed3e0a0b2e744a29
src/components/TestCardNumber.js
src/components/TestCardNumber.js
import React, { Component } from 'react'; import { faintBlack, cyan500 } from 'material-ui/styles/colors'; import MenuItem from 'material-ui/MenuItem'; import IconMenu from 'material-ui/IconMenu'; import IconButton from 'material-ui/IconButton/IconButton'; import ActionHelpOutline from 'material-ui/svg-icons/action/hel...
import React, { Component } from 'react'; import { faintBlack, cyan500 } from 'material-ui/styles/colors'; import MenuItem from 'material-ui/MenuItem'; import IconMenu from 'material-ui/IconMenu'; import IconButton from 'material-ui/IconButton/IconButton'; import ActionHelpOutline from 'material-ui/svg-icons/action/hel...
Add some test card numbers.
Add some test card numbers.
JavaScript
apache-2.0
blobor/buka,blobor/buka,blobor/skipass.site,blobor/skipass.site
--- +++ @@ -6,7 +6,9 @@ import ActionHelpOutline from 'material-ui/svg-icons/action/help-outline'; const TEST_CARD_NUMBERS = [ - '01-2167-30-92545' + '01-2167-30-92545', + '26-2167-19-35623', + '29-2167-26-31433' ]; class TestCardNumber extends Component {
e3a6aa64f47b65aba6a1d612c468c52b213f4546
src/components/geo-risks/view.js
src/components/geo-risks/view.js
/** * Created by Tomasz Gabrysiak @ Infermedica on 08/02/2017. */ import View from '../../base/view'; import template from './template'; export default class GeoRisksView extends View { constructor (el, context) { context.locationRiskFactors = ['p_15', 'p_20', 'p_21', 'p_16', 'p_17', 'p_18', 'p_14', 'p_19', '...
/** * Created by Tomasz Gabrysiak @ Infermedica on 08/02/2017. */ import View from '../../base/view'; import template from './template'; export default class GeoRisksView extends View { constructor (el, context) { context.locationRiskFactors = ['p_15', 'p_20', 'p_21', 'p_16', 'p_17', 'p_18', 'p_14', 'p_19', '...
Update geo riskfators screen to use the new structure of reported symptoms
Update geo riskfators screen to use the new structure of reported symptoms
JavaScript
mit
infermedica/js-symptom-checker-example,infermedica/js-symptom-checker-example
--- +++ @@ -12,7 +12,7 @@ const handleRisksChange = (e) => { let group = {}; this.el.querySelectorAll('.input-risk').forEach((item) => { - group[item.id] = item.checked; + group[item.id] = {reported: item.checked}; }); this.context.patient.addSymptomsGroup(group); }...
ab1a77facf8a5f0d34e1ef61e8abce65ccfe772f
src/components/republia-times.js
src/components/republia-times.js
var React = require( "react" ); var MorningScreen = require( "./morning-screen" ); var PlayScreen = require( "./play-screen" ); module.exports = React.createClass({ displayName: "RepubliaTimes", getInitialState() { return { day: 1, screen: "morning" }; }, changeToScreen( newScreen ) { this.setState({...
var React = require( "react" ); var MorningScreen = require( "./morning-screen" ); var PlayScreen = require( "./play-screen" ); module.exports = React.createClass({ displayName: "RepubliaTimes", getInitialState() { return { day: 1, screen: "morning" }; }, changeToScreen( newScreen ) { this.setState({...
Use an arrow function instead
Use an arrow function instead
JavaScript
isc
bjohn465/republia-times,bjohn465/republia-times
--- +++ @@ -21,7 +21,7 @@ renderMorningScreen() { return <MorningScreen day={this.state.day} - onContinue={this.changeToScreen.bind( null, "play" )} />; + onContinue={() => this.changeToScreen( "play" )} />; }, renderPlayScreen() {
aa06dc2086eb43845d86d229ed57e235abeeadfe
src/filters/ascii/AsciiFilter.js
src/filters/ascii/AsciiFilter.js
var core = require('../../core'); /** * @author Vico @vicocotea * original shader : https://www.shadertoy.com/view/lssGDj by @movAX13h */ /** * An ASCII filter. * * @class * @extends AbstractFilter * @namespace PIXI.filters */ function AsciiFilter() { core.AbstractFilter.call(this, // vertex shad...
var core = require('../../core'); // TODO (cengler) - The Y is flipped in this shader for some reason. /** * @author Vico @vicocotea * original shader : https://www.shadertoy.com/view/lssGDj by @movAX13h */ /** * An ASCII filter. * * @class * @extends AbstractFilter * @namespace PIXI.filters */ function Asc...
Add a TODO for ascii filter
Add a TODO for ascii filter
JavaScript
mit
falihakz/pixi.js,leonardo-silva/pixi.js,TrevorSayre/pixi.js,finscn/pixi.js,twhitbeck/pixi.js,sfinktah/pixi.js,jpweeks/pixi.js,DarkEngineer/pixi.js,lucap86/pixi.js,jojuntune/pixi.js,out-of-band/pixi.js,bdero/pixi.js,GoodBoyDigital/pixi.js,SUNFOXGames/pixi.js,trehnert23/pixi.js,Mgonand/pixi.js,sfinktah/pixi.js,NikkiKoole...
--- +++ @@ -1,4 +1,6 @@ var core = require('../../core'); + +// TODO (cengler) - The Y is flipped in this shader for some reason. /** * @author Vico @vicocotea
2775ca6bf28c6b3ec0deb0ce8c4f682de470cca4
src/commands/clean/clean.js
src/commands/clean/clean.js
/* * clean.js - Clean only the bots messages. * * Contributed by Ovyerus */ exports.commands = [ 'clean' ]; exports.clean = { desc: 'clean messages created by the bot itself', main: (bot, ctx) => { return new Promise((resolve,reject) => { ctx.msg.channel.getMessages(100).then(msgs...
/* * clean.js - Clean only the bots messages. * * Contributed by Ovyerus */ exports.commands = [ 'clean' ]; exports.clean = { desc: 'clean messages created by the bot itself', main: (bot, ctx) => { return new Promise((resolve, reject) => { ctx.msg.channel.getMessages(100).then(msg...
Clean additions and send message amount
Clean additions and send message amount
JavaScript
unknown
sr229/owo-whats-this,ClarityMoe/Clara,awau/owo-whats-this,owo-dev-team/owo-whats-this,awau/Clara
--- +++ @@ -11,12 +11,13 @@ exports.clean = { desc: 'clean messages created by the bot itself', main: (bot, ctx) => { - return new Promise((resolve,reject) => { + return new Promise((resolve, reject) => { ctx.msg.channel.getMessages(100).then(msgs => { let delet ...
88168d12446d91540a00ed78c18f144df2c9e234
findJavaHome.js
findJavaHome.js
require('find-java-home')(function(err, home){ if(err){ console.error("[node-java] "+err); process.exit(1); } process.stdout.write(home); });
require('find-java-home')(function(err, home){ if (err || !home) { if (!err) err = Error('Unable to determine Java home location'); process.exit(1); } process.stdout.write(home); });
Exit with error if Java home can't be found
Exit with error if Java home can't be found
JavaScript
mit
joeferner/node-java,joeferner/node-java,joeferner/node-java,joeferner/node-java,joeferner/node-java,joeferner/node-java
--- +++ @@ -1,6 +1,6 @@ require('find-java-home')(function(err, home){ - if(err){ - console.error("[node-java] "+err); + if (err || !home) { + if (!err) err = Error('Unable to determine Java home location'); process.exit(1); } process.stdout.write(home);
26d6e669462517abdbd2906785657f14da8cc555
public/assets/wee/build/tasks/legacy-convert.js
public/assets/wee/build/tasks/legacy-convert.js
/* global legacyConvert, module, project */ module.exports = function(grunt) { grunt.registerTask('convertLegacy', function(task) { var dest = legacyConvert[task], content = grunt.file.read(dest), rootSize = project.style.legacy.rootSize, rootValue = 10; // Determine root value for unit conversion if ...
/* global legacyConvert, module, project */ module.exports = function(grunt) { grunt.registerTask('convertLegacy', function(task) { var dest = legacyConvert[task], content = grunt.file.read(dest), rootSize = project.style.legacy.rootSize, rootValue = 10; // Determine root value for unit conversion if ...
Remove extra semicolon injection in legacy stylesheet
Remove extra semicolon injection in legacy stylesheet
JavaScript
apache-2.0
janusnic/wee,weepower/wee,weepower/wee,janusnic/wee
--- +++ @@ -21,7 +21,7 @@ content = content.replace(/(-?[.\d]+)rem/gi, function(str, match) { return (match * rootValue) + 'px'; }).replace(/opacity:([.\d]+)/gi, function(str, match) { - return 'filter:alpha(opacity=' + Math.round((match * 100) * 100 / 100) + ');'; + return 'filter:alpha(opacity=' + Mat...
91854c84fe969d6622b5c9bf3fe87818750f9c1f
src/js/components/Camera.js
src/js/components/Camera.js
import {Entity} from 'aframe-react'; import React from 'react'; import Wsgamepad from './Wsgamepad'; export default ({ position=[0, 0, 5], id="camera", active="false", userHeight="4.8", rotation=[0, 0, 0], far="10000", looksControlsEnabeld="true", fov="80", near="0.005", velocity=[3, ...
import {Entity} from 'aframe-react'; import React from 'react'; import Wsgamepad from './Wsgamepad'; export default ({ position=[0, 0, 5], id="camera", active="false", userHeight="4.8", rotation=[0, 0, 0], far="10000", looksControlsEnabeld="true", fov="80", near="0.005", velocity=[3, ...
Update ws endpoint to localhost
Update ws endpoint to localhost
JavaScript
mit
maniart/darkpatterns,maniart/darkpatterns
--- +++ @@ -32,7 +32,7 @@ touch-controls="" hmd-controls="" ws-gamepad={{ - endpoint: "ws://192.168.0.14:7878" + endpoint: "ws://127.0.0.1:7878" }} look-controls="" universal-controls=""
ceea32dc631efab5c5b00722ec331f16a1751a4e
strip-test-selectors.js
strip-test-selectors.js
'use strict'; /* eslint-env node */ let TEST_SELECTOR_PREFIX = /data-test-.*/; function isTestSelector(attribute) { return TEST_SELECTOR_PREFIX.test(attribute); } function stripTestSelectors(node) { if ('sexpr' in node) { node = node.sexpr; } node.params = node.params.filter(function(param) { retur...
'use strict'; /* eslint-env node */ let TEST_SELECTOR_PREFIX = /data-test-.*/; function isTestSelector(attribute) { return TEST_SELECTOR_PREFIX.test(attribute); } function stripTestSelectors(node) { if ('sexpr' in node) { node = node.sexpr; } node.params = node.params.filter(function(param) { retur...
Use `traverse()` instead of the deprecated `Walker` class
Use `traverse()` instead of the deprecated `Walker` class
JavaScript
mit
simplabs/ember-test-selectors,simplabs/ember-test-selectors
--- +++ @@ -27,16 +27,22 @@ } StripTestSelectorsTransform.prototype.transform = function(ast) { - let walker = new this.syntax.Walker(); + let { traverse } = this.syntax; - walker.visit(ast, function(node) { - if (node.type === 'ElementNode') { + traverse(ast, { + ElementNode(node) { node.attri...
47dcd35d3834834d7e46b274c0828b82602df5a2
src/L.Control.Angular.js
src/L.Control.Angular.js
'use strict'; L.Control.Angular = L.Control.extend({ options: { position: 'bottomleft', template: '' }, onAdd: function(map) { var that = this; var container = L.DomUtil.create('div', 'angular-control-leaflet'); angular.element(document).ready(function() { ...
'use strict'; L.Control.Angular = L.Control.extend({ options: { position: 'bottomleft', template: '' }, onAdd: function onAdd (map) { var that = this; var container = L.DomUtil.create('div', 'angular-control-leaflet'); angular.element(document).rea...
Add di to allow access to the control's options from its angular controller
Add di to allow access to the control's options from its angular controller
JavaScript
mit
grantHarris/leaflet-control-angular
--- +++ @@ -5,9 +5,10 @@ position: 'bottomleft', template: '' }, - onAdd: function(map) { + onAdd: function onAdd (map) { var that = this; var container = L.DomUtil.create('div', 'angular-control-leaflet'); + angular.element(document).ready(func...
a936197d853cf9309aa23b712a51853376c7bb13
lib/BaseHash.js
lib/BaseHash.js
/** * Message for errors when some method is not implemented * @type {String} * @private */ var NEED_IMPLEMENT_MESSAGE = "This method need to implement"; /** * BaseHash class * @constructor */ function BaseHash(options) { if (typeof options === 'string') { this.setData(options); } else if (typeo...
/** * Message for errors when some method is not implemented * @type {String} * @private */ var NEED_IMPLEMENT_MESSAGE = "This method need to implement"; /** * BaseHash class * @constructor */ function BaseHash(options) { if (!options) { throw new Error('You must provide data'); } if (Objec...
Fix bug with array and object data
Fix bug with array and object data
JavaScript
mit
ghaiklor/data-2-hash
--- +++ @@ -10,12 +10,14 @@ * @constructor */ function BaseHash(options) { - if (typeof options === 'string') { - this.setData(options); - } else if (typeof options === 'object' && options.data) { + if (!options) { + throw new Error('You must provide data'); + } + + if (Object.protot...
80cc141b8a08bc195bf51c5445cc76fb0e5a0809
config/tailwindcss-config.js
config/tailwindcss-config.js
module.exports = { content: [ './app/**/*.{html,hbs,js}' ], darkMode: false, // or 'media' or 'class' theme: { extend: {} }, plugins: [ require('@tailwindcss/forms') ] }
module.exports = { content: [ './app/**/*.{html,hbs,js}' ], darkMode: 'class', // or 'media' or 'class' theme: { extend: {} }, plugins: [ require('@tailwindcss/forms') ] }
Update deprecated Tailwind config value
Update deprecated Tailwind config value
JavaScript
mpl-2.0
67P/hyperchannel,67P/hyperchannel
--- +++ @@ -2,7 +2,7 @@ content: [ './app/**/*.{html,hbs,js}' ], - darkMode: false, // or 'media' or 'class' + darkMode: 'class', // or 'media' or 'class' theme: { extend: {} },
1aaeff5c1d3709948b6f6f6435635b339fc5d83c
app/assets/javascripts/search.js
app/assets/javascripts/search.js
$(function() { var $tabs = $('#search-results-tabs'), $searchForm = $('.js-search-hash'); if($tabs.length > 0){ $tabs.tabs({ 'defaultTab' : getDefaultSearchTabIndex(), scrollOnload: true }); } function getDefaultSearchTabIndex(){ var tabIds = $('.search-navigation a').map(function(i, el){ ...
$(function() { var $tabs = $('#search-results-tabs'), $searchForm = $('.js-search-hash'); if($tabs.length > 0){ $tabs.tabs({ 'defaultTab' : getDefaultSearchTabIndex(), scrollOnload: true }); } function getDefaultSearchTabIndex(){ var tabIds = $('.search-navigation a').map(function(i, el){ ...
Tidy up whitespace and line-endings
Tidy up whitespace and line-endings
JavaScript
mit
alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend
--- +++ @@ -8,10 +8,10 @@ function getDefaultSearchTabIndex(){ var tabIds = $('.search-navigation a').map(function(i, el){ - return $(el).attr('href').split('#').pop(); - }), - $defaultTab = $('input[name=tab]'), - selectedTab = $.inArray($defaultTab.val(), tabIds); + retu...
3af3831986136005504d4db5580e886ab83b2a35
app/components/edit-interface.js
app/components/edit-interface.js
import Ember from 'ember'; import EmberValidations from 'ember-validations'; export default Ember.Component.extend(EmberValidations, { classNames: ["edit-interface"], validations: { 'changes': { changeset: true, } }, /* This is only required because ember-validations doesn't correctly observe chi...
import Ember from 'ember'; import EmberValidations from 'ember-validations'; export default Ember.Component.extend(EmberValidations, { classNames: ["edit-interface"], validations: { 'changes': { changeset: true, } }, /* This is only required because ember-validations doesn't correctly observe chi...
Add new meaning should have synonyms added too (empty array)
Add new meaning should have synonyms added too (empty array)
JavaScript
mit
wordset/wordset-ui,BryanCode/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui
--- +++ @@ -14,7 +14,7 @@ }.observes("hup.at"), actions: { addNewMeaning() { - this.get("changes.meanings").pushObject(new Object({action: "add", def: "", example: "", labels: []})); + this.get("changes.meanings").pushObject(new Object({action: "add", def: "", example: "", labels: [], synonyms: [...
988845fff293580680805c952ad6842e7f9b3dc3
src/modules/drawer/index.js
src/modules/drawer/index.js
import React from 'react' import MuiDrawer from 'material-ui/Drawer' import MenuItem from 'material-ui/MenuItem' import muiThemeable from 'material-ui/styles/muiThemeable'; import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import * as drawerActions from './dux' class Drawer extends React...
import React from 'react' import MuiDrawer from 'material-ui/Drawer' import MenuItem from 'material-ui/MenuItem' import { Link } from 'react-router-dom' import muiThemeable from 'material-ui/styles/muiThemeable'; import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import * as drawerActions ...
Make the drawer behave like a mobile drawer Close when you click away. Grey out the background when the menu is up.
Make the drawer behave like a mobile drawer Close when you click away. Grey out the background when the menu is up.
JavaScript
apache-2.0
davidharting/react-redux-example,davidharting/react-redux-example
--- +++ @@ -1,29 +1,50 @@ import React from 'react' import MuiDrawer from 'material-ui/Drawer' import MenuItem from 'material-ui/MenuItem' +import { Link } from 'react-router-dom' import muiThemeable from 'material-ui/styles/muiThemeable'; import { connect } from 'react-redux' import { bindActionCreators } from...
4973763838d745cdc236f3bb985f8ef107d03476
src/modules/getIconLinks.js
src/modules/getIconLinks.js
const cheerio = require('cheerio'); const url = require('url'); function hrefIsIcon(href) { return /\w\.(png|jpg|ico)/.test(href); } function getIconLinks(rootUrl, dom) { var $ = cheerio.load(dom); const icons = []; $('link').each(function(i, elem) { const href = $(this).attr('href'); ...
const cheerio = require('cheerio'); const url = require('url'); function hrefIsIcon(href) { return /((icon.*\.(png|jpg))|(\w+\.ico))$/.test(href); } function getIconLinks(rootUrl, dom) { var $ = cheerio.load(dom); const icons = []; $('link').each(function(i, elem) { const href = $(this).attr('...
Check for `icon` in icon path
Check for `icon` in icon path
JavaScript
mit
jiahaog/page-icon
--- +++ @@ -2,7 +2,7 @@ const url = require('url'); function hrefIsIcon(href) { - return /\w\.(png|jpg|ico)/.test(href); + return /((icon.*\.(png|jpg))|(\w+\.ico))$/.test(href); } function getIconLinks(rootUrl, dom) {
aad4f74eeaac1bd4428bcd74a3627209ac477b8e
lib/faexport/public/js/faexport.js
lib/faexport/public/js/faexport.js
$(function() { function update() { var name = $('#boxes #name').val(); var id = $('#boxes #id').val(); if (name || id) { if (!name) { name = "{name}"; } if (!id) { id = "{id}"; } $('#links').show(); $('.resource').each(function() { ...
'use strict'; $(function() { function update() { var name = $('#boxes #name').val(); var id = $('#boxes #id').val(); if (name || id) { if (!name) { name = "{name}"; } if (!id) { id = "{id}"; } $('#links').show(); $('.resource').each(function()...
Add 'use strict' to javascript
Add 'use strict' to javascript
JavaScript
bsd-3-clause
boothale/faexport,boothale/faexport,boothale/faexport
--- +++ @@ -1,3 +1,5 @@ +'use strict'; + $(function() { function update() { var name = $('#boxes #name').val();
5fc5dab5c4a2a7972cac711b562bd4f981b9215c
src/modules/view/getters.js
src/modules/view/getters.js
import { Immutable } from 'nuclear-js'; import { getters as entityGetters } from '../entity'; const DEFAULT_VIEW_ENTITY_ID = 'group.default_view'; export const currentView = [ 'currentView', ]; export const views = [ entityGetters.entityMap, entities => entities.filter(entity => entity.domain === 'group' && ...
import { Immutable } from 'nuclear-js'; import { getters as entityGetters } from '../entity'; const DEFAULT_VIEW_ENTITY_ID = 'group.default_view'; export const currentView = [ 'currentView', ]; export const views = [ entityGetters.entityMap, entities => entities.filter(entity => entity.domain === 'group' && ...
Allow embedding groups in groups
Allow embedding groups in groups
JavaScript
mit
balloob/home-assistant-js
--- +++ @@ -14,7 +14,7 @@ entity.entityId !== DEFAULT_VIEW_ENTITY_ID), ]; -function addToMap(map, entities, groupEntity) { +function addToMap(map, entities, groupEntity, recurse = true) { groupEntity.attributes.entity_id.forEach(entityId => { if (map.has(entityId)) ...
4bfb7f5c8e80b9c7009ac388f55843aec7dc8f12
src/utils/columnAccessor.spec.js
src/utils/columnAccessor.spec.js
import columnAccessor from './columnAccessor'; describe('Util:columnAccessor', () => { it('should run this test', () => { const accessor = columnAccessor({ column: 'foo' }); const d = { foo: 5 }; expect(accessor(d)).toEqual(5); }); });
import columnAccessor from './columnAccessor'; describe('Util:columnAccessor', () => { it('should access the value of a column', () => { const accessor = columnAccessor({ column: 'foo' }); const d = { foo: 5 }; expect(accessor(d)).toEqual(5); }); it('should apply a number formatter'...
Add test for number formatter
Add test for number formatter
JavaScript
bsd-3-clause
nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework
--- +++ @@ -1,9 +1,14 @@ import columnAccessor from './columnAccessor'; describe('Util:columnAccessor', () => { - it('should run this test', () => { + it('should access the value of a column', () => { const accessor = columnAccessor({ column: 'foo' }); const d = { foo: 5 }; expect...
ec6597383ddfcae4e0a0c4015b7315aef0e5caf3
src/reducers/course-reducer.js
src/reducers/course-reducer.js
import * as types from '../actions/action-types'; export default (state = [], action) => { switch (action.type) { case types.CREATE_COURSE: return [ ...state, Object.assign({}, action.course), ]; default: return state; } };
import * as types from '../actions/action-types'; export default (state = [], action) => { switch (action.type) { case types.LOAD_COURSES_SUCCESS: return action.courses; default: return state; } };
Load courses in the reducer
Load courses in the reducer
JavaScript
mit
joilson-cisne/react-redux-es6,joilson-cisne/react-redux-es6
--- +++ @@ -2,11 +2,8 @@ export default (state = [], action) => { switch (action.type) { - case types.CREATE_COURSE: - return [ - ...state, - Object.assign({}, action.course), - ]; + case types.LOAD_COURSES_SUCCESS: + return action.courses; default: ...
f27949cfbb5eaf7d7517cc1c15cdbe9dc4c09e1f
app/config/config.views.js
app/config/config.views.js
[ { "name": "Textstring", "path": "/umbraco/views/propertyeditors/textbox/textbox.html" }, { "name": "Content Picker", "path": "/umbraco/views/propertyeditors/contentpicker/contentpicker.html" }, { "name": "Boolean", "path": "/umbraco/views/propertyedi...
[ { "name": "Textstring", "path": "/umbraco/views/propertyeditors/textbox/textbox.html" }, { "name": "Content Picker", "path": "/umbraco/views/propertyeditors/contentpicker/contentpicker.html" }, { "name": "Boolean", "path": "/umbraco/views/propertyedi...
Add a few new Core Editors
Add a few new Core Editors
JavaScript
mit
imulus/Archetype,tomfulton/Archetype,imulus/Archetype,Nicholas-Westby/Archetype,Nicholas-Westby/Archetype,kgiszewski/Archetype,tomfulton/Archetype,kjac/Archetype,tomfulton/Archetype,imulus/Archetype,Nicholas-Westby/Archetype,kjac/Archetype,kgiszewski/Archetype,kipusoep/Archetype,kgiszewski/Archetype,kipusoep/Archetype,...
--- +++ @@ -18,5 +18,21 @@ { "name": "Radio Buttons", "path": "/umbraco/views/propertyeditors/radiobuttons/radiobuttons.html" + }, + { + "name": "Date Picker", + "path": "/umbraco/views/propertyeditors/datepicker/datepicker.html" + }, + { + "name": "Dropdown", +...
a3f29a4d4e2f7ebe98461c92da50cc3a914360e7
content.js
content.js
chrome .runtime .sendMessage({ msg: 'getStatus' }, function (response) { if (response.status) { let storage = chrome.storage.local; storage.get(['type', 'freq', 'q', 'gain'], function (items) { type = items.type || 'highshelf'; freq = items.freq || '17999'; q = items.q || '0...
function createScript(property, source) { let scriptElement = document.createElement('script'); scriptElement['property'] = source; return scriptElement; } function injectScript(script) { (document.head || document.documentElement).appendChild(script); } chrome .runtime .sendMessage({ msg: 'getStatus' }, ...
Make script injection more abstract
Make script injection more abstract
JavaScript
apache-2.0
ubeacsec/Silverdog,ubeacsec/Silverdog
--- +++ @@ -1,3 +1,13 @@ +function createScript(property, source) { + let scriptElement = document.createElement('script'); + scriptElement['property'] = source; + return scriptElement; +} + +function injectScript(script) { + (document.head || document.documentElement).appendChild(script); +} + chrome .runtim...
60603f0620732a9bf3fe9697ebbd8427be89d8ac
lib/defaults.js
lib/defaults.js
module.exports = { loadPlugins: false , cms_methods: true , plugins: [] , pluginConfigs: {} , metadata: { siteTitle: "No name" , description: "Foo" } , corePlugins: [ "bloggify-router" , "bloggify-plugin-manager" ] , pluginConfigs: { "bloggify-plugin-manager":...
module.exports = { loadPlugins: false , cms_methods: true , plugins: [] , pluginConfigs: {} , metadata: { siteTitle: "No name" , description: "Foo" } , corePlugins: [ "bloggify-router" , "bloggify-plugin-manager" ] , pluginConfigs: { "bloggify-plugin-manager":...
Add an alias for bloggify on the client
Add an alias for bloggify on the client
JavaScript
mit
Bloggify/Bloggify
--- +++ @@ -50,4 +50,9 @@ , publicTheme: "/!/bloggify/theme/" , cssUrls: "/!/bloggify/css-urls/" } + , bundler: { + aliases: { + "bloggify": `${__dirname}/client/index.js` + } + } };
ab612a1e43f7d66ecef3dd08745868c827c158cf
gulpfile.js
gulpfile.js
const babel = require('gulp-babel'); const gulp = require('gulp'); const pug = require('gulp-pug'); const uglify = require('gulp-uglify'); gulp.task('build', () => { gulp.src('app/src/pug/*') .pipe(pug()) .pipe(gulp.dest('app/dist')); gulp.src('app/src/js/*') .pipe(babel({presets: ['es2015']})) .pipe(uglify...
const babel = require('gulp-babel'); const cssnano = require('cssnano'); const gulp = require('gulp'); const postcss = require('gulp-postcss'); const pug = require('gulp-pug'); const uglify = require('gulp-uglify'); gulp.task('build', () => { gulp.src('app/src/pug/*') .pipe(pug()) .pipe(gulp.dest('app/dist')); ...
Add css processing to `gulp build`
Add css processing to `gulp build`
JavaScript
mit
wulkano/kap,albinekb/kap,albinekb/kap,albinekb/kap
--- +++ @@ -1,5 +1,7 @@ const babel = require('gulp-babel'); +const cssnano = require('cssnano'); const gulp = require('gulp'); +const postcss = require('gulp-postcss'); const pug = require('gulp-pug'); const uglify = require('gulp-uglify'); @@ -8,6 +10,10 @@ .pipe(pug()) .pipe(gulp.dest('app/dist')); +...
73d920d2b938af78ed5a6828fd303ba7486af3c7
gulpfile.js
gulpfile.js
var gulp = require('gulp'), browserSync = require('browser-sync'), sass = require('gulp-sass'), bower = require('gulp-bower'), notify = require('gulp-notify'), reload = browserSync.reload, bs = require("browser-sync").create(), Hexo = require('hexo'), ...
var gulp = require('gulp'), browserSync = require('browser-sync'), sass = require('gulp-sass'), bower = require('gulp-bower'), notify = require('gulp-notify'), reload = browserSync.reload, bs = require("browser-sync").create(), Hexo = require('hexo'), ...
Fix changes so it'll start tracking css watches
Fix changes so it'll start tracking css watches
JavaScript
mit
chrisjlee/hexo-theme-zurb-foundation,wakermahmud/Moretaza
--- +++ @@ -13,24 +13,25 @@ scss: './scss/', css: './source/css', ejs: 'layout' -}; +}, +watchFiles = [ + './scss/*.scss', + '*/*.ejs' +]; // Static Server + watching scss/html files -gulp.task('serve', ['sass'], function() { +gulp.task('serve', ['sass:watch'], function() { // init sta...
1da97a23950b7248b493d391ea916f907236297f
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var sassLint = require('gulp-sass-lint'); var concat = require('gulp-concat'); var sourcemaps = require('gulp-sourcemaps'); var babel = require('gulp-babel'); gulp.task('babel', function() { return gulp.src('app/Resources/client/jsx/projec...
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var sassLint = require('gulp-sass-lint'); var concat = require('gulp-concat'); var sourcemaps = require('gulp-sourcemaps'); var babel = require('gulp-babel'); require('babel-core/register'); // testing var mocha = require('gulp-mocha'); gulp....
Add test task to gulp
Add test task to gulp
JavaScript
mit
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
--- +++ @@ -6,6 +6,10 @@ var concat = require('gulp-concat'); var sourcemaps = require('gulp-sourcemaps'); var babel = require('gulp-babel'); +require('babel-core/register'); +// testing +var mocha = require('gulp-mocha'); + gulp.task('babel', function() { return gulp.src('app/Resources/client/jsx/project/...
dec3f18d5411344e652329ba439589b4c62fbbbd
app/service/ServiceReferential.js
app/service/ServiceReferential.js
/* global Promise */ var Reference = require('../models/reference'); var reference = new Reference(); // var References = require('../models/references'); // var references = new References(); var Promisify = require('../models/promisify'); var promiseCollection = new Promisify.Collection(); promiseCollection.url = ref...
/* global Promise */ var Reference = require('../models/reference'); var References = require('../models/references'); var Promisify = require('../models/promisify'); /*Instances of both model and collection of virtual machines.*/ var promiseReference = Promisify.Convert.Model(new Reference()); var promiseReferences = ...
Add the promisification in the service in order to be treated by the view.
Add the promisification in the service in order to be treated by the view.
JavaScript
mit
KleeGroup/front-end-spa,pierr/front-end-spa,KleeGroup/front-end-spa,pierr/front-end-spa
--- +++ @@ -1,11 +1,10 @@ /* global Promise */ var Reference = require('../models/reference'); -var reference = new Reference(); -// var References = require('../models/references'); -// var references = new References(); +var References = require('../models/references'); var Promisify = require('../models/promisi...
5810a06a5db9e393b1a5bd163eb1df398cd5e564
src/api/token-api.js
src/api/token-api.js
const API_URL = 'https://d07a5522.ngrok.io' export const saveTokenForPush = subscription => fetch(`${API_URL}/token`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, mode: 'no-cors', body: JSON.stringify(subscription) })
const API_URL = 'https://build-notification-api.herokuapp.com' export const saveTokenForPush = subscription => fetch(`${API_URL}/token`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, mode: 'no-cors', body: JSON.stringify(subscription) })
Update the url for the build-notification-api
Update the url for the build-notification-api
JavaScript
mit
addityasingh/build-notification-app,addityasingh/build-notification-app
--- +++ @@ -1,4 +1,4 @@ -const API_URL = 'https://d07a5522.ngrok.io' +const API_URL = 'https://build-notification-api.herokuapp.com' export const saveTokenForPush = subscription => fetch(`${API_URL}/token`, {
17f13f03b0efabbc865bb093061c07aef7231fd2
app/simple-example/simple-test.js
app/simple-example/simple-test.js
importScripts("/app/bower_components/videogular-questions/questions-worker.js"); loadAnnotations({ "first-question": { time: 4, questions: [ { id: "first-question", type: "single", question: "What is the moon made of?", options: [ { name: "cheese" }, { name: "cheeese...
importScripts("/app/bower_components/videogular-questions/questions-worker.js"); loadAnnotations({ "first-question": { time: 4, questions: [ { id: "first-question", type: "single", question: "What is the moon made of?", options: [ { name: "cheese" }, { name: "cheeese...
Move the action to the outer question object
Move the action to the outer question object This is a bit more question independant, and more expressive.
JavaScript
mit
soton-ecs-2014-gdp-12/videogular-questions-example,soton-ecs-2014-gdp-12/videogular-questions-example
--- +++ @@ -27,15 +27,17 @@ question: "Answer incorrect, do you want to review the video", options: [ { - name: "Yes", - action: function(video) { - video.setTime(0); - } + name: "Yes" }, { name: "No" } ], + action: function(result, video) { +...
2da4cdcfb0617c1a13b9740aa8a9025a1f67a048
lib/clearfix.js
lib/clearfix.js
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-clears/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-clears/tachyons-clears.min.css', 'utf8') var moduleObj = css...
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-clears/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-clears/tachyons-clears.min.css', 'utf8') var moduleObj = css...
Add site footer to each documentation generator
Add site footer to each documentation generator
JavaScript
mit
matyikriszta/moonlit-landing-page,cwonrails/tachyons,fenderdigital/css-utilities,fenderdigital/css-utilities,topherauyeung/portfolio,getfrank/tachyons,topherauyeung/portfolio,topherauyeung/portfolio,tachyons-css/tachyons,pietgeursen/pietgeursen.github.io
--- +++ @@ -11,7 +11,7 @@ var srcCSS = fs.readFileSync('./src/_clearfix.css', 'utf8') var navDocs = fs.readFileSync('./templates/nav_docs.html', 'utf8') - +var siteFooter = fs.readFileSync('./templates/footer.html', 'utf8') var template = fs.readFileSync('./templates/docs/clearfix/index.html', 'utf8') var tpl...
85f9bb332079ba9012713c4ae2793a657b5529e7
content.js
content.js
//Get the begin and end coordinates of selction function getSelectionEnds() { var success = false, x1 = 0, y1 = 0, x2 = 0, y2 = 0; var sel = window.getSelection() if (sel.rangeCount > 0){ var range_rects = sel.getRangeAt(0).getClientRects(); if (range_rects.length > 0){ //fail if zero ...
//Get the begin and end coordinates of selction function getSelectionEnds() { var success = false, x1 = 0, y1 = 0, x2 = 0, y2 = 0; var sel = window.getSelection() if (sel.rangeCount > 0){ var range_rects = sel.getRangeAt(0).getClientRects(); if (range_rects.length > 0){ //fail if zero ...
Add Event Listener to window.resize
Add Event Listener to window.resize
JavaScript
mit
glgh/perfect-reader,glgh/perfect-reader
--- +++ @@ -17,7 +17,13 @@ return {success: success, x1: x1, y1: y1, x2: x2, y2: y2}; } +// A side note: use event listener, not inline event handlers (e.g., "onclick") +// new inline events could overwrite any existing inline event handlers document.addEventListener("mouseup", function(event) { chrom...
8f9a3159f14ca9b04098485628e8b199ccba3738
api/lib/log/logger.js
api/lib/log/logger.js
// TODO: To decide and adopt to some logging utility like winston module.exports = { info: function(message,context) { if(context) { console.log(message,JSON.stringify(context, null, 2)); } else { console.log(message); } }, error: function(message, error) { console.error(messa...
// TODO: To decide and adopt to some logging utility like winston var util = require('util'); module.exports = { info: function(message,context) { if(context) { console.log(message, util.format('%j', context)); } else { console.log(message); } }, error: function(message, error) {...
Fix multi-line log output in app logs
Fix multi-line log output in app logs
JavaScript
apache-2.0
pradyutsarma/app-autoscaler,cloudfoundry-incubator/app-autoscaler,cloudfoundry-incubator/app-autoscaler,pradyutsarma/app-autoscaler,qibobo/app-autoscaler,qibobo/app-autoscaler,pradyutsarma/app-autoscaler,cloudfoundry-incubator/app-autoscaler,pradyutsarma/app-autoscaler,qibobo/app-autoscaler,cloudfoundry-incubator/app-a...
--- +++ @@ -1,8 +1,10 @@ // TODO: To decide and adopt to some logging utility like winston +var util = require('util'); + module.exports = { info: function(message,context) { if(context) { - console.log(message,JSON.stringify(context, null, 2)); + console.log(message, util.format('%j', context)); ...
8cc92420c4b8313c2826cdfef88e160e1323bf21
generator-lateralus/component/templates/main.js
generator-lateralus/component/templates/main.js
define([ 'lateralus' ,'./model' ,'./view' ,'text!./template.mustache' ], function ( Lateralus ,Model ,View ,template ) { 'use strict'; var {{componentClassName}}Component = Lateralus.Component.extend({ name: '{{componentName}}' ,Model: Model ,View: View ,template: template }...
define([ 'lateralus' ,'./model' ,'./view' ,'text!./template.mustache' ], function ( Lateralus ,Model ,View ,template ) { 'use strict'; var Base = Lateralus.Component; var {{componentClassName}}Component = Base.extend({ name: '{{componentName}}' ,Model: Model ,View: View ,te...
Add Base pattern to Component template.
Add Base pattern to Component template.
JavaScript
mit
Jellyvision/lateralus,Jellyvision/lateralus
--- +++ @@ -17,7 +17,9 @@ ) { 'use strict'; - var {{componentClassName}}Component = Lateralus.Component.extend({ + var Base = Lateralus.Component; + + var {{componentClassName}}Component = Base.extend({ name: '{{componentName}}' ,Model: Model ,View: View
fe0170e9ebf81bc97cddf30491c6b53d03833b93
backend/server/db/model/index.js
backend/server/db/model/index.js
module.exports = function models(r) { return { projects: require('./projects')(r), users: require('./users')(r), samples: require('./samples')(r), access: require('./access')(r), files: require('./files')(r) }; };
module.exports = function models(r) { return { projects: require('./projects')(r), users: require('./users')(r), samples: require('./samples')(r), access: require('./access')(r), files: require('./files')(r), r: r }; };
Make database available as an export.
Make database available as an export.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
--- +++ @@ -4,6 +4,7 @@ users: require('./users')(r), samples: require('./samples')(r), access: require('./access')(r), - files: require('./files')(r) + files: require('./files')(r), + r: r }; };
63cd82ee1b085968de51be944dbc65b431418c87
web/src/index.js
web/src/index.js
/** * Main entry point for budget web app */ import React from 'react'; import { AppContainer } from 'react-hot-loader'; import { render } from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; import store from './store'; import Root from '~client/containers/Root'; import './images/favicon.png'; fun...
import '@babel/polyfill'; import React from 'react'; import { AppContainer } from 'react-hot-loader'; import { render } from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; import store from './store'; import Root from '~client/containers/Root'; import './images/favicon.png'; function renderApp(RootC...
Use babel polyfill on frontend
Use babel polyfill on frontend
JavaScript
mit
felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget
--- +++ @@ -1,6 +1,4 @@ -/** - * Main entry point for budget web app - */ +import '@babel/polyfill'; import React from 'react'; import { AppContainer } from 'react-hot-loader';
6ba32e797ea1037726eeea0501bf7f5bc5032433
src/assets/AppAssetFiles/js/panel.js
src/assets/AppAssetFiles/js/panel.js
/** * Scroll to element * @param element */ function scrollTo(element, duration) { duration = duration || 500; if (!element) return false; var elem = $(element).offset(); if (elem.top) { $('html, body').animate({ scrollTop: elem.top }, duration); } }
/** * Scroll to element * @param element */ function scrollTo(element, duration) { duration = duration || 500; if (!element) return false; var elem = $(element).offset(); if (elem.top) { $('html, body').animate({ scrollTop: elem.top }, duration); } } (function () { ...
Allow some tags in whitelist
Allow some tags in whitelist
JavaScript
bsd-3-clause
hiqdev/hipanel-core,hiqdev/hipanel-core,hiqdev/hipanel-core,hiqdev/hipanel-core
--- +++ @@ -12,3 +12,15 @@ }, duration); } } + +(function () { + try { + var tooltipElementsWhitelist = $.fn.tooltip.Constructor.DEFAULTS.whiteList + tooltipElementsWhitelist.table = [] + tooltipElementsWhitelist.thead = [] + tooltipElementsWhitelist.tbody = [] + t...
5f8ad093e4a856d0d32542226259524acfd7f22a
src/store/configureStore.js
src/store/configureStore.js
import {createStore, applyMiddleware} from "redux"; import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly'; import thunk from "redux-thunk"; import rootReducer from "../reducers/rootReducer"; export default function configureStore(preloadedState) { const middlewares = [thunk]; const m...
import {createStore, applyMiddleware} from "redux"; import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly'; import thunk from "redux-thunk"; import rootReducer from "../reducers/rootReducer"; export default function configureStore(preloadedState) { const middlewares = [thunk]; const m...
Configure Hot Module Replacement for the reducer logic
Configure Hot Module Replacement for the reducer logic
JavaScript
mit
markerikson/project-minimek,markerikson/project-minimek
--- +++ @@ -19,5 +19,14 @@ composedEnhancer ); + if(process.env.NODE_ENV !== "production") { + if(module.hot) { + module.hot.accept("../reducers/rootReducer", () =>{ + const newRootReducer = require("../reducers/rootReducer").default; + store.replaceR...
9a34bf400a045a469ee32ed3e80002d9d9db8223
test/renderer/agendas/index_spec.js
test/renderer/agendas/index_spec.js
import { expect } from 'chai'; import { updateCellSource, executeCell } from '../../../src/notebook/actions'; import { liveStore, dispatchQueuePromise, waitForOutputs } from '../../utils'; describe('agendas.executeCell', function() { this.timeout(5000); it('produces the right output', () => { return liveStore...
import { expect } from 'chai'; import { updateCellSource, executeCell } from '../../../src/notebook/actions'; import { liveStore, dispatchQueuePromise, waitForOutputs } from '../../utils'; describe('agendas.executeCell', function() { this.timeout(5000); it('produces the right output', (done) => { setTimeout(d...
Call setTimeout in test case
Call setTimeout in test case
JavaScript
bsd-3-clause
captainsafia/nteract,0u812/nteract,0u812/nteract,jdfreder/nteract,jdetle/nteract,captainsafia/nteract,jdetle/nteract,nteract/nteract,nteract/composition,rgbkrk/nteract,nteract/nteract,0u812/nteract,captainsafia/nteract,jdfreder/nteract,rgbkrk/nteract,temogen/nteract,jdfreder/nteract,jdetle/nteract,nteract/nteract,jdfre...
--- +++ @@ -5,7 +5,8 @@ describe('agendas.executeCell', function() { this.timeout(5000); - it('produces the right output', () => { + it('produces the right output', (done) => { + setTimeout(done, 5000); return liveStore((kernel, dispatch, store) => { const cellId = store.getState().document.get...
4d30906bf9300438e6a421dc69d278a8e3549271
api-analytics/service-worker.js
api-analytics/service-worker.js
// In a real use case, the endpoint could point to another origin. var LOG_ENDPOINT = 'report/logs'; // The code in `oninstall` and `onactive` force the service worker to // control the clients ASAP. self.oninstall = function(event) { event.waitUntil(self.skipWaiting()); }; self.onactivate = function(event) { eve...
// In a real use case, the endpoint could point to another origin. var LOG_ENDPOINT = 'report/logs'; // The code in `oninstall` and `onactive` force the service worker to // control the clients ASAP. self.oninstall = function(event) { event.waitUntil(self.skipWaiting()); }; self.onactivate = function(event) { eve...
Clarify fetch handler in the api-analytics recipe
Clarify fetch handler in the api-analytics recipe
JavaScript
mit
mozilla/serviceworker-cookbook,mozilla/serviceworker-cookbook
--- +++ @@ -11,19 +11,31 @@ event.waitUntil(self.clients.claim()); }; -// Fetch is as simply as log the request and passthrough. -// Water clear thanks to the promise syntax! self.onfetch = function(event) { - event.respondWith(log(event.request).then(fetch)); + + event.respondWith( + // Log the request ....
88da7f4c79a6abf8589dfcc53ca507086e831abb
paragraph.js
paragraph.js
const _ = require('lodash'); const uuidV4 = require('uuid/v4'); const Sentence = require('./sentence'); class Text { constructor(text) { let paragraphs = _.chain(text).split('\n').compact() .map((text, index) => new Paragraph(text, index)) .value(); return paragraphs; } } let sentences = new ...
const _ = require('lodash'); const uuidV4 = require('uuid/v4'); const Sentence = require('./sentence'); class Text { constructor(parent, text) { let paragraphs = _.chain(text).split('\n').compact() .map((text, index) => new Paragraph(parent, text, index)) .value(); return paragraphs; } } let ...
Add more method and refactor code.
Add more method and refactor code. Constructor first argument is a parent text. - parent() get paragraph parent which is a text. Adding lookup methods, they are: - findSentenceById() = find a sentence by its id in the sentencesCollection - findSentenceByIndex = find a sentence by its index in the sentencesCollection ...
JavaScript
mit
raitucarp/paratree
--- +++ @@ -3,9 +3,9 @@ const Sentence = require('./sentence'); class Text { - constructor(text) { + constructor(parent, text) { let paragraphs = _.chain(text).split('\n').compact() - .map((text, index) => new Paragraph(text, index)) + .map((text, index) => new Paragraph(parent, text, index)) ...
04dba251aa62d44da1bdec120db116091ebb0d64
bin/skeletons/project/api/init.js
bin/skeletons/project/api/init.js
/** * @file init.js * Custom initialization for your app. Use this space to attach any pre/post * hooks your setup will need. This is executed after the Router and * AutoLoader have been set up, but before drive() is called. */ var turnpike = require('turnpike'); // This hook lets you attach your own middleware ...
/** * @file init.js * Custom initialization for your app. Use this space to attach any pre/post * hooks your setup will need. */ var turnpike = require('turnpike'); // This hook lets you attach your own middleware to Turnpike's Connect object. turnpike.Driver.pre('startServer', function(next, app, cb){ next(a...
Fix a lie in a comment
Fix a lie in a comment
JavaScript
mit
jay-depot/turnpike,jay-depot/turnpike
--- +++ @@ -1,8 +1,7 @@ /** * @file init.js * Custom initialization for your app. Use this space to attach any pre/post - * hooks your setup will need. This is executed after the Router and - * AutoLoader have been set up, but before drive() is called. + * hooks your setup will need. */ var turnpike = requi...
a742374a5b0878c23de946e9aadf4a78593e68e8
lib/linguist.js
lib/linguist.js
const spawnSync = require('child_process').spawnSync; class Linguist { /** * Returns the languages found in the project. * Associate Array of language String to Array of filenames that are written in that language * * Throws 'Linguist not installed' error if command line of 'linguist' is not available....
const spawnSync = require('child_process').spawnSync; class Linguist { /** * Returns the languages found in the project. * Associate Array of language String to Array of filenames that are written in that language * * Throws 'Linguist not installed' error if command line of 'linguist' is not available....
Add Sync to method name as it's Sync reliant
Add Sync to method name as it's Sync reliant
JavaScript
apache-2.0
todogroup/repolinter,trevmex/repolinter,todogroup/repolinter,trevmex/repolinter
--- +++ @@ -8,7 +8,7 @@ * * Throws 'Linguist not installed' error if command line of 'linguist' is not available. */ - identify_languages(targetDir) { + identifyLanguagesSync(targetDir) { const linguistOutput = spawnSync('linguist', [targetDir, '--json']).stdout; if(linguistOutput == null) { ...
97ee55c563de51d4a5612092c211c537f140b316
gulpfile.babel.js
gulpfile.babel.js
import path from 'path'; import mixins from 'postcss-mixins'; import nested from 'postcss-nested'; import extend from 'postcss-extend'; import repeat from 'postcss-for'; import simpleVars from 'postcss-simple-vars'; import each from 'postcss-each'; import cssMqpacker from 'css-mqpacker'; import gulp from 'gulp'...
import path from 'path'; import mixins from 'postcss-mixins'; import nested from 'postcss-nested'; import extend from 'postcss-sass-extend'; import repeat from 'postcss-for'; import simpleVars from 'postcss-simple-vars' import cssMqpacker from 'css-mqpacker'; import gulp from 'gulp'; import gulpLoadPlugins from...
Use postcss-sass-extend instead of postcss-extend.
Use postcss-sass-extend instead of postcss-extend.
JavaScript
mit
sunya9/castella,sunya9/castella
--- +++ @@ -1,10 +1,9 @@ import path from 'path'; import mixins from 'postcss-mixins'; import nested from 'postcss-nested'; -import extend from 'postcss-extend'; +import extend from 'postcss-sass-extend'; import repeat from 'postcss-for'; -import simpleVars from 'postcss-simple-vars'; -import each from 'postcss-e...
66a8fd70d78cf502f3916686dbf097139e617a94
app/components/shared/Button.js
app/components/shared/Button.js
import React, { PropTypes } from 'react'; import { Text, TouchableHighlight } from 'react-native'; const Button = ({theme, disabled}) => { const {styles} = theme; const btnStyles = [styles.button]; if (disabled) { btnStyles.push(styles.buttonDisabled); } return ( <TouchableHighlight ...
import React, { PropTypes } from 'react'; import { Text, TouchableHighlight } from 'react-native'; const Button = ({theme, disabled, children, onPress}) => { const {styles} = theme; const btnStyles = [styles.button]; if (disabled) { btnStyles.push(styles.buttonDisabled); } return ( <Touchabl...
Fix button problem introduced in previous commit
Fix button problem introduced in previous commit
JavaScript
mit
uiheros/react-native-redux-todo-list,uiheros/react-native-redux-todo-list,uiheros/react-native-redux-todo-list
--- +++ @@ -4,7 +4,7 @@ TouchableHighlight } from 'react-native'; -const Button = ({theme, disabled}) => { +const Button = ({theme, disabled, children, onPress}) => { const {styles} = theme; const btnStyles = [styles.button]; if (disabled) { @@ -13,11 +13,11 @@ return ( <TouchableHighlight ...
4c4bd258b2bd4a3ef1b57bd0c020fbabe23ecb59
app/js/services/audiohandler.js
app/js/services/audiohandler.js
'use strict'; /* * Module for playing audio, now the Angular way! */ angular.module('audiohandler', []) .factory('audioFactory', function ($ionicPlatform, $window, $cordovaNativeAudio) { $ionicPlatform.ready(function () { if ($window.cordova) { $cordovaNativeAudio.preloadComplex('call', 'res...
'use strict'; /* * Module for playing audio, now the Angular way! */ angular.module('audiohandler', []) .factory('audioFactory', function ($ionicPlatform, $window, $cordovaNativeAudio) { $ionicPlatform.ready(function () { if ($window.cordova) { $cordovaNativeAudio.preloadComplex('dial', 'res...
Switch accidentally changed call and dial sounds
Switch accidentally changed call and dial sounds 
JavaScript
mit
learning-layers/sardroid,learning-layers/sardroid,learning-layers/sardroid
--- +++ @@ -8,8 +8,8 @@ .factory('audioFactory', function ($ionicPlatform, $window, $cordovaNativeAudio) { $ionicPlatform.ready(function () { if ($window.cordova) { - $cordovaNativeAudio.preloadComplex('call', 'res/sounds/dial.wav', 1, 1); - $cordovaNativeAudio.preloadComplex('dia...
883ec525c2d19d95fbf07e4c9317fa6e93ff0201
jquery.steamytext.js
jquery.steamytext.js
/** * @name jquery-steamytext * @version 1.0.0 * @description jQuery SteamyText animation plugin * @author Maxim Zalysin <max@zalysin.ru> */ (function($){ $.fn.steamyText = function(data){ var defaults = { text: '' , duration: 1500 , displace: 50 , tag: '...
/** * @name jquery-steamytext * @version 1.1.0 * @description jQuery SteamyText animation plugin * @author Maxim Zalysin <max@zalysin.ru> */ (function($){ $.fn.steamyText = function(data){ var defaults = { text: '', duration: 1500, displace: 50, tag: 'spa...
Set default zIndex to 10000
Set default zIndex to 10000
JavaScript
mit
magna-z/jquery-steamytext
--- +++ @@ -1,17 +1,17 @@ /** * @name jquery-steamytext - * @version 1.0.0 + * @version 1.1.0 * @description jQuery SteamyText animation plugin * @author Maxim Zalysin <max@zalysin.ru> */ (function($){ $.fn.steamyText = function(data){ var defaults = { - text: '' - , dura...
7b0c689275bc9cacc1c98edda482c76f62c26e54
js/htmlPlayerLogo.js
js/htmlPlayerLogo.js
(function() { function onPlayerReady() { var overlay = videoPlayer.overlay(); $(overlay).html('<img id="overlaylogo" src="http://cs1.brightcodes.net/ben/img/genericlogo.png" />') .css({ position:"relative" }); $("#overlaylogo").css({ posi...
(function() { function onPlayerReady() { var overlay = videoPlayer.overlay(); $(overlay).html('<img id="overlaylogo" src="http://cs1.brightcodes.net/ben/img/genericlogo.png" />') .css({ position:"fixed", height:"100%", width:"100%" ...
Update overlay positioning to fixed
Update overlay positioning to fixed
JavaScript
apache-2.0
mister-ben/Brightcove-Player-Logo
--- +++ @@ -4,7 +4,9 @@ var overlay = videoPlayer.overlay(); $(overlay).html('<img id="overlaylogo" src="http://cs1.brightcodes.net/ben/img/genericlogo.png" />') .css({ - position:"relative" + position:"fixed", + height:"100%", + ...
2a13d8a04cf0f15955ff605e00c22f4cd4150dc8
dev/app/shared/TB-Headerbar/tb-headerbar.directive.js
dev/app/shared/TB-Headerbar/tb-headerbar.directive.js
(function() { "use strict"; angular .module('VinculacionApp') .directive('tbHeaderbar', tbHeaderbar); function tbHeaderbar() { var directive = { restrict: 'E', scope: { expand: '=' }, templateUrl: 'templates/s...
(function() { "use strict"; angular .module('VinculacionApp') .directive('tbHeaderbar', tbHeaderbar); function tbHeaderbar() { var directive = { restrict: 'E', scope: { expand: '=?' }, templateUrl: 'templates/...
Make expand property optional for headerbar
Make expand property optional for headerbar
JavaScript
mit
Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC
--- +++ @@ -10,7 +10,7 @@ { restrict: 'E', scope: { - expand: '=' + expand: '=?' }, templateUrl: 'templates/shared/TB-Headerbar/tb-headerbar.html' };
abbead374f1dd20232a3c4275d5f52e5c4fd9e25
lib/slug_mapper.js
lib/slug_mapper.js
var _ = require('underscore'); var getSlug = require('speakingurl'); var SLUG_MAP_FILE = "src/data/slug_map.json"; module.exports = function(grunt) { function readMap() { try { return grunt.file.readJSON(SLUG_MAP_FILE); } catch (e) { return {}; } } var contents = r...
var _ = require('underscore'); var getSlug = require('speakingurl'); var SLUG_MAP_FILE = "src/data/slug_map.json"; module.exports = function(grunt) { function readMap() { try { return grunt.file.readJSON(SLUG_MAP_FILE); } catch (e) { return {}; } } var contents = r...
Handle slug collisions by adding a little salt.
Handle slug collisions by adding a little salt.
JavaScript
mit
collective-archive/collective-archive-site-generator
--- +++ @@ -15,15 +15,28 @@ var contents = readMap(); - function sluggify(resource, record) { - return '/' + getSlug(record.displayName); + function sluggify(resource, record, salt) { + salt = salt || ''; //used to break ties + + return '/' + getSlug(record.displayName) + salt; + } + + function sl...
2c3a36930b35aec59c31ffa726a49cec00012570
karma_config/vueLocal.js
karma_config/vueLocal.js
/* eslint-disable no-console */ import vue from 'vue'; import vuex from 'vuex'; import router from 'vue-router'; import vueintl from 'vue-intl'; import 'intl'; import 'intl/locale-data/jsonp/en.js'; import kRouter from 'kolibri.coreVue.router'; kRouter.init([]); vue.prototype.Kolibri = {}; vue.config.silent = true; v...
import 'intl'; import 'intl/locale-data/jsonp/en.js'; import Vue from 'vue'; import Vuex from 'vuex'; import VueRouter from 'vue-router'; import kRouter from 'kolibri.coreVue.router'; import { setUpVueIntl } from 'kolibri.utils.i18n'; kRouter.init([]); Vue.prototype.Kolibri = {}; Vue.config.silent = true; Vue.use(Vue...
Use the i18n utils setup function in tests
Use the i18n utils setup function in tests # Conflicts: # karma_config/vueLocal.js
JavaScript
mit
jonboiser/kolibri,learningequality/kolibri,benjaoming/kolibri,learningequality/kolibri,indirectlylit/kolibri,lyw07/kolibri,jonboiser/kolibri,learningequality/kolibri,christianmemije/kolibri,benjaoming/kolibri,indirectlylit/kolibri,DXCanas/kolibri,lyw07/kolibri,benjaoming/kolibri,benjaoming/kolibri,DXCanas/kolibri,chris...
--- +++ @@ -1,39 +1,17 @@ -/* eslint-disable no-console */ -import vue from 'vue'; -import vuex from 'vuex'; -import router from 'vue-router'; -import vueintl from 'vue-intl'; import 'intl'; import 'intl/locale-data/jsonp/en.js'; +import Vue from 'vue'; +import Vuex from 'vuex'; +import VueRouter from 'vue-router';...
6bf3c7a5eb8fa1e73e8f8d65e1d25f05800efe37
src/_utils/pipSizeToStepSize.js
src/_utils/pipSizeToStepSize.js
// eg. // 3 -> 0.001 // 2 -> 0.01 // 1 -> 0.1 export default pipSize => { const zeros = Array(pipSize).join('0'); const stepStr = '0.' + zeros + 1; return stepStr; };
// example: // input output // 3 -> 0.001 // 2 -> 0.01 // 1 -> 0.1 export default pipSize => { const zeros = Array(pipSize).join('0'); const stepStr = '0.' + zeros + 1; return stepStr; };
Improve comment to clarify function's intention
Improve comment to clarify function's intention
JavaScript
mit
qingweibinary/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary...
--- +++ @@ -1,7 +1,8 @@ -// eg. -// 3 -> 0.001 -// 2 -> 0.01 -// 1 -> 0.1 +// example: +// input output +// 3 -> 0.001 +// 2 -> 0.01 +// 1 -> 0.1 export default pipSize => { const zeros = Array(pipSize).join('0'); const stepStr = '0.' + zeros + 1;
c9b3c797373fc4b83a84551bfb56459f8c36f50a
src/page/archive/index.js
src/page/archive/index.js
import React from 'react'; import Archive from '../../component/archive/archive-list-container'; import PropTypes from 'prop-types'; const render = ({ match }) => <Archive name={match.params.name} />; render.propTypes = { match: PropTypes.object, }; export default render;
import React from 'react'; import Archive from '../../component/archive/archive-list-container'; import PropTypes from 'prop-types'; const render = ({ match: { params }, history }) => <Archive name={params.name} history={history} />; render.propTypes = { match: PropTypes.object, history: PropTypes.object, }; ...
Add 'history' prop to the archive-list.
fix(router): Add 'history' prop to the archive-list.
JavaScript
apache-2.0
Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend
--- +++ @@ -2,9 +2,10 @@ import Archive from '../../component/archive/archive-list-container'; import PropTypes from 'prop-types'; -const render = ({ match }) => <Archive name={match.params.name} />; +const render = ({ match: { params }, history }) => <Archive name={params.name} history={history} />; render.prop...