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
1467a50893393792b8ec47df9796733a40877e7d
lib/helpers/bindResources.js
lib/helpers/bindResources.js
'use strict' const resources = require('../resources') const querySyntax = require('./querySyntax') module.exports = (propToBind, dispatch) => { resources.forEach(resource => { propToBind[resource.name] = query => new Promise((resolve, reject) => { let config = { params: querySyntax(query) } ...
'use strict' const resources = require('../resources') const querySyntax = require('./querySyntax') module.exports = (propToBind, dispatch) => { resources.forEach(resource => { propToBind[resource.name] = query => { let resourceURL = resource.name let config = null if (query) { confi...
Adjust bindResource and allow integer query
Adjust bindResource and allow integer query
JavaScript
mit
saschabratton/sparkpay
--- +++ @@ -5,22 +5,28 @@ module.exports = (propToBind, dispatch) => { resources.forEach(resource => { - propToBind[resource.name] = query => - new Promise((resolve, reject) => { - let config = { params: querySyntax(query) } + propToBind[resource.name] = query => { + let resourceURL = res...
558bd4544d76beed8e3d2f8c03c8e228227aed46
gulpfile.js
gulpfile.js
var gulp = require('gulp') var connect = require('gulp-connect') var browserify = require('browserify') var source = require('vinyl-source-stream'); var gulp = require('gulp'); var mocha = require('gulp-mocha'); gulp.task('connect', function () { connect.server({ root: '', port: 4000 }) }) gul...
var gulp = require('gulp') var connect = require('gulp-connect') var browserify = require('browserify') var source = require('vinyl-source-stream'); var gulp = require('gulp'); var mocha = require('gulp-mocha'); gulp.task('connect', function () { connect.server({ root: '', port: 4000 }) }) gul...
Add comment explaining what test task is
Add comment explaining what test task is
JavaScript
mit
Martin-Cox/AirFlow,Martin-Cox/AirFlow
--- +++ @@ -27,6 +27,7 @@ }) gulp.task('test', function() { + //Creates local server, runs mocha tests, then exits process (therefore killing server) connect.server({ root: '', port: 4000
853fcd169a4fea0d8efcfc2be789ee535e49e423
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var browserify = require('browserify'); var source = require('vinyl-source-stream'); var imagemin = require('gulp-imagemin'); var open = require('gulp-open'); gulp.task('scripts', function () { return browserify('./js/main.js') .bundle() .pipe(source('bundle.js')) .pipe(gulp.d...
var gulp = require('gulp'); var browserify = require('browserify'); var source = require('vinyl-source-stream'); var imagemin = require('gulp-imagemin'); var open = require('gulp-open'); gulp.task('scripts', function () { return browserify('./js/main.js') .bundle() .pipe(source('bundle.js')) .pipe(gulp.d...
Break chaining into different lines and change string to single quotes
Break chaining into different lines and change string to single quotes * Keep styling in file consistent..
JavaScript
mit
brunops/zombies-game,brunops/zombies-game
--- +++ @@ -38,7 +38,8 @@ app: 'google chrome' }; - return gulp.src("./build/index.html").pipe(open('./build/index.html', options)); + return gulp.src('./build/index.html') + .pipe(open('./build/index.html', options)); }); gulp.task('default', ['scripts', 'css', 'html', 'images', 'watch', 'open']);
d55fdf086698484fffdbfc095ab7547b05daa0d7
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var minifyCSS = require('gulp-minify-css'); var uglify = require('gulp-uglify'); var paths = { js: ['js/**.js'], sass: { src: ['css/sass/**.scss'], build: 'css/' } }; gulp.task...
var gulp = require('gulp'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var minifyCSS = require('gulp-minify-css'); var uglify = require('gulp-uglify'); var paths = { js: ['js/**.js'], sass: { src: ['css/sass/**.scss'], build: 'css/' } }; gulp.task...
Build gulp task for generating css and js
Build gulp task for generating css and js
JavaScript
mit
andrew/first-pr,andrew/first-pr
--- +++ @@ -34,4 +34,5 @@ gulp.watch( paths.sass.src, ['sass']); }); -gulp.task('default', ['js', 'sass', 'watch']); +gulp.task('build', ['js', 'sass']); +gulp.task('default', ['build', 'watch']);
467cab061de0819402d424d2c340c91a445c4f9d
src/components/App/App.js
src/components/App/App.js
import React, { PropTypes } from 'react'; import ReactDOM from 'react-dom'; import { Link } from 'react-router'; import { createPureComponent } from 'utils/createPureComponent'; export default createPureComponent({ displayName: 'App', renderLink() { const isEditing = this.props.location.pathname === '/edit...
import React, { PropTypes } from 'react'; import ReactDOM from 'react-dom'; import { Link } from 'react-router'; import { createPureComponent } from 'utils/createPureComponent'; export default createPureComponent({ displayName: 'App', renderLink() { const isEditing = this.props.location.pathname === '/edit...
Revert "Revert "Revert "Revert "Revert "Revert "Revert "kein editor"""""""
Revert "Revert "Revert "Revert "Revert "Revert "Revert "kein editor""""""" This reverts commit 6795b41f5129310bfe89df0ca9bb904b00913597.
JavaScript
mit
mattesja/mygame,mattesja/mygame
--- +++ @@ -20,6 +20,18 @@ return ( <div className="app"> {this.props.children} + <nav className="navbar"> + <div className="navbar__item"> + {this.renderLink()} + </div> + <div className="navbar__item"> + <iframe + src="https:/...
d3c9b44d1567eb4f7cd4b6f067d5bc859deb28b1
src/js/api/QuestionAPI.js
src/js/api/QuestionAPI.js
import { fetchAnswers, fetchQuestion, fetchComparedAnswers, postAnswer, postSkipQuestion } from '../utils/APIUtils'; export function getAnswers(url = `answers`){ return fetchAnswers(url); } export function getComparedAnswers(otherUserId, filters, url = `answers/compare-new/${otherUserId}?locale=es${filters.map(fi...
import { fetchAnswers, fetchQuestion, fetchComparedAnswers, postAnswer, postSkipQuestion } from '../utils/APIUtils'; export function getAnswers(url = `answers`){ return fetchAnswers(url); } export function getComparedAnswers(otherUserId, filters, url = `answers/compare/${otherUserId}?locale=es${filters.map(filter...
Rename compare route to use definitive one as 'compare'
QS-935: Rename compare route to use definitive one as 'compare'
JavaScript
agpl-3.0
nekuno/client,nekuno/client
--- +++ @@ -4,7 +4,7 @@ return fetchAnswers(url); } -export function getComparedAnswers(otherUserId, filters, url = `answers/compare-new/${otherUserId}?locale=es${filters.map(filter => '&'+filter+'=1')}`){ +export function getComparedAnswers(otherUserId, filters, url = `answers/compare/${otherUserId}?locale=e...
d3dd2c2766f04d3984a2445d110f4b370e860ec9
src/lib/core/hyperline.js
src/lib/core/hyperline.js
import React from 'react' import PropTypes from 'prop-types' import Component from 'hyper/component' import decorate from 'hyper/decorate' class HyperLine extends Component { static propTypes() { return { plugins: PropTypes.array.isRequired } } styles() { return { line: { display...
import React from 'react' import PropTypes from 'prop-types' import Component from 'hyper/component' import decorate from 'hyper/decorate' class HyperLine extends Component { static propTypes() { return { plugins: PropTypes.array.isRequired } } styles() { return { line: { display...
Use padding instead of margin for x-axis.
Use padding instead of margin for x-axis. The overflow: hidden; property on the wrapper isn't taking margin into account for the x-axis. By using padding instead, the x-axis overflow is correctly hidden.
JavaScript
mit
Hyperline/hyperline
--- +++ @@ -23,7 +23,8 @@ font: 'bold 10px Monospace', pointerEvents: 'none', background: 'rgba(0, 0, 0, 0.08)', - margin: '10px 10px 0 10px' + margin: '10px 0', + padding: '0 10px', }, wrapper: { display: 'flex',
f4985c3b6a55f316f3818ff821ee84718b715459
app/js/init.js
app/js/init.js
document.addEventListener('DOMContentLoaded', () => { setTimeout(window.browserCheck, 1000); window.setupGol(); window.navUpdate(true); window.setupLaptops(); window.onscroll(); // Configure scrolling when navigation trigger clicked document.getElementById('navigation-trigger').addEventListener('click'...
document.addEventListener('DOMContentLoaded', () => { setTimeout(window.browserCheck, 1000); window.setupGol(); window.navUpdate(true); window.setupLaptops(); window.onscroll(); // Configure scrolling when navigation trigger clicked document.getElementById('navigation-trigger').addEventListener('click'...
Allow going back up by clicking navigation toggle again
Allow going back up by clicking navigation toggle again
JavaScript
mit
controversial/controversial.io,controversial/controversial.io,controversial/controversial.io
--- +++ @@ -9,6 +9,8 @@ // Configure scrolling when navigation trigger clicked document.getElementById('navigation-trigger').addEventListener('click', () => { - window.scrollTo({ top: window.innerHeight / 2, behavior: 'smooth' }); + // Scroll to top if user is scrolled more than 10 pixels, otherwise scr...
cb60f989e6b0174f3a02a69ae9203f52fd163f2e
app/assets/javascripts/map/views/layers/LandRightsLayer.js
app/assets/javascripts/map/views/layers/LandRightsLayer.js
/** * The LandRights layer module. * * @return LandRightsLayer class (extends CartoDBLayerClass) */ define([ 'abstract/layer/CartoDBLayerClass', 'text!map/cartocss/land_rights.cartocss' ], function(CartoDBLayerClass, LandRightsCartocss) { 'use strict'; var LandRightsLayer = CartoDBLayerClass.extend({ ...
/** * The LandRights layer module. * * @return LandRightsLayer class (extends CartoDBLayerClass) */ define([ 'abstract/layer/CartoDBLayerClass' ], function(CartoDBLayerClass) { 'use strict'; var LandRightsLayer = CartoDBLayerClass.extend({ options: { sql: 'SELECT the_geom_webmercator, cartodb_id,...
Revert it to the last state before the update
Revert it to the last state before the update
JavaScript
mit
Vizzuality/gfw,Vizzuality/gfw
--- +++ @@ -4,20 +4,18 @@ * @return LandRightsLayer class (extends CartoDBLayerClass) */ define([ - 'abstract/layer/CartoDBLayerClass', - 'text!map/cartocss/land_rights.cartocss' -], function(CartoDBLayerClass, LandRightsCartocss) { + 'abstract/layer/CartoDBLayerClass' +], function(CartoDBLayerClass) { '...
508c3e0267346d6a253dccc7ab1c6014a843c50d
spec/backend/integration/branchesIntegrationSpec.js
spec/backend/integration/branchesIntegrationSpec.js
'use strict'; let request = require('supertest-as-promised'); const instance_url = process.env.INSTANCE_URL; let app; let listOfBranches = (res) => { if (!('branches' in res.body)) { throw new Error('branches not found'); } }; let getBranches = () => { return request(app) .get('/branches'...
'use strict'; const specHelper = require('../../support/specHelper'), Branch = specHelper.models.Branch, Group = specHelper.models.Group; let request = require('supertest-as-promised'); const instanceUrl = process.env.INSTANCE_URL; let app; function seed() { let branchWithGroups; return Branch.create(...
Add route test for branch groups and set to use spec helper
Add route test for branch groups and set to use spec helper
JavaScript
agpl-3.0
rabblerouser/core,rabblerouser/core,rabblerouser/core
--- +++ @@ -1,12 +1,38 @@ 'use strict'; +const specHelper = require('../../support/specHelper'), + Branch = specHelper.models.Branch, + Group = specHelper.models.Group; let request = require('supertest-as-promised'); -const instance_url = process.env.INSTANCE_URL; +const instanceUrl = process.env.INSTANCE_U...
ca9ae7313050e9ff873e04d532a99d5ea3969cba
src/sanity/preview/Reference.js
src/sanity/preview/Reference.js
import {materializeReference} from '../data/fetch' import {ReferencePreview} from '../../..' export default ReferencePreview.create(materializeReference)
import {materializeReference} from '../data/fetch' import {ReferencePreview} from '../../index' export default ReferencePreview.create(materializeReference)
Change path to reference preview
Change path to reference preview
JavaScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
--- +++ @@ -1,4 +1,4 @@ import {materializeReference} from '../data/fetch' -import {ReferencePreview} from '../../..' +import {ReferencePreview} from '../../index' export default ReferencePreview.create(materializeReference)
857d37d8682fc94af2fc9bdd35f35fbb77376f63
js/fileUtils.js
js/fileUtils.js
export async function genArrayBufferFromFileReference(fileReference) { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.onload = function(e) { resolve(e.target.result); }; reader.onerror = function(e) { reject(e); }; reader.readAsArrayBuffer(fileRe...
export async function genArrayBufferFromFileReference(fileReference) { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.onload = function(e) { resolve(e.target.result); }; reader.onerror = function(e) { reject(e); }; reader.readAsArrayBuffer(fileRe...
Allow multiple files to be loaded via eject
Allow multiple files to be loaded via eject
JavaScript
mit
captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js
--- +++ @@ -34,6 +34,7 @@ // Can this fail? Do we ever reject? const fileInput = document.createElement("input"); fileInput.type = "file"; + fileInput.multiple = true; // Not entirely sure why this is needed, since the input // was just created, but somehow this helps prevent change /...
6ed9ff28b456d033fafd5c9defa31486a2e84c09
scripts/buildexamples.js
scripts/buildexamples.js
var childProcess = require('child_process'); var fs = require('fs'); process.chdir('examples'); childProcess.execSync('npm install', { stdio: 'inherit' }); childProcess.execSync('npm run update', { stdio: 'inherit' }); process.chdir('..'); // Build all of the example folders. dirs = fs.readdirSync('examples'); var c...
var childProcess = require('child_process'); var fs = require('fs'); process.chdir('examples'); childProcess.execSync('npm install', { stdio: 'inherit' }); childProcess.execSync('npm run update', { stdio: 'inherit' }); process.chdir('..'); // Build all of the example folders. dirs = fs.readdirSync('examples'); var c...
Make examples build more verbose
Make examples build more verbose
JavaScript
bsd-3-clause
jupyter/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab...
--- +++ @@ -17,8 +17,10 @@ if (dirs[i].indexOf('node_modules') !== -1) { continue; } - console.log('Building: ' + dirs[i] + '...'); + console.log('\n***********\nBuilding: ' + dirs[i] + '...'); process.chdir('examples/' + dirs[i]); childProcess.execSync('npm run build', { stdio: 'inherit' }); pr...
baf3f40889a2d00ce0dec7fa98e0d9b2b170ed68
src/tizen/AccelerometerProxy.js
src/tizen/AccelerometerProxy.js
(function(win) { var cordova = require('cordova'), Acceleration = require('org.apache.cordova.device-motion.Acceleration'), accelerometerCallback = null; module.exports = { start: function (successCallback, errorCallback) { if (accelerometerCallback) { win.re...
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); y...
Add license headers to Tizen code
CB-6465: Add license headers to Tizen code
JavaScript
apache-2.0
purplecabbage/cordova-plugin-device-motion,corimf/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion,purplecabbage/cordova-plugin-device-motion,blackberry-webworks/cordova-plugin-device-motion,apache/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion...
--- +++ @@ -1,3 +1,24 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License,...
62aac5749c19a11f797d38ee99cbfba2f6714d46
test/spec/pointcloud/pointcloud.service.spec.js
test/spec/pointcloud/pointcloud.service.spec.js
'use strict'; describe('pointcloud.service', function() { // load the module beforeEach(module('pattyApp.pointcloud')); var PointcloudService; var Potree; beforeEach(function() { inject(function(_PointcloudService_, _Potree_) { PointcloudService = _PointcloudService_; Potree = _Potree_; ...
'use strict'; describe('pointcloud.service', function() { // load the module beforeEach(module('pattyApp.pointcloud')); var PointcloudService; var Potree; beforeEach(function() { inject(function(_PointcloudService_, _Potree_) { PointcloudService = _PointcloudService_; Potree = _Potree_; ...
Fix test, showStats was not added to test yet.
Fix test, showStats was not added to test yet.
JavaScript
apache-2.0
NLeSC/PattyVis,NLeSC/PattyVis
--- +++ @@ -29,7 +29,8 @@ pointColorType: Potree.PointColorType.RGB, pointColorTypes: Potree.PointColorType, pointShapes: Potree.PointShape, - pointShape: Potree.PointShape.SQUARE + pointShape: Potree.PointShape.SQUARE, + showStats: false }; expect(Point...
ab46c8e8ac688107a1a7c52a836ac774a10ebb90
examples/add-to-basket/index.js
examples/add-to-basket/index.js
const basketItemViews = { remove: function remove(el) { el.addEventListener("click", function() { el.parentNode.remove(); }); }, addToBasket: function addToBasket(el, props) { el.addEventListener("click", function() { fetch(props.file) .then(res => res.text()) .then(data =...
const basketItemViews = { remove: function remove(el) { el.addEventListener("click", function() { el.parentNode.remove(); }); }, addToBasket: function addToBasket(el, props) { const container = document.querySelector(`.${props.target}`); el.addEventListener("click", function() { fetc...
Change selector to outside onclik event
Change selector to outside onclik event
JavaScript
mit
icelab/viewloader
--- +++ @@ -6,16 +6,16 @@ }, addToBasket: function addToBasket(el, props) { + const container = document.querySelector(`.${props.target}`); + el.addEventListener("click", function() { fetch(props.file) .then(res => res.text()) .then(data => { const wrapper = documen...
af3d1a81abc124affe3e4f5eabefe6946c635b42
addon/initializers/add-modals-container.js
addon/initializers/add-modals-container.js
/*globals document */ let hasDOM = typeof document !== 'undefined'; function appendContainerElement(rootElementId, id) { if (!hasDOM) { return; } if (document.getElementById(id)) { return; } let rootEl = document.querySelector(rootElementId); let modalContainerEl = document.createElement('div'); ...
/*globals document */ let hasDOM = typeof document !== 'undefined'; function appendContainerElement(rootElementOrId, id) { if (!hasDOM) { return; } if (document.getElementById(id)) { return; } let rootEl = rootElementOrId.appendChild ? rootElementOrId : document.querySelector(rootElementOrId); le...
Handle when App.rootElement can be a node, rather than an id
Handle when App.rootElement can be a node, rather than an id
JavaScript
mit
yapplabs/ember-modal-dialog,yapplabs/ember-modal-dialog
--- +++ @@ -1,7 +1,7 @@ /*globals document */ let hasDOM = typeof document !== 'undefined'; -function appendContainerElement(rootElementId, id) { +function appendContainerElement(rootElementOrId, id) { if (!hasDOM) { return; } @@ -10,7 +10,7 @@ return; } - let rootEl = document.querySelector...
d9ca32775708b9d3ede66e4fad902e4b2a7a3966
example/konami_code/main.js
example/konami_code/main.js
(function () { var codes = [ 38, // up 38, // up 40, // down 40, // down 37, // left 39, // right 37, // left 39, // right 66, // b 65 // a ]; kamo.Stream.fromEventHandlerSetter(window, 'onkeyup').map(function (message) { return message.keyCode; }).windowWithCount(c...
(function () { var codes = [ 38, // up 38, // up 40, // down 40, // down 37, // left 39, // right 37, // left 39, // right 66, // b 65 // a ]; kamo.Stream.fromEventHandlerSetter(window, 'onkeyup').map(function (message) { return message.keyCode; }).windowWithCount(c...
Remove debug code left by mistake
Remove debug code left by mistake
JavaScript
mit
r7kamura/kamo.js
--- +++ @@ -15,7 +15,6 @@ kamo.Stream.fromEventHandlerSetter(window, 'onkeyup').map(function (message) { return message.keyCode; }).windowWithCount(codes.length).filter(function (message) { - console.log(message); return JSON.stringify(message) == JSON.stringify(codes); }).subscribe(function (me...
aca431a35442633f68c052764ae132a7184ca118
app/assets/javascripts/bootstrapper.es6.js
app/assets/javascripts/bootstrapper.es6.js
/* Bootstrap components and api on DOM Load */ import Relay from 'react-relay'; import { mountComponents, unmountComponents, } from './utils/componentMounter'; /* global Turbolinks document */ // Get auth and csrf tokens import Authentication from './helpers/authentication.es6'; const auth = new Authenticatio...
/* Bootstrap components and api on DOM Load */ import Relay from 'react-relay'; import { mountComponents, unmountComponents, } from './utils/componentMounter'; /* global Turbolinks document */ // Get auth and csrf tokens import Authentication from './helpers/authentication.es6'; const auth = new Authenticatio...
Remove authrisation token from requests
Remove authrisation token from requests
JavaScript
artistic-2.0
Hireables/hireables,Hireables/hireables,gauravtiwari/hireables,Hireables/hireables,gauravtiwari/techhire,gauravtiwari/hireables,gauravtiwari/techhire,gauravtiwari/techhire,gauravtiwari/hireables
--- +++ @@ -24,7 +24,6 @@ retryDelays: [5000], headers: { 'X-CSRF-Token': auth.csrfToken(), - Authorization: auth.authToken(), }, }) );
b3ecee926842a8ffc129e9baf01e82be3b326f71
angular-katex.js
angular-katex.js
/*! * angular-katex v0.2.1 * https://github.com/tfoxy/angular-katex * * Copyright 2015 Tomás Fox * Released under the MIT license */ (function() { 'use strict'; angular.module('katex', []) .provider('katexConfig', function() { var self = this; self.errorTemplate = function(err) { ...
/*! * angular-katex v0.2.1 * https://github.com/tfoxy/angular-katex * * Copyright 2015 Tomás Fox * Released under the MIT license */ (function() { 'use strict'; angular.module('katex', []) .constant('katex', katex) .provider('katexConfig', ['katex', function(katex) { var self = this; ...
Add katex as an angular constant
Add katex as an angular constant
JavaScript
mit
tfoxy/angular-katex
--- +++ @@ -10,7 +10,8 @@ 'use strict'; angular.module('katex', []) - .provider('katexConfig', function() { + .constant('katex', katex) + .provider('katexConfig', ['katex', function(katex) { var self = this; self.errorTemplate = function(err) { @@ -32,7 +33,7 @@ thi...
7c4f727f9f3f52ab2a6491740e5e8ddbc3b67aa4
public/app/scripts/app.js
public/app/scripts/app.js
'use strict'; angular.module('publicApp', [ 'ngCookies', 'ngResource', 'ngSanitize', 'ngRoute' ]) .config(function ($routeProvider) { $routeProvider .when('/', { templateUrl: 'views/main.html', controller: 'MainCtrl' }) .when('/users', { templateUrl: 'views/users.html',...
'use strict'; angular.module('publicApp', [ 'ngCookies', 'ngResource', 'ngSanitize', 'ngRoute' ]) .config(function ($routeProvider) { $routeProvider .when('/', { templateUrl: 'views/main.html', controller: 'MainCtrl' }) .when('/users/:id', { templateUrl: 'views/user.htm...
Add routes for login, registration and user admin
[FEATURE] Add routes for login, registration and user admin
JavaScript
isc
Parkjeahwan/awegeeks,xdv/gatewayd,zealord/gatewayd,zealord/gatewayd,crazyquark/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd
--- +++ @@ -12,9 +12,29 @@ templateUrl: 'views/main.html', controller: 'MainCtrl' }) - .when('/users', { - templateUrl: 'views/users.html', - controller: 'UsersCtrl' + .when('/users/:id', { + templateUrl: 'views/user.html', + controller: 'UserCtrl' + }) + .when('/admin/use...
ad7e5373322aa618b2e7374a8699c054b84b2d64
packages/ember-views/tests/compat/attrs_proxy_test.js
packages/ember-views/tests/compat/attrs_proxy_test.js
import View from "ember-views/views/view"; import { runAppend, runDestroy } from "ember-runtime/tests/utils"; import compile from "ember-template-compiler/system/compile"; import Registry from "container/registry"; var view, registry, container; QUnit.module("ember-views: attrs-proxy", { setup() { registry = ne...
import View from "ember-views/views/view"; import { runAppend, runDestroy } from "ember-runtime/tests/utils"; import compile from "ember-template-compiler/system/compile"; import Registry from "container/registry"; var view, registry, container; QUnit.module("ember-views: attrs-proxy", { setup() { registry = ne...
Fix typo in compat mode attrs test.
Fix typo in compat mode attrs test.
JavaScript
mit
mfeckie/ember.js,lan0/ember.js,olivierchatry/ember.js,tofanelli/ember.js,miguelcobain/ember.js,mdehoog/ember.js,mitchlloyd/ember.js,Krasnyanskiy/ember.js,femi-saliu/ember.js,nicklv/ember.js,pangratz/ember.js,delftswa2016/ember.js,xtian/ember.js,topaxi/ember.js,cdl/ember.js,vikram7/ember.js,tricknotes/ember.js,selvagsz/...
--- +++ @@ -20,7 +20,7 @@ registry.register('view:foo', View.extend({ bar: 'qux', - template: compile('{{bar}}') + template: compile('{{view.bar}}') })); view = View.extend({
c77f36aa39fa95208dd25f9db39abee804aa2c90
config/index.js
config/index.js
'use strict'; let config = {}; config.port = 3000; config.apiKey = process.env.LFM_API_KEY; config.apiSecret = process.env.LFM_SECRET; module.exports = config;
'use strict'; let config = {}; config.port = 3000; config.api_key = process.env.LFM_API_KEY; config.apiSecret = process.env.LFM_SECRET; config.sk = process.env.LFM_SESSION_KEY; module.exports = config;
Add session key to config and update api key
Add session key to config and update api key
JavaScript
mit
FTLam11/Audio-Station-Scrobbler,FTLam11/Audio-Station-Scrobbler
--- +++ @@ -3,7 +3,8 @@ let config = {}; config.port = 3000; -config.apiKey = process.env.LFM_API_KEY; +config.api_key = process.env.LFM_API_KEY; config.apiSecret = process.env.LFM_SECRET; +config.sk = process.env.LFM_SESSION_KEY; module.exports = config;
9aadb6e0383e7615b66da3fc1cce659c5a475c86
vendor/assets/javascripts/vendor_application.js
vendor/assets/javascripts/vendor_application.js
//= require jquery //= require jquery_ujs //= require turbolinks //= require foundation //= require ace/ace //= require ace/mode-ruby //= require ace/mode-golang //= require ace/mode-python //= require ace/mode-c_cpp //= require ace/mode-csharp //= require ace/mode-php //= require ace/theme-tomorrow_night //= require...
//= require jquery //= require jquery_ujs //= require turbolinks //= require foundation //= require ace/ace //= require ace/mode-ruby //= require ace/mode-golang //= require ace/mode-python //= require ace/mode-c_cpp //= require ace/mode-csharp //= require ace/mode-php //= require ace/worker-php //= require ace/them...
Revert "Revert "add missing worker-php for ace editor""
Revert "Revert "add missing worker-php for ace editor""
JavaScript
mit
tamzi/grounds.io,foliea/grounds.io,grounds/grounds.io,tamzi/grounds.io,grounds/grounds.io,foliea/grounds.io,tamzi/grounds.io,grounds/grounds.io,grounds/grounds.io,foliea/grounds.io,tamzi/grounds.io,foliea/grounds.io
--- +++ @@ -11,6 +11,8 @@ //= require ace/mode-csharp //= require ace/mode-php +//= require ace/worker-php + //= require ace/theme-tomorrow_night //= require ace/theme-textmate //= require ace/theme-monokai
a6f2abe06879273c426ff7c1cf1f4a4e3365e6ed
app/js/app/services.js
app/js/app/services.js
'use strict'; define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() { /* Services */ angular.module('scooter.services', []) .constant('Repo', { owner: "ucam-cl-dtg", ...
'use strict'; define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() { /* Services */ angular.module('scooter.services', []) .constant('Repo', { owner: "isaacphysics",...
Migrate content repo to @isaacphysics
Migrate content repo to @isaacphysics
JavaScript
mit
ucam-cl-dtg/scooter,ucam-cl-dtg/scooter
--- +++ @@ -7,7 +7,7 @@ angular.module('scooter.services', []) .constant('Repo', { - owner: "ucam-cl-dtg", + owner: "isaacphysics", name: "isaac-content-2" })
10dce7b80924d70fde48129873be5e63808e30f4
js/backends/graphics/graphics.js
js/backends/graphics/graphics.js
document.write("<canvas>") var Graphics = new Processing(document.querySelector('canvas'));
document.write("<canvas>") var Graphics = new Processing(document.querySelector('canvas')); Graphics.keyPressed = function() { World.query("keyboard").forEach(function(e) { e.key = Graphics.keyCode; }); } Graphics.keyReleased = function() { World.query("keyboard").forEach(function(e) { delete e.key; }...
Add key* functions to Graphics backend
Add key* functions to Graphics backend
JavaScript
mit
sangohan/twelve,nasser/twelve,nasser/twelve,sangohan/twelve
--- +++ @@ -1,2 +1,14 @@ document.write("<canvas>") var Graphics = new Processing(document.querySelector('canvas')); + +Graphics.keyPressed = function() { + World.query("keyboard").forEach(function(e) { + e.key = Graphics.keyCode; + }); +} + +Graphics.keyReleased = function() { + World.query("keyboard").forEa...
9bec7b6e05e2b0cdc856959d3358f5cfd3703a7d
public/js/worker.js
public/js/worker.js
importScripts('/js/sha256.js'); onmessage = function(e) { console.log('received work!'); var date = (new Date()).yyyymmdd(); var bits = 0; var rand = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5); var name = e.data[0]; var difficulty = e.data[1]; for (var counter = 0; bits < difficul...
importScripts('/js/sha256.js'); onmessage = function(e) { console.log('received work!'); var date = (new Date()).yyyymmdd(); var bits = 0; var rand = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5); var name = e.data[0]; var difficulty = e.data[1]; for (var counter = 0; bits < difficul...
Add comments for cash input.
Add comments for cash input.
JavaScript
mit
martindale/converse,martindale/converse,willricketts/converse,willricketts/converse
--- +++ @@ -12,7 +12,14 @@ for (var counter = 0; bits < difficulty; counter++) { var chunks = [ - '2', difficulty , 'sha256', date, name, '', rand, counter + '2', // Hashcash version number. Note that this is 2, as opposed to 1. + difficulty, // asserted number of bits that this cash matches...
14db2d58cd866166e047e4c50c12bd88e5f64cd3
push-rich/server.js
push-rich/server.js
// Use the web-push library to hide the implementation details of the communication // between the application server and the push service. // For details, see https://tools.ietf.org/html/draft-ietf-webpush-protocol and // https://tools.ietf.org/html/draft-ietf-webpush-encryption. var webPush = require('web-push'); we...
// Use the web-push library to hide the implementation details of the communication // between the application server and the push service. // For details, see https://tools.ietf.org/html/draft-ietf-webpush-protocol and // https://tools.ietf.org/html/draft-ietf-webpush-encryption. var webPush = require('web-push'); we...
Allow startup without setting GCM API key
Allow startup without setting GCM API key
JavaScript
mit
mozilla/serviceworker-cookbook,mozilla/serviceworker-cookbook
--- +++ @@ -4,7 +4,7 @@ // https://tools.ietf.org/html/draft-ietf-webpush-encryption. var webPush = require('web-push'); -webPush.setGCMAPIKey(process.env.GCM_API_KEY); +webPush.setGCMAPIKey(process.env.GCM_API_KEY || null); module.exports = function(app, route) { app.post(route + 'register', function(req, ...
41991574f6105df69ac940cc6aa27885ec76d503
js/dictionary.js
js/dictionary.js
var Dictionary = function() { var jsonURL = './json/dictionary.json'; this._wordList = (function() { var json = null; $.ajax({ 'async': false, 'global': false, 'url': jsonURL, 'dataType': 'json', 'success': function( data ) { json = data; } }); return jso...
var Dictionary = function() { var jsonURL = './json/dictionary.json'; this._wordList = (function() { var json = null; $.ajax({ 'async': false, 'global': false, 'url': jsonURL, 'dataType': 'json', 'success': function( data ) { json = data; } }); return jso...
Fix word search returning the index instead of whether the word exists.
Fix word search returning the index instead of whether the word exists.
JavaScript
mit
razh/spellquest
--- +++ @@ -31,5 +31,5 @@ Dictionary.prototype.isWord = function( word ) { - return this._wordList.lastIndexOf( word ); + return this._wordList.lastIndexOf( word ) !== -1; }
4862fbed37854b9be0fe9271a04d786786c9eca7
collections.js
collections.js
// CHANGE the current collection var changeCollection=function(new_index){ dbIndex = new_index; imageDB = DATABASE[dbIndex]; $("#collectionFooter").text(collections[dbIndex]); localStorage.setItem("last_visited_index",dbIndex); // saves the state AKA the last collection you had open if(imageDB==null){ ima...
// CHANGE the current collection var changeCollection=function(new_index){ dbIndex = new_index; imageDB = DATABASE[dbIndex]; $("#collectionFooter").text(collections[dbIndex]); document.title = collections[dbIndex]; localStorage.setItem("last_visited_index",dbIndex); // saves the state AKA the last collection...
Change window title based on current collection
Change window title based on current collection
JavaScript
cc0-1.0
johnprattchristian/imagecollection,johnprattchristian/imagecollection
--- +++ @@ -3,6 +3,7 @@ dbIndex = new_index; imageDB = DATABASE[dbIndex]; $("#collectionFooter").text(collections[dbIndex]); + document.title = collections[dbIndex]; localStorage.setItem("last_visited_index",dbIndex); // saves the state AKA the last collection you had open if(imageDB==null){ imageDB = []...
1e26d91c9706abb49ee0d5b5224b30ce8ce629b8
test/helpers/mock-htmlmerger.js
test/helpers/mock-htmlmerger.js
(function () { var server = sinon.fakeServer.create(); server.xhr.useFilters = true; server.xhr.addFilter(function (method, url) { //whenever the this returns true the request will not faked return !url.match(/starcounter\//); }); server.respondWith('GET', /htmlmerger/, [200, {"Conte...
(function () { var server = sinon.fakeServer.create(); server.xhr.useFilters = true; server.xhr.addFilter(function (method, url) { //whenever the this returns true the request will not faked return !url.match(/sc\//); }); server.respondWith('GET', /htmlmerger/, [200, {"Content-Type":...
Update mock server path in test helper for FF and IE
Update mock server path in test helper for FF and IE
JavaScript
mit
Starcounter/starcounter-include,Starcounter/starcounter-include
--- +++ @@ -3,7 +3,7 @@ server.xhr.useFilters = true; server.xhr.addFilter(function (method, url) { //whenever the this returns true the request will not faked - return !url.match(/starcounter\//); + return !url.match(/sc\//); }); server.respondWith('GET', /htmlmerger/, [200...
598b062784f68a1fe3c07dfdfeeba89abdc3e148
src/components/Markup.js
src/components/Markup.js
import React, { Component } from 'react'; import Registry from '../utils/Registry'; export default class Markup extends Component { render() { return ( <div dangerouslySetInnerHTML={ {__html: this.props.data}}></div> ) } } Registry.set('Markup', Markup);
import React, { Component } from 'react'; import Registry from '../utils/Registry'; import { isArray } from 'lodash'; export default class Markup extends Component { getContent() { if (this.props.data && isArray(this.props.data) && this.props.data.length > 0) { return this.props.data[0]; }; if (th...
Add getContent method to markup component
Add getContent method to markup component
JavaScript
mit
NuCivic/react-dash,NuCivic/react-dashboard,NuCivic/react-dash,NuCivic/react-dash,NuCivic/react-dashboard,NuCivic/react-dashboard
--- +++ @@ -1,10 +1,27 @@ import React, { Component } from 'react'; import Registry from '../utils/Registry'; +import { isArray } from 'lodash'; export default class Markup extends Component { + getContent() { + if (this.props.data && isArray(this.props.data) && this.props.data.length > 0) { + return th...
63afc625a808e66ac2bc1159557fc1547628a23a
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { require('load-grunt-tasks')(grunt); // Add the grunt-mocha-test tasks. [ 'grunt-mocha-test', 'grunt-contrib-watch' ] .forEach( grunt.loadNpmTasks ); grunt.initConfig({ // Configure a mochaTest task mochaTest: { test: { options: { ...
module.exports = function(grunt) { require('load-grunt-tasks')(grunt); // Add the grunt-mocha-test tasks. [ 'grunt-mocha-test', 'grunt-contrib-watch' ] .forEach( grunt.loadNpmTasks ); grunt.initConfig({ // Configure a mochaTest task mochaTest: { test: { options: { ...
Break watch task into separate task
Break watch task into separate task
JavaScript
mit
BrianSilvia/http-fs-node,BrianSilvia/http-fs-node
--- +++ @@ -21,8 +21,11 @@ }, watch: { + options: { + atBegin: true + }, scripts: { - files: [ 'src/**/*.js' , 'test/**/*.js' ], + files: [ 'src/**/*.js', 'test/**/*.js' ], tasks: ['eslint', 'mochaTest' ] } }, @@ -32,5 +35,6 @@ } }); -...
fdcd6a46e85cee80cda021b8dad199101b3d888d
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), copy: { jquery: { expand: true, flatten: true, src: 'bower_components/jquery/dist/jquery.min.js', dest: 'dist/share/git-webui/w...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), copy: { jquery: { expand: true, flatten: true, src: 'bower_components/jquery/dist/jquery.min.js', dest: 'dist/share/git-webui/w...
Copy file permissions for all files
Copy file permissions for all files
JavaScript
apache-2.0
PeterDaveHello/git-webui,peter-genesys/git-webui,alberthier/git-webui,desyncr/git-webui,epicagency/git-webui,desyncr/git-webui,epicagency/git-webui,Big-Shark/git-webui,Big-Shark/git-webui,PeterDaveHello/git-webui,PeterDaveHello/git-webui,desyncr/git-webui,alberthier/git-webui,peter-genesys/git-webui,peter-genesys/git-w...
--- +++ @@ -16,6 +16,9 @@ dest: 'dist/share/git-webui/webui/js/', }, git_webui: { + options: { + mode: true, + }, expand: true, cwd: 'src', src: ['lib/**', 'share/**', '!**/le...
7ca0d5b081b5eefafbca80965d5140f9cc8cef0e
Gruntfile.js
Gruntfile.js
/** * grunt-dco * * Copyright (c) 2014 Rafael Xavier de Souza * Licensed under the MIT license. */ "use strict"; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ jshint: { all: [ "Gruntfile.js", "tasks/**/*.js" ], options: { jshint...
/** * grunt-dco * * Copyright (c) 2014 Rafael Xavier de Souza * Licensed under the MIT license. */ "use strict"; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ jshint: { all: [ "Gruntfile.js", "tasks/**/*.js" ], options: { jshint...
Set target on dco grunt task configuration
Set target on dco grunt task configuration
JavaScript
mit
rxaviers/grunt-dco
--- +++ @@ -21,9 +21,11 @@ } }, dco: { - options: { - exceptionalAuthors: { - "rxaviers@gmail.com": "Rafael Xavier de Souza" + current: { + options: { + exceptionalAuthors: { + "rxaviers@gmail.com": "Rafael Xavier de Souza" + } } ...
cd931b99fdb37f549ac0362baabc2dbfaab3de3b
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { require('load-grunt-tasks')(grunt); // Add the grunt-mocha-test tasks. [ 'grunt-mocha-test', 'grunt-contrib-watch' ] .forEach( grunt.loadNpmTasks ); grunt.initConfig({ // Configure a mochaTest task mochaTest: { test: { options: { ...
module.exports = function(grunt) { require('load-grunt-tasks')(grunt); // Add the grunt-mocha-test tasks. [ 'grunt-mocha-test', 'grunt-contrib-watch' ] .forEach( grunt.loadNpmTasks ); grunt.initConfig({ // Configure a mochaTest task mochaTest: { test: { options: { ...
Add unit tests back to default grunt task
Add unit tests back to default grunt task
JavaScript
mit
BrianSilvia/http-fs-node,BrianSilvia/http-fs-node
--- +++ @@ -35,6 +35,6 @@ } }); - grunt.registerTask( 'default', [ 'eslint' ]); + grunt.registerTask( 'default', [ 'eslint' , 'mochaTest' ]); grunt.registerTask( 'debug', [ 'watch' ]); };
5aa65c9489168b55c1b936582609ebd3e80f9e32
Gruntfile.js
Gruntfile.js
module.exports = function (grunt) { var paths = require('./paths'); grunt.loadNpmTasks('grunt-mocha-test'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.initConfig({ paths: paths, watch: { src: { files: ['...
module.exports = function (grunt) { var paths = require('./paths'); grunt.loadNpmTasks('grunt-mocha-test'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.initConfig({ paths: paths, watch: { src: { files: ['...
Build before every test as a way to keep builds up to date (thanks @hodgestar)
Build before every test as a way to keep builds up to date (thanks @hodgestar)
JavaScript
bsd-3-clause
praekelt/vumi-ureport,praekelt/vumi-ureport
--- +++ @@ -42,6 +42,7 @@ }); grunt.registerTask('test', [ + 'build', 'mochaTest' ]);
8aac3f2f829792220578c31ba1df5a308327c1b0
Gruntfile.js
Gruntfile.js
module.exports = function( grunt ) { 'use strict'; // Project configuration. grunt.initConfig( { pkg: grunt.file.readJSON( 'package.json' ), copy: { main: { src: [ 'includes/**', 'languages/**', 'composer.json', 'CHANGELOG.md', 'LICENSE.txt', 'readme.txt', 'sticky-tax...
module.exports = function( grunt ) { 'use strict'; // Project configuration. grunt.initConfig( { pkg: grunt.file.readJSON( 'package.json' ), copy: { main: { src: [ 'includes/**', 'lib/**', 'languages/**', 'composer.json', 'CHANGELOG.md', 'LICENSE.txt', 'readme.txt', ...
Include lib/* in the build command
Include lib/* in the build command
JavaScript
mit
liquidweb/sticky-tax,liquidweb/sticky-tax,liquidweb/sticky-tax
--- +++ @@ -10,6 +10,7 @@ main: { src: [ 'includes/**', + 'lib/**', 'languages/**', 'composer.json', 'CHANGELOG.md',
9454a3e4032193b29c498e477a165f04a082afbb
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { 'use strict'; require('grunt-horde') .create(grunt) .demand('projName', 'sinon-doublist') .demand('instanceName', 'sinonDoublist') .demand('klassName', 'sinonDoublist') .loot('node-component-grunt') .loot('node-lib-grunt') .loot('./config/grunt') ....
module.exports = function(grunt) { 'use strict'; require('grunt-horde') .create(grunt) .demand('projName', 'sinon-doublist') .demand('instanceName', 'sinonDoublist') .demand('klassName', 'sinonDoublist') .loot('node-component-grunt') .loot('node-lib-grunt') .loot('./config/grunt') ....
Set home dir for TravisCI
fix(grunt-horde): Set home dir for TravisCI
JavaScript
mit
codeactual/sinon-doublist
--- +++ @@ -9,5 +9,6 @@ .loot('node-component-grunt') .loot('node-lib-grunt') .loot('./config/grunt') + .home(__dirname) .attack(); };
63bde0dab0d5cb013e8165ed897af201e0eeb5e1
src/client/controller/meta_controller.js
src/client/controller/meta_controller.js
export default class MetaController { constructor(PageMetadata) { this.meta = PageMetadata; } } MetaController.$inject = ['PageMetadata'];
class MetaController { constructor(PageMetadata) { this.meta = PageMetadata; } } MetaController.$inject = ['PageMetadata']; export default MetaController;
Upgrade MetaController to ES6 syntax
Upgrade MetaController to ES6 syntax
JavaScript
mit
demerzel3/desmond,demerzel3/desmond,demerzel3/desmond,demerzel3/desmond
--- +++ @@ -1,6 +1,8 @@ -export default class MetaController { +class MetaController { constructor(PageMetadata) { this.meta = PageMetadata; } } MetaController.$inject = ['PageMetadata']; + +export default MetaController;
c9e083cc8b431390042b744d7252e64ce758b50a
apps/acalc/bg.js
apps/acalc/bg.js
/** * @license * Copyright 2014 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
/** * @license * Copyright 2014 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
Revert "ACalc: Increased minimum and starting calculator size."
Revert "ACalc: Increased minimum and starting calculator size." This reverts commit 1747c7b05b30630358a58603da0d1878cf9b2a57.
JavaScript
apache-2.0
foam-framework/foam,mdittmer/foam,foam-framework/foam,jlhughes/foam,osric-the-knight/foam,jlhughes/foam,osric-the-knight/foam,jacksonic/foam,foam-framework/foam,jlhughes/foam,mdittmer/foam,jlhughes/foam,osric-the-knight/foam,foam-framework/foam,osric-the-knight/foam,jacksonic/foam,foam-framework/foam,mdittmer/foam,mdit...
--- +++ @@ -19,10 +19,10 @@ chrome.app.window.create('AppCalc.html', { id: 'Calculator', innerBounds: { - minWidth: 510, - minHeight: 440, - width: 500, - height: 600 + minWidth: 330, + minHeight: 340, + width: 350, + height: 450 } }); }
35de520dffd5a7e592b44295ae79e5abd117a630
app/scripts/models/online-player.js
app/scripts/models/online-player.js
import AsyncPlayer from './async-player.js'; // An online player whose moves are determined by a remote human user class OnlinePlayer extends AsyncPlayer { constructor({ game }) { game.session.on('receive-next-move', ({ column }) => { game.emit('online-player:receive-next-move', { column }); }); } ...
import AsyncPlayer from './async-player.js'; // An online player whose moves are determined by a remote human user class OnlinePlayer extends AsyncPlayer { constructor({ game }) { // Add a global listener here for all moves we will receive from the // opponent (online) player during the course of the game; ...
Comment OnlinePlayer code more thoroughly
Comment OnlinePlayer code more thoroughly
JavaScript
mit
caleb531/connect-four
--- +++ @@ -4,19 +4,27 @@ class OnlinePlayer extends AsyncPlayer { constructor({ game }) { + // Add a global listener here for all moves we will receive from the + // opponent (online) player during the course of the game; when we receive a + // move from the opponent, TinyEmitter will help us resolve ...
ea2d72768aa3eb8f15400ed343662918755df702
src/document/nodes/image/ImagePackage.js
src/document/nodes/image/ImagePackage.js
import Image from 'substance/packages/image/Image' import ImageComponent from 'substance/packages/image/ImageComponent' import ImageMarkdownComponent from './ImageMarkdownComponent' import ImageHTMLConverter from 'substance/packages/image/ImageHTMLConverter' import ImageXMLConverter from 'substance/packages/image/Image...
import ImageNode from 'substance/packages/image/ImageNode' import ImageComponent from 'substance/packages/image/ImageComponent' import ImageMarkdownComponent from './ImageMarkdownComponent' import ImageHTMLConverter from 'substance/packages/image/ImageHTMLConverter' import ImageXMLConverter from 'substance/packages/ima...
Deal with Substance Image -> ImageNode
Deal with Substance Image -> ImageNode
JavaScript
apache-2.0
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
--- +++ @@ -1,4 +1,4 @@ -import Image from 'substance/packages/image/Image' +import ImageNode from 'substance/packages/image/ImageNode' import ImageComponent from 'substance/packages/image/ImageComponent' import ImageMarkdownComponent from './ImageMarkdownComponent' import ImageHTMLConverter from 'substance/packag...
aad192238064aa6546555b3391546ebcbc04c0df
src/discord.js
src/discord.js
const Discord = require('discord.js'), client = new Discord.Client; client.run = ctx => { client.on('ready', () => { if (client.user.bot) { client.destroy(); } else { ctx.gui.put(`{bold}Logged in as ${client.user.tag}{/bold}`); ctx.gui.put('Use the join command to join a guild, dm, or cha...
const Discord = require('discord.js'), client = new Discord.Client; client.run = ctx => { client.on('ready', () => { if (client.user.bot) { client.destroy(); } else { ctx.gui.put(`{bold}Logged in as ${client.user.tag}{/bold}`); ctx.gui.put('Use the join command to join a guild, dm, or cha...
Write dynamically created messages to GUI
Write dynamically created messages to GUI
JavaScript
mit
wwwg/retrocord-light,wwwg/retrocord-light
--- +++ @@ -10,7 +10,11 @@ ctx.gui.put('Use the join command to join a guild, dm, or channel (:join discord api #general)'); } }); - + client.on('message', msg => { + if (ctx.current.channel && msg.channel.id ==- ctx.current.channel.id) { + ctx.gui.putMessage(msg); + } + }) client.login...
c9482b9e34a1b2243370d66864f38d9f35d56b79
tests/snapshot-helpers.js
tests/snapshot-helpers.js
import React from 'react'; import ReactDOMServer from 'react-dom/server'; import jsBeautify from 'js-beautify'; import * as Settings from './settings'; /* * Render React components to markup in order to compare to a Jest Snapshot. Enzyme render with an actual DOM is needed for components that use <Dialog /> and porta...
import React from 'react'; import ReactDOMServer from 'react-dom/server'; import jsBeautify from 'js-beautify'; import * as Settings from './settings'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; /* * Render React components to DOM state as a String * * Please note, Component is the non-...
Add renderDOM to Jest snapshot helpers
Add renderDOM to Jest snapshot helpers
JavaScript
bsd-3-clause
salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react
--- +++ @@ -2,6 +2,17 @@ import ReactDOMServer from 'react-dom/server'; import jsBeautify from 'js-beautify'; import * as Settings from './settings'; + +import { shallow } from 'enzyme'; +import toJson from 'enzyme-to-json'; + +/* + * Render React components to DOM state as a String + * + * Please note, Component ...
c5ba74bea4488be4a66ab8a32aa2a314fcfcf03b
src/app/utils/preload.js
src/app/utils/preload.js
define( [ "Ember" ], function( Ember ) { var concat = [].concat; var makeArray = Ember.makeArray; return function preload( withError, list ) { if ( list === undefined ) { list = withError; withError = false; } function promiseImage( src ) { if ( !src ) { return Promise.resolve(); } var d...
define( [ "Ember" ], function( Ember ) { var concat = [].concat; var makeArray = Ember.makeArray; return function preload( withError, list ) { if ( list === undefined ) { list = withError; withError = false; } function promiseImage( src ) { if ( !src ) { return Promise.resolve(); } var d...
Set image to null once it has finished loading
Set image to null once it has finished loading
JavaScript
mit
streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui
--- +++ @@ -16,9 +16,23 @@ var defer = Promise.defer(); var image = new Image(); - image.addEventListener( "load", defer.resolve, false ); - image.addEventListener( "error", withError ? defer.reject : defer.resolve, false ); + + image.addEventListener( "load", function() { + image = null; + defe...
538a1fca657d35875ce2a679f39e6b5868627e3e
src/js/main.js
src/js/main.js
/* PSEUDO CODE FOR LOGIN MENU 1. COLLECT DATA ENTERED INTO THE <INPUT> 2. WHEN .LOGIN-SUBMIT IS 'CLICKED' `GET/users/id` TO DATABASE TO BE VERIFIED? */ ;(function(){ angular.module('Front-Rails', [ ]) .run(function($http, $rootScope) { $http.get('https://stackundertow.herokuapp.com/questions') .then(functi...
/* PSEUDO CODE FOR LOGIN MENU 1. COLLECT DATA ENTERED INTO THE <INPUT> 2. WHEN .LOGIN-SUBMIT IS 'CLICKED' `GET/users/id` TO DATABASE TO BE VERIFIED? */ ;(function(){ angular.module('Front-Rails', [ ]) .run(function($http, $rootScope) { $http.get('https://stackundertow.herokuapp.com/questions') .then(functi...
Remove active class when .list or aside is clicked.
Remove active class when .list or aside is clicked.
JavaScript
mit
front-rails/GUI,front-rails/GUI
--- +++ @@ -23,7 +23,7 @@ })(); - +/* Signup and Login menu drop down*/ $('.search a[href]').on('click', function(event){ event.preventDefault(); $(this).add(this.hash) @@ -37,3 +37,16 @@ .toggleClass('active') .siblings().removeClass('active'); }); + +$('.list').on('click', function(event){ ...
2d7acc374a01b4342e35dd86aeabf9eee5a5b72d
lib/parse/value_parser.js
lib/parse/value_parser.js
/** * @fileOverview */ define(['parse/parse', 'ecma/ast/value', 'khepri/parse/token_parser'], function(parse, astValue, token){ "use strict"; // Literal //////////////////////////////////////// var nullLiteral = parse.Parser('Null Literal', parse.bind(token.nullLiteral, functio...
/** * @fileOverview */ define(['ecma/parse/value_parser'], function(ecma_value){ "use strict"; return ecma_value; });
Use value parser from parse-ecma
Use value parser from parse-ecma
JavaScript
mit
mattbierner/khepri
--- +++ @@ -1,74 +1,9 @@ /** * @fileOverview */ -define(['parse/parse', - 'ecma/ast/value', - 'khepri/parse/token_parser'], -function(parse, - astValue, - token){ +define(['ecma/parse/value_parser'], +function(ecma_value){ "use strict"; -// Literal -/////////////////////////////...
72773fb2aa29ab226a5bcb2a8ce7bf468ede0c69
src/repositorys/interactionrepository.js
src/repositorys/interactionrepository.js
const winston = require('winston') const authorisedRequest = require('../lib/authorisedrequest') const config = require('../config') function getInteraction (token, interactionId) { return authorisedRequest(token, `${config.apiRoot}/interaction/${interactionId}/`) } function saveInteraction (token, interaction) { ...
const winston = require('winston') const authorisedRequest = require('../lib/authorisedrequest') const config = require('../config') function getInteraction (token, interactionId) { return authorisedRequest(token, `${config.apiRoot}/interaction/${interactionId}/`) } function saveInteraction (token, interaction) { ...
Fix issue causing contacts to list ALL interactions
Fix issue causing contacts to list ALL interactions
JavaScript
mit
uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
--- +++ @@ -32,9 +32,9 @@ */ function getInteractionsForContact (token, contactId) { return new Promise((resolve) => { - authorisedRequest(token, `${config.apiRoot}/interaction/?contact_id=${contactId}`) + authorisedRequest(token, `${config.apiRoot}/contact/${contactId}/`) .then((response) => { - ...
761819fa974fc7b9d1c5f7ae436b54e08546b2cf
lib/settings.js
lib/settings.js
"use strict"; var cacheManager = require("cache-manager"); module.exports = { // cache system (see https://github.com/BryanDonovan/node-cache-manager) Cache: cacheManager.caching({ store: "memory", max: 5000, ttl: 60 * 60 }), // default request timeout values DefaultOpenTim...
"use strict"; var cacheManager = require("cache-manager"); module.exports = { // cache system (see https://github.com/BryanDonovan/node-cache-manager) Cache: cacheManager.caching({ store: "memory", max: 5000, ttl: 60 * 60 }), // default request timeout values DefaultOpenTim...
Use exact default values from needle docs for clarity
Use exact default values from needle docs for clarity
JavaScript
mit
cubehouse/themeparks
--- +++ @@ -10,8 +10,8 @@ ttl: 60 * 60 }), // default request timeout values - DefaultOpenTimeout: 10 * 1000, // 10 seconds; timeout in milliseconds - DefaultReadTimeout: 0 * 1000, // 0 seconds; timeout in milliseconds + DefaultOpenTimeout: 10000, // 10 seconds; timeout in milliseconds + ...
775532063ca4c85d3217bd25d7476460fe778308
packages/antwar/src/core/paths/parse-section-name.js
packages/antwar/src/core/paths/parse-section-name.js
const _ = require('lodash'); module.exports = function parseSectionName(sectionName, name) { const ret = sectionName + name; // Root exception (/) return ret.length > 1 ? _.trimStart(ret, '/') : ret; };
const _ = require('lodash'); module.exports = function parseSectionName(sectionName, name = '') { const ret = sectionName + name; // Root exception (/) return ret.length > 1 ? _.trimStart(ret, '/') : ret; };
Set default value for `parseSectionName` name
fix: Set default value for `parseSectionName` name Otherwise this can lead to concat with `undefined` which results in `undefined`. This needs better tests.
JavaScript
mit
antwarjs/antwar
--- +++ @@ -1,6 +1,6 @@ const _ = require('lodash'); -module.exports = function parseSectionName(sectionName, name) { +module.exports = function parseSectionName(sectionName, name = '') { const ret = sectionName + name; // Root exception (/)
347755aa2c6c280a118005dd06b13a43f5496460
chattify.js
chattify.js
function filterF(i, el) { var pattern = /(From|To|Subject|Cc|Date):/i; return el.textContent.match(pattern); } $($("blockquote").get().reverse()).each(function(i, el) { var contents = $(el).contents(); var matches = contents.find("*").filter(filterF).get().reverse(); while (matches.length > 0) { matches...
function filterF(i, el) { var pattern = /(From|To|Sent|Subject|Cc|Date):/i; return el.textContent.match(pattern); } // convert From...To... blocks into one-liners var matches = $(document).find("*").filter(filterF).get().reverse(); while (matches.length > 0) { matches[0].remove(); matches = $(document).find("...
Move pattern matching to the top
Move pattern matching to the top
JavaScript
mit
kubkon/email-chattifier,kubkon/email-chattifier
--- +++ @@ -1,18 +1,19 @@ function filterF(i, el) { - var pattern = /(From|To|Subject|Cc|Date):/i; + var pattern = /(From|To|Sent|Subject|Cc|Date):/i; return el.textContent.match(pattern); } +// convert From...To... blocks into one-liners +var matches = $(document).find("*").filter(filterF).get().reverse(); ...
6dac4d26fde402813c1ad6431d8f9f961d488454
test/_stubs.js
test/_stubs.js
import sinon from 'sinon'; import config from '../config.default.json'; import DataStoreHolder from '../lib/data-store-holder'; export { getGithubClient } from './_github-client'; const getIssue = (content = 'lorem ipsum') => { //TODO should use an actual issue instance instead with a no-op github client. cons...
import sinon from 'sinon'; import config from '../config.default.json'; import DataStoreHolder from '../lib/data-store-holder'; import getGithubClient from './_github-client'; const getIssue = (content = 'lorem ipsum') => { //TODO should use an actual issue instance instead with a no-op github client. const la...
Revert "tests: Use exports syntax directly"
Revert "tests: Use exports syntax directly" This reverts commit 5c2697713268ad03612e93d1c0b285a9b7f9986e.
JavaScript
mpl-2.0
mozillach/gh-projects-content-queue
--- +++ @@ -1,7 +1,7 @@ import sinon from 'sinon'; import config from '../config.default.json'; import DataStoreHolder from '../lib/data-store-holder'; -export { getGithubClient } from './_github-client'; +import getGithubClient from './_github-client'; const getIssue = (content = 'lorem ipsum') => { //TOD...
17ea0550201dea34b44397eec927e00f575bac5d
blueprints/app/files/tests/helpers/module-for-acceptance.js
blueprints/app/files/tests/helpers/module-for-acceptance.js
import { module } from 'qunit'; import startApp from '../helpers/start-app'; import destroyApp from '../helpers/destroy-app'; export default function(name, options = {}) { module(name, { beforeEach() { this.application = startApp(); if (options.beforeEach) { options.beforeEach.apply(this, ar...
import { module } from 'qunit'; import startApp from '../helpers/start-app'; import destroyApp from '../helpers/destroy-app'; export default function(name, options = {}) { module(name, { beforeEach() { this.application = startApp(); if (options.beforeEach) { options.beforeEach.apply(this, ar...
Call destroyApp after afterEach options
Call destroyApp after afterEach options As discussed in #5348, destroyApp() should be called after options.afterEach.apply(...).
JavaScript
mit
martypenner/ember-cli,seawatts/ember-cli,eccegordo/ember-cli,acorncom/ember-cli,kanongil/ember-cli,patocallaghan/ember-cli,nathanhammond/ember-cli,thoov/ember-cli,calderas/ember-cli,johnotander/ember-cli,scalus/ember-cli,jrjohnson/ember-cli,patocallaghan/ember-cli,rtablada/ember-cli,ef4/ember-cli,johnotander/ember-cli,...
--- +++ @@ -13,11 +13,11 @@ }, afterEach() { - destroyApp(this.application); - if (options.afterEach) { options.afterEach.apply(this, arguments); } + + destroyApp(this.application); } }); }
532d59bddb0f38a3d440c1cdabd4ac92d9105b13
modules/static/plugins/flexboxIE.js
modules/static/plugins/flexboxIE.js
/* @flow */ const alternativeValues = { 'space-around': 'distribute', 'space-between': 'justify', 'flex-start': 'start', 'flex-end': 'end' } const alternativeProps = { alignContent: 'msFlexLinePack', alignSelf: 'msFlexItemAlign', alignItems: 'msFlexAlign', justifyContent: 'msFlexPack', order: 'msFlexO...
/* @flow */ const alternativeValues = { 'space-around': 'distribute', 'space-between': 'justify', 'flex-start': 'start', 'flex-end': 'end' } const alternativeProps = { alignContent: 'msFlexLinePack', alignSelf: 'msFlexItemAlign', alignItems: 'msFlexAlign', justifyContent: 'msFlexPack', order: 'msFlexO...
Fix flexBasis property for IE
Fix flexBasis property for IE
JavaScript
mit
rofrischmann/inline-style-prefixer
--- +++ @@ -13,7 +13,7 @@ order: 'msFlexOrder', flexGrow: 'msFlexPositive', flexShrink: 'msFlexNegative', - flexBasis: 'msPreferredSize' + flexBasis: 'msFlexPreferredSize' } export default function flexboxIE(property: string, value: any, style: Object): void {
a815c7e9d888053d37d6d98a56c84b3836265331
ui/commands/select_all.js
ui/commands/select_all.js
'use strict'; var Command = require('./command'); var SelectAll = Command.extend({ static: { name: 'selectAll' }, execute: function() { var ctrl = this.getController(); var surface = ctrl.getSurface(); if (surface) { var editor = ctrl.getSurface().getEditor(); var newSelection = edi...
'use strict'; var SurfaceCommand = require('./surface_command'); var SelectAll = SurfaceCommand.extend({ static: { name: 'selectAll' }, execute: function() { var surface = this.getSurface(); if (surface) { var newSelection = surface.selectAll(surface.getDocument(), surface.getSelection()); ...
Fix broken select all command.
Fix broken select all command.
JavaScript
mit
TypesetIO/substance,jacwright/substance,andene/substance,substance/substance,abhaga/substance,stencila/substance,substance/substance,michael/substance-1,andene/substance,michael/substance-1,TypesetIO/substance,podviaznikov/substance,abhaga/substance,podviaznikov/substance,jacwright/substance
--- +++ @@ -1,18 +1,16 @@ 'use strict'; -var Command = require('./command'); +var SurfaceCommand = require('./surface_command'); -var SelectAll = Command.extend({ +var SelectAll = SurfaceCommand.extend({ static: { name: 'selectAll' }, execute: function() { - var ctrl = this.getController(); - ...
6fea7c2846d3977e2b6549aa3243d582b4c39c78
Libraries/react-native/react-native-interface.js
Libraries/react-native/react-native-interface.js
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @flow */...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @flow */...
Remove all the flow errors
[ReactNative] Remove all the flow errors
JavaScript
mit
Applied-Duality/react-native,judastree/react-native,javache/react-native,corbt/react-native,charlesvinette/react-native,sghiassy/react-native,Poplava/react-native,soxunyi/react-native,cez213/react-native,hengcj/react-native,cdlewis/react-native,tarkus/react-native-appletv,peterp/react-native,BretJohnson/react-native,ed...
--- +++ @@ -21,3 +21,6 @@ declare var Headers: any; declare var Request: any; declare var Response: any; +declare module requestAnimationFrame { + declare var exports: (callback: any) => any; +}
0353d63465f9a393600708c19b158cdf20a817d3
app/assets/javascripts/autocomplete_point_fields.js
app/assets/javascripts/autocomplete_point_fields.js
$(function () { $.get("/point_types.json", function (typeList) { $("#point_type").autocomplete({ source: typeList, delay: 0, minLength: 0, autoFocus: true }); $("#point_type").focus(function () { $(this).autocomplete("search", ""); }); }); $.get("/sayges", function (saygeList) { ...
$(function () { $.get("/point_types.json", function (typeList) { $("#point_type").autocomplete({ source: typeList, delay: 0, minLength: 0, autoFocus: true }); $("#point_type").focus(function () { $(this).autocomplete("search", ""); }); }); $.get("/sayges.json", function (saygeList)...
Use explicit json url on user autocomplete
Use explicit json url on user autocomplete
JavaScript
bsd-2-clause
Sayhired/SaygePoints,Sayhired/SaygePoints
--- +++ @@ -9,7 +9,7 @@ }); }); - $.get("/sayges", function (saygeList) { + $.get("/sayges.json", function (saygeList) { $("#to_user").autocomplete({ source: saygeList, delay: 0, autoFocus: true });
792dc7a8405a900c8120739498fc1aaeb5113cf4
scripts/iltalehti.user.js
scripts/iltalehti.user.js
$(function() { // Body headings $('h1.juttuotsikko span.otsikko:last-of-type').satanify(); // Left $('#container_vasen p a:not(.palstakuva)').satanify(' '); // Right $('#container_oikea [class$=link-list] p a:not(.palstakuva)').satanify(' '); $('#container_oikea .widget a .list-title').satanify(); //...
$(function() { // Body headings $('h1.juttuotsikko span.otsikko:last-of-type').each(function() { // Some of the center title spans on Iltalehti have manual <br /> elements // inside of them, which our satanify plugin isn't smart enough to handle // yet. Hack around it with this for now. var contents...
Add a quick hack for broken Iltalehti titles
Add a quick hack for broken Iltalehti titles Needs more testing.
JavaScript
mit
veeti/iltasaatana,veeti/iltasaatana
--- +++ @@ -1,6 +1,15 @@ $(function() { // Body headings - $('h1.juttuotsikko span.otsikko:last-of-type').satanify(); + $('h1.juttuotsikko span.otsikko:last-of-type').each(function() { + // Some of the center title spans on Iltalehti have manual <br /> elements + // inside of them, which our satanify plug...
316fa2ac078fdad20deeca235580387821f3b29f
src/js/FlexGrid.react.js
src/js/FlexGrid.react.js
/* @flow */ var React = require('react'); var FlexCell: any = require('./FlexCell.react'); var FlexDetail = require('./FlexDetail.react'); class FlexGrid extends React.Component{ state: {detail: string}; render: Function; constructor(): void { super(); this.state = {detail:''}; this...
/* @flow */ var React = require('react'); var FlexCell: any = require('./FlexCell.react'); var FlexDetail = require('./FlexDetail.react'); class FlexGrid extends React.Component{ state: {detail: string}; render: Function; constructor(): void { super(); this.state = {detail:''}; this...
Make it cleaner to read
Make it cleaner to read
JavaScript
mit
thewazir/pokemon-react,thewazir/pokemon-react
--- +++ @@ -12,7 +12,6 @@ this.render = this.render.bind(this); } handleDetailSelection(title: string) { - console.log(`You picked ${title}`); this.setState({detail:title}); } handleDetailClosing(){ @@ -29,7 +28,10 @@ if( p.name.indexOf(this.props.filt...
f2360e8ac9e7d0ef3c2174df60936c1451daa8d6
lib/dice-bag.js
lib/dice-bag.js
/* * Copyright (c) 2015 Steven Soloff * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publi...
/* * Copyright (c) 2015 Steven Soloff * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publi...
Create closure around enclosing object instead of local variables referencing enclosing object properties.
Create closure around enclosing object instead of local variables referencing enclosing object properties.
JavaScript
mit
ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js
--- +++ @@ -27,13 +27,12 @@ } DiceBag.prototype.d = function (sides) { - var randomNumberGenerator = this.randomNumberGenerator; return function () { return { source: "d" + sides, - value: Math.floor(randomNumberGenerator() * sides) + 1 + value: Math.floor(this....
96322552efa957b565247b7121a6dcfcd3a037ab
lib/resolver.js
lib/resolver.js
var Module = require('module') var path = require('path') var fs = require('fs') function exists (target, extensions) { if (fs.existsSync(target)) { return target } if (path.extname(target) === '') { for (var i = 0; i < extensions.length; i++) { var resolvedPath = target + extensions[i] if (...
var Module = require('module') var path = require('path') var fs = require('fs') function exists (target, extensions) { if (fs.existsSync(target)) { return target } if (path.extname(target) === '') { for (var i = 0; i < extensions.length; i++) { var resolvedPath = target + extensions[i] if (...
Check if request is a built-in module
Check if request is a built-in module
JavaScript
mit
chrisyip/requere
--- +++ @@ -22,6 +22,11 @@ return request } + // Check if it's a built-in module + if (!Module._resolveLookupPaths(request, parent)[1].length) { + return request + } + var resolvedPath var i = 0 var extensions = Object.keys(Module._extensions)
be619af686fc09d843e90a246fed60fb26524197
lib/validate.js
lib/validate.js
'use strict'; var validate = require('validate.js'); var validateFxoObject = function(type, value, key, options) { if(options.required) { if(!value) { return ' is required'; } } if(value && !value.valid) { return 'is not a valid ' + type + ' input'; } }; validate.validators.fxoDatetime = f...
'use strict'; var validate = require('validate.js'); var validateFxoObject = function(type, value, key, options) { if(options.required) { if(!value) { return ' is required'; } } if(value && !value.valid) { return 'is not a valid ' + type + ' input'; } }; validate.validators.fxoDatetime = f...
Swap key and options params to correct order in fxo validators functions.
Swap key and options params to correct order in fxo validators functions.
JavaScript
mit
marian2js/flowxo-sdk,equus71/flowxo-sdk,flowxo/flowxo-sdk
--- +++ @@ -14,11 +14,11 @@ } }; -validate.validators.fxoDatetime = function(value, key, options) { +validate.validators.fxoDatetime = function(value, options, key) { return validateFxoObject('datetime', value, key, options); }; -validate.validators.fxoBoolean = function(value, key, options) { +validate.v...
48ff97b172c1c186cbcdacb817f3866a10a1fd58
angular-uploadcare.js
angular-uploadcare.js
'use strict'; /** * @ngdoc directive * @name angular-uploadcare.directive:UploadCare * @description Provides a directive for the Uploadcare widget. * # UploadCare */ angular.module('ng-uploadcare', []) .directive('uploadcareWidget', function () { return { restrict: 'E', replace: true, requ...
'use strict'; /** * @ngdoc directive * @name angular-uploadcare.directive:UploadCare * @description Provides a directive for the Uploadcare widget. * # UploadCare */ angular.module('ng-uploadcare', []) .directive('uploadcareWidget', function () { return { restrict: 'E', replace: true, requ...
Use current element for widget instead
Use current element for widget instead
JavaScript
mit
uploadcare/angular-uploadcare
--- +++ @@ -18,12 +18,12 @@ onUploadComplete: '&', onChange: '&', }, - controller: ['$scope', '$log', function($scope, $log) { + controller: ['$scope', '$element', '$log', function($scope, $element, $log) { if(!uploadcare) { $log.error('Uploadcare script has not ...
5139a033cc4083fd86416a330e3220babe377341
cypress/integration/query_report.js
cypress/integration/query_report.js
context('Form', () => { before(() => { cy.login('Administrator', 'qwe'); cy.visit('/desk'); }); it('add custom column in report', () => { cy.visit('/desk#query-report/Permitted Documents For User'); cy.get('#page-query-report input[data-fieldname="user"]').as('input'); cy.get('@input').focus().type('test...
context('Form', () => { before(() => { cy.login('Administrator', 'qwe'); cy.visit('/desk'); }); it('add custom column in report', () => { cy.visit('/desk#query-report/Permitted Documents For User'); cy.get('#page-query-report input[data-fieldname="user"]').as('input'); cy.get('@input').focus().type('test...
Use force true for clicking menu
fix(test): Use force true for clicking menu
JavaScript
mit
yashodhank/frappe,yashodhank/frappe,mhbu50/frappe,StrellaGroup/frappe,frappe/frappe,StrellaGroup/frappe,frappe/frappe,mhbu50/frappe,vjFaLk/frappe,frappe/frappe,almeidapaulopt/frappe,adityahase/frappe,adityahase/frappe,adityahase/frappe,yashodhank/frappe,mhbu50/frappe,saurabh6790/frappe,saurabh6790/frappe,almeidapaulopt...
--- +++ @@ -11,7 +11,7 @@ cy.get('@input').focus().type('test@erpnext.com', { delay: 100 }); cy.get('#page-query-report input[data-fieldname="doctype"]').as('input-test'); cy.get('@input-test').focus().type('Role', { delay: 100 }); - cy.get('.menu-btn-group .btn').click(); + cy.get('.menu-btn-group .btn')....
66c0d320a73c792dfeca3a7f783c9f8c180bb1b0
app/assets/javascripts/modules/enable-aria-controls.js
app/assets/javascripts/modules/enable-aria-controls.js
window.GOVUK = window.GOVUK || {} window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (GOVUK) { 'use strict' GOVUK.Modules.EnableAriaControls = function EnableAriaControls () { this.start = function (element) { element.find('[data-aria-controls]').each(enableAriaControls) function enable...
window.GOVUK = window.GOVUK || {} window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (GOVUK) { 'use strict' GOVUK.Modules.EnableAriaControls = function EnableAriaControls () { this.start = function (element) { var $controls = element[0].querySelectorAll('[data-aria-controls]') for (var i...
Remove JQuery from EnableAriaControls module
Remove JQuery from EnableAriaControls module We're using an old and unsupported version of jQuery for browser support reasons. Rather than upgrade, it's far better to remove our dependence. jQuery makes writing JavaScript easier, but it doesn't do anything that you can't do with vanilla JavaScript, because it's all w...
JavaScript
mit
alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend
--- +++ @@ -6,12 +6,11 @@ GOVUK.Modules.EnableAriaControls = function EnableAriaControls () { this.start = function (element) { - element.find('[data-aria-controls]').each(enableAriaControls) - - function enableAriaControls () { - var controls = $(this).data('aria-controls') - if (ty...
557c5a62d82c86efed996e468183a4e0688ff987
meteor/client/helpers/router.js
meteor/client/helpers/router.js
/* ---------------------------------------------------- +/ ## Client Router ## Client-side Router. /+ ---------------------------------------------------- */ // Config Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', }); // Filters var filters = { my...
/* ---------------------------------------------------- +/ ## Client Router ## Client-side Router. /+ ---------------------------------------------------- */ // Config Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', notFoundTemplate: 'notFound', }); // Filters var filters = { my...
Make the locations view the homepage
Make the locations view the homepage This is our main base.
JavaScript
mit
scimusmn/sd-scrapbook,scimusmn/sd-scrapbook,scimusmn/sd-scrapbook
--- +++ @@ -40,6 +40,7 @@ // Locations this.route('locations', { + path: '/', waitOn: function () { return Meteor.subscribe('allLocations'); }, @@ -63,13 +64,6 @@ } }); - - // Pages - - this.route('homepage', { - path: '/' - }); - this.route('content'); // Users
51c5761d4d0d7ed74fef80ca9277d529912b862d
packages/babel-plugin-relay/getSchemaIntrospection.js
packages/babel-plugin-relay/getSchemaIntrospection.js
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; const fs = require('fs'); const path = require('path'); const {SCHEMA_EXTENSION} = require('./Gra...
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; const fs = require('fs'); const path = require('path'); const {SCHEMA_EXTENSION} = require('./Gra...
Remove support for parsing legacy interfaces
Remove support for parsing legacy interfaces Reviewed By: kassens Differential Revision: D6972027 fbshipit-source-id: 6af12e0fad969b8f0a8348c17347cec07f2047b2
JavaScript
mit
xuorig/relay,facebook/relay,cpojer/relay,xuorig/relay,freiksenet/relay,xuorig/relay,wincent/relay,iamchenxin/relay,cpojer/relay,facebook/relay,kassens/relay,dbslone/relay,voideanvalue/relay,josephsavona/relay,zpao/relay,dbslone/relay,facebook/relay,wincent/relay,atxwebs/relay,yungsters/relay,voideanvalue/relay,atxwebs/...
--- +++ @@ -26,10 +26,7 @@ if (source[0] === '{') { return JSON.parse(source); } - return parse(SCHEMA_EXTENSION + '\n' + source, { - // TODO(T25914961) remove after schema syncs with the new format. - allowLegacySDLImplementsInterfaces: true, - }); + return parse(SCHEMA_EXTENSION ...
129b28981a813f8965c98f619cc220ca71468343
lib/deferredchain.js
lib/deferredchain.js
function DeferredChain() { var self = this; this.chain = new Promise(function(accept, reject) { self._accept = accept; self._reject = reject; }); this.await = new Promise(function() { self._done = arguments[0]; }); this.started = false; }; DeferredChain.prototype.then = function(fn) { var se...
function DeferredChain() { var self = this; this.chain = new Promise(function(accept, reject) { self._accept = accept; self._reject = reject; }); this.await = new Promise(function() { self._done = arguments[0]; self._error = arguments[1]; }); this.started = false; }; DeferredChain.prototyp...
Fix issue where errors aren't being propagated.
Fix issue where errors aren't being propagated.
JavaScript
mit
prashantpawar/truffle,DigixGlobal/truffle
--- +++ @@ -7,6 +7,7 @@ this.await = new Promise(function() { self._done = arguments[0]; + self._error = arguments[1]; }); this.started = false; }; @@ -17,6 +18,9 @@ var args = Array.prototype.slice.call(arguments); return fn.apply(null, args); + }); + this.chain = this.chain.catch(f...
eea12ffb865c76519476e8c339e2bbd56423ab4d
source/renderer/app/containers/static/AboutDialog.js
source/renderer/app/containers/static/AboutDialog.js
// @flow import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import ReactModal from 'react-modal'; import About from '../../components/static/About'; import styles from './AboutDialog.scss'; import type { InjectedDialogContainerProps } from '../../types/injectedPropsType'; type Pro...
// @flow import React, { Component } from 'react'; import { inject, observer } from 'mobx-react'; import ReactModal from 'react-modal'; import About from '../../components/static/About'; import styles from './AboutDialog.scss'; import type { InjectedDialogContainerProps } from '../../types/injectedPropsType'; type Pro...
Implement new About dialog design
[DDW-608] Implement new About dialog design
JavaScript
apache-2.0
input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus
--- +++ @@ -26,6 +26,7 @@ return ( <ReactModal isOpen + onRequestClose={this.props.actions.app.closeAboutDialog.trigger} className={styles.dialog} overlayClassName={styles.overlay} ariaHideApp={false}
9118e1d29e4d3e9d0c6cfb12a02700c39ac8513b
etc/notebook/custom/custom.js
etc/notebook/custom/custom.js
/* JupyROOT JS */ // Terminal button $(document).ready(function() { var terminalURL = "/terminals/1"; var re = new RegExp(".+\/user\/([a-z0-9]+)\/.+", "g"); if (re.test(document.URL)) { // We have been spawned by JupyterHub, add the user name to the URL var user = document.URL.replace(re, "...
/* JupyROOT JS */ // Terminal button $(document).ready(function() { var terminalURL = "/terminals/1"; var re = new RegExp(".+\/user\/([a-z0-9]+)\/.+", "g"); if (re.test(document.URL)) { // We have been spawned by JupyterHub, add the user name to the URL var user = document.URL.replace(re, "...
Set %%cpp highlighting for root --notebook
Set %%cpp highlighting for root --notebook
JavaScript
lgpl-2.1
mhuwiler/rootauto,root-mirror/root,mhuwiler/rootauto,karies/root,simonpf/root,karies/root,olifre/root,karies/root,simonpf/root,root-mirror/root,zzxuanyuan/root,simonpf/root,mhuwiler/rootauto,olifre/root,zzxuanyuan/root,olifre/root,olifre/root,olifre/root,zzxuanyuan/root,olifre/root,karies/root,simonpf/root,simonpf/root...
--- +++ @@ -11,3 +11,8 @@ } $('div#header-container').append("<a href='" + terminalURL + "' class='btn btn-default btn-sm navbar-btn pull-right' style='margin-right: 4px; margin-left: 2px;'>Terminal</a>"); }); + +// Highlighting for %%cpp cells +require(['notebook/js/codecell'], function(codecell) { + c...
99d332faca68dedf51f31b9fda60ea9672b66126
app/assets/javascripts/global/views/questions.js
app/assets/javascripts/global/views/questions.js
app = app || {}; app.QuestionView = Backbone.View.extend({ template: _.template( $('#question_template').html() ), events: {}, initialize: function(){}, render: function(){} });
Add basic outline to Backbone question view -define template -empty events -empty initialize -empty render
Add basic outline to Backbone question view -define template -empty events -empty initialize -empty render
JavaScript
cc0-1.0
red-spotted-newts-2014/food-overflow,red-spotted-newts-2014/food-overflow
--- +++ @@ -0,0 +1,14 @@ +app = app || {}; + +app.QuestionView = Backbone.View.extend({ + + template: _.template( $('#question_template').html() ), + + events: {}, + + initialize: function(){}, + + render: function(){} + + +});
47bd5107690ab5b34cd210a6a45942b4b469e6ba
src/utils/data3d/load.js
src/utils/data3d/load.js
import fetch from '../io/fetch.js' import decodeBuffer from './decode-buffer.js' export default function loadData3d (url, options) { return fetch(url, options).then(function(res){ return res.arrayBuffer() }).then(function(buffer){ return decodeBuffer(buffer, { url: url }) }) }
import fetch from '../io/fetch.js' import decodeBuffer from './decode-buffer.js' export default function loadData3d (url, options) { return fetch(url, options).then(function(res){ return res.buffer() }).then(function(buffer){ return decodeBuffer(buffer, { url: url }) }) }
Use buffer() instead of arrayBuffer()
Use buffer() instead of arrayBuffer()
JavaScript
mit
archilogic-com/3dio-js,archilogic-com/3dio-js
--- +++ @@ -3,7 +3,7 @@ export default function loadData3d (url, options) { return fetch(url, options).then(function(res){ - return res.arrayBuffer() + return res.buffer() }).then(function(buffer){ return decodeBuffer(buffer, { url: url }) })
fa0c582c42f81d4f94a4e2fdc16ac7df9bf1d1c1
packages/vega-parser/schema/spec.js
packages/vega-parser/schema/spec.js
export default { "defs": { "spec": { "title": "Vega visualization specification", "type": "object", "allOf": [ {"$ref": "#/defs/scope"}, { "properties": { "$schema": {"type": "string", "format": "uri"}, "description": {"type": "string"}, ...
export default { "defs": { "spec": { "title": "Vega visualization specification", "type": "object", "allOf": [ {"$ref": "#/defs/scope"}, { "properties": { "$schema": {"type": "string", "format": "uri"}, "config": {"type": "object"}, "...
Add config object to JSON schema.
Add config object to JSON schema.
JavaScript
bsd-3-clause
vega/vega,vega/vega,vega/vega,vega/vega,lgrammel/vega
--- +++ @@ -8,6 +8,7 @@ { "properties": { "$schema": {"type": "string", "format": "uri"}, + "config": {"type": "object"}, "description": {"type": "string"}, "width": {"type": "number"}, "height": {"type": "number"},
435ca8ef211b92be8222a2aeee44bef7bdd74890
rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js
rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
Update SettingsCtrl test after EvaluationSettings changes
Update SettingsCtrl test after EvaluationSettings changes git-svn-id: https://svn.apache.org/repos/asf/incubator/climate/trunk@1504017 13f79535-47bb-0310-9956-ffa450edef68 Former-commit-id: 92957b0f0e6bba13073b75fe9692f1b1b425f626
JavaScript
apache-2.0
pwcberry/climate,riverma/climate,lewismc/climate,MBoustani/climate,pwcberry/climate,apache/climate,huikyole/climate,Omkar20895/climate,jarifibrahim/climate,jarifibrahim/climate,Omkar20895/climate,pwcberry/climate,riverma/climate,apache/climate,pwcberry/climate,MJJoyce/climate,huikyole/climate,MBoustani/climate,lewismc/...
--- +++ @@ -30,7 +30,7 @@ var scope = $rootScope.$new(); var ctrl = $controller("SettingsCtrl", {$scope: scope}); - expect(Object.keys(scope.settings)).toEqual(["metrics", "temporal"]); + expect(Object.keys(scope.settings)).toEqual(["metrics", "temporal", "spatialSelect"]); }); }); });
2b4785dca28b3863353de148a78e4aeed595a98c
addon/adapters/ember-loopback.js
addon/adapters/ember-loopback.js
import DS from 'ember-data'; import Ember from 'ember'; export default DS.RESTAdapter.extend({ defaultSerializer: 'ember-loopback/serializers/ember-loopback', /** * Serializes the query params as a json because loopback has some funky crazy syntax * @see http://docs.strongloop.com/display/public/LB/Querying...
import DS from 'ember-data'; import Ember from 'ember'; export default DS.RESTAdapter.extend({ defaultSerializer: 'ember-loopback/serializers/ember-loopback', /** * Serializes the query params as a json because loopback has some funky crazy syntax * @see http://docs.strongloop.com/display/public/LB/Querying...
Update REST adapter to work with loopback errors
Update REST adapter to work with loopback errors
JavaScript
mit
mediasuitenz/ember-loopback,mediasuitenz/ember-loopback
--- +++ @@ -41,7 +41,8 @@ if (jqXHR && jqXHR.status === 422) { // 422 Unprocessable Entity, aka validation error. - return new DS.InvalidError(Ember.$.parseJSON(jqXHR.responseText)); + var errors = Ember.$.parseJSON(jqXHR.responseText); + return new DS.InvalidError(errors.error.details.me...
c3627324afb753e7b4393e8f2ddd1269768ac8e1
src/Data/Foreign.js
src/Data/Foreign.js
/* global exports */ "use strict"; // module Data.Foreign // jshint maxparams: 3 exports.parseJSONImpl = function (left, right, str) { try { return right(JSON.parse(str)); } catch (e) { return left(e.toString()); } }; // jshint maxparams: 1 exports.toForeign = function (value) { return value; }; exp...
/* global exports */ "use strict"; // module Data.Foreign // jshint maxparams: 3 exports.parseJSONImpl = function (left, right, str) { try { return right(JSON.parse(str)); } catch (e) { return left(e.toString()); } }; // jshint maxparams: 1 exports.toForeign = function (value) { return value; }; exp...
Use length instead of property iteration
Use length instead of property iteration
JavaScript
bsd-3-clause
purescript/purescript-foreign
--- +++ @@ -43,7 +43,7 @@ exports.writeObject = function (fields) { var record = {}; - for (var i in fields) { + for (var i = 0; i < fields.length; i++) { record[fields[i].key] = fields[i].value; } return record;
1cffb363b4456ffc9064479c02c72b96b2deba33
covervid.js
covervid.js
jQuery.fn.extend({ coverVid: function(width, height) { var $this = this; $(window).on('resize load', function(){ // Get parent element height and width var parentHeight = $this.parent().height(); var parentWidth = $this.parent().width(); // Get native video width and height v...
jQuery.fn.extend({ coverVid: function(width, height) { $(document).ready(sizeVideo); $(window).resize(sizeVideo); var $this = this; function sizeVideo() { // Get parent element height and width var parentHeight = $this.parent().height(); var parentWidth = $this.parent().width...
Clean up spacing + use document ready
Clean up spacing + use document ready
JavaScript
mit
zonayedpca/covervid,tianskyluj/covervid,A11oW/ngCovervid,jfeigel/ngCovervid,gdseller/covervid,space150/covervid,AlptugYaman/covervid,AlptugYaman/covervid,gdseller/covervid,tatygrassini/covervid,kitestudio/covervid,PabloValor/covervid,stefanerickson/covervid,stefanerickson/covervid,kitestudio/covervid,PabloValor/covervi...
--- +++ @@ -1,50 +1,53 @@ jQuery.fn.extend({ - coverVid: function(width, height) { +coverVid: function(width, height) { + + $(document).ready(sizeVideo); + $(window).resize(sizeVideo); var $this = this; - $(window).on('resize load', function(){ + function sizeVideo() { - // Get parent el...
76f678705e608d086b8dc549f180229b787398b4
web-client/app/scripts/directives/scrollSpy.js
web-client/app/scripts/directives/scrollSpy.js
'use strict'; angular.module('webClientApp') .directive('scrollSpy', ['$window', '$interval', function ($window, $interval) { var didScroll; var lastScroll = 0; return function(scope) { angular.element($window).bind('scroll', function() { didScroll = true; }); $interval(...
'use strict'; angular.module('webClientApp') .directive('scrollSpy', ['$window', '$interval', function ($window, $interval) { var didScroll; var lastScroll = 0; return function(scope) { angular.element($window).bind('scroll', function() { didScroll = true; }); $interval(...
Fix infinite scrolling in firefox
Fix infinite scrolling in firefox
JavaScript
bsd-2-clause
ahmgeek/manshar,manshar/manshar,manshar/manshar,manshar/manshar,ahmgeek/manshar,ahmgeek/manshar,ahmgeek/manshar,manshar/manshar
--- +++ @@ -13,7 +13,7 @@ $interval(function(){ if(didScroll) { - scope.yscroll = document.body.scrollTop; + scope.yscroll = document.body.scrollTop || document.documentElement.scrollTop; didScroll = false; if(scope.yscroll < 50) {
12fc327a90f7ff6dcb372728270a6275215bb52a
gulpfile.js
gulpfile.js
var gulp = require('gulp'), istanbul = require('gulp-istanbul'), jasmine = require('gulp-jasmine'), jshint = require('gulp-jshint'), plumber = require('gulp-plumber'); var paths = { src: ['index.js'], test: ['spec/**/*.spec.js'], coverage: './coverage' }; gulp.task('lint', function() { return ...
var gulp = require('gulp'), istanbul = require('gulp-istanbul'), jasmine = require('gulp-jasmine'), jshint = require('gulp-jshint'), plumber = require('gulp-plumber'); var paths = { src: ['index.js'], test: ['spec/**/*.spec.js'], coverage: './coverage' }; gulp.task('lint', function() { return ...
Remove task completion callback from the `coverage` task
Remove task completion callback from the `coverage` task
JavaScript
mit
yuanqing/mitch
--- +++ @@ -26,7 +26,7 @@ })); }); -gulp.task('coverage', function(cb) { +gulp.task('coverage', function() { return gulp.src(paths.src) .pipe(plumber()) .pipe(istanbul()) @@ -36,8 +36,7 @@ .pipe(istanbul.writeReports({ dir: paths.coverage, reporters: ['lcov', 'text-...
d73be27d2bcb8481c1bc86702b82e38445c7e33e
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var sass = require('gulp-sass'); // Common paths. var paths = { BootstrapSCSS: 'priv/assets/bootstrap-custom/bootstrap-custom.scss', BootstrapInclude: 'priv/components/bootstrap-sass/assets/stylesheets', } // Build admin CSS from SASS/CSS gulp.task('bootstrap-sass', function() { ...
var gulp = require('gulp'); var sass = require('gulp-sass'); // Common paths. var paths = { BootstrapSCSS: 'priv/assets/bootstrap-custom/bootstrap-custom.scss', BootstrapInclude: 'priv/components/bootstrap-sass/assets/stylesheets', } // Build admin CSS from SASS/CSS gulp.task('sass', function() { return g...
Rename bootstrap-sass Gulp task to 'sass'
Rename bootstrap-sass Gulp task to 'sass'
JavaScript
mit
OxySocks/micro,OxySocks/micro
--- +++ @@ -8,7 +8,7 @@ } // Build admin CSS from SASS/CSS -gulp.task('bootstrap-sass', function() { +gulp.task('sass', function() { return gulp.src(paths.BootstrapSCSS) .pipe(sass({ trace: true, @@ -20,8 +20,8 @@ // Watch for changes. gulp.task('watch', function () { - gulp.watch(paths....
be4dd0a0f52aae22e349b9b711ae28d26747add1
app/routes/index.js
app/routes/index.js
import Ember from 'ember'; export default Ember.Route.extend({ beforeModel: function() { this.transitionTo('dashboard'); } });
import Ember from 'ember'; export default Ember.Route.extend({ beforeModel: function() { this.replaceWith('dashboard'); } });
Use replaceWith to redirect to dashboard on login
Use replaceWith to redirect to dashboard on login
JavaScript
mit
thecoolestguy/frontend,thecoolestguy/frontend,stopfstedt/frontend,gabycampagna/frontend,ilios/frontend,gboushey/frontend,djvoa12/frontend,stopfstedt/frontend,ilios/frontend,jrjohnson/frontend,gboushey/frontend,gabycampagna/frontend,dartajax/frontend,jrjohnson/frontend,djvoa12/frontend,dartajax/frontend
--- +++ @@ -2,6 +2,6 @@ export default Ember.Route.extend({ beforeModel: function() { - this.transitionTo('dashboard'); + this.replaceWith('dashboard'); } });
27606e9ed8891f71c4cdab341d77ce0aa4c0bc8e
src/javascripts/ng-admin/Crud/field/maReferenceManyField.js
src/javascripts/ng-admin/Crud/field/maReferenceManyField.js
function maReferenceManyField(ReferenceRefresher) { 'use strict'; return { scope: { 'field': '&', 'value': '=', 'entry': '=?', 'datastore': '&?' }, restrict: 'E', link: function(scope) { var field = scope.field(); ...
function maReferenceManyField(ReferenceRefresher) { 'use strict'; return { scope: { 'field': '&', 'value': '=', 'entry': '=?', 'datastore': '&?' }, restrict: 'E', link: function(scope) { var field = scope.field(); ...
Fix typo in template definition
Fix typo in template definition
JavaScript
mit
Benew/ng-admin,thachp/ng-admin,marmelab/ng-admin,LuckeyHomes/ng-admin,marmelab/ng-admin,heliodor/ng-admin,ahgittin/ng-admin,gxr1028/ng-admin,manekinekko/ng-admin,arturbrasil/ng-admin,jainpiyush111/ng-admin,arturbrasil/ng-admin,vasiakorobkin/ng-admin,jainpiyush111/ng-admin,janusnic/ng-admin,rao1219/ng-admin,eBoutik/ng-a...
--- +++ @@ -47,7 +47,7 @@ datastore="datastore()" refresh="refresh($search)" value="value"> - </ma-choice-field>` + </ma-choices-field>` }; }
8e44961e67fa00f9b97252843423451150f7d215
src/application/applicationContainer.js
src/application/applicationContainer.js
let { isArray } = require('../mindash'); let findApp = require('../core/findApp'); module.exports = function (React) { let ApplicationContainer = React.createClass({ childContextTypes: { app: React.PropTypes.object }, getChildContext() { return { app: findApp(this) }; }, render() { ...
let findApp = require('../core/findApp'); let { isArray, extend } = require('../mindash'); module.exports = function (React) { let ApplicationContainer = React.createClass({ childContextTypes: { app: React.PropTypes.object }, getChildContext() { return { app: findApp(this) }; }, rende...
Clone the element without using addons
Clone the element without using addons
JavaScript
mit
goldensunliu/marty-lib,KeKs0r/marty-lib,thredup/marty-lib,gmccrackin/marty-lib,CumpsD/marty-lib,martyjs/marty-lib
--- +++ @@ -1,5 +1,5 @@ -let { isArray } = require('../mindash'); let findApp = require('../core/findApp'); +let { isArray, extend } = require('../mindash'); module.exports = function (React) { let ApplicationContainer = React.createClass({ @@ -14,16 +14,16 @@ if (children) { if (isArray(chil...
d8b936eabb69ac5fd0cd4cd38cbd54a0ed7d6540
app/js/on_config.js
app/js/on_config.js
function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) { 'ngInject'; $locationProvider.html5Mode(true); $stateProvider .state('Home', { url: '/', controller: 'ExampleCtrl as home', templateUrl: 'home.html', title: 'Home' }); $urlRouterProvider.otherwise('/'); } export ...
function OnConfig($stateProvider, $locationProvider, $urlRouterProvider) { 'ngInject'; $locationProvider.html5Mode(true); $stateProvider .state('Home', { url: '/', controller: 'ExampleCtrl as home', templateUrl: 'home.html', title: 'Home' }) .state('Page1', { url: '/page1', control...
Add basic page1 2 with routing
Add basic page1 2 with routing
JavaScript
mit
8bithappy/happyhack,8bithappy/happyhack
--- +++ @@ -9,6 +9,18 @@ controller: 'ExampleCtrl as home', templateUrl: 'home.html', title: 'Home' + }) + .state('Page1', { + url: '/page1', + controller: 'ExampleCtrl as home', + templateUrl: 'page1.html', + title: 'Page1' + }) + .state('Page2', { + url: '/page2', + controller: ...
5349a3f6b0ff47b4d0be4d9b291d3c9e9c1a0718
lib/node_modules/@stdlib/assert/is-browser/lib/global_scope.js
lib/node_modules/@stdlib/assert/is-browser/lib/global_scope.js
/* eslint-disable no-new-func */ 'use strict'; /** * Test if the global scope is bound to the "window" variable present in browser environments. When creating a new function using the `function(){}` constructor, the execution scope aliased by the `this` variable is the global scope. * * @private * @returns {boolean} b...
/* eslint-disable no-new-func */ 'use strict'; /** * Test if the global scope is bound to the "window" variable present in browser environments. When creating a new function using the `Function(){}` constructor, the execution scope aliased by the `this` variable is the global scope. * * @private * @returns {boolean} b...
Revert regression by capitalizing constructor again
Revert regression by capitalizing constructor again
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
--- +++ @@ -2,7 +2,7 @@ 'use strict'; /** -* Test if the global scope is bound to the "window" variable present in browser environments. When creating a new function using the `function(){}` constructor, the execution scope aliased by the `this` variable is the global scope. +* Test if the global scope is bound t...
8742d2bffb4c2f02b2372c9a4be0385c0422411d
common/errors.js
common/errors.js
(function() { 'use strict'; angular.module('chaise.errors', []) // Factory for each error type .factory('ErrorService', [function ErrorService() { function error409(error) { // retry logic // passthrough to app for now } // Special behavior for handlin...
(function() { 'use strict'; angular.module('chaise.errors', []) // Factory for each error type .factory('ErrorService', ['$log', function ErrorService($log) { function error409(error) { // retry logic // passthrough to app for now } // Special behavior...
Use $log in error service
Use $log in error service
JavaScript
apache-2.0
informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise
--- +++ @@ -4,7 +4,7 @@ angular.module('chaise.errors', []) // Factory for each error type - .factory('ErrorService', [function ErrorService() { + .factory('ErrorService', ['$log', function ErrorService($log) { function error409(error) { // retry logic @@ -15,7 +15,7 @@ ...
884e849c8fa169320355c1544ab9e236f56f868e
modules/recipes/server/routes/recipes.server.routes.js
modules/recipes/server/routes/recipes.server.routes.js
'use strict'; /** * Module dependencies. */ var recipesPolicy = require('../policies/recipes.server.policy'), recipes = require('../controllers/recipes.server.controller'); module.exports = function (app) { // Recipes collection routes app.route('/api/recipes').all(recipesPolicy.isAllowed) .get(recipes.li...
'use strict'; /** * Module dependencies. */ var recipesPolicy = require('../policies/recipes.server.policy'), recipes = require('../controllers/recipes.server.controller'); module.exports = function (app) { // Recipes collection routes app.route('/api/recipes').all(recipesPolicy.isAllowed) .get(recipes.li...
Revert "finished backend for healthify"
Revert "finished backend for healthify" This reverts commit 6903c2baf7a2716f81add8fcc3b3dd42b1dfb65e. Trying to fix nodemon crash
JavaScript
mit
SEGroup9b/whatUEatin,SEGroup9b/whatUEatin,SEGroup9b/whatUEatin
--- +++ @@ -21,11 +21,8 @@ app.route('/api/usda/foodReport/:ndbno').get(recipes.returnFoodReport); - app.route('/api/usda/healthify/:foodObject').get(recipes.returnAlternatives); - // Finish by binding the recipe middleware app.param('recipeId', recipes.recipeByID); app.param('food',recipes.getName);...
528a764e786787535ab6d763072cb0550435075b
test/lib/prepare-spec.js
test/lib/prepare-spec.js
var prepare = require('../../lib/prepare'); var expect = require('expect'); var samples = { 'copy': { 'assets': require('../samples/copy/assets'), 'report': require('../samples/copy/report') }, 'compress': { 'assets': require('../samples/compress/assets'), 'report': require('../samples/compress/r...
var prepare = require('../../lib/prepare'); var expect = require('expect'); var samples = { 'copy': { 'assets': require('../samples/copy/assets'), 'report': require('../samples/copy/report') }, 'compress': { 'assets': require('../samples/compress/assets'), 'report': require('../samples/compress/r...
Update test: sort arraies before expecting
Update test: sort arraies before expecting
JavaScript
mit
arrowrowe/tam
--- +++ @@ -14,9 +14,20 @@ describe('Prepare a report', function () { + function sortFiles(report) { + for (var pkgName in report) { + report[pkgName].commands.forEach(function (command) { + command.files.sort(); + command.output.sort(); + }); + } + } + function T(key, sample) ...
b78aee002c1f991ea02ef734dea40c872a979dc3
public/javascripts/lib/model_with_language_mixin.js
public/javascripts/lib/model_with_language_mixin.js
window.ModelWithLanguageMixin = { LANGUAGE_CHOICES: { en: 'English', es: 'Spanish', hi: 'Hindi', pt: 'Portuguese', ru: 'Russian', ja: 'Japanese', de: 'German', id: 'Malay/Indonesian', vi: 'Vietnamese', ko: 'Korean', fr: 'French', fa: 'Persian', ...
window.ModelWithLanguageMixin = { LANGUAGE_CHOICES: { en: 'English', es: 'Spanish', hi: 'Hindi', pt: 'Portuguese', ru: 'Russian', ja: 'Japanese', de: 'German', id: 'Malay/Indonesian', vi: 'Vietnamese', ko: 'Korean', fr: 'French', fa: 'Persian', ...
Add getLanguage method to languages mixin.
Add getLanguage method to languages mixin. This is more suitable for passing to JST template
JavaScript
mit
ivarvong/documentcloud,dannguyen/documentcloud,roberttdev/dactyl4,gunjanmodi/documentcloud,roberttdev/dactyl,roberttdev/dactyl4,monofox/documentcloud,monofox/documentcloud,dannguyen/documentcloud,Teino1978-Corp/Teino1978-Corp-documentcloud,dannguyen/documentcloud,moodpo/documentcloud,monofox/documentcloud,Teino1978-Cor...
--- +++ @@ -29,6 +29,10 @@ getLanguageName: function(){ return this.LANGUAGE_CHOICES[ this.getLanguageCode() ]; + }, + + getLanguage: function(){ + return { code: this.getLanguageCode(), name: this.getLanguageName() }; } };
6c376933137540938bd869be1dd27ac039108704
app/routes/movie.js
app/routes/movie.js
import Ember from 'ember'; export default Ember.Route.extend({ model(params) { return Ember.RSVP.hash({ movie: Ember.$.getJSON("https://api.themoviedb.org/3/movie/" + params.movie_id+ "?api_key=0910db5745f86638474ffefa5d3ba687"), userRating: this.get('firebaseUtil').findRecord(param...
import Ember from 'ember'; export default Ember.Route.extend({ model(params) { return Ember.RSVP.hash({ movie: Ember.$.getJSON("https://api.themoviedb.org/3/movie/" + params.movie_id+ "?api_key=0910db5745f86638474ffefa5d3ba687"), userRating: this.get('firebaseUtil').findRecord(param...
Fix initial user rating display
Fix initial user rating display
JavaScript
mit
JaxonWright/CineR8,JaxonWright/CineR8
--- +++ @@ -4,7 +4,7 @@ model(params) { return Ember.RSVP.hash({ movie: Ember.$.getJSON("https://api.themoviedb.org/3/movie/" + params.movie_id+ "?api_key=0910db5745f86638474ffefa5d3ba687"), - userRating: this.get('firebaseUtil').findRecord(params.movie_id, 'users/8V63eXOsjJhe9oA...
bad1014c435b94e2c18515ae619152adcc392dcc
project.config.js
project.config.js
const path = require('path') const NODE_ENV = process.env.NODE_ENV || 'production' const KF_USER_PATH = process.env.KF_USER_PATH || __dirname const KF_SERVER_PORT = parseInt(process.env.KF_SERVER_PORT, 10) const KF_LOG_LEVEL = parseInt(process.env.KF_LOG_LEVEL, 10) module.exports = { // environment to use when build...
const path = require('path') const NODE_ENV = process.env.NODE_ENV || 'production' const KF_USER_PATH = process.env.KF_USER_PATH || __dirname const KF_SERVER_PORT = parseInt(process.env.KF_SERVER_PORT, 10) const KF_LOG_LEVEL = parseInt(process.env.KF_LOG_LEVEL, 10) module.exports = { // environment to use when build...
Fix dev port at 3000 again
Fix dev port at 3000 again
JavaScript
isc
bhj/karaoke-forever,bhj/karaoke-forever
--- +++ @@ -14,7 +14,7 @@ // http server host: https://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback serverHost: '0.0.0.0', // http server port: https://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback - serverPort: isNaN(KF_SERVER_PORT) ? 0 : KF_SERVER_PORT, + se...
cfa1f1741701930afa9813dc11674c15bd83849e
src/builder/javascript.js
src/builder/javascript.js
import { transformFile } from 'babel-core' import { then } from '../util/async' import { debug } from '../util/stdio' import { default as es2015 } from 'babel-preset-es2015' import { default as amd } from 'babel-plugin-transform-es2015-modules-amd' export default function configure(pkg, opts) { return (name, file, d...
import { transformFile } from 'babel-core' import { debug } from '../util/stdio' import { default as es2015 } from 'babel-preset-es2015' import { default as amd } from 'babel-plugin-transform-es2015-modules-amd' export default function configure(pkg, opts) { return (name, file, done) => { transformFile(file ...
Remove obsolute async util import
Remove obsolute async util import
JavaScript
mit
zambezi/ez-build,zambezi/ez-build
--- +++ @@ -1,5 +1,4 @@ import { transformFile } from 'babel-core' -import { then } from '../util/async' import { debug } from '../util/stdio' import { default as es2015 } from 'babel-preset-es2015' import { default as amd } from 'babel-plugin-transform-es2015-modules-amd'
20ba3c4e8995318e1ef937cd57fd9c6304412998
index.js
index.js
var express = require('express'); var app = express(); var redis = require('redis').createClient(process.env.REDIS_URL); app.get('/', function(req, res){ res.send('hello world'); }); app.get('/sayhello', function (req, res){ res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Content-Type', 'appli...
var express = require('express'); var app = express(); var redis = require('redis'); var redis_client = redis.createClient(process.env.REDIS_URL || "redis://h:pe991302eec381b357d57f8089f915c35ac970d0bb4f2c89dba4bc52cbd7bcbb7@ec2-79-125-23-12.eu-west-1.compute.amazonaws.com:15599"); app.get('/', function(req, res){ r...
Add /keys endpoint for setting & getting from Redis
Add /keys endpoint for setting & getting from Redis
JavaScript
mit
codehackdays/HelloWorld
--- +++ @@ -1,6 +1,7 @@ var express = require('express'); var app = express(); -var redis = require('redis').createClient(process.env.REDIS_URL); +var redis = require('redis'); +var redis_client = redis.createClient(process.env.REDIS_URL || "redis://h:pe991302eec381b357d57f8089f915c35ac970d0bb4f2c89dba4bc52cbd7bcbb...
06347c6e939899854a98f0655df67e5d83ba378a
index.js
index.js
'use strict'; module.exports = function (arr) { var arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86'; var platform = process.platform; if (!arr.length) { return null; } return arr.filter(function (obj) { if (obj.os === platform && obj.arch === arch) { delete obj.os; delet...
'use strict'; module.exports = function (arr) { var arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86'; var platform = process.platform; console.log(arr); if (!arr || !arr.length) { return []; } return arr.filter(function (obj) { if (obj.os === platform && obj.arch === arch) { ...
Return an empty array instead of `null`
Return an empty array instead of `null`
JavaScript
mit
kevva/os-filter-obj
--- +++ @@ -4,8 +4,10 @@ var arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86'; var platform = process.platform; - if (!arr.length) { - return null; + console.log(arr); + + if (!arr || !arr.length) { + return []; } return arr.filter(function (obj) {
3f1019a71b7dc636390bffe96bf6a93354739b10
index.js
index.js
const jsonMask = require('json-mask') module.exports = function (opt) { opt = opt || {} function partialResponse(obj, fields) { if (!fields) return obj return jsonMask(obj, fields) } function wrap(orig) { return function (obj) { const param = this.req.query[opt.query || 'fields'] if (...
const jsonMask = require('json-mask') module.exports = function (opt) { opt = opt || {} function partialResponse(obj, fields) { if (!fields) return obj return jsonMask(obj, fields) } function wrap(orig) { return function (obj) { const param = this.req.query[opt.query || 'fields'] if (...
Add comment about binary res.json()
Add comment about binary res.json()
JavaScript
mit
nemtsov/express-partial-response
--- +++ @@ -15,8 +15,10 @@ orig(partialResponse(obj, param)) } else if (2 === arguments.length) { if ('number' === typeof arguments[1]) { + // res.json(body, status) backwards compat orig(arguments[1], partialResponse(obj, param)) } else { + // res.json(s...
6b7f738fd598b50d3fd021597f3f78e6282a79ce
index.js
index.js
var express = require('express'); var Connection = require('./lib/backend/connection').Connection; var restAdaptor = require('./lib/frontend/rest-adaptor'); var socketIoAdaptor = require('./lib/frontend/socket.io-adaptor'); var dashboardHandler = require('./lib/frontend/dashboard-handler'); express.application.kotoumi...
var express = require('express'); var Connection = require('./lib/backend/connection').Connection; var restAdaptor = require('./lib/frontend/rest-adaptor'); var socketIoAdaptor = require('./lib/frontend/socket.io-adaptor'); var dashboardHandler = require('./lib/frontend/dashboard-handler'); express.application.kotoumi...
Make it easy to use mocked/stubbed connections for testing
Make it easy to use mocked/stubbed connections for testing
JavaScript
mit
droonga/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga,KitaitiMakoto/express-droonga
--- +++ @@ -18,7 +18,10 @@ if (params.server) { socketIoAdaptor.register(this, params.server, params); params.server.on('close', function() { - connection.close(); + // The connection can be mocked/stubbed. We don't need to close + // such a fake connection. + if (typeof connection.cl...
da7718cb9914f268e62200ab21c8f4a62e9d5899
index.js
index.js
"use strict"; // stdlib var Fs = require('fs'); // nodeca var NLib = require('nlib'); // 3rd-party var StaticLulz = require('static-lulz'); var FsTools = NLib.Vendor.FsTools; var Async = NLib.Vendor.Async; module.exports = NLib.Application.create({ root: __dirname, name: 'nodeca.core', bootstrap: function...
"use strict"; // stdlib var Fs = require('fs'); // nodeca var NLib = require('nlib'); // 3rd-party var StaticLulz = require('static-lulz'); var FsTools = NLib.Vendor.FsTools; var Async = NLib.Vendor.Async; module.exports = NLib.Application.create({ root: __dirname, name: 'nodeca.core', bootstrap: function...
Remove http_server from nodeca context.
Remove http_server from nodeca context.
JavaScript
mit
nodeca/nodeca.core,nodeca/nodeca.core
--- +++ @@ -43,7 +43,7 @@ global.nodeca.hooks.init.after('initialization', function (next) { - nodeca.runtime.http_server = connect.createServer(); + var http_server = connect.createServer(); next(); });
92f8cb2850d9e5148aa309c76b4c87cf1fc18652
index.js
index.js
var gulp = require('gulp'), gutil = require('gulp-util'); function loadTasks(config) { var tasks = Object.keys(config); tasks.forEach(function (name) { var taskConfig = config[name], task = require('./tasks/' + name)(taskConfig); gulp.task(name, task); }); return gulp;...
var gulp = require('gulp'), gutil = require('gulp-util'); function loadTasks(config) { var tasks = Object.keys(config); tasks.forEach(function (name) { var taskConfig = config[name], task = require(taskConfig.def)(taskConfig); gulp.task(name, task); }); return gulp; } ...
Use task property for require func
Use task property for require func
JavaScript
mit
gulp-boilerplate/gulp-boilerplate
--- +++ @@ -5,7 +5,7 @@ var tasks = Object.keys(config); tasks.forEach(function (name) { var taskConfig = config[name], - task = require('./tasks/' + name)(taskConfig); + task = require(taskConfig.def)(taskConfig); gulp.task(name, task); });
818624b20d08020c5f0ac8f2f8059d2ec7fd1ee0
index.js
index.js
function neymar(type, props, ...children) { props = props || {} return { type, props, children: Array.prototype.concat.apply([], children) } } function createElement(node) { if (typeof node === 'string') { return document.createTextNode(node) } const el = docume...
function neymar(type, props, ...children) { props = props || {} return { type, props, children: Array.prototype.concat.apply([], children) } } function setProperties(node, props) { Object.keys(props).map(prop => { const propName = prop === 'className' ? 'class' : prop ...
Add property assignments to the DOM node being created
Add property assignments to the DOM node being created
JavaScript
mit
lucasfcosta/vdom-example,lucasfcosta/vdom-example
--- +++ @@ -7,12 +7,21 @@ } } +function setProperties(node, props) { + Object.keys(props).map(prop => { + const propName = prop === 'className' ? 'class' : prop + node.setAttribute(propName, props[prop]) + }) + +} + function createElement(node) { if (typeof node === 'string') { ...