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
aafe773244155b0630eed62ae72014d8a471b001
template/test/index.js
template/test/index.js
import glob from 'glob'; glob.sync('**/*-test.js', {realpath: true, cwd: __dirname}).forEach(require);
'use strict'; require('react-component-template/test');
Use test runner from react-component-template
Use test runner from react-component-template
JavaScript
mit
nkbt/cf-react-component-template
--- +++ @@ -1,4 +1,4 @@ -import glob from 'glob'; +'use strict'; -glob.sync('**/*-test.js', {realpath: true, cwd: __dirname}).forEach(require); +require('react-component-template/test');
a49043204b258ae6e04038c69c40a4bb16ca18e8
server/config/routes.js
server/config/routes.js
const userController = require('./users/userController.js'); const listingController = require('./listings/listingController.js'); module.exports = (app, db) => { // Routes for all users app.get('/api/users', userController.getAll); app.post('/api/users', userController.createOne); // Routes for specific use...
const userController = require('./users/userController.js'); const listingController = require('./listings/listingController.js'); module.exports = (app, db, path, rootPath) => { // Routes for all users app.get('/api/users', userController.getAll); app.post('/api/users', userController.createOne); // Routes ...
Add catch-all route to allow page refreshing
Add catch-all route to allow page refreshing
JavaScript
mit
bwuphan/raptor-ads,Darkrender/raptor-ads,bwuphan/raptor-ads,wolnewitz/raptor-ads,Velocies/raptor-ads,Darkrender/raptor-ads,Velocies/raptor-ads,wolnewitz/raptor-ads
--- +++ @@ -1,32 +1,36 @@ const userController = require('./users/userController.js'); const listingController = require('./listings/listingController.js'); -module.exports = (app, db) => { +module.exports = (app, db, path, rootPath) => { // Routes for all users app.get('/api/users', userController.getAll...
1eb7f32e8bb7097cfca068dda7b339aca4691938
components/message/Message.js
components/message/Message.js
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Box from '../box'; import { ButtonGroup } from '../button'; import cx from 'classnames'; import theme from './theme.css'; class Message extends PureComponent { static propTypes = { className: PropTypes.string, children: ...
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Box from '../box'; import { ButtonGroup } from '../button'; import cx from 'classnames'; import theme from './theme.css'; class Message extends PureComponent { static propTypes = { className: PropTypes.string, children: ...
Drop the wrapper, clone the element and apply the class instead
Drop the wrapper, clone the element and apply the class instead
JavaScript
mit
teamleadercrm/teamleader-ui
--- +++ @@ -32,7 +32,7 @@ {children} {hasAction && ( <ButtonGroup className={theme['actions']} marginTop={4}> - {button && <span className={theme['button']}>{button}</span>} + {button && React.cloneElement(button, { className: theme['button'] })} ...
de314b6ba5fcc799090d328e379002e04e8fc10f
lib/conditions/index.js
lib/conditions/index.js
const express = require('express'); const logger = require('../logger').policy; const schemas = require('../schemas'); const predefined = require('./predefined'); const conditions = {}; function register ({ name, handler, schema }) { const validate = schemas.register('condition', name, schema); conditions[name] =...
const express = require('express'); const logger = require('../logger').policy; const schemas = require('../schemas'); const predefined = require('./predefined'); const conditions = {}; function register ({ name, handler, schema }) { const validate = schemas.register('condition', name, schema); conditions[name] =...
Use log.warn instead of debug and claim it's a warn
Use log.warn instead of debug and claim it's a warn
JavaScript
apache-2.0
ExpressGateway/express-gateway
--- +++ @@ -26,7 +26,7 @@ logger.debug('matchEGCondition for %o', conditionConfig); const func = conditions[conditionConfig.name]; if (!func) { - logger.debug(`warning: condition not found for ${conditionConfig.name}`); + logger.warn(`Condition not found for ${conditionConfig.name}`); ...
6ff68041de291f09753ef50f1c6d9b2b1f40b976
lib/less/tree/extend.js
lib/less/tree/extend.js
(function (tree) { tree.Extend = function Extend(selector, option, index) { this.selector = selector; this.option = option; this.index = index; switch(option) { case "all": this.allowBefore = true; this.allowAfter = true; break; default: this...
(function (tree) { tree.Extend = function Extend(selector, option, index) { this.selector = selector; this.option = option; this.index = index; this.object_id = tree.Extend.next_id++; this.parent_ids = [this.object_id]; switch(option) { case "all": this.allowBefore = true; ...
Set object id and initiate parent_ids array
Set object id and initiate parent_ids array
JavaScript
apache-2.0
mcanthony/less.js,wjb12/less.js,demohi/less.js,PUSEN/less.js,nolanlawson/less.js,jjj117/less.js,wjb12/less.js,less/less.js,PUSEN/less.js,angeliaz/less.js,Nastarani1368/less.js,MrChen2015/less.js,bammoo/less.js,dyx/less.js,Nastarani1368/less.js,paladox/less.js,SomMeri/less-rhino.js,NaSymbol/less.js,seven-phases-max/less...
--- +++ @@ -4,6 +4,8 @@ this.selector = selector; this.option = option; this.index = index; + this.object_id = tree.Extend.next_id++; + this.parent_ids = [this.object_id]; switch(option) { case "all": @@ -16,6 +18,7 @@ break; } }; +tree.Extend.next_id = 0; tree.Exte...
eaa3fa7e5224932ccbcefdd26db81b384b3155fc
n3-composer/server/api/decisions.js
n3-composer/server/api/decisions.js
import { Router } from 'express' import bodyParser from 'body-parser' import Decision from './classes/Decision.js' var router = Router() router.use(bodyParser.urlencoded({ extended: true })) router.post('/createDecision', function(req, res) { // TODO These 4 fields (IUN, Version, unitIds, organizationId) should be ...
import { Router } from 'express' import bodyParser from 'body-parser' import Decision from './classes/Decision.js' var router = Router() router.use(bodyParser.urlencoded({ extended: true })) router.post('/createDecision', function(req, res) { // TODO These 4 fields (IUN, Version, unitIds, organizationId) should be ...
Return success param on successful decision upload
Return success param on successful decision upload
JavaScript
mit
eellak/gsoc17-diavgeia,eellak/gsoc17-diavgeia,eellak/gsoc17-diavgeia,eellak/gsoc17-diavgeia
--- +++ @@ -9,6 +9,7 @@ // TODO These 4 fields (IUN, Version, unitIds, organizationId) should be set // by the current implementation of Diavgeia new Decision(req.body,'60Β3ΩΡΙ-ΒΝ3','b4ae1411-f81d-437b-9c63-a8b7d4ed866b',['6105'],'93302').generateN3() + res.redirect('/?success'); }) export default route...
caedc16fc57aec421d711dbdac3ebc37ebfb3283
src/index.js
src/index.js
import React, { PropTypes } from 'react'; import markdownIt from 'markdown-it'; import ast from './util/ast'; import renderTokens from './util/renderTokens'; import components from './components'; const md = new markdownIt(); /** * Renders React components from a Markdown string. * @todo Allow for custom markdown-i...
import React, { PropTypes } from 'react'; import markdownIt from 'markdown-it'; import ast from './util/ast'; import renderTokens from './util/renderTokens'; import components from './components'; /** * Renders React components from a Markdown string. * @todo Allow for custom components. */ export default function ...
Allow custom markdown-it instance to be passed to the <Markdown /> component
Allow custom markdown-it instance to be passed to the <Markdown /> component
JavaScript
mit
gakimball/meact,gakimball/meact
--- +++ @@ -4,15 +4,12 @@ import renderTokens from './util/renderTokens'; import components from './components'; -const md = new markdownIt(); - /** * Renders React components from a Markdown string. - * @todo Allow for custom markdown-it instance. * @todo Allow for custom components. */ -export default fu...
190e5fb8e549493841b9bb9ffd7820ddb00e6d85
src/index.js
src/index.js
function FakeStorage() { this.clear(); } FakeStorage.prototype = { key(index) { // sanitise index as int index = parseInt(index); // return early if index isn't a positive number or larger than length if (isNaN(index) || index < 0 || index >= this.length) { return null; } // loop thro...
class FakeStorage { #data = {}; get length() { return Object.keys(this.#data).length; } key(n) { return Object.keys(this.#data)[Number.parseInt(n, 10)] ?? null; } getItem(key) { const _data = this.#data; const _key = `${key}`; return Object.prototype.hasOwnProperty.call(_data, _key) ...
Rewrite using modern JavaScript features
Rewrite using modern JavaScript features
JavaScript
mit
jacobbuck/fake-storage
--- +++ @@ -1,55 +1,37 @@ -function FakeStorage() { - this.clear(); +class FakeStorage { + #data = {}; + + get length() { + return Object.keys(this.#data).length; + } + + key(n) { + return Object.keys(this.#data)[Number.parseInt(n, 10)] ?? null; + } + + getItem(key) { + const _data = this.#data; + ...
3ca2c46fef9c7b2339ca8df5e64044736f166ed0
src/index.js
src/index.js
/** * __ _ __ ____ * / / | |/ // __ \ * / / | // / / / * / /___/ |/ /_/ / * /_____/_/|_/_____/ * * @author Alan Doherty (BattleCrate Ltd.) * @license MIT */ // requires var Client = require('./classes/Client'); /** * Creates a new client at the specified host, if none * is provided the ...
/** * __ _ __ ____ * / / | |/ // __ \ * / / | // / / / * / /___/ |/ /_/ / * /_____/_/|_/_____/ * * @author Alan Doherty (BattleCrate Ltd.) * @license MIT */ // requires var Client = require('./classes/Client'); /** * Creates a new client at the specified host, if none * is provided the ...
Change js2doc fields in lxd init function
Change js2doc fields in lxd init function
JavaScript
mit
alandoherty/node-lxd
--- +++ @@ -17,7 +17,8 @@ * is provided the client will use the local domain socket. * @param {string?} host * @param {object?} authentication - * @param {string?} authentication.pem + * @param {string?} authentication.cert + * @param {string?} authentication.key * @param {string?} authentication.password *...
0c9d564d3733fa5807c36cb992e13026c0ec21c7
src/loading_bar_middleware.js
src/loading_bar_middleware.js
import { showLoading, hideLoading } from './loading_bar_ducks' const defaultTypeSuffixes = ['PENDING', 'FULFILLED', 'REJECTED'] export default function loadingBarMiddleware(config = {}) { const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes return ({ dispatch }) => next => action => { ...
import { showLoading, hideLoading } from './loading_bar_ducks' const defaultTypeSuffixes = ['PENDING', 'FULFILLED', 'REJECTED'] export default function loadingBarMiddleware(config = {}) { const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes return ({ dispatch }) => next => action => { ...
Update the way we identify suffixes to be more precise
Update the way we identify suffixes to be more precise
JavaScript
mit
mironov/react-redux-loading-bar
--- +++ @@ -14,14 +14,14 @@ const [PENDING, FULFILLED, REJECTED] = promiseTypeSuffixes - const isPending = `_${PENDING}` - const isFulfilled = `_${FULFILLED}` - const isRejected = `_${REJECTED}` + const isPending = new RegExp(`${PENDING}$`, 'g') + const isFulfilled = new RegExp(`${FULFILLED}$`...
a2d2e80470b4d054424c00060c9ad4fe8c312fb8
src/model.js
src/model.js
/* Where is defined the DB connection. * * We got the following collections (cf. schema.js): * - User * - Client * - Grant * */ require.paths.unshift(__dirname + "/../vendors/rest-mongo/src") var events = require('events') , rest_mongo = require("rest-mongo/core") , mongo_backend = require("rest-mongo/...
/* Where is defined the DB connection. * * We got the following collections (cf. schema.js): * - User * - Client * - Grant * */ require.paths.unshift(__dirname + "/../vendors/rest-mongo/src") var events = require('events') , rest_mongo = require("rest-mongo/core") , mongo_backend = require("rest-mongo/...
Fix delete client: authorizations should be removed.
Fix delete client: authorizations should be removed. Signed-off-by: François de Metz <4073ce8ed0c8af431a3bf625d935cc2c9542ae9c@af83.com> Signed-off-by: Virtuo <ff019a5748a52b5641624af88a54a2f0e46a9fb5@ruyssen.fr>
JavaScript
agpl-3.0
AF83/auth_server
--- +++ @@ -36,7 +36,7 @@ // When removing a client, remove its authorizations emitter.on('DELETE:Client', function(ids) { - var R = RFactory(); + var R = exports.RFactory(); R.Authorization.remove({query: { client: {'$in': ids.map(function(id){return {id: id}})} }});
977b87be2bd6d05ee626e09b5ec7faff0edf888b
src/proxy.js
src/proxy.js
var http = require('http'); exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) { var proxy_req = http.createClient(proxy_port, proxy_host).request( client_req.method, client_req.url, client_req.headers); client_req.setEncoding('binary'); proxy_req.setEncoding('binary'); proxy_re...
var http = require('http'); exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) { var proxy_req = http.createClient(proxy_port, proxy_host).request( client_req.method, client_req.url, client_req.headers); client_req.setEncoding('binary'); proxy_req.addListener('response', function (p...
Revert "more encoding settings." because it's stupid.
Revert "more encoding settings." because it's stupid. This reverts commit ccb99882a11a9edd301de8c6e42bf9700e6f8bf5.
JavaScript
apache-2.0
tilgovi/lode,tilgovi/lode
--- +++ @@ -4,7 +4,6 @@ var proxy_req = http.createClient(proxy_port, proxy_host).request( client_req.method, client_req.url, client_req.headers); client_req.setEncoding('binary'); - proxy_req.setEncoding('binary'); proxy_req.addListener('response', function (proxy_resp) { client_resp.writeH...
8de119d3bf8d14d30b71efe3af5a1bf41eaca220
src/responseBuilderHandler.js
src/responseBuilderHandler.js
'use strict'; var ResponseBuilder = require('./ResponseBuilder'); module.exports = function(promiseReturningHandlerFn, request, cb, CustomRespBuilderClass) { promiseReturningHandlerFn() .then(function(respBuilder) { // eslint-disable-next-line no-console console.log('completed with %s milli...
'use strict'; var ResponseBuilder = require('./ResponseBuilder'); /** * In our APIs, we often have errors that are several promises deep, and without this, * it's hard to tell where the error actually originated (especially with AWS calls, etc). * This will generally make error stack traces much more helpful to us...
Enable Q's long stack support by default
Enable Q's long stack support by default Since the response builder handler is often one of the first things created in our APIs, it provides a convenient place to enable the long stack support in Q.
JavaScript
mit
silvermine/apigateway-utils
--- +++ @@ -1,6 +1,14 @@ 'use strict'; var ResponseBuilder = require('./ResponseBuilder'); + +/** + * In our APIs, we often have errors that are several promises deep, and without this, + * it's hard to tell where the error actually originated (especially with AWS calls, etc). + * This will generally make error s...
2c3f63b6cc372fac32cc0a917100d381f82743be
ui/js/dashboard/nco.js
ui/js/dashboard/nco.js
'use strict'; module.exports = { template: require('./nco.html'), data: function () { return { region : 12907, campaign: true, // Trick with-indicator into loading without a campaign overview: [{ title : 'Influencer', indicators: [164,165,166,167], chart : 'chart-bar' }, { t...
'use strict'; module.exports = { template: require('./nco.html'), data: function () { return { region : null, campaign: null, overview: [{ title : 'Influencer', indicators: [164,165,166,167], chart : 'chart-bar' }, { title : 'Information Source', indicators: [164,165,...
Set campaign and region to null by default
Set campaign and region to null by default Campaign and region are getting passed down by the dashboard view from the dropdowns, so there is no need to provide defaults in the NCO dashboard component.
JavaScript
agpl-3.0
unicef/polio,unicef/polio,unicef/polio,unicef/polio,unicef/rhizome,SeedScientific/polio,unicef/rhizome,unicef/rhizome,SeedScientific/polio,SeedScientific/polio,SeedScientific/polio,SeedScientific/polio,unicef/rhizome
--- +++ @@ -5,8 +5,8 @@ data: function () { return { - region : 12907, - campaign: true, // Trick with-indicator into loading without a campaign + region : null, + campaign: null, overview: [{ title : 'Influencer',
6972b64ab05f7b66af8e512067a83cba0e0be917
jakefile.js
jakefile.js
/*global desc, task, jake, fail, complete */ (function() { "use strict"; task("default", ["lint"]); desc("Lint everything"); task("lint", [], function() { var lint = require("./build/lint/lint_runner.js"); var files = new jake.FileList(); files.include("**/*.js"); files.exclude("node_modules"); var opt...
/*global desc, task, jake, fail, complete */ (function() { "use strict"; desc("Build and test"); task("default", ["lint"]); desc("Lint everything"); task("lint", [], function() { var lint = require("./build/lint/lint_runner.js"); var files = new jake.FileList(); files.include("**/*.js"); files.exclude("...
Set up continuous integration script
Set up continuous integration script
JavaScript
mit
kyroskoh/lets_code_javascript,kyroskoh/lets_code_javascript,halcwb/lets_code_javascript,halcwb/lets_code_javascript,halcwb/lets_code_javascript,kyroskoh/lets_code_javascript
--- +++ @@ -2,6 +2,7 @@ (function() { "use strict"; + desc("Build and test"); task("default", ["lint"]); desc("Lint everything"); @@ -13,6 +14,18 @@ files.exclude("node_modules"); var options = nodeLintOptions(); lint.validateFileList(files.toArray(), options, {}); + }); + + desc("Integrate"); + t...
d5c4e9fe858c226b163114f6d9f5e2636c8a5589
spec/strong-api-spec.js
spec/strong-api-spec.js
describe('strong-api', function(){ var StrongAPI = require('../lib/strong-api'); var api; beforeEach(function () { api = new StrongAPI(); }); it('should translate in the default default locale', function() { expect(api.translate('everything')).toEqual('I am a translated string for locale: en'); ...
describe('strong-api', function(){ var StrongAPI = require('../lib/strong-api'); var api; beforeEach(function () { api = new StrongAPI(); }); it('should translate in the default default locale', function() { expect(api.translate('everything')).toEqual('I am a translated string for locale: en'); ...
Write a failing test to show variable substitution
Write a failing test to show variable substitution I plan to just use sprintf's support for this. http://www.diveintojavascript.com/projects/javascript-sprintf
JavaScript
mit
fs-webdev/strong,timshadel/strong
--- +++ @@ -27,4 +27,15 @@ expect(api.translate('everything', { locale: 'es' })).toEqual('I am a translated string for locale: es'); }); + // Interpolation + it('should use named arguments as substitutions', function() { + // Setup the test case, assuming you have this string + var fake_back = { 'en...
65942a18a3050a4572a1200bbe69a0d146251c15
test/components/MenuScreen/MenuScreen.spec.js
test/components/MenuScreen/MenuScreen.spec.js
import React from "react"; import ReactTestUtils from "react-addons-test-utils"; import MenuScreen from "src/components/MenuScreen/MenuScreen.js"; describe("MenuScreen", () => { it("should exist", () => { MenuScreen.should.exist; }); it("should be react element", () => { ReactTestUtils.isElement(<Menu...
import React from "react"; import ReactTestUtils from "react-addons-test-utils"; import jsdom from "mocha-jsdom"; import MenuScreen from "src/components/MenuScreen/MenuScreen.js"; import Button from "src/components/Shared/Button.js"; import setCurrentScreenAction from "src/actions/ScreenActions.js"; import { GAME_SCR...
Add tests for menu buttons
Add tests for menu buttons
JavaScript
mit
Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React
--- +++ @@ -1,9 +1,19 @@ import React from "react"; import ReactTestUtils from "react-addons-test-utils"; +import jsdom from "mocha-jsdom"; import MenuScreen from "src/components/MenuScreen/MenuScreen.js"; +import Button from "src/components/Shared/Button.js"; + +import setCurrentScreenAction from "src/actions/S...
fa1180e20689c88f6e5db4023770cb51ba9d3e9a
utils/elementToText.js
utils/elementToText.js
import { isValidElement } from 'react' const whitespacesRe = /\s+/g const _format = (str = '') => str.replace(whitespacesRe, ' ') const elementToTextRec = x => { if (Array.isArray(x)) { return x.map(elementToTextRec).join('') } else if (isValidElement(x)) { return elementToTextRec(x.props.children) } el...
import { isValidElement } from 'react' const whitespacesRe = /\s+/g const _format = (str = '') => str.trim().replace(whitespacesRe, ' ') const elementToTextRec = x => { if (Array.isArray(x)) { return x.map(elementToTextRec).join('') } else if (isValidElement(x)) { return elementToTextRec(x.props.children)...
Move trim into more sensible place
Move trim into more sensible place
JavaScript
mit
styled-components/styled-components-website,styled-components/styled-components-website
--- +++ @@ -1,7 +1,7 @@ import { isValidElement } from 'react' const whitespacesRe = /\s+/g -const _format = (str = '') => str.replace(whitespacesRe, ' ') +const _format = (str = '') => str.trim().replace(whitespacesRe, ' ') const elementToTextRec = x => { if (Array.isArray(x)) { @@ -15,6 +15,6 @@ return...
a5fd7493788a20e1175d66f23dde1fdde6ff7fd2
src/article/shared/BlockQuoteComponent.js
src/article/shared/BlockQuoteComponent.js
import { NodeComponent } from '../../kit' export default class BlockQuoteComponent extends NodeComponent { render ($$) { let node = this.props.node let el = $$('div') .addClass('sc-block-quote') .attr('data-id', node.id) el.append( this._renderValue($$, 'content').ref('content'), ...
import { NodeComponent } from '../../kit' export default class BlockQuoteComponent extends NodeComponent { render ($$) { let node = this.props.node let el = $$('div') .addClass('sc-block-quote') .attr('data-id', node.id) el.append( this._renderValue($$, 'content', { container: true })....
Make BlockQuote.content editable as container.
Make BlockQuote.content editable as container.
JavaScript
mit
substance/texture,substance/texture
--- +++ @@ -8,7 +8,7 @@ .attr('data-id', node.id) el.append( - this._renderValue($$, 'content').ref('content'), + this._renderValue($$, 'content', { container: true }).ref('content'), this._renderValue($$, 'attrib').ref('attrib') ) return el
62e6ed3baa6183897b1af121269d1dee9edb2704
js/popup.js
js/popup.js
// Filename: popup.js // Date: July 2017 // Authors: Evgeni Dobranov & Thomas Binu // Purpose: Defines extension UI and functional behavior // Entry point into app functionality function onPopupLoad(){ // Immediately inject script to get page content chrome.tabs.executeScript(null, { file: "js/contentsc...
// Filename: popup.js // Date: July 2017 // Authors: Evgeni Dobranov & Thomas Binu // Purpose: Defines extension UI and functional behavior // Entry point into app functionality function onPopupLoad(){ // Immediately inject script to get page content chrome.tabs.executeScript(null, { file: "js/contentsc...
Update regex that cleans page content
Update regex that cleans page content Regex no longer removes common punctuation. Line breaks are replaced with a space.
JavaScript
apache-2.0
our-sinc-topo/visable-marketplace,our-sinc-topo/visable-marketplace
--- +++ @@ -19,9 +19,8 @@ if (request.action == "getSource") { var pageContent = (request.source).toString(); - var pageContentCleaned = pageContent.replace(/[^a-zA-Z\s]/gi, '').replace(/(\r\n|\n|\r)/gm,''); + var pageContentCleaned = pageContent.replace(/[^a-zA-Z0-9.,:;'...
8c8317d74cd996a2ea6d4fb014d51199108dbe01
src/components/Page/styles/Actions.css.js
src/components/Page/styles/Actions.css.js
// @flow import baseStyles from '../../../styles/resets/baseStyles.css.js' import styled from '../../styled' export const config = { marginBottom: 100, padding: '12px 0', spacing: 5, } export const ActionsUI = styled('div')` ${baseStyles} display: flex; flex-direction: row-reverse; margin-left: -${config....
// @flow import baseStyles from '../../../styles/resets/baseStyles.css.js' import styled from '../../styled' export const config = { marginBottom: 100, padding: '12px 0', spacing: 10, } export const ActionsUI = styled('div')` ${baseStyles} display: flex; flex-direction: row-reverse; margin-left: -${config...
Adjust spacing between Page.Actions items
Adjust spacing between Page.Actions items
JavaScript
mit
helpscout/blue,helpscout/blue,helpscout/blue
--- +++ @@ -5,7 +5,7 @@ export const config = { marginBottom: 100, padding: '12px 0', - spacing: 5, + spacing: 10, } export const ActionsUI = styled('div')`
1a0c26c08f4c61db23fe5ad990b69e1da7579d16
test/transformer.spec.js
test/transformer.spec.js
var tape = require('tape'); tape.test('transformer - should be a function', function (assert) { assert.equals(typeof require('../lib/transformer'), 'function'); assert.end(); }); tape.test('transformer - should return a templating function', function (assert) { assert.equals(typeof require('../lib/transformer')(),...
var tape = require('tape'); tape.test('transformer - should be a function', function (assert) { assert.equals(typeof require('../lib/transformer'), 'function'); assert.end(); }); tape.test('transformer - should return a templating function', function (assert) { assert.equals(typeof require('../lib/transformer')(),...
Add tests for the {index} placeholder
Add tests for the {index} placeholder
JavaScript
mit
nsand/newid
--- +++ @@ -27,3 +27,9 @@ assert.equals(transformer('path/to/file.txt'), 'path/to/different.name'); assert.end(); }); + +tape.test('transformer - should replace the {index} parameter', function (assert) { + var transformer = require('../lib/transformer')('{index}.foo'); + assert.equals(transformer('path/to/file....
53a9b2e2afbd83c76d007dacdb8bfc1491e6d34e
tests/helperfunctions.js
tests/helperfunctions.js
function getMap(){ var map = new OpenLayers.Map({ layers: [ new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", { layers: "basic" } ) ] }); return m...
function getMap(){ var map = new OpenLayers.Map({ layers: [ new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", { layers: "basic" } ) ] }); return m...
Adjust the helperfunction for a lazy map component to use the correct xtype.
Adjust the helperfunction for a lazy map component to use the correct xtype.
JavaScript
bsd-3-clause
geoext/GXM,geoext/GXM
--- +++ @@ -24,7 +24,7 @@ } function getLazyMapPanel(opts) { - var options = Ext.apply(opts || {}, { xtype: 'gxm_mappanel' }); + var options = Ext.apply(opts || {}, { xtype: 'gxm_map' }); options.map = ( opts && opts.map ) ? opts.map : getMap(); var mappanel = options;
da1be2ea51c8afa987e237216154f436fe0fa867
lib/compolib.build.js
lib/compolib.build.js
'use strict' // var util = require('util') var console = require('better-console') // var renderNav = require('./compolib.renderNav') var filetreeToJSON = require('./compolib.filetreeToJSON') var components = require('./compolib.components') var ncp = require('ncp').ncp module.exports = function build (opts) { // c...
'use strict' // var util = require('util') var console = require('better-console') // var renderNav = require('./compolib.renderNav') var filetreeToJSON = require('./compolib.filetreeToJSON') var components = require('./compolib.components') var ncp = require('ncp').ncp module.exports = function build (opts) { // c...
Add non-hardcoded variable that leads to styleguide assets folder
Add non-hardcoded variable that leads to styleguide assets folder
JavaScript
mit
karlisup/chewingum,karlisup/chewingum
--- +++ @@ -9,7 +9,7 @@ module.exports = function build (opts) { // copy assets to public folder - ncp('node_modules/component-library-core/doc-template/assets', opts.location.dest + '/assets', function (err) { + ncp(opts.location.styleguide + '/assets', opts.location.dest + '/assets', function (err) { i...
493bfd49c7a7d45bb723a4108889c27afc6bddff
examples/artwork-of-selection.js
examples/artwork-of-selection.js
var iTunes = require('../') , conn = null iTunes.createConnection(onConn); function onConn (err, c) { if (err) throw err; conn = c; conn.selection( onSelection ); } function onSelection (err, selection) { if (err) throw err; if (selection.length > 0) { var track = selection[0]; track.artworks(o...
var iTunes = require('../') , conn = null iTunes.createConnection(onConn); function onConn (err, c) { if (err) throw err; conn = c; conn.selection( onSelection ); } function onSelection (err, selection) { if (err) throw err; if (selection.length > 0) { var track = selection[0]; track.artworks(o...
Add a test case to ensure that the memory leak is fixed.
Add a test case to ensure that the memory leak is fixed.
JavaScript
mit
TooTallNate/node-iTunes,TooTallNate/node-iTunes,TooTallNate/node-iTunes
--- +++ @@ -27,6 +27,17 @@ if (err) throw err; console.log(data.constructor.name); console.log(data.length); + + // A test to make sure that gargabe collecting one of the Buffers doesn't + // cause a seg fault. Invoke node with '--expose_gc' to force garbage coll + data = null; + ...
eb4c550d39d3231873e5dc059a062c052d3707de
webpack/plugins/commonsChunk.js
webpack/plugins/commonsChunk.js
const { optimize: { CommonsChunkPlugin }, } = require('webpack'); function isCss({ resource }) { return resource && resource.match(/\.(css|sss)$/); } function isVendor({ resource }) { return resource && resource.indexOf('node_modules') >= 0 && resource.match(/\.js$/); } module.exports = (config) =>...
const { optimize: { CommonsChunkPlugin }, } = require('webpack'); function isCss({ resource }) { return resource && resource.match(/\.(css|sss)$/); } function isVendor({ resource }) { return resource && resource.indexOf('node_modules') >= 0 && resource.match(/\.js$/); } module.exports = (config) =>...
Rename common chunk "manifest" to "runtime"
Rename common chunk "manifest" to "runtime"
JavaScript
mit
AlexMasterov/webpack-kit,AlexMasterov/webpack-kit
--- +++ @@ -24,7 +24,7 @@ }, }), new CommonsChunkPlugin({ - name: 'manifest', + name: 'runtime', minChunks: Infinity, }), ];
e204f56c778711d707589a96b0aff021f2efeda3
tickle-frontend/src/errorReporting.js
tickle-frontend/src/errorReporting.js
// This should be the only file aware that we use Opbeat for error reporting. import { opbeatAppId, opbeatOrgId } from './settings' const init = () => { window._opbeat('config', { orgId: opbeatOrgId, appId: opbeatAppId }) } const setExtraContext = (extraContext) => { window._opbeat('setExtraContext', ex...
// This should be the only file aware that we use Opbeat for error reporting. import { opbeatAppId, opbeatOrgId } from './settings' const init = () => { window._opbeat('config', { orgId: opbeatOrgId, appId: opbeatAppId }) } const setExtraContext = (extraContext) => { window._opbeat('setExtraContext', ex...
Use extra context from error object
Use extra context from error object
JavaScript
mit
ovidner/bitket,ovidner/bitket,ovidner/bitket,ovidner/bitket
--- +++ @@ -13,6 +13,7 @@ } const capture = (err, extraContext) => { + if (err.extra) setExtraContext(err.extra) if (extraContext) setExtraContext(extraContext) window._opbeat('captureException', err) }
9d8b30591611a56c2d6410eab501fcdb5997f3c3
test/decoder/decode.js
test/decoder/decode.js
import test from 'ava'; import { decoder } from '../../src'; import base from '../base'; test('should be able to compose decoder functions', t => { t.deepEqual( decoder.decode( [].concat( base.latLngBytes, base.unixtimeBytes, base.uint16Bytes, base.tempBytes, base.ui...
import test from 'ava'; import { decoder } from '../../src'; import base from '../base'; test('should be able to compose decoder functions', t => { t.deepEqual( decoder.decode( [].concat( base.latLngBytes, base.unixtimeBytes, base.uint16Bytes, base.tempBytes, base.ui...
Fix copy-paste typo in unit test.
Fix copy-paste typo in unit test.
JavaScript
mit
thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization
--- +++ @@ -31,6 +31,7 @@ 2: base.uint16, 3: base.temp, 4: base.uint8, + 5: base.humidity, 5: base.rawFloat, 6: base.bitmap, }
99057f25b5c98fb4ff89090f96dbcb112ab93c86
dropbox_client.js
dropbox_client.js
DropboxOAuth = {}; // Request dropbox credentials for the user // @param options {optional} // @param callback {Function} Callback function to call on // completion. Takes one argument, credentialToken on success, or Error on // error. DropboxOAuth.requestCredential = function (options, callback) { // support bo...
DropboxOAuth = {}; // Request dropbox credentials for the user // @param options {optional} // @param callback {Function} Callback function to call on // completion. Takes one argument, credentialToken on success, or Error on // error. DropboxOAuth.requestCredential = function (options, callback) { // support bo...
Undo code for client logic
Undo code for client logic
JavaScript
mit
gcampax/meteor-dropbox-oauth,gcampax/meteor-dropbox-oauth
--- +++ @@ -27,7 +27,8 @@ '?response_type=code' + '&client_id=' + config.clientId + '&redirect_uri=' + OAuth._redirectUri('dropbox', config, {}, {secure: true}) + - '&state=' + OAuth._stateParam(loginStyle, credentialToken).replace('?close&', '?close=true&'); + '&state=' + OAu...
f2264fa5eab081f13ba87bf79eae1e1a6c64bf8f
test/sugar_dom_test.js
test/sugar_dom_test.js
/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/ /*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/ /*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/ (function(el, document) { test('is awesome', 1, function() { ...
/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/ /*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/ /*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/ (function(el, document) { test('creating plain DOM elements', ...
Add more basic tests for creating elements
Add more basic tests for creating elements
JavaScript
mit
webmat/sugar_dom
--- +++ @@ -3,8 +3,10 @@ /*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/ (function(el, document) { - test('is awesome', 1, function() { - ok(el('p').nodeName.match(/p/i), 'should be thoroughly awesome'); + test('creating plain DOM elements', function() { + ok( el('p')....
5c67a13bd8167183720cb8d39ff9e5630d8398e3
src/js/api.js
src/js/api.js
import ApiEvents from './events/ApiEvents'; import { firebaseRef } from './appconfig'; var ref = firebaseRef.child('notes'); var API = { start() { ref.on('child_added', (snapshot) => { var noteName = snapshot.key(); var note = snapshot.val(); ApiEvents.noteAdded(noteName, note); }); r...
import ApiEvents from './events/ApiEvents'; import { firebaseRef } from './appconfig'; var noteRef = firebaseRef.child('notes'); var API = { start() { noteRef.on('child_added', (snapshot) => { var noteName = snapshot.key(); var note = snapshot.val(); ApiEvents.noteAdded(noteName, note); })...
Rename ref to noteRef in API
Rename ref to noteRef in API Will need ref to ref the base ref.
JavaScript
mit
kentor/notejs-react,kentor/notejs-react,kentor/notejs-react
--- +++ @@ -1,22 +1,22 @@ import ApiEvents from './events/ApiEvents'; import { firebaseRef } from './appconfig'; -var ref = firebaseRef.child('notes'); +var noteRef = firebaseRef.child('notes'); var API = { start() { - ref.on('child_added', (snapshot) => { + noteRef.on('child_added', (snapshot) => { ...
a012312485095fd894806b4070164f859bcab523
minechat.js
minechat.js
var readline = require('readline'); var mineflayer = require('mineflayer'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false }); var bot = mineflayer.createBot({ host: "hostname", username: "user@email.com", password: "password" }); rl.on('line', function(lin...
var readline = require('readline'); var mineflayer = require('mineflayer'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false }); function print_help() { console.log("usage: node minechat.js <hostname> <user> <password>"); } if (process.argv.length < 5) { console....
Read host, user and passwd from arglist
Read host, user and passwd from arglist
JavaScript
mit
ut7/minechat,llbit/minechat
--- +++ @@ -7,10 +7,27 @@ terminal: false }); +function print_help() { + console.log("usage: node minechat.js <hostname> <user> <password>"); +} + +if (process.argv.length < 5) { + console.log("Too few arguments!"); + print_help(); + process.exit(1); +} + +process.argv.forEach(function(val, index, array) { + if ...
dbd02d4ae342e0b5797dc2cd4b7092daf20a1e73
js/select_place.js
js/select_place.js
var Place = {}; $(document).on('pageshow', '#select-place', function() { $('#select-place-map').css('height', 500); utils.getCurrentLocation().done(function(location) { Place.map = Map.createMap('select-place-map', location.latitude, location.longitude, 12); Place.currentLocation = Map.createMarker(Pl...
var Place = {}; $(document).on('pageshow', '#select-place', function() { $('#select-place-map').css('height', 450); var pos = Map.map.getCenter(); Place.map = Map.createMap('select-place-map', pos.lat(), pos.lng(), 8); // kutc Place.currentLocation = Map.createMarker(Place.map, 'Current Location', ...
Set select place marker latlng based on main map center latlng
Set select place marker latlng based on main map center latlng
JavaScript
mit
otknoy/michishiki
--- +++ @@ -1,19 +1,17 @@ var Place = {}; $(document).on('pageshow', '#select-place', function() { - $('#select-place-map').css('height', 500); + $('#select-place-map').css('height', 450); - utils.getCurrentLocation().done(function(location) { - Place.map = Map.createMap('select-place-map', - loca...
d0cf2ffa9ed5613bd6bb34c7cd6049d8b6304b27
test/cypress/plugins/index.js
test/cypress/plugins/index.js
/* eslint-disable */ require('dotenv').config() module.exports = (on, config) => { if (config.testingType === 'component') { require('@cypress/react/plugins/load-webpack')(on, config, {webpackFilename: './webpack.config.js'}) return config } require('@cypress/code-coverage/task')(on, config) on('file:...
/* eslint-disable */ require('dotenv').config() module.exports = (on, config) => { if (config.testingType === 'component') { require('@cypress/react/plugins/load-webpack')(on, config, { webpackFilename: './webpack.config.js' }) return config } require('@cypress/code-coverage/task')(on, config) on('fil...
Fix formatting in plugins file
Fix formatting in plugins file
JavaScript
mit
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
--- +++ @@ -3,17 +3,21 @@ module.exports = (on, config) => { if (config.testingType === 'component') { - require('@cypress/react/plugins/load-webpack')(on, config, {webpackFilename: './webpack.config.js'}) + require('@cypress/react/plugins/load-webpack')(on, config, { webpackFilename: './webpack.config.js...
b3aa0298d5bdccd24a614f7a1194fae0762e4685
js/forum/src/components/DiscussionRenamedPost.js
js/forum/src/components/DiscussionRenamedPost.js
import EventPost from 'flarum/components/EventPost'; /** * The `DiscussionRenamedPost` component displays a discussion event post * indicating that the discussion has been renamed. * * ### Props * * - All of the props for EventPost */ export default class DiscussionRenamedPost extends EventPost { icon() { ...
import EventPost from 'flarum/components/EventPost'; /** * The `DiscussionRenamedPost` component displays a discussion event post * indicating that the discussion has been renamed. * * ### Props * * - All of the props for EventPost */ export default class DiscussionRenamedPost extends EventPost { icon() { ...
Fix use of "new" keyword making eslint angry
Fix use of "new" keyword making eslint angry
JavaScript
mit
Albert221/core,flarum/core,malayladu/core,falconchen/core,renyuneyun/core,vuthaihoc/core,Luceos/core,flarum/core,dungphanxuan/core,datitisev/core,zaksoup/core,falconchen/core,datitisev/core,Albert221/core,Onyx47/core,Luceos/core,zaksoup/core,datitisev/core,Albert221/core,renyuneyun/core,kirkbushell/core,kidaa/core,zaks...
--- +++ @@ -23,8 +23,8 @@ const newTitle = post.content()[1]; return { - old: <strong className="DiscussionRenamedPost-old">{oldTitle}</strong>, - new: <strong className="DiscussionRenamedPost-new">{newTitle}</strong> + 'old': <strong className="DiscussionRenamedPost-old">{oldTitle}</strong...
762e01365545b5eb2638fbe8efd9753fef907d92
app.js
app.js
function Dialogue(title,contents,buttons) { var Title; var Contents; var Buttons; /** Setters */ function SetTitle(){ } function SetButtons(){ } function SetContents(){ } function SetID(){ } /** Getters */ function GetTitle(){ } function GetButtons...
function App(){ return { assert: function(a, b, message) { if (a !== b) { throw message || "Assertion Failed"; } } } } function Dialogue(title,contents,buttons){ var Title; var Contents; var Buttons; var ID; var app = new App(); ...
Add assert as part of App();
Add assert as part of App();
JavaScript
mit
lgoldstien/legacy.JS
--- +++ @@ -1,12 +1,25 @@ -function Dialogue(title,contents,buttons) { +function App(){ + return { + assert: function(a, b, message) { + if (a !== b) { + throw message || "Assertion Failed"; + } + } + } +} + +function Dialogue(title,contents,buttons){ va...
69100f5362709045ef496caad23a464921dc63ba
frontend/app/base/directives/editable_link.js
frontend/app/base/directives/editable_link.js
angular.module('app.directives').directive('editableLink', editableLink); function editableLink() { return { restrict: 'E', scope: { viewModel: '=', type: '@', field: '@', object: '=?', socialMediaName: '@?', }, templateUrl...
angular.module('app.directives').directive('editableLink', editableLink); function editableLink() { return { restrict: 'E', scope: { viewModel: '=', type: '@', field: '@', object: '=?', socialMediaName: '@?', }, templateUrl...
Allow clearing of social media fields with inline editing
LILY-2266: Allow clearing of social media fields with inline editing
JavaScript
agpl-3.0
HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily
--- +++ @@ -50,7 +50,12 @@ args[el.field] = $data; if (el.socialMediaName) { - args.name = el.socialMediaName; + if ($data) { + args.name = el.socialMediaName; + } else { + args.is_deleted = true; + } + patchPro...
120096cd116a7dcd910ea5d887a6e969b206b53d
controller.js
controller.js
'use strict'; const Foxx = require('org/arangodb/foxx'); const schema = require('./schema'); const graphql = require('graphql-sync').graphql; const ctrl = new Foxx.Controller(applicationContext); // This is a regular Foxx HTTP API endpoint. ctrl.post('/graphql', function (req, res) { // By just passing the raw body...
'use strict'; const Foxx = require('org/arangodb/foxx'); const schema = require('./schema'); const graphql = require('graphql-sync').graphql; const formatError = require('graphql-sync').formatError; const ctrl = new Foxx.Controller(applicationContext); // This is a regular Foxx HTTP API endpoint. ctrl.post('/graphql'...
Use formatError to expose errors
Use formatError to expose errors
JavaScript
apache-2.0
arangodb-foxx/demo-graphql
--- +++ @@ -2,6 +2,7 @@ const Foxx = require('org/arangodb/foxx'); const schema = require('./schema'); const graphql = require('graphql-sync').graphql; +const formatError = require('graphql-sync').formatError; const ctrl = new Foxx.Controller(applicationContext); @@ -17,7 +18,9 @@ if (result.errors) { ...
67eb630c11fe5ef0578411745d9734714ae39022
util/debug.js
util/debug.js
var browserify = require('browserify'); var cssify = require('cssify'); var watchify = require('watchify'); var through = require('through'); var fs = require('fs'); var path = require('path'); var cp = require('child_process'); function globalOl(file) { var data = ''; function write(buf) { data += buf; } functi...
var browserify = require('browserify'); var cssify = require('cssify'); var watchify = require('watchify'); var through = require('through'); var fs = require('fs'); var path = require('path'); var cp = require('child_process'); function globalOl(file) { var data = ''; function write(buf) { data += buf; } functi...
Remove accidently added error handler from update listener
Remove accidently added error handler from update listener
JavaScript
bsd-2-clause
ahocevar/openlayers-app,ahocevar/openlayers-app
--- +++ @@ -24,15 +24,8 @@ packageCache: {} }).transform(globalOl).transform(cssify, {global: true}); -b.on('update', function bundle(onError) { - var stream = b.bundle(); - if (onError) { - stream.on('error', function(err) { - console.log(err.message); - process.exit(1); - }); - } - stream....
26b3b8c32d8fd9a51e374f4cdd278a5fcec92daf
project/static/js/authors/friend-requests.js
project/static/js/authors/friend-requests.js
$(function() { var $friend_request_button = $("#send-friend-request-button"); var $friend_request_sent_message = $("#friend-request-sent-message"); $friend_request_button.on('click', function () { var $that = $(this); $.post($that.data('url'), function () { $that.hide(); ...
$(function() { var $friend_request_button = $("#send-friend-request-button"); var $friend_request_sent_message = $("#friend-request-sent-message"); var $follow_button = $("#follow-button"); var $unfollow_button = $("#unfollow-button"); $friend_request_button.on('click', function () { var $t...
Update UI to represent that author is also followed when you send a friend request
Update UI to represent that author is also followed when you send a friend request
JavaScript
apache-2.0
TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution
--- +++ @@ -1,12 +1,16 @@ $(function() { var $friend_request_button = $("#send-friend-request-button"); var $friend_request_sent_message = $("#friend-request-sent-message"); + var $follow_button = $("#follow-button"); + var $unfollow_button = $("#unfollow-button"); $friend_request_button.on('c...
5de73ce2cf93631bf48fee2ae5ae7c54bd500fba
src/values/PropertyDescriptor.js
src/values/PropertyDescriptor.js
"use strict"; /* @flow */ const Value = require('../Value'); let serial = 0; //TODO: We should call this a PropertyDescriptor, not a variable. class PropertyDescriptor { constructor(value) { this.value = value; this.serial = serial++; this.configurable = true; this.enumerable = true; this.writeable = tru...
"use strict"; /* @flow */ const Value = require('../Value'); let serial = 0; //TODO: We should call this a PropertyDescriptor, not a variable. class PropertyDescriptor { constructor(value) { this.value = value; this.serial = serial++; this.configurable = true; this.enumerable = true; this.writeable = tru...
Call setter even if object isn't writable.
Call setter even if object isn't writable.
JavaScript
mit
codecombat/esper.js,codecombat/esper.js,codecombat/esper.js
--- +++ @@ -30,11 +30,11 @@ } *setValue(thiz, to) { - if ( !this.writeable ) return; thiz = thiz || Value.null; if ( this.getter ) { return yield * this.setter.call(thiz, [to]); } + if ( !this.writeable ) return this.value; this.value = to; return this.value; }
66d7acce7bf82ddc0a0afa5e1fae8e6a13214c47
Chapter_2/app.js
Chapter_2/app.js
var http = require('http'); var os = require('os'); var handler = function(request, response) { response.writeHead(200); response.end("You've hit " + os.hostname()); } var www = http.createServer(handler); www.listen(8080);
var http = require('http'); var os = require('os'); var handler = function(request, response) { response.writeHead(200); response.end("You've hit " + os.hostname() + "\n"); } var www = http.createServer(handler); www.listen(8080);
Add a new line character
Add a new line character
JavaScript
mit
Evalle/k8s-in-action,Evalle/k8s-in-action
--- +++ @@ -3,7 +3,7 @@ var handler = function(request, response) { response.writeHead(200); - response.end("You've hit " + os.hostname()); + response.end("You've hit " + os.hostname() + "\n"); } var www = http.createServer(handler);
0fb6b78a3f59152405c0f6e5a81adcd939c1fc01
src/commands/tick-rm.js
src/commands/tick-rm.js
export default rm import Entry from '../entry' import PouchDB from 'pouchdb' import {write} from './output' import chalk from 'chalk' import conf from '../config' let db = new PouchDB(conf.db) function rm (yargs) { let argv = yargs .usage('tick rm entryid') .argv db.get(argv._[1]) .then(removeEntry) }...
export default rm import Entry from '../entry' import PouchDB from 'pouchdb' import {write} from './output' import chalk from 'chalk' import conf from '../config' let db = new PouchDB(conf.db) function rm (yargs) { let argv = yargs .usage('Usage: tick rm [options] <entryid ...>') .help('h') .alias('h', 'help...
Clean up tick rm usage and add help
Clean up tick rm usage and add help
JavaScript
agpl-3.0
jonotron/tickbin,tickbin/tickbin,chadfawcett/tickbin
--- +++ @@ -10,8 +10,10 @@ function rm (yargs) { let argv = yargs - .usage('tick rm entryid') - .argv + .usage('Usage: tick rm [options] <entryid ...>') + .help('h') + .alias('h', 'help') + .argv db.get(argv._[1]) .then(removeEntry)
c02374368a35d3780d67d88c79e8bfef139fae80
ckeditor/static/ckeditor/ckeditor/config.js
ckeditor/static/ckeditor/ckeditor/config.js
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6...
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6...
Disable the SCAYT and context menu CKEditor plugins so we can use the native browser / OS spell-checker instead.
Disable the SCAYT and context menu CKEditor plugins so we can use the native browser / OS spell-checker instead.
JavaScript
bsd-3-clause
ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor
--- +++ @@ -8,5 +8,10 @@ // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; - // CKEDITOR.config.contentsCss = '/static/admin/blog/css/ckeditor_content.css'; + + // Disable the CKEditor right-click menu and + // the SCAYT dictionary plugin. ...
623b9508b89f243f7f0652d01cf18f79c7604405
snippets/base/static/js/templateChooserWidget.js
snippets/base/static/js/templateChooserWidget.js
;$(function() { 'use strict'; if ($('.inline-template').length > 1) { $('.inline-template').hide(); $('#id_template_chooser').change(function() { let template = $(this).val(); $('.inline-template').hide(); if (template) { $inline = $('.' + tem...
;$(function() { 'use strict'; function showTemplate() { let value = $('#id_template_chooser').val(); if (value) { $('.inline-template').hide(); $('.' + value).show(); } } if ($('.inline-template').length > 1) { $('.inline-template').hide(); ...
Fix template chooser on save error.
Fix template chooser on save error.
JavaScript
mpl-2.0
glogiotatidis/snippets-service,mozmar/snippets-service,mozilla/snippets-service,mozmar/snippets-service,mozilla/snippets-service,mozmar/snippets-service,glogiotatidis/snippets-service,mozmar/snippets-service,mozilla/snippets-service,glogiotatidis/snippets-service,mozilla/snippets-service,glogiotatidis/snippets-service
--- +++ @@ -1,14 +1,23 @@ ;$(function() { 'use strict'; + function showTemplate() { + let value = $('#id_template_chooser').val(); + if (value) { + $('.inline-template').hide(); + $('.' + value).show(); + } + } + if ($('.inline-template').length > 1) { ...
b1416f9fabc1a6c17436eb443050ec8e997abc1a
app/js/arethusa.core/arethusa_local_storage.js
app/js/arethusa.core/arethusa_local_storage.js
"use strict"; /** * @ngdoc service * @name arethusa.core.arethusaLocalStorage * * @description * Arethusa's API to communicate with `localStorage`. All values stored are * prefixed with `arethusa.`. * * Performs type coercion upon retrieval for Booleans, so that `true`, `false` * and `null` can be used proper...
"use strict"; /** * @ngdoc service * @name arethusa.core.arethusaLocalStorage * * @description * Arethusa's API to communicate with `localStorage`. All values stored are * prefixed with `arethusa.`. * * Performs type coercion upon retrieval for Booleans, so that `true`, `false` * and `null` can be used proper...
Add delegator for keys() in arethusaLocalStorage
Add delegator for keys() in arethusaLocalStorage
JavaScript
mit
Masoumeh/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa
--- +++ @@ -38,6 +38,8 @@ */ this.set = localStorageService.set; + this.keys = localStorageService.keys; + var JSONBooleans = ['true', 'false', 'null']; function coerce(value) { if (JSONBooleans.indexOf(value) === -1) {
8d479ed64e6e21445cfa8e5c60f46605bd8eea5a
lib/components/completeBlock/completeBlock.js
lib/components/completeBlock/completeBlock.js
import CompleteBlock from './completeBlock.html'; import './completeBlock.scss'; class CompleteBlock { static detailsComponent() { return { templateUrl: CompleteBlock, bindings: { headerImg: '@', headerTitle: '@', headerPicto: '@', headerColor: '@', headerBackgroundColor: '@', bodyBack...
import TemplateCompleteBlock from './completeBlock.html'; import './completeBlock.scss'; class CompleteBlock { static detailsComponent() { return { templateUrl: TemplateCompleteBlock, bindings: { headerImg: '@', headerTitle: '@', headerPicto: '@', headerColor: '@', headerBackgroundColor: '...
Rename variable because the template and the class has the same name
fix: Rename variable because the template and the class has the same name
JavaScript
mit
kevincaradant/web-template-webpack,kevincaradant/web-template-webpack
--- +++ @@ -1,10 +1,10 @@ -import CompleteBlock from './completeBlock.html'; +import TemplateCompleteBlock from './completeBlock.html'; import './completeBlock.scss'; class CompleteBlock { static detailsComponent() { return { - templateUrl: CompleteBlock, + templateUrl: TemplateCompleteBlock, binding...
46c3ec4c3eb99e3a8812e6674ce6940f4f15a5aa
test/client/ui-saucelabs.conf.js
test/client/ui-saucelabs.conf.js
exports.config = { specs: ['ui/**/*.spec.js'], sauceUser: process.env.SAUCE_USERNAME, sauceKey: process.env.SAUCE_ACCESS_KEY, baseUrl: 'http://localhost:3000', capabilities: { 'browserName': 'firefox', 'platform': 'Linux', 'version': '32', 'tunnel-identifier': process.env.TRA...
exports.config = { specs: ['ui/**/*.spec.js'], sauceUser: process.env.SAUCE_USERNAME, sauceKey: process.env.SAUCE_ACCESS_KEY, baseUrl: 'http://localhost:3000', capabilities: { 'browserName': 'firefox', 'platform': 'Windows 7', 'version': '32', 'tunnel-identifier': process.env...
Use Windows on Sauce to avoid unsupported platform combinations
Use Windows on Sauce to avoid unsupported platform combinations
JavaScript
mit
agilejs/2014-10-code-red
--- +++ @@ -5,7 +5,7 @@ baseUrl: 'http://localhost:3000', capabilities: { 'browserName': 'firefox', - 'platform': 'Linux', + 'platform': 'Windows 7', 'version': '32', 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER, 'build': process.env.TRAVIS_BUILD_NUMBER,
efbef4f393cd571b593b5aafb7cd3465f1102e62
src/components/utils.js
src/components/utils.js
export function asyncHandler(handler) { return function(req, res, next) { if (!handler) { throw new Error(`Invalid handler ${handler}, it must be a function.`); } handler(req, res, next) .then(function(response) { if (response) { res.send(response); } }) ...
export function asyncHandler(handler) { return function(req, res, next) { if (!handler) { throw new Error(`Invalid handler ${handler}, it must be a function.`); } handler(req, res, next) .then(function(response) { if (response) { res.send(response); } }) ...
Fix incorrect extraction of error code
Fix incorrect extraction of error code
JavaScript
mit
arkakkar/electron-update-api,TakeN0/squirrel-updates-server,Aluxian/squirrel-updates-server
--- +++ @@ -15,11 +15,8 @@ let status = 500; if (message.match(/^[\d]{3}:/)) { + status = parseInt(message.substr(0, 3), 10); message = message.substring(4).trim(); - const code = parseInt(message.substr(0, 3), 10); - if (!isNaN(code)) { - status = ...
a1e25a3e10cc2ce7cbf9c07284981cd2cc5b85eb
app/assets/javascripts/application.js
app/assets/javascripts/application.js
//= require jquery //= require jquery_ujs //= require jquery.remotipart //= require select2 //= require cocoon //= require dropzone //= require govuk/selection-buttons //= require moj //= require modules/moj.cookie-message.js //= require_tree . (function () { 'use strict'; delete moj.Modules.devs; $('#fixed-fee...
//= require jquery //= require jquery_ujs //= require jquery.remotipart //= require select2 //= require cocoon //= require dropzone //= require vendor/polyfills/bind //= require govuk/selection-buttons //= require moj //= require modules/moj.cookie-message.js //= require_tree . (function () { 'use strict'; delete ...
Fix issue with PhantomJS and Function.prototype.bind support
Fix issue with PhantomJS and Function.prototype.bind support
JavaScript
mit
ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments
--- +++ @@ -4,6 +4,7 @@ //= require select2 //= require cocoon //= require dropzone +//= require vendor/polyfills/bind //= require govuk/selection-buttons //= require moj //= require modules/moj.cookie-message.js
97b56dd8f09dbc18f4c57652fd665f325aec6bcb
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Remove require_self and back to require ./wookmark...
Remove require_self and back to require ./wookmark...
JavaScript
mit
ninabreznik/RefugeesWork,ninabreznik/RefugeesWork,ninabreznik/RefugeesWork
--- +++ @@ -10,8 +10,9 @@ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details // about supported directives. // -//= require_self //= require jquery //= require jquery_ujs //= require turbolinks //= require_tree . +//= require ./jquery.min.js +//= require ./jque...
15732c641dfbd0d814dff0bb6cfdc9c0d4293d2a
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Remove loading of scrollify, not using
Remove loading of scrollify, not using
JavaScript
mit
fma2/cfe-money,fma2/cfe-money,fma2/cfe-money
--- +++ @@ -13,6 +13,5 @@ //= require jquery //= require jquery_ujs //= require jquery-ui -//= require Scrollify //= require turbolinks //= require_tree .
650f4373a69a4af57def67ce53356ef8093e603b
test/specs/component/TextSpec.js
test/specs/component/TextSpec.js
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={200}>This is really...
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={300} style={{ fontF...
Set fontFamily on <Text> tests to guarantee consistent regardless of environment (hopefully fix failures in CI)
Set fontFamily on <Text> tests to guarantee consistent regardless of environment (hopefully fix failures in CI)
JavaScript
mit
recharts/recharts,sdoomz/recharts,recharts/recharts,sdoomz/recharts,thoqbk/recharts,thoqbk/recharts,sdoomz/recharts,recharts/recharts,recharts/recharts,thoqbk/recharts
--- +++ @@ -7,7 +7,7 @@ describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( - <Text width={200}>This is really long text</Text> + <Text width={300} style={{ fontFamily: 'Courier' }}>This is really long text</Text> ); expect(wrapper...
dbe6cea973ff30b9b5ca61f09b34b61b8cf5295d
src/elements/element.js
src/elements/element.js
import TYPES from 'types'; function isMember(element) { if (element.element) { return element.element === TYPES.MEMBER; } return element === TYPES.MEMBER; } function getValueType({element, content}) { if (isMember(element)) { return content.value.element; } return element; } function getType(el...
import TYPES from 'types'; function isMember(element) { if (element.element) { return element.element === TYPES.MEMBER; } return element === TYPES.MEMBER; } function getValueType({element, content}) { if (isMember(element)) { return content.value.element; } return element; } function getType(el...
Remove the ‘isNestedObject’ helper, no longer used.
Element: Remove the ‘isNestedObject’ helper, no longer used.
JavaScript
mit
apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit
--- +++ @@ -56,8 +56,10 @@ return element === TYPES.ENUM; } -function isNestedObject(element) { - return isObject(element) || isArray(element) || isEnum(element); +function isObjectOrArray(element) { + return isObject(element) || isArray(element); +} + function hasSamples(element) { const attributes = ele...
4ffa7245d7f0cb5e053ff3219d8b586c62938819
src/js/pebble-js-app.js
src/js/pebble-js-app.js
var initialized = false; var options = {}; Pebble.addEventListener("ready", function() { console.log("ready called!"); initialized = true; }); Pebble.addEventListener("showConfiguration", function() { console.log("showing configuration"); Pebble.openURL('http://assets.getpebble.com.s3-website-us-east-1.amazon...
var initialized = false; var options = {}; Pebble.addEventListener("ready", function() { console.log("ready called!"); initialized = true; }); Pebble.addEventListener("showConfiguration", function() { console.log("showing configuration"); Pebble.openURL('http://assets.getpebble.com.s3-website-us-east-1.amazon...
Improve robustness of cancellation detection.
Improve robustness of cancellation detection.
JavaScript
mit
pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo
--- +++ @@ -14,7 +14,8 @@ Pebble.addEventListener("webviewclosed", function(e) { console.log("configuration closed"); // webview closed - if (e.response != "{}") { + //Using primitive JSON validity and non-empty check + if (e.response.charAt(0) == "{" && e.response.slice(-1) == "}" && e.response.length > 5) {...
5b3e52464bb32c64ba3c08a705c166a064fc537a
lib/transform/transform-space.js
lib/transform/transform-space.js
import Promise from 'bluebird' import { omit, defaults } from 'lodash/object' import { partialRight } from 'lodash/partialRight' import * as defaultTransformers from './transformers' const spaceEntities = [ 'contentTypes', 'entries', 'assets', 'locales', 'webhooks' ] /** * Run transformer methods on each item for ...
import Promise from 'bluebird' import { omit, defaults } from 'lodash/object' import * as defaultTransformers from './transformers' const spaceEntities = [ 'contentTypes', 'entries', 'assets', 'locales', 'webhooks' ] /** * Run transformer methods on each item for each kind of entity, in case there * is a need to ...
Revert Enable async entity transforms
fix(transformers): Revert Enable async entity transforms This reverts commit 6dcad860e5fc67fabcebeee762aad42d06e029e9.
JavaScript
mit
contentful/contentful-batch-libs
--- +++ @@ -1,6 +1,5 @@ import Promise from 'bluebird' import { omit, defaults } from 'lodash/object' -import { partialRight } from 'lodash/partialRight' import * as defaultTransformers from './transformers' const spaceEntities = [ @@ -12,28 +11,22 @@ * is a need to transform data when copying it to the desti...
e4594662b73173fae86d3ad64351828421aae962
src/palettes/nearest.js
src/palettes/nearest.js
// @flow import { RANGE } from "constants/controlTypes"; import type { ColorRGBA } from "types"; const optionTypes = { levels: { type: RANGE, range: [1, 256], default: 2 } }; const defaults = { levels: optionTypes.levels.default }; // Gets nearest color const getColor = ( color: ColorRGBA, options: { level...
// @flow import { RANGE } from "constants/controlTypes"; import type { ColorRGBA } from "types"; const optionTypes = { levels: { type: RANGE, range: [1, 256], default: 2 } }; const defaults = { levels: optionTypes.levels.default }; // Gets nearest color const getColor = ( color: ColorRGBA, options: { level...
Return early if full colour
Nearest: Return early if full colour
JavaScript
mit
gyng/ditherer,gyng/ditherer,gyng/ditherer
--- +++ @@ -17,6 +17,10 @@ color: ColorRGBA, options: { levels: number } = defaults ): ColorRGBA => { + if (options.levels >= 256) { + return color; + } + const step = 255 / (options.levels - 1); // $FlowFixMe
9fe2fb9aed4fb4c8833443a4df400591d18976da
dangerfile.js
dangerfile.js
import { danger, warn } from 'danger'; const packageChanged = danger.git.modified_files.includes('package.json'); const lockfileChanged = danger.git.modified_files.includes('package-lock.json'); if (packageChanged && !lockfileChanged) { warn(`Changes were made to package.json, but not to package-lock.json. Perhaps y...
import { danger, warn } from 'danger'; const packageChanged = danger.git.modified_files.includes('package.json'); const lockfileChanged = danger.git.modified_files.includes('package-lock.json'); if (packageChanged && !lockfileChanged) { warn(`Changes were made to package.json, but not to package-lock.json. Perhaps y...
Update message when package-lock.json should be updated
Chore: Update message when package-lock.json should be updated No need to remove lock file anymore.
JavaScript
mit
styleguidist/react-styleguidist,sapegin/react-styleguidist,sapegin/react-styleguidist,styleguidist/react-styleguidist,bluetidepro/react-styleguidist,styleguidist/react-styleguidist
--- +++ @@ -5,5 +5,5 @@ if (packageChanged && !lockfileChanged) { warn(`Changes were made to package.json, but not to package-lock.json. -Perhaps you need to run \`rm package-lock.json && npm install\`. Make sure you’re using npm 5+.`); +Perhaps you need to run \`npm install\` and commit changes in package-lock....
fdedf38a1ccc570ca5ce30e4bf72a0927fa119b1
scripts/tasks/download.js
scripts/tasks/download.js
'use strict' var github = require('octonode') var client = github.client() var evRepo = client.repo('nodejs/evangelism') var https = require('https') var path = require('path') var fs = require('fs') /* Currently proof-of-concept work. Outstanding: * ================ * - [ ] gulpify * - [ ] add to local boot proc...
'use strict' const github = require('octonode') const https = require('https') const path = require('path') const fs = require('fs') const basePath = path.join(__dirname, '..', '..', 'locale', 'en', 'blog', 'weekly-updates') const repo = github.client().repo('nodejs/evangelism') /* Currently proof-of-concept work. O...
Use `fs.access` instead of `fs.existsSync`
Use `fs.access` instead of `fs.existsSync`
JavaScript
mit
strawbrary/nodejs.org,marocchino/new.nodejs.org,abdelrahmansaeedhassan/yuri,boneskull/new.nodejs.org,nodejs/new.nodejs.org,rnsloan/new.nodejs.org,yous/new.nodejs.org,matthewloring/new.nodejs.org,rnsloan/new.nodejs.org,boneskull/new.nodejs.org,yous/new.nodejs.org,nodejs/new.nodejs.org,strawbrary/nodejs.org,phillipj/new....
--- +++ @@ -1,12 +1,12 @@ 'use strict' -var github = require('octonode') -var client = github.client() -var evRepo = client.repo('nodejs/evangelism') +const github = require('octonode') +const https = require('https') +const path = require('path') +const fs = require('fs') -var https = require('https') -var path...
9df9040dfbb5004a3a3ff90287caed2d03c77c3f
simplayer.js
simplayer.js
#!/usr/bin/env node 'use strict'; var childProcess = require('child_process'); /** * play * To run the process to match the platform. * @param {string} filepath * @param {function} callback * @return {Object} childProcess */ function play(filepath, callback) { var mediaSoundPlayer = '(New-Object System.Media...
#!/usr/bin/env node 'use strict'; var childProcess = require('child_process'); /** * play * To run the process to match the platform. * @param {string} filepath * @param {function} callback * @return {Object} childProcess */ function play(filepath, callback) { var mediaSoundPlayer = '"(New-Object System.Medi...
Fix no exit to the powershell in windows
Fix no exit to the powershell in windows
JavaScript
mit
MaxMEllon/simplayer
--- +++ @@ -12,7 +12,7 @@ * @return {Object} childProcess */ function play(filepath, callback) { - var mediaSoundPlayer = '(New-Object System.Media.SoundPlayer "' + filepath + '").Play()'; + var mediaSoundPlayer = '"(New-Object System.Media.SoundPlayer "' + filepath + '").Play(); exit $LASTEXITCODE"'; var p...
22935d8ed0181fba9910f01d00a8c148de4be021
src/app/result/result.controller.js
src/app/result/result.controller.js
class ResultController { constructor(SocketService, GameService, toastr, _, GameFactory) { 'ngInject'; this._ = _; this.GameService = GameService; this.players = GameService.players; this.toastr = toastr; SocketService.extendedHandler = (message) => { if(message.type === 'player_create...
class ResultController { constructor(SocketService, GameService, toastr, _, GameFactory) { 'ngInject'; this._ = _; this.GameService = GameService; this.players = GameService.players; this.toastr = toastr; SocketService.extendedHandler = (message) => { if(message.type === 'player_create...
Fix toast not showing player name
Fix toast not showing player name
JavaScript
mit
hendryl/Famous-Places-Web,hendryl/Famous-Places-Web
--- +++ @@ -19,7 +19,7 @@ handlePlayerCreate(playerId) { const player = this._.find(this.GameService.players, (n) => n.id === playerId); - this.toastr.info(player + ' is creating a new game.'); + this.toastr.info(player.name + ' is creating a new game.'); } handlePlayerSelect(message) {
f273fe7f02f95698fbb139aa63b9ceccf65ba8db
lib/clifton-smtp.js
lib/clifton-smtp.js
//@Authors: Oliver Barnwell(ob6160) Harry Dalton(Hoolean) //Requires var net = require("net"); var util = require("util"); var EventEmitter = require("event").EventEmitter; //Exports module.exports = function(options) { return new clifton-smtp(options); } function clifton-smtp(options) { EventEmitter.call(this); ...
Add cliffton-server object & some base functionality
Add cliffton-server object & some base functionality
JavaScript
mit
CliftonJS/clifton-smtp
--- +++ @@ -0,0 +1,27 @@ +//@Authors: Oliver Barnwell(ob6160) Harry Dalton(Hoolean) + +//Requires +var net = require("net"); +var util = require("util"); +var EventEmitter = require("event").EventEmitter; + +//Exports +module.exports = function(options) { + return new clifton-smtp(options); +} + + +function clifton-s...
3d94482d5e8a9be898cb707f4ceccf1c90b9c068
lib/EventService.js
lib/EventService.js
const P = require('bluebird'); const preq = require('preq'); const uuid = require('cassandra-uuid').TimeUuid; function getResourceChangeEvent(resourceUri, domain) { return { meta: { topic: 'resource_change', uri: resourceUri, id: uuid.now().toString(), dt: new Date().toISOString(), ...
const P = require('bluebird'); const preq = require('preq'); const uuid = require('cassandra-uuid').TimeUuid; function getResourceChangeEvent(resourceUri, domain) { return { meta: { topic: 'resource_change', uri: resourceUri, id: uuid.now().toString(), dt: new Date().toISOString(), ...
Add protocol to resource_change event URIs
Add protocol to resource_change event URIs
JavaScript
apache-2.0
kartotherian/tilerator,kartotherian/tilerator,kartotherian/tilerator
--- +++ @@ -16,11 +16,12 @@ } class EventService { - constructor(eventBusUri, domain, sources, logger) { + constructor(eventBusUri, domain, sources, logger, protocol = 'https') { this.eventBusUri = eventBusUri; this.domain = domain; this.sources = sources; this.logger = logger; + this.pro...
a62988bb0fd8f72faac3ed409eac105e06bf565f
demo/index.js
demo/index.js
require('./lib/seed')() const { compose } = require('ramda') const http = require('http') const util = require('util') const { logger, methods, mount, parseJson, redirect, routes, static } = require('..') const { createCourse, fetchCourse, fetchCourses, updateCourse } = require('./api/courses') const...
require('./lib/seed')() const { compose } = require('ramda') const http = require('http') const util = require('util') const { logger, methods, mount, parseJson, redirect, routes, static } = require('..') const { createCourse, fetchCourse, fetchCourses, updateCourse } = require('./api/courses') const...
Use PORT env var for heroku demo
Use PORT env var for heroku demo
JavaScript
mit
articulate/paperplane
--- +++ @@ -15,7 +15,7 @@ const { home } = require('./api/pages') -const port = 3000 +const port = process.env.PORT || 3000 const listening = err => err ? console.error(err) : console.info(`Listening on port: ${port}`)
b05972b6d8695469c655f89235773cea751e7410
src/star_constructor.js
src/star_constructor.js
function chart(selection) { // Merging the various user params vars.user_vars = vistk.utils.merge(vars.user_vars, vars._user_vars); // Merging with current charts parameters set by the user in the HTML file vars = vistk.utils.merge(vars, vars.user_vars); // Create the top level element conainin...
function chart(selection) { // Merging the various user params vars.user_vars = vistk.utils.merge(vars.user_vars, vars._user_vars); // Merging with current charts parameters set by the user in the HTML file vars = vistk.utils.merge(vars, vars.user_vars); // Create the top level element conainin...
Allow elements within SVG to overflow
Allow elements within SVG to overflow
JavaScript
mit
cid-harvard/vis-toolkit,cid-harvard/vis-toolkit
--- +++ @@ -13,6 +13,8 @@ vars.svg = d3.select(vars.container).append("svg") .attr("width", vars.width) .attr("height", vars.height) + .style('overflow', 'visible') + .style('z-index', 0) .append("g") .attr("transform", "translate(" + vars.margi...
d31eb501d5ffaad8900e1a91e7c28b97a4c75f78
src/Ractive/prototype/shared/makeArrayMethod.js
src/Ractive/prototype/shared/makeArrayMethod.js
import { isArray } from 'utils/is'; import { getKeypath, normalise } from 'shared/keypaths'; import runloop from 'global/runloop'; import getNewIndices from 'shared/getNewIndices'; var arrayProto = Array.prototype; export default function ( methodName ) { return function ( keypath, ...args ) { var array, newIndice...
import { isArray } from 'utils/is'; import { getKeypath, normalise } from 'shared/keypaths'; import runloop from 'global/runloop'; import getNewIndices from 'shared/getNewIndices'; var arrayProto = Array.prototype; export default function ( methodName ) { return function ( keypath, ...args ) { var array, newIndice...
Use keypath.str property to prevent coercion erros
Use keypath.str property to prevent coercion erros
JavaScript
mit
thomsbg/ractive,thomsbg/ractive,Rich-Harris/ractive,ISNIT0/ractive,dyx/ractive,heavyk/ractive,marcalexiei/ractive,dyx/ractive,aliprogrammer69/ractive,aliprogrammer69/ractive,JonDum/ractive,pingjiang/ractive,heavyk/ractive,Rich-Harris/ractive,squaredup/ractive,cgvarela/ractive,JonDum/ractive,JonDum/ractive,ractivejs/rac...
--- +++ @@ -15,7 +15,7 @@ len = array.length; if ( !isArray( array ) ) { - throw new Error( 'Called ractive.' + methodName + '(\'' + keypath + '\'), but \'' + keypath + '\' does not refer to an array' ); + throw new Error( 'Called ractive.' + methodName + '(\'' + keypath.str + '\'), but \'' + keypath.str ...
e49c8ea16ed78ed1246905f4139aac9674122b83
src/components/toolbar/models/SelectStateModel.js
src/components/toolbar/models/SelectStateModel.js
import SelectStateItemsCollection from '../collections/SelectStateItemsCollection'; import meta from '../meta'; export default Backbone.Model.extend({ initialize() { const items = this.get('items'); const itemsCollection = new SelectStateItemsCollection(items); this.listenTo(itemsCollection...
import SelectStateItemsCollection from '../collections/SelectStateItemsCollection'; import meta from '../meta'; export default Backbone.Model.extend({ initialize() { const items = this.get('items'); const itemsCollection = new SelectStateItemsCollection(items); this.listenTo(itemsCollection...
Add default selected state to toolbar selections.
Add default selected state to toolbar selections.
JavaScript
mit
comindware/core-ui,comindware/core-ui,comindware/core-ui,comindware/core-ui
--- +++ @@ -8,9 +8,7 @@ this.listenTo(itemsCollection, 'select:one', model => this.set('iconClass', model.get('iconClass'))); this.set('items', itemsCollection); - const firstNotHeadlineModel = itemsCollection.find(model => model.get('type') !== meta.toolbarItemType.HEADLINE); - item...
11290de91c78b3e5c98c96723b8bd4935be2b2a4
ghost/admin/app/session-stores/application.js
ghost/admin/app/session-stores/application.js
import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive'; export default AdaptiveStore.extend({ localStorageKey: 'ghost:session', cookieName: 'ghost:session' });
import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive'; import ghostPaths from 'ghost/utils/ghost-paths'; const paths = ghostPaths(); const keyName = `ghost${(paths.subdir.indexOf('/') === 0 ? `-${paths.subdir.substr(1)}` : ``) }:session`; export default AdaptiveStore.extend({ localStorageKey: keyN...
Set localStorage key based on subdir
Set localStorage key based on subdir closes #6326
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
--- +++ @@ -1,6 +1,10 @@ import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive'; +import ghostPaths from 'ghost/utils/ghost-paths'; + +const paths = ghostPaths(); +const keyName = `ghost${(paths.subdir.indexOf('/') === 0 ? `-${paths.subdir.substr(1)}` : ``) }:session`; export default AdaptiveStore....
83c643c19035a44d74b8aeccfe279dc2c7ce3367
lib/config/index.js
lib/config/index.js
'use strict'; const readConfig = require('restore-server-config'); // singleton let config; /** * Loads the configuration and stores it in the config singleton. * @param {string} baseDir Directory which contains the folder cfg with the config files. * @param [Logger] logger */ function load(baseDir, logger) { ...
'use strict'; const readConfig = require('restore-server-config'); // singleton let config; /** * Loads the configuration and stores it in the config singleton. * @param {string} baseDir Directory which contains the folder cfg with the config files. * @param [Logger] logger */ function load(baseDir, logger) { ...
Replace config load callback wrapper
Replace config load callback wrapper
JavaScript
mit
restorecommerce/chassis-srv,restorecommerce/chassis-srv
--- +++ @@ -12,9 +12,13 @@ */ function load(baseDir, logger) { return (cb) => { - readConfig(baseDir, logger, (cfg) => { - config = cfg; - cb(null, cfg); + readConfig(baseDir, logger, (err, cfg) => { + if (err) { + cb(err, cfg); + } else { + config = cfg; + cb(null...
bc85619117de88c6248f7652bb82a9396f35adc9
app/assets/javascripts/web.js
app/assets/javascripts/web.js
//= require jquery //= require leaflet //= require leaflet-ajax //= require leaflet-routing-machine //= require osmtogeojson //= require maps $("#agua").change(function () { if (this.checked) { showWindsLayer(); } else { hideWindsLayer(); } }) $("#lluvia").change(function () { if (thi...
//= require jquery //= require leaflet //= require leaflet-ajax //= require leaflet-routing-machine //= require osmtogeojson //= require maps $( document ).ready(function() { $("#agua").change(function () { if (this.checked) { showWindsLayer(); } else { hideWindsLayer(); ...
Add checkbox event listeners after document load.
Add checkbox event listeners after document load.
JavaScript
mit
ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend
--- +++ @@ -5,27 +5,30 @@ //= require osmtogeojson //= require maps +$( document ).ready(function() { -$("#agua").change(function () { - if (this.checked) { - showWindsLayer(); - } else { - hideWindsLayer(); - } -}) + $("#agua").change(function () { + if (this.checked) { + ...
8e8f489721dead1c9cecc9cc4934865633bea258
config.js
config.js
/* * Copyright (c) 2014 Giovanni Capuano <webmaster@giovannicapuano.net> * Released under the MIT License * http://opensource.org/licenses/MIT */ var config = {}; // Images configuration config.images = { path: '../images', url : '/images' }; // Set the following line to false if you have a webserver that s...
/* * Copyright (c) 2014 Giovanni Capuano <webmaster@giovannicapuano.net> * Released under the MIT License * http://opensource.org/licenses/MIT */ var config = {}; // Images configuration config.images = { path: '../images', url : '/images' }; // Set the following line to false if you have a webserver that s...
Set default thumbs width to 250
Set default thumbs width to 250
JavaScript
mit
RoxasShadow/Vasilij
--- +++ @@ -32,7 +32,7 @@ config.thumbs = { path : '../thumbs', url : '/thumbs', - width : 500, + width : 250, cpu : 8 };
685e7f437e4155c80814ca81f246a3571f85289f
spec/components/link.js
spec/components/link.js
import React, { PureComponent } from 'react'; import Link from '../../components/link'; class LinkTest extends PureComponent { handleClick = () => { console.log('Clicked on a link'); }; render () { return ( <article> <header> <h1>Links</h1> </header> <div classNam...
import React, { PureComponent } from 'react'; import { Link, Heading1, Section } from '../../components/'; import { BrowserRouter as Router, Link as ReactRouterLink } from 'react-router-dom'; Link.use(ReactRouterLink); class LinkTest extends PureComponent { handleClick = () => { console.log('Clicked on a link')...
Use the Link component from react-router in combination with our custom styled Link
Use the Link component from react-router in combination with our custom styled Link
JavaScript
mit
teamleadercrm/teamleader-ui
--- +++ @@ -1,5 +1,8 @@ import React, { PureComponent } from 'react'; -import Link from '../../components/link'; +import { Link, Heading1, Section } from '../../components/'; +import { BrowserRouter as Router, Link as ReactRouterLink } from 'react-router-dom'; + +Link.use(ReactRouterLink); class LinkTest extends ...
6bbed196b8b30180936e38e17bfddd3617752d31
__tests__/components/Thumbnail-test.js
__tests__/components/Thumbnail-test.js
import React from 'react'; import shallowRender from '../utils/shallowRender'; import Thumbnail from '../../src/components/Thumbnail'; jest.unmock('../../src/components/Thumbnail'); describe('Thumbnail Component', () => { it('should be a div HTML element', () => { const output = shallowRender(<Thumbnail />); ...
import React from 'react'; import shallowRender from '../utils/shallowRender'; import Thumbnail from '../../src/components/Thumbnail'; jest.unmock('../../src/components/Thumbnail'); describe('Thumbnail Component', () => { it('should be a div HTML element', () => { const output = shallowRender(<Thumbnail />); ...
Update tests for Thumbnail component
Update tests for Thumbnail component
JavaScript
mit
LittleFurryBastards/webpack-react-redux,LittleFurryBastards/webpack-babel-react,LittleFurryBastards/webpack-babel-react,LittleFurryBastards/webpack-react-redux
--- +++ @@ -16,4 +16,18 @@ expect(output.props.className).toBe('wrr-thumbnail'); }); + + it('should have a default color #000', () => { + const expected = { color: '#000' }; + const output = shallowRender(<Thumbnail />); + + expect(output.props.style).toEqual(expected); + }); + + it('should prop...
d23a0c33a1db143c2b821dd307096d466db3c7af
src/frontend/lite/src/walletPath.js
src/frontend/lite/src/walletPath.js
import { app } from "electron"; const isDevelopment = process.env.NODE_ENV !== "production"; import os from "os"; import path from "path"; let walletPath = ""; if (process.type !== "renderer") { if (os.platform() === "linux") { walletPath = path.join( app.getPath("home"), isDevelopment ? ".gulden_d...
import { app } from "electron"; const isDevelopment = process.env.NODE_ENV !== "production"; import os from "os"; import path from "path"; let walletPath = ""; if (process.type !== "renderer") { if (os.platform() === "linux") { walletPath = path.join( app.getPath("home"), isDevelopment ? ".gulden_l...
Change wallet path for lite wallet
ELECTRON: Change wallet path for lite wallet
JavaScript
mit
nlgcoin/guldencoin-official,nlgcoin/guldencoin-official,nlgcoin/guldencoin-official,nlgcoin/guldencoin-official,nlgcoin/guldencoin-official,nlgcoin/guldencoin-official
--- +++ @@ -10,7 +10,7 @@ if (os.platform() === "linux") { walletPath = path.join( app.getPath("home"), - isDevelopment ? ".gulden_dev" : ".gulden" + isDevelopment ? ".gulden_lite_dev" : ".gulden_lite" ); } else { walletPath = app.getPath("userData");
2014d17c9c301508b0747327fc6a2a7b8dd538a3
src/main/web/florence/js/functions/_reset.js
src/main/web/florence/js/functions/_reset.js
function resetPage() { // Prevent default behaviour of all form submits throught Florence $(document).on('submit', 'form', function(e) { e.preventDefault(); console.log('Form submit stopped on: ', e); }); // Fix for modal form submits not being detected $(document).on('click', 'butt...
function resetPage() { // Prevent default behaviour of all form submits throught Florence $(document).on('submit', 'form', function(e) { e.preventDefault(); }); // Fix for modal form submits not being detected $(document).on('click', 'button', function() { var $closestForm = $(this)...
Remove form submit prevention logging
Remove form submit prevention logging
JavaScript
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -2,7 +2,6 @@ // Prevent default behaviour of all form submits throught Florence $(document).on('submit', 'form', function(e) { e.preventDefault(); - console.log('Form submit stopped on: ', e); }); // Fix for modal form submits not being detected
dc14852989ce28312ea93b1e2210f70f9928ee79
app/navigation/renderScene.js
app/navigation/renderScene.js
/* @flow */ import React from "react-native"; import routeMapper from "../routes/routeMapper"; import Colors from "../../Colors.json"; const { NavigationCard, StyleSheet, View } = React; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: Colors.lightGrey }, normal: { marginTop: 56...
/* @flow */ import React from "react-native"; import routeMapper from "../routes/routeMapper"; import Colors from "../../Colors.json"; const { NavigationCard, StyleSheet, View } = React; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: Colors.lightGrey }, normal: { marginTop: 56...
Use sceneRecord.get to get current route
Use sceneRecord.get to get current route
JavaScript
unknown
scrollback/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods
--- +++ @@ -23,7 +23,8 @@ const renderScene = function(navState: Object, onNavigation: Function): Function { return props => { - const route = navState.get(navState.index); + const route = props.sceneRecord.get("route"); // eslint-disable-line react/prop-types + const { component: RouteComponent, pa...
d84468b7631cf9c08d1f9d185f59f36c79d16d68
app/static/js/lib/reserves.js
app/static/js/lib/reserves.js
import { fromPairs, isEmpty, head, last, max, mapObjIndexed, sortBy, toPairs, } from 'ramda' export function calculateReserves (cumulative, reserveData, mineral, column, series) { const reserves = getReserves(reserveData, mineral) if (!reserves) { // console.debug('No r...
import { fromPairs, isEmpty, head, last, max, mapObjIndexed, sortBy, toPairs, } from 'ramda' export function calculateReserves (cumulative, reserveData, mineral, column, series) { const reserves = getReserves(reserveData, mineral) if (!reserves) { // console.debug('No r...
Change calculateReserves minimum value to zero
Change calculateReserves minimum value to zero
JavaScript
mit
peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag
--- +++ @@ -23,7 +23,7 @@ return mapObjIndexed((row, year) => { return fromPairs([ ['Year', year], - [series, max(1, reserveAmount - (row[column] - cumulativeOnReserveYear))] + [series, max(0, reserveAmount - (row[column] - cumulativeOnReserveYear))] ]) }...
722184133a934315f1bd261bd4a16c54d5607be7
app/themes/base/containers.js
app/themes/base/containers.js
export default ({ borders, colors, radii, space }) => { const defaultStyles = { mx: 'auto', bg: colors.white, width: ['100%', '85%'], mb: `${space[6]}px`, }; const large = { ...defaultStyles, maxWidth: '1280px', }; const medium = { ...defaultStyles, maxWidth: '840px', }; ...
export default ({ borders, colors, radii, space }) => { const defaultStyles = { mx: 'auto', bg: colors.white, width: ['100%', '85%'], mb: `${space[6]}px`, position: 'relative', }; const large = { ...defaultStyles, maxWidth: '1280px', }; const medium = { ...defaultStyles, ...
Add relative position to default container styles
[WEB-1338] Add relative position to default container styles
JavaScript
bsd-2-clause
tidepool-org/blip,tidepool-org/blip,tidepool-org/blip
--- +++ @@ -4,6 +4,7 @@ bg: colors.white, width: ['100%', '85%'], mb: `${space[6]}px`, + position: 'relative', }; const large = {
940f3dce1f1aa7c885e66705c42df93810a308dd
lib/ticket-types.js
lib/ticket-types.js
'use strict'; function ticketTypes (args, callback) { var ticketTypes = [ {name: 'ninja', title: 'Ninja', tooltip: 'Select Ninja to create tickets for attendees under 13 or over 13.'}, {name: 'parent-guardian', title: 'Parent/Guardian', tooltip: 'Select Parent/Guardian to create tickets for parents/guardians...
'use strict'; function ticketTypes (args, callback) { /* ninja is defined as a key in many areas, keep it for backward compatibility */ var ticketTypes = [ {name: 'ninja', title: 'Youth', tooltip: 'Select Youth to create tickets for attendees under 18.'}, {name: 'parent-guardian', title: 'Parent/Guardian',...
Rename ninja to youth to reduce confusion
Rename ninja to youth to reduce confusion
JavaScript
mit
CoderDojo/cp-events-service,CoderDojo/cp-events-service
--- +++ @@ -1,8 +1,9 @@ 'use strict'; function ticketTypes (args, callback) { + /* ninja is defined as a key in many areas, keep it for backward compatibility */ var ticketTypes = [ - {name: 'ninja', title: 'Ninja', tooltip: 'Select Ninja to create tickets for attendees under 13 or over 13.'}, + {name: ...
2984f42931b1030093f4329b51fc202063001eda
src/app/index.module.js
src/app/index.module.js
/* global malarkey:false, moment:false */ import { config } from './index.config'; import { routerConfig } from './index.route'; import { themeConfig } from './index.theme'; import { runBlock } from './index.run'; import { MainController } from './main/main.controller'; import { DetailsController } from './details/det...
/* global moment:false */ import { config } from './index.config'; import { routerConfig } from './index.route'; import { themeConfig } from './index.theme'; import { runBlock } from './index.run'; import { MainController } from './main/main.controller'; import { DetailsController } from './details/details.controller'...
FIX - Removed unused dependencies
FIX - Removed unused dependencies
JavaScript
mit
lucasdesenna/generic-search-flow,lucasdesenna/generic-search-flow
--- +++ @@ -1,4 +1,4 @@ -/* global malarkey:false, moment:false */ +/* global moment:false */ import { config } from './index.config'; import { routerConfig } from './index.route'; @@ -8,8 +8,7 @@ import { DetailsController } from './details/details.controller'; import { RetractableSearchbarDirective } from '.....
ad0ab578bfaa2f16ec7235f6943928859f65f01b
src/Store.js
src/Store.js
import AsyncStorage from '@react-native-community/async-storage'; import { persistStore, persistReducer } from 'redux-persist'; import { applyMiddleware, createStore } from 'redux'; import thunk from 'redux-thunk'; import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers'; import reducers fr...
import AsyncStorage from '@react-native-community/async-storage'; import { persistStore, persistReducer } from 'redux-persist'; import { applyMiddleware, createStore } from 'redux'; import thunk from 'redux-thunk'; import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers'; import reducers fr...
Add blacklist pages store state
Add blacklist pages store state
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
--- +++ @@ -12,7 +12,7 @@ keyPrefix: '', key: 'root', storage: AsyncStorage, - blacklist: ['nav'], + blacklist: ['nav', 'pages'], }; const persistedReducer = persistReducer(persistConfig, reducers);
4ba2b6b0e60bbd7d101f61e228ec4191c608e288
src/index.js
src/index.js
'use strict'; /** * Make a web element pannable. */ module.exports = { init: (elem, containerElem) => { var container = containerElem ? containerElem : elem.parentElement; elem.addEventListener('mousemove', (e) => { e.preventDefault(); if (e && e.which === 1) { if (e.movementX !== 0) { con...
'use strict'; /** * Limit execution of onReady function * to once over the given wait time. * * @function _throttle * @private * * @param {function} onReady * @param {function} onStandby * @param {number} wait * * @returns {function} */ const _throttle = (onReady, onStandby, wait) => { let time = Date....
Implement throttling on event listener
Implement throttling on event listener
JavaScript
mit
selcher/panner,selcher/panner
--- +++ @@ -1,29 +1,97 @@ 'use strict'; + +/** + * Limit execution of onReady function + * to once over the given wait time. + * + * @function _throttle + * @private + * + * @param {function} onReady + * @param {function} onStandby + * @param {number} wait + * + * @returns {function} + */ +const _throttle = (onReady...
775cc483bbae71e5fd9793e9986e0348d2474d06
src/index.js
src/index.js
'use strict'; /* globals window, angular */ angular.module('vlui', [ 'LocalStorageModule', 'ui.select', ]) .constant('_', window._) // datalib, vegalite, vega .constant('dl', window.dl) .constant('vl', window.vl) .constant('vg', window.vg) // other libraries .constant('Blob', window.Blob) .consta...
'use strict'; /* globals window, angular */ angular.module('vlui', [ 'LocalStorageModule', 'ui.select', 'angular-google-analytics' ]) .constant('_', window._) // datalib, vegalite, vega .constant('dl', window.dl) .constant('vl', window.vl) .constant('vg', window.vg) // other libraries .constant('...
Add angular analytics as dependency
Add angular analytics as dependency
JavaScript
bsd-3-clause
vega/vega-lite-ui,uwdata/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui
--- +++ @@ -4,6 +4,7 @@ angular.module('vlui', [ 'LocalStorageModule', 'ui.select', + 'angular-google-analytics' ]) .constant('_', window._) // datalib, vegalite, vega @@ -20,7 +21,7 @@ addCount: true, // add count field to Dataset.dataschema debug: true, useUrl: true, - logging: fa...
e4da867c2422df1279ed0e13dcc3143af473aa6a
src/index.js
src/index.js
/* @flow */ import matches from 'matches-selector-ng'; const proto = global.Element && global.Element.prototype; const vendor = proto && proto.closest; export default function closest(element: HTMLElement, selector: string): ?HTMLElement { if (vendor) return vendor.call(element, selector); let parent = element; ...
/* @flow */ import matches from 'matches-selector-ng'; const proto = global.Element && global.Element.prototype; const vendor = proto && proto.closest; export default function closest(element: HTMLElement, selector: string): HTMLElement | null { if (vendor) return vendor.call(element, selector); let parent = ele...
Make return type more specific.
Make return type more specific.
JavaScript
mit
AgentME/closest-ng
--- +++ @@ -5,7 +5,7 @@ const proto = global.Element && global.Element.prototype; const vendor = proto && proto.closest; -export default function closest(element: HTMLElement, selector: string): ?HTMLElement { +export default function closest(element: HTMLElement, selector: string): HTMLElement | null { if (ve...
7235b162e7080fe287f83edd84b13a91a4aa0ab2
app/scripts/plugins/draw/draw.js
app/scripts/plugins/draw/draw.js
define(['backbone', 'backbone.marionette', 'communicator', 'leaflet', 'leaflet.draw'], function(Backbone, Marionette, Communicator, L, LeafletDraw) { return Marionette.Object.extend({ map: null, mapController: null, initialize: function(o) { var self = this; Communicator.medi...
define(['backbone', 'backbone.marionette', 'communicator', 'leaflet', 'leaflet.draw'], function(Backbone, Marionette, Communicator, L, LeafletDraw) { return Marionette.Object.extend({ map: null, mapController: null, initialize: function(o) { var self = this; Communicator.medi...
Remove circle and rectangle tools
Remove circle and rectangle tools
JavaScript
mit
TotalActiveMedia/erfgeoviewer,TotalActiveMedia/erfgeoviewer,TotalActiveMedia/erfgeoviewer
--- +++ @@ -24,6 +24,10 @@ map.addLayer(drawnItems); var drawControl = new L.Control.Draw({ + draw: { + rectangle: false, + circle: false, + }, edit: { featureGroup: drawnItems }
2b2aae763a3dc985a6bde7345a0798a7e0347423
projects/immersive-and-narrative/plugins/MediaEvents/src/MediaEvents.js
projects/immersive-and-narrative/plugins/MediaEvents/src/MediaEvents.js
var ForgePlugins = ForgePlugins || {}; ForgePlugins.MediaEvents = function() { this._video = null; }; ForgePlugins.MediaEvents.prototype = { boot: function() { this._setupVideo(); }, reset: function() { this._clearVideo(); this._setupVideo(); }, _setupVideo: f...
var ForgePlugins = ForgePlugins || {}; ForgePlugins.MediaEvents = function() { this._video = null; }; ForgePlugins.MediaEvents.prototype = { boot: function() { this._setupVideo(); }, reset: function() { this._clearVideo(); this._setupVideo(); }, _setupVideo: f...
Fix MediaEvent plugin of immersive project for new scene media
Fix MediaEvent plugin of immersive project for new scene media
JavaScript
apache-2.0
gopro/forgejs-samples,gopro/forgejs-samples
--- +++ @@ -20,18 +20,8 @@ _setupVideo: function() { - if(this.viewer.renderer.media !== null) - { - this._video = this.viewer.renderer.media.displayObject; - this._video.onEnded.add(this._onEndedHandler, this); - } - else - { - if(this.v...
aa7245ba61b8a9f4c0c50d1516b59e618caf3050
src/subtitulamos/resources/assets/js/rules.js
src/subtitulamos/resources/assets/js/rules.js
/** * This file is covered by the AGPLv3 license, which can be found at the LICENSE file in the root of this project. * @copyright 2020 subtitulamos.tv */ import "../css/rules.scss"; import { onDomReady } from "./utils"; onDomReady(() => { for (const $spoilerWrapper of document.querySelectorAll(".spoiler-wrapper...
/** * This file is covered by the AGPLv3 license, which can be found at the LICENSE file in the root of this project. * @copyright 2020 subtitulamos.tv */ import "../css/rules.scss"; import { get_all, onDomReady } from "./utils"; onDomReady(() => { for (const $spoilerName of get_all(".spoiler-name")) { $spoi...
Fix collapsing of rule explanations
Fix collapsing of rule explanations
JavaScript
agpl-3.0
subtitulamos/subtitulamos,subtitulamos/subtitulamos,subtitulamos/subtitulamos,subtitulamos/subtitulamos,subtitulamos/subtitulamos
--- +++ @@ -4,14 +4,14 @@ */ import "../css/rules.scss"; -import { onDomReady } from "./utils"; +import { get_all, onDomReady } from "./utils"; onDomReady(() => { - for (const $spoilerWrapper of document.querySelectorAll(".spoiler-wrapper")) { - $spoilerWrapper.addEventListener("click", function () { - ...
675065d9085e8c4dc7ee8214a7eade47d5041f51
src/utils.js
src/utils.js
const defaults = require('./defaults.js'); const parseBoolean = boolean => boolean === 'true'; const parseIntervals = (intervals) => { if (Array.isArray(intervals)) { return intervals .filter(i => !isNaN(i)) .map(parseFloat) .sort((a, b) => a - b); } const interval = parseFloat(intervals);...
const defaults = require('./defaults.js'); const parseBoolean = boolean => boolean === 'true'; const parseIntervals = (intervals) => { if (Array.isArray(intervals)) { return intervals .filter(i => !isNaN(i)) .map(parseFloat) .sort((a, b) => a - b); } const interval = parseFloat(intervals);...
Clone `defaults` object to avoid member assignment
Clone `defaults` object to avoid member assignment Fixes urbica/galton#183
JavaScript
mit
urbica/galton,urbica/galton
--- +++ @@ -39,6 +39,6 @@ acc[paramKey] = parser(query[paramKey]); } return acc; - }, defaults); + }, Object.assign({}, defaults)); module.exports = parseQuery;
57125a8c83882e44b2108e7ecac9240dfd90c8cf
src/js/pebble-js-app.js
src/js/pebble-js-app.js
var initialized = false; Pebble.addEventListener("ready", function() { console.log("ready called!"); initialized = true; }); Pebble.addEventListener("showConfiguration", function() { console.log("showing configuration"); var shakeToCheat = 1; // get current setting from pebble Pebble.openURL('http://rawgith...
var initialized = false; Pebble.addEventListener("ready", function() { console.log("ready called!"); initialized = true; }); Pebble.addEventListener("showConfiguration", function() { console.log("showing configuration"); var shakeToCheat = localStorage.getItem("shake-to-cheat") || 1; Pebble.openURL('http://...
Load and persist config on phone app
Load and persist config on phone app
JavaScript
mit
chasecolburn/line-maze,chasecolburn/line-maze,chasecolburn/line-maze
--- +++ @@ -7,7 +7,7 @@ Pebble.addEventListener("showConfiguration", function() { console.log("showing configuration"); - var shakeToCheat = 1; // get current setting from pebble + var shakeToCheat = localStorage.getItem("shake-to-cheat") || 1; Pebble.openURL('http://rawgithub.com/kesselborn/line-maze/SDK-...
f74006ac42b9a1d75b2887130fd0046b7d05f268
client/components/admin-lte/Sidebar.js
client/components/admin-lte/Sidebar.js
import React from 'react'; import SideLink from '../common/SideLink'; import { Link } from 'react-router'; const Sidebar = (props) => { // eslint-disable-line no-unused-vars return ( <aside className="main-sidebar"> <section className="sidebar"> <div className="user-panel"> ...
import React from 'react'; import SideLink from '../common/SideLink'; import { Link } from 'react-router'; const Sidebar = (props) => { // eslint-disable-line no-unused-vars return ( <aside className="main-sidebar"> <section className="sidebar"> <div className="user-panel"> ...
Add a link to the import-subscribers page in the sidebar
Add a link to the import-subscribers page in the sidebar
JavaScript
bsd-3-clause
zhakkarn/Mail-for-Good,zhakkarn/Mail-for-Good,karuppiah7890/Mail-for-Good,karuppiah7890/Mail-for-Good,karuppiah7890/Mail-for-Good,zhakkarn/Mail-for-Good
--- +++ @@ -23,7 +23,7 @@ <li className="treeview"><a href="#"> Subscribers </a> <ul className="treeview-menu"> <li><Link to="/add-email">Add email</Link></li> - <li><a href="#">Link in level 2</a></li> + <li>...
3bfd0e3be920ac3e9b35ef9e906aeee47f34abe6
src/doors.js
src/doors.js
//TODO: Implement helper functions for: // open/close, lock/unlock, and other player and NPC interactions with doors.
//TODO: Implement helper functions for: // open/close, lock/unlock, and other player and NPC interactions with doors. 'use strict'; const CommandUtil = require('./command_util').CommandUtil; const util = require('util'); /* * Handy little util functions. */ const has = (collection, thing) => collection.indexOf(thin...
Refactor open and close function to be the same thing, exported to be called from the command files.
Refactor open and close function to be the same thing, exported to be called from the command files.
JavaScript
mit
seanohue/ranviermud,shawncplus/ranviermud,seanohue/ranviermud
--- +++ @@ -1,2 +1,83 @@ //TODO: Implement helper functions for: // open/close, lock/unlock, and other player and NPC interactions with doors. + +'use strict'; +const CommandUtil = require('./command_util').CommandUtil; +const util = require('util'); + +/* + * Handy little util functions. + */ +const has = (collect...
2ef6613becea4df29aaf9aeff58d308686743084
app/js/app.js
app/js/app.js
var store = null; $(function() { $(document).on("dragstart", "img", false); $("#page-back").click(function() { utils.page(utils.page() - 1); }); $("#page-next").click(function() { utils.page(utils.page() + 1); }); $.getJSON("data.json").done(function(data) { if(data.length == 0) alert("No dat...
var store = null; $(function() { $(document).on("dragstart", "img", false); $("#page-back").click(function() { utils.page(utils.page() - 1); }); $("#page-next").click(function() { utils.page(utils.page() + 1); }); $(window).keydown(function(event) { if(event.keyCode == 39) { event.preve...
Allow using keyboard to move between pages as well
Allow using keyboard to move between pages as well
JavaScript
mit
bloopletech/mangos,bloopletech/videos,bloopletech/videos
--- +++ @@ -10,6 +10,17 @@ utils.page(utils.page() + 1); }); + $(window).keydown(function(event) { + if(event.keyCode == 39) { + event.preventDefault(); + utils.page(utils.page() + 1); + } + else if(event.keyCode == 8 || event.keyCode == 37) { + event.preventDefault(); + utils....
b81ff5ecc2ccb982c136305f9df3fb3c0d72827c
libs/Mailer.js
libs/Mailer.js
// let messanger = require('./mailer/transport')(); module.exports = function(_db, messanger){ if(!SlickSources[_db]) return {start: () => false}; let _req = {db:SlickSources[_db]}, Mails = Models.Mails(_req), fetchMails = cb => { Mails.find({limit:100,sent:'0'}, function(e, rec...
// let messanger = require('./mailer/transport')(); module.exports = function(_db, messanger){ if(!SlickSources[_db]) return {start: () => false}; let _req = {db:SlickSources[_db]}, Mails = Models.Mails(_req), fetchMails = cb => { Mails.find({limit:100}, function(e, recs){ ...
Remove handling of failed send error
Remove handling of failed send error
JavaScript
mit
steveesamson/slicks-bee,steveesamson/slicks-bee
--- +++ @@ -9,10 +9,14 @@ Mails = Models.Mails(_req), fetchMails = cb => { - Mails.find({limit:100,sent:'0'}, function(e, recs){ + Mails.find({limit:100}, function(e, recs){ + if(!e){ + cb(recs); + }else{ + ...
5c4c8f1b0b3557cde47b7ec4a2c553a3acca7a36
src/error.js
src/error.js
// // Error handling // export var onError export function catchFunctionErrors(delegate) { return onError ? function () { try { return delegate.apply(this, arguments); } catch (e) { onError && onError(e); throw e; } } : delegate; } export function de...
// // Error handling // --- // // The default onError handler is to re-throw. export var onError = function (e) { throw(e); }; export function catchFunctionErrors(delegate) { return onError ? function () { try { return delegate.apply(this, arguments); } catch (e) { onError(e...
Change onError behaviour; export safeSetTimeout
Change onError behaviour; export safeSetTimeout
JavaScript
mit
knockout/tko.utils
--- +++ @@ -1,15 +1,16 @@ // // Error handling +// --- // -export var onError +// The default onError handler is to re-throw. +export var onError = function (e) { throw(e); }; export function catchFunctionErrors(delegate) { return onError ? function () { try { return delegate.apply(th...
1dbec704daf75b7e48f6508fad00951ce1b562d4
app/assets/javascripts/renalware/components/tabs.js
app/assets/javascripts/renalware/components/tabs.js
function initTabs() { $(".sub-nav.with-tabs dl a").on("click", function(e) { e.preventDefault(); var anchor = e.target var dl = anchor.closest("dl"); var dd = anchor.closest("dd"); var idToDeactivate = $("dd.active a", dl).attr("href"); $("dd.active", dl).removeClass("active") $(dd).addCla...
function initTabs() { $(".sub-nav.with-tabs dl a").on("click", function(e) { e.preventDefault(); var anchor = e.target var dl = $(anchor).closest("dl"); var dd = $(anchor).closest("dd"); var idToDeactivate = $("dd.active a", dl).attr("href"); $("dd.active", dl).removeClass("active") $(dd)....
Fix an IE11 js bug in tab toggling
Fix an IE11 js bug in tab toggling
JavaScript
mit
airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core
--- +++ @@ -2,8 +2,8 @@ $(".sub-nav.with-tabs dl a").on("click", function(e) { e.preventDefault(); var anchor = e.target - var dl = anchor.closest("dl"); - var dd = anchor.closest("dd"); + var dl = $(anchor).closest("dl"); + var dd = $(anchor).closest("dd"); var idToDeactivate = $("dd.ac...
0287791b0c12f2f952d2289fd6b99a9ab5cb6203
dev/_/components/js/sourceCollectionView.js
dev/_/components/js/sourceCollectionView.js
AV.SourceCollectionView = Backbone.View.extend({ el: '#list_container', initialize: function() { this.listenTo(this.collection, 'all', this.render); console.log("Initialize View"); }, events: { "click #deleteButton": "delete", //"click #uploadButton": "upload", }, template: _.t...
AV.SourceCollectionView = Backbone.View.extend({ el: '#list_container', initialize: function() { this.listenTo(this.collection, 'all', this.render); console.log("Initialize View"); }, events: { "click #deleteButton": "delete", //"click #uploadButton": "upload", }, templ...
Remove upload view from sourcecollectionview
Remove upload view from sourcecollectionview
JavaScript
bsd-3-clause
Swarthmore/juxtaphor,Swarthmore/juxtaphor
--- +++ @@ -5,8 +5,8 @@ console.log("Initialize View"); }, events: { - "click #deleteButton": "delete", - //"click #uploadButton": "upload", + "click #deleteButton": "delete", + //"click #uploadButton": "upload", }, template: _.template( $("#list_template").html()), render: f...
2d4f8b734a297942ba4ddc875359a165a68184b4
lib/form/index.js
lib/form/index.js
/** @jsx dom */ import dom from 'magic-virtual-element'; import formSerialize from 'form-serialize'; export const propTypes = { onSubmit: { type: 'function' }, transform: { type: 'function' } }; export function render({props}) { const {children, transform, onSubmit} = props; function handle(e) { e.preven...
/** @jsx dom */ import dom from 'magic-virtual-element'; import formSerialize from 'form-serialize'; export const propTypes = { onSubmit: { type: 'function' }, transform: { type: 'function' } }; export function render({props}) { const {children, transform, onSubmit} = props; function handle(e) { e.preven...
Return the submit event in callback
Return the submit event in callback
JavaScript
mit
kevva/deku-form
--- +++ @@ -23,7 +23,7 @@ const data = formSerialize(el, transform); if (onSubmit) { - onSubmit(data, el); + onSubmit(data, el, e); } } }
a4dcb20a78bf8e72f943ae24247a4330c68c56c9
src/index.js
src/index.js
(function () { module.exports = function (onCreate, onAppend) { var baseApp; return { /** * Array of properties to be copied from main app to sub app */ merged: ['view engine', 'views'], /** * Array of properties to be co...
(function () { module.exports = function (onCreate, onAppend) { var baseApp; return { /** * Array of properties to be copied from main app to sub app */ merged: ['view engine', 'views'], /** * Array of properties to be co...
Include the baseApp when running onAppend function
Include the baseApp when running onAppend function
JavaScript
mit
steveukx/express-subapp
--- +++ @@ -51,7 +51,7 @@ app.locals[local] = baseApp.locals[local]; }); - onAppend && onAppend(app); + onAppend && onAppend(app, baseApp); if (root > 1) { baseApp.use(root, app);
7533d0283f658aaf5e93b017be5f96d021c1581e
src/index.js
src/index.js
var Laminate = {}; Laminate.Badge = require('./components/badge.js'); Laminate.Button = require('./components/button.js'); Laminate.Card = require('./components/card.js'); Laminate.Content = require('./components/content.js'); Laminate.Icon = require('./components/icon.js'); Laminate.Modal = require('./components/moda...
var Laminate = {}; Laminate.Badge = require('./components/badge'); Laminate.Button = require('./components/button'); Laminate.Card = require('./components/card'); Laminate.Content = require('./components/content'); Laminate.Icon = require('./components/icon'); Laminate.InputGroup = require('./components/input-group');...
Remove the .js from requires.
Remove the .js from requires.
JavaScript
bsd-3-clause
joestump/laminate
--- +++ @@ -1,10 +1,11 @@ var Laminate = {}; -Laminate.Badge = require('./components/badge.js'); -Laminate.Button = require('./components/button.js'); -Laminate.Card = require('./components/card.js'); -Laminate.Content = require('./components/content.js'); -Laminate.Icon = require('./components/icon.js'); -Laminat...
184c92f89191ebcbe9135ec6f04bce0cb97f55cf
js/getData.js
js/getData.js
window.onload = initializeData() function initializeData() { var div = document.getElementById("right_now"); var date = new Date(); div.textContent = date.getFullYear() + '-' + date.getMonth() + '-' + date.getDate(); var text = div.textContent; }
window.onload = initializeData() function initializeData() { var right_now = document.getElementById("right_now"); var date = new Date(); right_now.textContent = date.getFullYear() + '-' + date.getMonth() + '-' + date.getDate(); var text = right_now.textContent; }
Rename div variable to right_now
Rename div variable to right_now
JavaScript
mit
mercysmart/cepatsembuh-iqbal,mercysmart/cepatsembuh-iqbal
--- +++ @@ -1,8 +1,8 @@ window.onload = initializeData() function initializeData() { - var div = document.getElementById("right_now"); + var right_now = document.getElementById("right_now"); var date = new Date(); - div.textContent = date.getFullYear() + '-' + date.getMonth() + '-' + date.getDate(); - var ...