commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
4ce92b03bbda3f6c5d7112c53bed0cfa9205b03a
planner/static/planner/js/new_step_form.js
planner/static/planner/js/new_step_form.js
function set_correct_origin(prev, last) { $(last).find("input[id*='origin_auto']").prop("disabled", true).val($(prev).find("input[id*='destination_auto']").val()); $(last).find("input[type='number'][id*='origin']").val($(prev).find("input[type='number'][id*='destination']").val()); } $(function () { $(".in...
function set_correct_origin(prev, last) { $(last).find("input[id*='origin_auto']").prop("disabled", true).val($(prev).find("input[id*='destination_auto']").val()); $(last).find("input[type='number'][id*='origin']").val($(prev).find("input[type='number'][id*='destination']").val()); } $(function () { $(".in...
Replace "question" with "step" in Newtrip buttons
Replace "question" with "step" in Newtrip buttons
JavaScript
mit
livingsilver94/getaride,livingsilver94/getaride,livingsilver94/getaride
c41f47f32e55029827babc95f8e889c33b3fff95
client/src/containers/ChannelIndexView.js
client/src/containers/ChannelIndexView.js
import React, {Component} from 'react' import {Link} from 'react-router-dom' import Card from '../components/Card' import {connect} from 'react-redux'; import {bindActionCreators} from 'redux' import * as channelsActions from '../actions/channelsActions' class ChannelIndexView extends Component { constructor(props...
import React, {Component} from 'react' import {Link} from 'react-router-dom' import Card from '../components/Card' import {connect} from 'react-redux'; class ChannelIndexView extends Component { constructor(props) { super(); this.name = props.channel.name } setArticleLink(title) { return encode...
Refactor using app state instead of local state
Refactor using app state instead of local state
JavaScript
mit
kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed
46962c63a43577a2902045958882b2ecdaa7ad3e
lib/provider-google-contact/helpers/upload.js
lib/provider-google-contact/helpers/upload.js
'use strict'; /** * Upload `contact` (containing contact data) onto Cluestr. * * * @param {Object} contact Contact to upload, plus cluestrClient * @param {Function} cb Callback to call once contacts has been uploaded. */ module.exports = function(contact, cluestrClient, cb) { console.log("Uploading ", contac...
'use strict'; /** * Upload `contact` (containing contact data) onto Cluestr. * * * @param {Object} contact Contact to upload, plus cluestrClient * @param {Object} cluestrClient Client for upload * @param {Object} datas Datas about the current account * @param {Object} contact Contact to upload, plus cluestrCl...
Add datas as parameter for v0.2.4
Add datas as parameter for v0.2.4
JavaScript
mit
AnyFetch/gcontacts-provider.anyfetch.com
29adca094212de2b38632a70e37d9b59b459e59c
problems/kata/001-todo-backend/001/todo.js
problems/kata/001-todo-backend/001/todo.js
// FIXME: don't use hardcoded params var nano = require('nano')('http://localhost:5984'); var db = nano.db.use('todo'); var todo = {}; todo.getAll = function(callback) { var results = []; db.view('todos', 'all_todos', function(err, body) { for (var row of body.rows) { results.push(row.value); } ...
// FIXME: don't use hardcoded params var nano = require('nano')('http://localhost:5984'); var db = nano.db.use('todo'); var todo = {}; todo.getAll = function(callback) { var results = []; db.view('todos', 'all_todos', function(err, body) { for (var row of body.rows) { results.push(row.value); } ...
Fix incorrect call to database and sloppy callback
Fix incorrect call to database and sloppy callback
JavaScript
mit
PurityControl/uchi-komi-js
f93145b58a5f8cd540b24310deef772bccdeeeb1
lib/index.js
lib/index.js
'use strict'; var config = require('../config/configuration.js'); function htmlReplace(str) { return str.replace(/<\/?[^>]+\/?>/g, ' ').replace(/ +/g, ' ').replace(/ ?\n ?/g, '\n').trim(); } module.exports = function(path, document, changes, finalCb) { if(!document.data.html) { changes.data.html = document.m...
'use strict'; var config = require('../config/configuration.js'); function htmlReplace(str) { return str.replace(/<\/?[^>]+\/?>/g, ' ').replace(/ +/g, ' ').replace(/ ?\n ?/g, '\n').trim(); } module.exports = function(path, document, changes, finalCb) { if(!document.data.html) { changes.data.html = document.m...
Replace \n by <br/> when we use text as html
Replace \n by <br/> when we use text as html
JavaScript
mit
AnyFetch/embedmail-hydrater.anyfetch.com
536c249f522ee04fa87f6aad5f652b09fdad959f
gulp-tasks/code-quality.js
gulp-tasks/code-quality.js
const path = require('path'); const eslint = require('gulp-eslint'); const config = require('../utils/config'); module.exports = gulp => () => { const stream = gulp.src(path.join(config.pkgdir, 'src/**/*.js')) .pipe(eslint({ configFile: path.join(process.cwd(), '.eslintrc.json'), })) .pipe(eslint.f...
const path = require('path'); const eslint = require('gulp-eslint'); const config = require('../utils/config'); module.exports = gulp => () => { const stream = gulp.src(path.join(config.pkgdir, 'src/**/*.js')) .pipe(eslint({ configFile: path.join(process.cwd(), '.eslintrc.json'), })) .pipe(eslint.f...
Fix code quality task for gulp 4
Fix code quality task for gulp 4
JavaScript
mit
odopod/code-library,odopod/code-library
ae727f6c05c2bf9f27a40ee98eb52fb782098636
node/behaviors/makeMap.js
node/behaviors/makeMap.js
const webModel = require('../webModel'); const webModelFunctions = require('../webModelFunctions'); const robotModel = require('../robotModel'); async function makeMap() { if (webModel.debugging) { console.log('Make Map'); webModelFunctions.scrollingStatusUpdate('Make Map'); } if (robotMode...
const webModel = require('../webModel'); const webModelFunctions = require('../webModelFunctions'); const robotModel = require('../robotModel'); async function makeMap() { if (webModel.debugging) { console.log('Make Map'); webModelFunctions.scrollingStatusUpdate('Make Map'); } if (robotMode...
Correct status output text for Make Map
Correct status output text for Make Map
JavaScript
mit
chrisl8/ArloBot,chrisl8/ArloBot,DTU-R3/ArloBot,DTU-R3/ArloBot,DTU-R3/ArloBot,chrisl8/ArloBot,chrisl8/ArloBot,chrisl8/ArloBot,chrisl8/ArloBot,DTU-R3/ArloBot,DTU-R3/ArloBot,DTU-R3/ArloBot
9299388df693c3717bb47353ce1e3d3543a7975e
reviewboard/static/rb/js/utils/textUtils.js
reviewboard/static/rb/js/utils/textUtils.js
(function() { // If `marked` is defined, initialize it with our preferred options if (marked !== undefined) { marked.setOptions({ gfm: true, tables: true, breaks: true, pedantic: false, sanitize: true, smartLists: true, langPrefix : 'language-', high...
(function() { /* * Format the given text and put it into $el. * * If the given element is expected to be rich text, this will format the text * using Markdown. * * Otherwise, if it's not expected and won't be converted, then it will add * links to review requests and bug trackers but otherwise leave the text a...
Fix some issues that were breaking javascript in firefox.
Fix some issues that were breaking javascript in firefox. This fixes a regression introduced when marked.js was removed. Apparently testing global names to see if they're defined doesn't work so well in firefox. This broke pretty much all javascript everywhere. Fortunately, we don't care about setting any marked.js op...
JavaScript
mit
custode/reviewboard,KnowNo/reviewboard,brennie/reviewboard,KnowNo/reviewboard,reviewboard/reviewboard,bkochendorfer/reviewboard,custode/reviewboard,davidt/reviewboard,sgallagher/reviewboard,sgallagher/reviewboard,beol/reviewboard,chipx86/reviewboard,beol/reviewboard,beol/reviewboard,chipx86/reviewboard,KnowNo/reviewboa...
c42c732793eb4ee75af7c616ef245e590a47dab7
lib/socket-adaptor.js
lib/socket-adaptor.js
var socketIo = require('socket.io'); function deepClone(base) { if (!base || typeof base != 'object') return base; var cloned = Object.create(null); Object.keys(base).forEach(function(key) { cloned[key] = deepClone(base[key]); }); return cloned; } function buildResultData(envelope) { return { ...
var socketIo = require('socket.io'); function deepClone(base) { if (!base || typeof base != 'object') return base; var cloned = Object.create(null); Object.keys(base).forEach(function(key) { cloned[key] = deepClone(base[key]); }); return cloned; } function buildResultData(envelope) { return { ...
Define missing local variable "connection"
Define missing local variable "connection"
JavaScript
mit
KitaitiMakoto/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga,droonga/express-droonga
5133b16080b85d8933e0f4da8197b7198403e484
routes/rest_views/middleware.js
routes/rest_views/middleware.js
const keystone = require('keystone'); const jwt = require('jsonwebtoken'); /* JWT middleware */ exports.requireJwtAuth = function(req, res, next) { const errorMessage = { badHeader: 'Bad request - missing JWT header', unauthorized: 'Unauthorized - JWT', }; if (!req.headers || !req.headers.authorizat...
const keystone = require('keystone'); const jwt = require('jsonwebtoken'); /* JWT middleware */ exports.requireJwtAuth = function(req, res, next) { const errorMessage = { badHeader: 'Bad request - missing JWT header', unauthorized: 'Unauthorized - JWT', }; // Enable auth with current Keystone's brow...
Enable Keystone's session auth for Rest API
Enable Keystone's session auth for Rest API
JavaScript
mit
pista329/keystonejs-test-project,pista329/keystonejs-test-project
a097dd790e059eec22f4b9374418ba3284fae4f3
mathChart.js
mathChart.js
var mathChart = { var insertchart = function(canvas,data) { var xmlns="https://www.w3.org/2000/svg" var svg = document.createElementNS(xmlns,"svg"); svg.height = canvas.clientHeight; svg.width = canvas.clientWidth; var path = generatePath(svg,data); for(var i=0; i<path.length; ++i) { svg.appendChild(...
/* mathChart.js author: corehello(corehello@gmail.com) data = { range : [[0,1],[2,3]]; data : [[1,2],[2,3],...]; } */ var mathChart = { var insertchart = function(canvas,data) { var xmlns="https://www.w3.org/2000/svg"; var svg = document.createElementNS(xmlns,"svg"); svg.height = canvas.clientHeigh...
Write the function to generate every path according to the data
Write the function to generate every path according to the data
JavaScript
mit
corehello/mathChart,corehello/mathChart
dc43bff790323b658a4f7ccb129a6f164b8eef60
bin/deploy.js
bin/deploy.js
#!/usr/bin/env node const UI = require('console-ui'); const cli = require('cli'); const Project = require('../models/project'); const CommandFactory = require('../commands/command-factory'); const discovery = require('../tasks/discover'); const pkg = require('./package.json'); let options = cli.parse({ environme...
#!/usr/bin/env node const UI = require('console-ui'); const cli = require('cli'); const Project = require('../models/project'); const CommandFactory = require('../commands/command-factory'); const discovery = require('../tasks/discover'); const pkg = require('../package.json'); let options = cli.parse({ environm...
Fix wrong path for package.json
Fix wrong path for package.json
JavaScript
mit
deployjs/deployjs-cli
0f70adee51fb89805952cf99bafb3d8ac0ffdea8
examples/rps/players/js-player.js
examples/rps/players/js-player.js
//initialize things globally if necessary var move = "rock"; function respond(command) { if(command === "move") return Math.random() < 0.5 ? "rock" : "paper"; else return "err"; }
//initialize things globally if necessary var move = "rock"; function respond(command) { if(command === "move") return Math.random() < 0.5 ? "rock" : "scissors"; else return "err"; }
Change jsplayer behavior for more natural ranking
Change jsplayer behavior for more natural ranking
JavaScript
mit
jacksondc/crane,jacksondc/crane,jacksondc/crane
b5f2976524bfe41893f5d288ea3fb73bfef33081
server/routes/index.js
server/routes/index.js
import userController from '../controllers/users'; import recipeController from '../controllers/recipes'; import Login from '../middleware/ensureLogin'; import User from '../middleware/isuser'; import recipeAdd from '../middleware/validateAddRecipe'; module.exports = (app) => { app.get('/api', (req, res) => res.stat...
import userController from '../controllers/users'; import recipeController from '../controllers/recipes'; import Login from '../middleware/ensureLogin'; import User from '../middleware/isuser'; import recipeAdd from '../middleware/validateAddRecipe'; module.exports = (app) => { app.get('/api', (req, res) => res.stat...
Add API that allows users to retreive all recipes in the application
Add API that allows users to retreive all recipes in the application
JavaScript
mit
Billmike/More-Recipes,Billmike/More-Recipes
849fd9cbdfa2dd1998ae2f6c9f2688bb6978a126
src/scenes/home/header/navDropdown/navDropdown.js
src/scenes/home/header/navDropdown/navDropdown.js
import React from 'react'; import PropTypes from 'prop-types'; import { withRouter } from 'react-router'; import classNames from 'classnames'; import NavItem from '../navItem/navItem'; import styles from './navDropdown.css'; function NavDropdown(props) { const classes = classNames({ [`${styles.child}`]: true, ...
import React from 'react'; import PropTypes from 'prop-types'; import { withRouter } from 'react-router'; import NavItem from '../navItem/navItem'; import styles from './navDropdown.css'; class NavDropdown extends React.Component { constructor(props) { super(props); this.state = { isDesktopScreenSize: ...
Change component to class for state (see full msg)
Change component to class for state (see full msg) Instead of dealing with a CSS MediaQuery cluster bomb to unintuitively force styles, I decided that using local state on this component with windwo resizes to conditionally render drop-downs like drop-downs would be best. When the windows is less than 779px in width, ...
JavaScript
mit
OperationCode/operationcode_frontend,hollomancer/operationcode_frontend,sethbergman/operationcode_frontend,hollomancer/operationcode_frontend,miaket/operationcode_frontend,OperationCode/operationcode_frontend,sethbergman/operationcode_frontend,hollomancer/operationcode_frontend,NestorSegura/operationcode_frontend,miake...
5076878be6bade0457301d6128f30b59662eb75b
lib/require-in-context.js
lib/require-in-context.js
'use strict'; var Module = require('module') , wrap = Module.wrap , readFile = require('fs').readFileSync , dirname = require('path').dirname , vm = require('vm') , createContext = vm.createContext , runInContext = vm.runInContext , errorMsg = require('./is-mod...
'use strict'; var Module = require('module') , wrap = Module.wrap , readFile = require('fs').readFileSync , dirname = require('path').dirname , vm = require('vm') , createContext = vm.createContext , runInContext = vm.runInContext , errorMsg = require('./is-mod...
Use regular require, when given context is same as current context
Use regular require, when given context is same as current context
JavaScript
mit
medikoo/node-ext
11b093cafe9b89050656b0dbb3337fa1f3bf4610
resources/assets/components/Empty/index.js
resources/assets/components/Empty/index.js
import React from 'react'; import './empty.scss'; const Empty = (props) => ( <div className="container empty"> <div className="empty__image" /> <div className="empty__text"> <h2 className="heading -gamma">{props.header}</h2> <span className="copy">{props.copy ? props.copy : null }</span> </di...
import React from 'react'; import PropTypes from 'prop-types'; import './empty.scss'; const Empty = props => ( <div className="container empty"> <div className="empty__image" /> <div className="empty__text"> <h2 className="heading -gamma">{props.header}</h2> <span className="copy">{props.copy ? ...
Add proptype validation to Empty component
Add proptype validation to Empty component
JavaScript
mit
DoSomething/rogue,DoSomething/rogue,DoSomething/rogue
761b9cfb6eca9d57f65b32a683eb0f13dfcbc391
source/modules/guide/core/js/script.js
source/modules/guide/core/js/script.js
/* global hljs */ Wee.fn.make('guide', { /** * Highlight code and bind click events * * @constructor */ _construct: function() { var priv = this.$private; // Setup syntax highlighting priv.highlightCode(); // Bind code toggle and selection $('ref:code').on('dblclick', function() { priv.selectC...
/* global hljs */ Wee.fn.make('guide', { /** * Highlight code and bind click events * * @constructor */ _construct: function() { var priv = this.$private; // Setup syntax highlighting priv.highlightCode(); // Bind code toggle and selection $('ref:code').on('dblclick', function() { priv.selectC...
Update style guide highlight.js from 9.1.0 to 9.2.0
Update style guide highlight.js from 9.1.0 to 9.2.0
JavaScript
apache-2.0
weepower/wee,weepower/wee
4eeb008670002889814cffef1f180096032b9d05
resources/js/validators/customValidator.js
resources/js/validators/customValidator.js
wd.cdv.validators.registerValidator("custom", function(validation, rs){ var validationResult = wd.cdv.validationResult({ name: validation.validationName, type: validation.validationType }); var result = validation.validationFunction.call(this,rs,[]); if (typeof result == "object") { validatio...
wd.cdv.validators.registerValidator("custom", function(validation, rs){ var validationResult = wd.cdv.validationResult({ name: validation.validationName, type: validation.validationType }); var result = validation.validationFunction.call(this,rs,[]); if (typeof result == "object") { validatio...
Remove print calls from custom validator
Remove print calls from custom validator Browsers and server-side CDV seem to have a somewhat different idea of what 'print' means. Ooops.
JavaScript
mpl-2.0
pedrofvteixeira/cdv,pedrofvteixeira/cdv,webdetails/cdv,pedrofvteixeira/cdv,webdetails/cdv,webdetails/cdv
cd06fbc2c9c8241e741b3e1ffc174372dff3669c
src/lib/responsive/setup_responsiveness.js
src/lib/responsive/setup_responsiveness.js
export default chart => { if (chart.responsive) { const { width, height } = chart // preserve original values chart._originWidth = width chart._originHeight = height // setup height calculation const heightRatio = height / width const xTicksRatio = chart.xTicks / width ...
export default chart => { if (chart.responsive) { const { width, height } = chart // preserve original values chart._originWidth = width chart._originHeight = height // setup height calculation const heightRatio = height / width const xTicksRatio = chart.xTicks / width ...
Fix computation of ticks for yAxis on responsive
Fix computation of ticks for yAxis on responsive
JavaScript
mit
simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks
98783e8c4fc67f5875c4be47c1706cedd1f3ee0e
src/OrthographicCamera.js
src/OrthographicCamera.js
'use strict'; let gl = require('./gl'); let glm = require('gl-matrix'); let mat4 = glm.mat4; let Camera = require('./Camera'); const _name = 'orthographic.camera'; const _left = -1; const _top = -1; const _near = 0.1; const _far = 1; class OrthographicCamera extends Camera { constructor({ name = _name, path, unif...
'use strict'; let gl = require('./gl'); let glm = require('gl-matrix'); let mat4 = glm.mat4; let Camera = require('./Camera'); const _name = 'orthographic.camera'; const _left = -1; const _bottom = -1; const _near = 0.1; const _far = 1; class OrthographicCamera extends Camera { constructor({ name = _name, path, u...
Fix orthographic camera usage of the glViewport method
Fix orthographic camera usage of the glViewport method
JavaScript
mit
allotrop3/four,allotrop3/four
0d7c4b7b6a2a9a72a2dca3fbd405097a9a7f180c
package/config/webpack.js
package/config/webpack.js
module.exports = { externals: { 'backbone': 'Backbone', 'backbone.babysitter': 'Backbone.ChildViewContainer', 'cocktail': 'Cocktail', 'jquery': 'jQuery', 'jquery-ui': 'jQuery', 'jquery.minicolors': 'jQuery', 'underscore': '_', 'backbone.marionette': 'Backbone.Marionette', 'iscroll'...
module.exports = { externals: { 'backbone': 'Backbone', 'backbone.babysitter': 'Backbone.ChildViewContainer', 'cocktail': 'Cocktail', 'jquery': 'jQuery', 'jquery-ui': 'jQuery', 'jquery.minicolors': 'jQuery', 'underscore': '_', 'backbone.marionette': 'Backbone.Marionette', 'iscroll'...
Fix Webpack build for server side rendering
Fix Webpack build for server side rendering REDMINE-17566
JavaScript
mit
codevise/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow
6bfc6f79e8272fb6e564b352dfb5bb858dd69c59
tests/karma.conf.js
tests/karma.conf.js
module.exports = config => { config.set({ frameworks: ['jasmine'], files: ['*.js'], preprocessors: { '*.js': ['webpack'], }, browsers: ['Chrome_fakeDevices'], plugins: [ 'karma-chrome-launcher', 'karma-webpack', 'karma-jasmine', ], webpack: { devtool:...
module.exports = config => { config.set({ frameworks: ['jasmine'], files: ['*.js'], preprocessors: { '*.js': ['webpack'], }, browsers: [process.env.BROWSER || 'chrome'], plugins: [ 'karma-chrome-launcher', 'karma-webpack', 'karma-jasmine', ], webpack: { ...
Fix firefox launching from Karma
Fix firefox launching from Karma
JavaScript
mit
aullman/opentok-camera-filters,aullman/opentok-camera-filters
ea6df9cde188a81998f4d4f9348c985db72a1e69
app/client/templates/posts/post_submit.js
app/client/templates/posts/post_submit.js
Template.postSubmit.events({ 'submit form': function(e) { e.preventDefault(); var post = { url: $(e.target).find('[name=url]').val(), title: $(e.target).find('[name=title]').val() }; post.slug = slugify(post.title); Meteor.call('postInsert', post, function(error, result) { // ...
Template.postSubmit.events({ 'submit form': function(e) { e.preventDefault(); var post = { url: $(e.target).find('[name=url]').val(), title: $(e.target).find('[name=title]').val() }; post.slug = slugify(post.title); Meteor.call('postInsert', post, function(error, result) { //...
Set alert error instead of stopping
Set alert error instead of stopping
JavaScript
mit
drainpip/music-management-system,drainpip/music-management-system
2800c236e28dafb46a0bd73ba0b2477345d7e2d3
packages/npm/spec/helpers-spec.js
packages/npm/spec/helpers-spec.js
'use babel' const { it } = require(process.env.SPEC_HELPER_SCRIPT) describe('versionFromRange', function() { })
'use babel' const { it } = require(process.env.SPEC_HELPER_SCRIPT) import { exists, versionFromRange } from '../lib/helpers' describe('exists', function() { it('works', async function() { expect(await exists(__filename)).toBe(true) expect(await exists('/tmp/non-existent-file')).toBe(false) }) }) describe...
Add specs for exists and versionFromRange
:white_check_mark: Add specs for exists and versionFromRange
JavaScript
mpl-2.0
motion/motion,flintjs/flint,motion/motion,flintjs/flint,flintjs/flint
c567d818c3ee340fa34159f2997aa10838747bc6
src/civ5saveproperties.js
src/civ5saveproperties.js
export default { "fileSignature": { "byteOffset": 0, "length": 4, "previousProperty": null, "type": "fixedLengthString" }, "saveGameVersion": { "byteOffset": 4, "length": 4, "previousProperty": "fileSignature", "type": "int32" }, "gameVersion": { "byteOffset": 8, "lengt...
export default { "fileSignature": { "byteOffset": 0, "byteOffsetInSection": 0, "length": 4, "previousProperty": null, "section": 1, "sectionByBuild": { "4": 0 }, "type": "fixedLengthString" }, "saveGameVersion": { "byteOffset": 4, "byteOffsetInSection": 4, "length...
Add section information and section 17
Add section information and section 17
JavaScript
mit
bmaupin/js-civ5save
42a9803fc2a316631b967b68b5ad3e12c8bb43bf
src/client/modules/map.js
src/client/modules/map.js
var regionStyle = { initial: { fill: '#000000', "fill-opacity": 1, stroke: 'none', "stroke-width": 0, "stroke-opacity": 1 }, hover: { "fill-opacity": 0.8, cursor: 'pointer' }, selected: { fill: 'yellow' } } var map = { init: function(){ return $('#map').vectorMap( ...
var regionStyle = { initial: { fill: '#8f8f8f', "fill-opacity": 1, stroke: 'none', "stroke-width": 0, "stroke-opacity": 1 }, hover: { "fill-opacity": 0.8, cursor: 'pointer' }, selected: { fill: 'yellow' } } var map = { init: function(){ return $('#map').vectorMap( ...
Change initial color to diferentiate from non-active countries to active countries
Change initial color to diferentiate from non-active countries to active countries
JavaScript
mit
ferflores/lightning,ferflores/lightning
43ecb332c85edc585dae35d1c574c065da89ca43
gulp/plugins/gulp-sanitize-translations.js
gulp/plugins/gulp-sanitize-translations.js
var through = require( 'through2' ); var gutil = require( 'gulp-util' ); var PluginError = gutil.PluginError; var sanitize = require( 'sanitize-html' ); const PLUGIN_NAME = 'gulp-sanitize-translations.js'; module.exports = function( options ) { // Creating a stream through which each file will pass var stream = thr...
var through = require( 'through2' ); var gutil = require( 'gulp-util' ); var PluginError = gutil.PluginError; var sanitize = require( 'sanitize-html' ); const PLUGIN_NAME = 'gulp-sanitize-translations.js'; module.exports = function( options ) { // Creating a stream through which each file will pass var stream = thr...
Fix translation sanitizing to work for plurals.
Fix translation sanitizing to work for plurals.
JavaScript
mit
gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib
4b0590961c42d151a0bc0fffd0afba23ded3c982
client/src/js/settings/selectors.js
client/src/js/settings/selectors.js
import { createSelector } from "reselect"; import { endsWith, flatMap, keys, map, max, pick } from "lodash-es"; import { taskDisplayNames } from "../utils"; const getMaximumTaskLimit = (limits, type) => ( max(map(limits, (value, key) => endsWith(key, type) ? value: 0 )) ); const taskLimitKeys = flatM...
import { createSelector } from "reselect"; import { endsWith, flatMap, keys, map, max, pick } from "lodash-es"; import { taskDisplayNames } from "../utils"; const getMaximumTaskLimit = (limits, type) => ( max(map(limits, (value, key) => endsWith(key, type) ? value : 0 )) ); const taskLimitKeys = flat...
Add reselect support for job limit values
Add reselect support for job limit values
JavaScript
mit
virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool
6a9653aa0b63e3bd0483be3bd0f79a4ac1164085
src/js/controllers/listToMapLinkingController.js
src/js/controllers/listToMapLinkingController.js
"use strict"; let ListToMapLinkingController = function() { let self = {}; function mapMarkerSelected(data) { let parentDiv = $("#serviceList"); let dPanel = d3.selectAll(".serviceEntry") .filter((d) => d["Organization Name"] === data["Organization Name"]); let innerListItem = $(dPanel.nodes())...
"use strict"; let ListToMapLinkingController = function() { let self = {}; function mapMarkerSelected(data) { let parentDiv = $("#serviceList"); let dPanel = d3.selectAll(".serviceEntry") .filter((d) => d["Organization Name"] === data["Organization Name"]); let innerListItem = $(dPanel.nodes())...
Add fix for collapsing services bug
Add fix for collapsing services bug
JavaScript
mit
AndrewTBurks/EnglewoodSocialServices,AndrewTBurks/EnglewoodSocialServices,uic-evl/EnglewoodSocialServices,uic-evl/EnglewoodSocialServices
e4e06bb7cbe3e33862b8031b41c2d32f97da8894
app/js/components/JobListing.js
app/js/components/JobListing.js
import { Component, PropTypes } from 'react' import {Link} from 'react-router' class JobListing extends Component { static propTypes: { title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, url: PropTypes.string.isRequired } constructor(props) { super(props) } ...
import { Component, PropTypes } from 'react' import {Link} from 'react-router' class JobListing extends Component { static propTypes: { title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, url: PropTypes.string.isRequired } constructor(props) { super(props) } ...
Add margin between open job posting rows.
Add margin between open job posting rows.
JavaScript
mit
blockstack/blockstack-site,blockstack/blockstack-site
26ff7b3522980e5e49367f5d39c28910588ff3e2
src/mui/input/ImageInputPreview.js
src/mui/input/ImageInputPreview.js
import React, { PropTypes } from 'react'; import FlatButton from 'material-ui/FlatButton'; import { red600 } from 'material-ui/styles/colors'; import RemoveCircle from 'material-ui/svg-icons/content/remove-circle'; const styles = { container: { display: 'inline-block', position: 'relative', },...
import React, { Component, PropTypes } from 'react'; import FlatButton from 'material-ui/FlatButton'; import { pinkA200 } from 'material-ui/styles/colors'; import RemoveCircle from 'material-ui/svg-icons/content/remove-circle'; const styles = { container: { display: 'inline-block', position: 'relat...
Improve design of image input preview delete button
Improve design of image input preview delete button
JavaScript
mit
matteolc/admin-on-rest,marmelab/admin-on-rest,matteolc/admin-on-rest,marmelab/admin-on-rest
2a903cbdc966f0cb23ad8b659d677fa061fc4819
tests/acceptance/specs/todos.spec.js
tests/acceptance/specs/todos.spec.js
import { expect } from 'chai'; import { addTodo } from './common.js'; describe('App', function() { beforeEach(function() { // TODO: refactor this using something like async.series return addTodo(browser, 'buy cheddar') .then(() => addTodo(browser, 'buy chorizo')) .then(() => addTodo(browser, 'bu...
import { expect } from 'chai'; import { addTodo } from './common.js'; describe('App', function() { beforeEach(function() { // TODO: refactor this using something like async.series return addTodo(browser, 'buy cheddar') .then(() => addTodo(browser, 'buy chorizo')) .then(() => addTodo(browser, 'bu...
Use string values for attributes in acceptance tests
Use string values for attributes in acceptance tests
JavaScript
mit
NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet
ab581f23f246aa856d47170cde42aa3ba9b4008f
step-capstone/src/App.js
step-capstone/src/App.js
import React from 'react'; import './styles/App.css'; import TravelObject from './components/TravelObject' class App extends React.Component { render () { return( <div className="App"> <TravelObject type="flight" /> </div> ); } } export default App;
import React from 'react'; import './styles/App.css'; import TravelObject from './components/TravelObject' class App extends React.Component { constructor(props) { super(props); this.state = { data: [] } } fetchData() { return [ { finalized: true, type: "flight", ...
Add function to fetch data and fetch data when component is mounted
Add function to fetch data and fetch data when component is mounted
JavaScript
apache-2.0
googleinterns/step98-2020,googleinterns/step98-2020
3233df80aaba2e7a81abbb68643854386f2bad7c
javascripts/init.js
javascripts/init.js
var animate; var Game = Game || {}; var WIDTH = window.innerWidth; var HEIGHT = window.innerHeight; var FPS = 1000 / 30; var engine = new Game.Engine('game', WIDTH, HEIGHT); engine.init(); engine.register(new Game.SnakeGame(WIDTH, HEIGHT, {})); // Use fallbacks for requestAnimationFrame animate = (window.requestAnima...
var animate; var Game = Game || {}; var WIDTH = window.innerWidth; var HEIGHT = window.innerHeight; var FPS = 1000 / 30; var engine = new Game.Engine('game', WIDTH, HEIGHT); engine.init(); engine.register(new Game.Snake(WIDTH, HEIGHT, {})); // Use fallbacks for requestAnimationFrame animate = (window.requestAnimation...
Use new Snake object naming
Use new Snake object naming
JavaScript
mit
msanatan/snake,msanatan/snake,msanatan/snake
e052265d4e9415b63bb2fd81fb983bdd30754944
web/test/components/portal/Portal.js
web/test/components/portal/Portal.js
import DomMock from '../../helpers/dom-mock'; import jsdom from 'mocha-jsdom'; import expect from 'expect'; import React from 'react'; import TestUtils from 'react-addons-test-utils'; import { Portal } from '../../../portal/src/containers/Portal'; import FBLogin from '../../../portal/src/components/FBLogin'; DomMock('...
import DomMock from '../../helpers/dom-mock'; import jsdom from 'mocha-jsdom'; import expect from 'expect'; import React from 'react'; import TestUtils from 'react-addons-test-utils'; import { Portal } from '../../../portal/src/containers/Portal'; import FBLogin from '../../../portal/src/components/FBLogin'; import Sub...
Add edit subject unit test in portal
Add edit subject unit test in portal
JavaScript
mit
trendmicro/serverless-survey-forms,trendmicro/serverless-survey-forms
36c92e1e7c1ebeffec6f8f1d4597a4c3aceabbac
src/systems/tracked-controls-webxr.js
src/systems/tracked-controls-webxr.js
var registerSystem = require('../core/system').registerSystem; /** * Tracked controls system. * Maintain list with available tracked controllers. */ module.exports.System = registerSystem('tracked-controls-webxr', { init: function () { this.controllers = []; this.addSessionEventListeners = this.addSession...
var registerSystem = require('../core/system').registerSystem; var utils = require('../utils'); /** * Tracked controls system. * Maintain list with available tracked controllers. */ module.exports.System = registerSystem('tracked-controls-webxr', { init: function () { this.controllers = []; this.throttled...
Use system tick to retrieve controllers instead of unreliable inputsourceschange event.
Use system tick to retrieve controllers instead of unreliable inputsourceschange event.
JavaScript
mit
aframevr/aframe,chenzlabs/aframe,ngokevin/aframe,aframevr/aframe,chenzlabs/aframe,ngokevin/aframe
10693276f09beaf3cc46782a8b698fa8fb4f7a70
http-random-user/src/main.js
http-random-user/src/main.js
import Cycle from '@cycle/core'; import {div, button, h1, h4, a, makeDOMDriver} from '@cycle/dom'; import {makeHTTPDriver} from '@cycle/http'; function main(sources) { const getRandomUser$ = sources.DOM.select('.get-random').events('click') .map(() => { const randomNum = Math.round(Math.random() * 9) + 1; ...
import Cycle from '@cycle/core'; import {div, button, h1, h4, a, makeDOMDriver} from '@cycle/dom'; import {makeHTTPDriver} from '@cycle/http'; function main(sources) { const getRandomUser$ = sources.DOM.select('.get-random').events('click') .map(() => { const randomNum = Math.round(Math.random() * 9) + 1; ...
Rename http-random-user key to category
Rename http-random-user key to category
JavaScript
mit
mikekidder/cycle-examples,cyclejs/cycle-examples,mikekidder/cycle-examples,cyclejs/cycle-examples,mikekidder/cycle-examples
c23457181f01c0df8b9a262edbe0113ca550c504
client/app/serializers/site.js
client/app/serializers/site.js
import DS from 'ember-data'; var SiteSerializer = DS.RESTSerializer.extend({ serialize: function(site, options) { var fields = [ 'name', 'tagline', 'description', 'moreDesc', 'joinText' ]; var result = { }; fields.forEach(function(field) { result[field] = site.get(field); }); if (options ...
import DS from 'ember-data'; var SITE_SERIALIZER_FIELDS = [ 'name', 'tagline', 'description', 'moreDesc', 'joinText' ]; var SiteSerializer = DS.RESTSerializer.extend({ serialize: function(site, options) { var result = site.getProperties(SITE_SERIALIZER_FIELDS); if (options && options.includeId) { res...
Use more idiomatic ember api
Use more idiomatic ember api
JavaScript
mit
aymerick/kowa,aymerick/kowa
6d7aa555c3b2d554fe74cc0df4186c88965a21de
ckanext/googleanalytics/fanstatic_library/googleanalytics_event_tracking.js
ckanext/googleanalytics/fanstatic_library/googleanalytics_event_tracking.js
// Add Google Analytics Event Tracking to resource download links. this.ckan.module('google-analytics', function(jQuery, _) { return { options: { googleanalytics_resource_prefix: '' }, initialize: function() { jQuery('a.resource-url-analytics').on('click', function() { var resource_p...
// Add Google Analytics Event Tracking to resource download links. this.ckan.module('google-analytics', function(jQuery, _) { return { options: { googleanalytics_resource_prefix: '' }, initialize: function() { jQuery('a.resource-url-analytics').on('click', function() { var resource_u...
Fix resource download event tracking js
Fix resource download event tracking js
JavaScript
agpl-3.0
ckan/ckanext-googleanalytics,ckan/ckanext-googleanalytics,ckan/ckanext-googleanalytics
48d7d841ffad787aca5652732e1a302ac5ab610e
grunt/config/sass.js
grunt/config/sass.js
// Compile SCSS files into CSS (dev mode is not compressed) module.exports = { dev: { options: { style: 'expanded' }, files: { 'preview/vizabi.css': 'src/assets/style/vizabi.scss' } }, prod: { options: { style: 'compressed' ...
// Compile SCSS files into CSS (dev mode is not compressed) module.exports = { dev: { options: { style: 'expanded' }, files: { 'dist/vizabi.css': 'src/assets/style/vizabi.scss' } }, prod: { options: { style: 'compressed' }, ...
Fix CSS not updating on development mode
Fix CSS not updating on development mode
JavaScript
bsd-3-clause
acestudiooleg/vizabi,sergey-filipenko/vizabi,vizabi/vizabi,logicerpsolution/vizabi,maximhristenko/vizabi,logicerpsolution/vizabi,buchslava/vizabi,TBAPI-0KA/vizabi,jdk137/vizabi,alliance-timur/vizabi,sergey-filipenko/vizabi,alliance-timur/vizabi,dab2000/vizabi,logicerpsolution/vizabi,acestudiooleg/vizabi,maximhristenko/...
4d9fdf55de26dc1a26b6a181b01e433d0b035ed2
packages/telescope-pages/lib/client/routes.js
packages/telescope-pages/lib/client/routes.js
Telescope.config.adminMenu.push({ route: 'pages', label: 'Pages', description: 'manage_static_pages' }); Telescope.config.preloadSubscriptions.push('pages'); PageController = RouteController.extend({ getTitle: function () { return Pages.collection.findOne({slug: this.params.slug}).title; }, data: func...
Telescope.config.adminMenu.push({ route: 'pages', label: 'Pages', description: 'manage_static_pages' }); Telescope.config.preloadSubscriptions.push('pages'); PageController = RouteController.extend({ currentPage: function () { return Pages.collection.findOne({slug: this.params.slug}); }, getTitle: fun...
Handle case where Pages collection isn't loaded yet (although that should never happen…)
Handle case where Pages collection isn't loaded yet (although that should never happen…)
JavaScript
mit
TodoTemplates/Telescope,MeteorHudsonValley/Telescope,hoihei/Telescope,tupeloTS/telescopety,NodeJSBarenko/Telescope,HelloMeets/HelloMakers,Scalingo/Telescope,manriquef/Vulcan,aykutyaman/Telescope,tupeloTS/grittynashville,Scalingo/Telescope,TribeMedia/Screenings,sungwoncho/Telescope,JstnEdr/Telescope,StEight/Telescope,ev...
9a2f2f3110d6aaa67fe7ac63d3f96bdd83636f21
app/utils/constants.js
app/utils/constants.js
import packageJson from './package.json'; module.exports = { backendRoot: 'https://obscure-woodland-71302.herokuapp.com/', flaskRoot: 'http://localhost:5000', /* flaskRoot: 'http://catapp-staging.herokuapp.com/',*/ /* graphQLRoot: (process.env.NODE_ENV !== 'production') ? '//localhost:5000/graphql' : '//catapp...
import packageJson from './package.json'; module.exports = { backendRoot: 'https://obscure-woodland-71302.herokuapp.com/', /* flaskRoot: 'http://localhost:5000',*/ flaskRoot: 'http://catapp-staging.herokuapp.com/', /* graphQLRoot: (process.env.NODE_ENV !== 'production') ? '//localhost:5000/graphql' : '//catapp...
Put all URLs to public
Put all URLs to public
JavaScript
mit
mhoffman/CatAppBrowser,mhoffman/CatAppBrowser
82da6073179d7c4107c313093d6c2cab88e017fc
server/sessions/sessionsController.js
server/sessions/sessionsController.js
var Session = require( './sessions' ); module.exports = { getAllSessions: function(request, response) { Session.findAll() .then( function(sessions) { response.send(sessions); }) }, addSession: function(request, response) { var sessionName = request.body.sessionName; Session.create( {...
var helpers = require( '../config/helpers' ); var Session = require( './sessions' ); module.exports = { getAllSessions: function( reqw, res, next ) { Session.findAll() .then( function( sessions ) { response.send( sessions ); }) }, addSession: function( req, res, next ) { var sessionName =...
Add endpoint for retrieving a single session
Add endpoint for retrieving a single session
JavaScript
mpl-2.0
CantillatingZygote/rubiginouschanticleer,RubiginousChanticleer/rubiginouschanticleer,RubiginousChanticleer/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer
44160a484f20585b95dd034f4a40c5138cac0c45
hobbes/extensions.js
hobbes/extensions.js
require('./extensions/es5'); require('./extensions/json'); // Based on Crockford's http://javascript.crockford.com/inheritance.html if (!Function.prototype.inherits) { Function.prototype.inherits = function (parent) { // Use new instance of parent as prototype var d = {}, p = (this.prototype = new parent());...
require('./extensions/es5'); require('./extensions/json'); // Based on Crockford's http://javascript.crockford.com/inheritance.html if (!Function.prototype.inherits) { Function.prototype.inherits = function (parent, constructorMembers) { // Use new instance of parent as prototype var d = {}, p = (this.protot...
Add optional initialization hash to `inherits`
Add optional initialization hash to `inherits`
JavaScript
mit
knuton/hobbes,knuton/hobbes,knuton/hobbes,knuton/hobbes
7b7739a4df8788cb1f163e0ad8fedf01f0a55071
app/js/app.js
app/js/app.js
window.ContactManager = { Models: {}, Collections: {}, Views: {}, start: function(data) { var contacts = new ContactManager.Collections.Contacts(data.contacts), router = new ContactManager.Router(); router.on('route:home', function() { router.navigate('contacts', { trigger: true,...
window.ContactManager = { Models: {}, Collections: {}, Views: {}, start: function(data) { var contacts = new ContactManager.Collections.Contacts(data.contacts), router = new ContactManager.Router(); router.on('route:home', function() { router.navigate('contacts', { trigger: true,...
Add new contact on form submitted
Add new contact on form submitted
JavaScript
mit
dmytroyarmak/backbone-contact-manager,SomilKumar/backbone-contact-manager,EaswarRaju/angular-contact-manager,vinnu-313/backbone-contact-manager,SomilKumar/backbone-contact-manager,giastfader/backbone-contact-manager,vinnu-313/backbone-contact-manager,hrundik/angular-contact-manager,giastfader/backbone-contact-manager,h...
15ee70dd5bfaa06eedfda8a75f6c7c796c6bbd2a
bot/utilities/media.js
bot/utilities/media.js
var settings = require(process.cwd() + '/settings.js').settings; var request = require('request'); module.exports.currentLink = ""; module.exports.currentName = ""; module.exports.currentID = ""; module.exports.currentType = ""; module.exports.currentDJName = ""; module.exports.getLink = function(bot, callback) { va...
var settings = require(process.cwd() + '/settings.js').settings; var request = require('request'); module.exports.currentLink = ""; module.exports.currentName = ""; module.exports.currentID = ""; module.exports.currentType = ""; module.exports.currentDJName = ""; module.exports.getLink = function(bot, callback) { va...
Add fallback if invalid or no Soundcloud API key is set
Add fallback if invalid or no Soundcloud API key is set
JavaScript
mit
coryshaw1/SteveBot,the2hill/TonerBot
061d634b72d081d49532be98e2248f14bf7112d6
quick-sort.js
quick-sort.js
// Program to sort an array using recursion function quickSort(arr) { if(arr.length == 0) { return []; } var left = [], right = [], pivot = arr[0]; for(var i = 1; i < arr.length; i++) { if(arr[i] < pivot) { left.push(arr[i]); } else { right.push(arr[i]); } } return quickSort(left).concat(pivot, quic...
// Program to sort an array using recursion function quickSort(arr) { if(arr.length == 0) { return []; } var left = [], right = [], pivot = arr[0]; // compare first element in array to the rest for(var i = 1; i < arr.length; i++) { // if element being looked at is less than first element, put it in left array...
Add pseudocode to quick sort function
Add pseudocode to quick sort function
JavaScript
mit
derekmpham/interview-prep,derekmpham/interview-prep
cf2cde301e150254d023068d79d8bcc2e959fb4d
server.js
server.js
/** hapijs default hello world **/ 'use strict'; const Hapi = require('hapi'); // Create a server with a host and port const server = new Hapi.Server(); server.connection({ host: 'localhost', port: 8000 }); // Add the route server.route({ method: 'GET', path:'/hello', handler: function (request,...
/** hapijs default hello world **/ 'use strict'; const Hapi = require('hapi'); // Create a server with a host and port const server = new Hapi.Server(); server.connection({ port: 8000 }); // Add the route server.route({ method: 'GET', path:'/hello', handler: function (request, reply) { retu...
Remove host from hapijs so it is not binding to a specific host
Remove host from hapijs so it is not binding to a specific host
JavaScript
mit
ResistanceCalendar/resistance-calendar-api,ResistanceCalendar/resistance-calendar-api
dbefbfdc2dc8645899c4af16cf0cbcd765070554
server.js
server.js
<<<<<<< HEAD var port = process.env.PORT || 8080; var StaticServer = require('static-server'); var server = new StaticServer({ rootPath: '.', // required, the root of the server file tree port: port, // optional, defaults to a random port ======= var StaticServer = require('static-server');...
var port = process.env.PORT || 8080; var StaticServer = require('static-server'); var server = new StaticServer({ rootPath: '.', // required, the root of the server file tree port: port, // optional, defaults to a random port cors: '*', // optional, defaults to undefined ...
Use port env to keep heroku happy
Use port env to keep heroku happy
JavaScript
mit
orangedrink/head-game,orangedrink/head-game
8f62c8e39c747e88b28498e1bc44204340479dc5
server.js
server.js
const path = require('path') const express = require('express') const app = express() const port = process.env.PORT ? process.env.PORT : 8081 const dist = path.join(__dirname, 'public') function ensureSecure(req, res, next) { // eslint-disable-line if (req.secure) { return next() } res.redirect(`https://...
const path = require('path') const express = require('express') const app = express() const port = process.env.PORT ? process.env.PORT : 8081 const dist = path.join(__dirname, 'public') app.use(express.static(dist)) app.all('/*', function (req, res, next) { // eslint-disable-line if (/^http$/.test(req.protocol))...
Update ensure secure express middleware
Update ensure secure express middleware
JavaScript
mit
developer239/workbox-webpack-react,developer239/workbox-webpack-react
ef0394aa91480462ebee8857d2f35fdd40402c9a
app/assets/javascripts/conversations.js
app/assets/javascripts/conversations.js
var conversations = { onRespondLaterClick: function() { var $listItem = $(this).parents('.conversation-row').parent(); var path = $(this).attr('data-account-conversation-path'); var pushToEndOfQueue = function() { var $list = $listItem.parent(); $listItem.remove().appendTo($list); } ...
var conversations = { onRespondLaterClick: function() { var $listItem = $(this).parents('.conversation-row').parent(); var path = $(this).attr('data-account-conversation-path'); var pushToEndOfQueue = function() { var $list = $listItem.parent(); $listItem.remove().appendTo($list); } ...
Make sure the info button works with turbolinks
Make sure the info button works with turbolinks
JavaScript
agpl-3.0
asm-helpful/helpful-web,asm-helpful/helpful-web,asm-helpful/helpful-web,asm-helpful/helpful-web
9a6ce516d1e96f5c9f5d54e07f94a9d68783ec4d
app/components/partials/Footer/index.js
app/components/partials/Footer/index.js
import React from 'react'; const styles = { footer: { padding: '10px', position: 'fixed', left: '0px', bottom: '0px', height: '45px', width: '100%', background: 'linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 1))', }, }; function Footer() { return ( <footer style=...
import React from 'react'; import FlatButton from 'material-ui/FlatButton'; import Dialog from 'material-ui/Dialog'; const styles = { footer: { padding: '5px', position: 'fixed', left: '0px', display: 'flex', flexDirection: 'row', bottom: '0px', height: '50px', width: '100%', back...
Support button in the footer
Support button in the footer
JavaScript
mit
aaronlangford31/ruah-web,aaronlangford31/ruah-web
0a3cf3af3f6be773a2bbd56e4f6f8e28e7b07e77
web/jasmine/spec/specIntelliasTest.js
web/jasmine/spec/specIntelliasTest.js
describe("Checking correctly data in object projects", function() { it("Length of object should to equal 4", function() { expect(projects.length).toEqual(4) }); var i = 0; while(i < projects.length) { (function (project) { it('project "' + project.name + '" should be active', function () { ...
Deploy functionality related with testing.
Deploy functionality related with testing.
JavaScript
mit
sfedyna/test-intellias,sfedyna/test-intellias,sfedyna/test-intellias
3836a6ede8f391a1039dd1aed2b82674bc1f94b5
assets/js/main.js
assets/js/main.js
function setStyle(style) { var range, sel; if (window.getSelection) { sel = window.getSelection(); if (sel.getRangeAt) { range = sel.getRangeAt(0); } document.designMode = "on"; if (range) { sel.removeAllRanges(); sel.addRange(range); } document.execCommand(style, fals...
function setStyle(style, param) { var range, sel; if (window.getSelection) { sel = window.getSelection(); if (sel.getRangeAt) { range = sel.getRangeAt(0); } document.designMode = "on"; if (range) { sel.removeAllRanges(); sel.addRange(range); } document.execCommand(styl...
Add function to add images by draggin from desktop
Add function to add images by draggin from desktop
JavaScript
mit
guilhermecomum/minimal-editor
d2337b21a2378d9ffb0243534338c8092ff78e63
src/app/services/navigationService.js
src/app/services/navigationService.js
'use strict'; var angular = require('angular'); module.exports = angular.module('myApp.services.navigationService', [ ]) .service('NavigationService', function ( ) { return { getMainNavItems: function () { return [ { title: 'Projects', url: '/#/', path: '/' }, { title: 'About', ...
'use strict'; var angular = require('angular'); module.exports = angular.module('myApp.services.navigationService', [ ]) .service('NavigationService', function ( ) { return { getMainNavItems: function () { return [ { title: 'Projects', url: '/#/', path: '/' }, { title: 'About', ...
Add play to the navigation
Add play to the navigation
JavaScript
mit
SirKettle/myPortfolio,SirKettle/myPortfolio
5b50833ca0595d0939d53e54dc289910431dbeb7
src/app/Chat/Message/MessageResult.js
src/app/Chat/Message/MessageResult.js
/* @flow */ import React from 'react' import type { MessageResult } from 'types' import styles from './style.css' type RollsProps = { rolls: Array<number> } const Rolls = (props: RollsProps) => { return <span> {props.rolls.map((roll, i, arr) => ( <span> <span className={styles.roll}> { ...
/* @flow */ import React from 'react' import type { MessageResult } from 'types' import styles from './style.css' type RollsProps = { rolls: Array<number> } const Rolls = (props: RollsProps) => { return <span> {props.rolls.map((roll, i, arr) => ( <span key={i}> <span className={styles.roll}> ...
Fix React warning regarding 'key' prop in render.
Fix React warning regarding 'key' prop in render.
JavaScript
mit
jsonnull/aleamancer,jsonnull/aleamancer
ec559a4be4b2dc852cfa7ca82d792918896801bd
src/fx.js
src/fx.js
// Zepto.js // (c) 2010, 2011 Thomas Fuchs // Zepto.js may be freely distributed under the MIT license. (function($, undefined){ var supportedTransforms = [ 'scale scaleX scaleY', 'translate', 'translateX', 'translateY', 'translate3d', 'skew', 'skewX', 'skewY', 'rotate', 'rot...
// Zepto.js // (c) 2010, 2011 Thomas Fuchs // Zepto.js may be freely distributed under the MIT license. (function($, undefined){ var supportedTransforms = [ 'scale scaleX scaleY', 'translate', 'translateX', 'translateY', 'translate3d', 'skew', 'skewX', 'skewY', 'rotate', 'rot...
Refactor usage cssProperties in $.fn.anim
Refactor usage cssProperties in $.fn.anim
JavaScript
mit
huaziHear/zepto,Genie77998/zepto,zhangwei001/zepto,fbiz/zepto,wubian0517/zepto,yuhualingfeng/zepto,alatvanas9/zepto,treejames/zepto,nerdgore/zepto,afgoulart/zepto,kolf/zepto,assgod/zepto,wanglam/zepto,dajbd/zepto,wanglam/zepto,leolin1229/zepto,zhangwei001/zepto,vincent1988/zepto,GerHobbelt/zepto,zhengdai/zepto,GerHobbe...
27bf060e5aa061b748b8e20deb7215e800c9c249
client/config/index.js
client/config/index.js
'use strict' // see http://vuejs-templates.github.io/webpack for documentation. const path = require('path') module.exports = { build: { env: require('./prod.env'), index: path.resolve(__dirname, '../dist/index.html'), assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', ...
'use strict' // see http://vuejs-templates.github.io/webpack for documentation. const path = require('path') module.exports = { build: { env: require('./prod.env'), index: path.resolve(__dirname, '../dist/index.html'), assetsRoot: path.resolve(__dirname, '../dist'), assetsSubDirectory: 'static', ...
Change port for client development
Change port for client development
JavaScript
agpl-3.0
1element/sc,1element/sc,1element/sc
1039880516112abc388e660ab8e6cb782deea42e
clients/web/js/util.js
clients/web/js/util.js
// Copyright 2015 The Vanadium Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. module.exports = { shortName: shortName, firstShortName: firstShortName, randomHex: randomHex }; // Note, shortName and firstShortName are duplicat...
// Copyright 2015 The Vanadium Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. var security = require('vanadium').security; module.exports = { shortName: shortName, firstShortName: firstShortName, randomHex: randomHex }; // N...
Fix chat to use security.ChainSeperator instead of hard-coded value.
Fix chat to use security.ChainSeperator instead of hard-coded value. Change-Id: Ie83886089e802cad27d69df8b53b421f6a2aef72
JavaScript
bsd-3-clause
vanadium/chat,vanadium/chat,vanadium/chat,vanadium/chat,vanadium/chat
2298e7cc99cd4d9c68c963046049969b0a076754
generators/app/templates/Component.js
generators/app/templates/Component.js
import React, { Component } from 'react'; import s from './<%= componentName %>.scss'; import withStyles from '../withStyles'; class <%= componentName %> extends Component { render() { return <div></div>; } } export default withStyles(<%= componentName %>, s);
import React, { Component } from 'react'; <% if (componentStyleExtension !== 'none') { -%> import withStyles from '../withStyles'; import s from './LoginPage.scss'; <% } -%> class <%= componentName %> extends Component { render() { return <div></div>; } } <% if (componentStyleExtension !== 'none') { -%> exp...
Fix importing styles where there's none
Fix importing styles where there's none
JavaScript
mit
gfpacheco/generator-react-starter-kit-component
1f6fb464187db286087d2ec5a4c954c28c31e624
spec/mobiread_test.js
spec/mobiread_test.js
var loadFileUrl = function (url) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, false); // synchronous // retrieve data unprocessed as a binary string xhr.overrideMimeType("text/plain; charset=x-user-defined"); xhr.send(); if (xhr.status === 200) { return xhr.response; // Note:...
var loadFileUrl = function (url) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, false); // synchronous // retrieve data unprocessed as a binary string xhr.overrideMimeType("text/plain; charset=x-user-defined"); xhr.send(); if (xhr.status === 200) { return xhr.response; // Note:...
Update location of local test file
Update location of local test file
JavaScript
mit
daviddrysdale/jsebook,daviddrysdale/jsebook
11d1ad864ca23f9c5243ab85a015168e0a9faa34
src/templates/infinite-scroll-link.js
src/templates/infinite-scroll-link.js
import React from 'react' import Link from 'gatsby-link' export default class InfiniteScrollLink extends React.Component { constructor (props) { super(props) const observerOptions = { root: null, rootMargin: '0px', threshold: 0.25 } this.observerCallback = this.observerCallback.bi...
import React from 'react' import Link from 'gatsby-link' export default class InfiniteScrollLink extends React.Component { constructor (props) { super(props) const observerOptions = { root: null, rootMargin: '0px', threshold: 0.25 } const callback = props.callback || (() => {}) ...
Define a maximum number of calls to get more events; Request user action before requesting more; Remove unnecessary use of component state.
Define a maximum number of calls to get more events; Request user action before requesting more; Remove unnecessary use of component state.
JavaScript
mit
LuisLoureiro/placard-wrapper
8d2e3aa557a754275062b829e74b71e98a162c6f
src/pages/workshops/drafts.js
src/pages/workshops/drafts.js
import React, { Fragment } from 'react' import Link from 'gatsby-link' import styled from 'styled-components' import { Container, Flex, Heading } from '@hackclub/design-system' import storage from '../../storage' import BG from '../../components/BG' import Sheet from '../../components/Sheet' import FeatherIcon from '....
import React, { Fragment } from 'react' import Link from 'gatsby-link' import styled from 'styled-components' import { Container, Flex, Box, Heading, Text } from '@hackclub/design-system' import ReactMarkdown from 'react-markdown' import storage from '../../storage' import BG from '../../components/BG' import Sheet fr...
Add body to draft card
Add body to draft card
JavaScript
mit
hackclub/website,hackclub/website,hackclub/website
a85a6deefa094d1a79c9cdd7c7342605e6c27dda
js/functions.js
js/functions.js
function statusIdToText(id) { if(id==0) { return 'Offline'; } else if(id==1) { return 'Available'; } else if(id==2) { return 'Away'; } else if(id==3){ return 'Occupied'; } } function getCurrentTimestamp(){ return Date.now(); } function timestampToTimeOfDay(timestam...
function statusIdToText(id) { if(id==0) { return 'Offline'; } else if(id==1) { return 'Available'; } else if(id==2) { return 'Away'; } else if(id==3){ return 'Occupied'; } } function getCurrentTimestamp(){ return Date.now() / 1000; } function timestampToTimeOfDay(t...
Fix timestamp function to give seconds
Fix timestamp function to give seconds
JavaScript
mit
perrr/svada,perrr/svada
274137fa8f11c6b53071c625ace15cffad526e9c
examples/client/services/account.js
examples/client/services/account.js
angular.module('MyApp') .factory('Account', ['$http', '$window', function($http, $window) { return { getUserInfo: function() { return $http.get('/api/me?token=' + $window.localStorage.token); } }; }]);
angular.module('MyApp') .factory('Account', ['$http', '$window', function($http, $window) { return { getUserInfo: function() { return $http.get('/api/me'); } }; }]);
Remove token querystring from API call
Remove token querystring from API call
JavaScript
mit
peterkim-ijet/satellizer,xxryan1234/satellizer,celrenheit/satellizer,jayzeng/satellizer,shikhardb/satellizer,maciekrb/satellizer,NikolayGalkin/satellizer,hsr-ba-fs15-dat/satellizer,amitport/satellizer,ELAPAKAHARI/satellizer,ELAPAKAHARI/satellizer,celrenheit/satellizer,redwood-strategic/satellizer,david300/satellizer,EL...
c109f3bb3d6eac0a3fd2a39717c5d34a27678567
landing/utils/auth/login/login.controller.js
landing/utils/auth/login/login.controller.js
(() => { 'use strict'; angular .module('app') .controller('LoginController', LoginController); LoginController.$inject = ['growl', '$window', '$http', '$routeSegment', 'TokenService', 'Endpoints']; function LoginController(growl, $window, $http, $routeSegment, TokenService, Endpoints)...
(() => { 'use strict'; angular .module('app') .controller('LoginController', LoginController); LoginController.$inject = ['growl', '$window', '$http', '$routeSegment', 'TokenService', 'Endpoints']; function LoginController(growl, $window, $http, $routeSegment, TokenService, Endpoints)...
Fix bug with reloading on Login page
Fix bug with reloading on Login page
JavaScript
mit
royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app
d2f2523243a192a5d03dae1c1b33a6cdccc27c04
src/assets/scripts/service-worker/service-worker.js
src/assets/scripts/service-worker/service-worker.js
// JavaScript Document // Scripts written by YOURNAME @ YOURCOMPANY // no service worker for previews self.addEventListener("fetch", (event) => { if (event.request.url.match(/preview=true/)) { return; } }); // set up caching toolbox.precache(["/", "../media/logo.svg", "../media/spritesheet.svg", "../...
// JavaScript Document // Scripts written by YOURNAME @ YOURCOMPANY // no service worker for previews self.addEventListener("fetch", (event) => { if (event.request.url.match(/preview=true/)) { return; } }); // set up caching toolbox.precache(["/", "../media/logo.svg", "../media/spritesheet.svg", "../...
Correct order of files to cache
Correct order of files to cache
JavaScript
mit
JacobDB/new-site,revxx14/new-site,JacobDB/new-site,revxx14/new-site,JacobDB/new-site
575b107f092032f04d0169400d04e978449ac4af
src/devtools/model.js
src/devtools/model.js
// @flow import type {Snapshot, SnapshotItem} from 'redux-ship'; export type State = { logs: {action: mixed, snapshot: Snapshot<mixed, mixed>}[], selectedLog: ?number, selectedSnapshotItem: ?SnapshotItem<mixed, mixed>, }; export const initialState: State = { logs: [], selectedLog: null, selectedSnapshotIt...
// @flow import type {Snapshot, SnapshotItem} from 'redux-ship'; export type State = { logs: {action: mixed, snapshot: Snapshot<mixed, mixed>}[], selectedLog: ?number, selectedSnapshotItem: ?SnapshotItem<mixed, mixed>, }; export const initialState: State = { logs: [], selectedLog: null, selectedSnapshotIt...
Fix bug to display the default snapshot item
Fix bug to display the default snapshot item
JavaScript
mit
clarus/redux-ship-devtools,clarus/redux-ship-devtools
9d12bf2ed95636b177dd3674a2e00f46b8efda2c
routes/priority_service_170315/intro/steps.js
routes/priority_service_170315/intro/steps.js
module.exports = { '/': { backLink: '/../priority_service_170301/filter/uncancelled', next: '/what-you-need' }, '/before-you-continue-overseas': { backLink: '/../priority_service_170301/overseas/uncancelled', next: '/what-you-need-overseas' }, '/what-you-need': { ...
module.exports = { '/': { backLink: '/../priority_service_170315/filter/uncancelled', next: '/what-you-need' }, '/before-you-continue-overseas': { backLink: '/../priority_service_170315/overseas/uncancelled', next: '/what-you-need-overseas' }, '/what-you-need': { ...
Fix back links in intro
Fix back links in intro
JavaScript
mit
UKHomeOffice/passports-prototype,UKHomeOffice/passports-prototype
4cea628e0c215f2a13489022068f6e38cab5aaa4
Libraries/Core/setUpReactRefresh.js
Libraries/Core/setUpReactRefresh.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * 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'; if (__DEV__) { const NativeDevSettings = require('../NativeModules/specs/NativeDevSettings'...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * 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'; if (__DEV__) { const DevSettings = require('../Utilities/DevSettings'); if (typeof DevSe...
Add reloadWithReason to Fast Refresh
Add reloadWithReason to Fast Refresh Summary: This diff adds reload reasons to Fast Refresh. This will help us understand why, for internal Facebook users, Fast Refresh is bailing out to a full reload so that we can improve it for everyone. Reviewed By: cpojer Differential Revision: D17499348 fbshipit-source-id: b6...
JavaScript
bsd-3-clause
pandiaraj44/react-native,myntra/react-native,pandiaraj44/react-native,hammerandchisel/react-native,exponent/react-native,javache/react-native,facebook/react-native,javache/react-native,hammerandchisel/react-native,janicduplessis/react-native,javache/react-native,exponentjs/react-native,arthuralee/react-native,janicdupl...
d8b9ff420d60510c8d74de728923a60af78677b4
node_modules_build/kwf-webpack/trl/trl-html-webpack-plugin.js
node_modules_build/kwf-webpack/trl/trl-html-webpack-plugin.js
'use strict'; var HtmlWebpackPlugin = require('html-webpack-plugin'); var fs = require('fs'); class TrlHtmlWebpackPlugin extends HtmlWebpackPlugin { htmlWebpackPluginAssets(compilation, chunks) { let language = this.options.language; let ret = super.htmlWebpackPluginAssets(compilation, chunks); ...
'use strict'; var HtmlWebpackPlugin = require('html-webpack-plugin'); var fs = require('fs'); class TrlHtmlWebpackPlugin extends HtmlWebpackPlugin { htmlWebpackPluginAssets(compilation, chunks) { let language = this.options.language; let ret = super.htmlWebpackPluginAssets(compilation, chunks); ...
Fix trl: Don't access filesystem, file doesn't get written when using dev-server
Fix trl: Don't access filesystem, file doesn't get written when using dev-server
JavaScript
bsd-2-clause
koala-framework/koala-framework,koala-framework/koala-framework
3067aa2d3c4beb1a2aca4ff59d7d2b88d33c8b84
app/components/gh-content-view-container.js
app/components/gh-content-view-container.js
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'section', classNames: ['gh-view', 'content-view-container'], previewIsHidden: false, resizeService: Ember.inject.service(), calculatePreviewIsHidden: function () { if (this.$('.content-preview').length) { ...
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'section', classNames: ['gh-view', 'content-view-container'], previewIsHidden: false, resizeService: Ember.inject.service(), _resizeListener: null, calculatePreviewIsHidden: function () { if (this.$('.conten...
Fix teardown of resize handler in content management screen
Fix teardown of resize handler in content management screen refs #5659 ([comment](https://github.com/TryGhost/Ghost/issues/5659#issuecomment-137114898)) - cleans up resize handler on willDestroy hook of gh-content-view-container
JavaScript
mit
TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin,kevinansfield/Ghost-Admin,acburdine/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,TryGhost/Ghost-Admin,JohnONolan/Ghost-Admin,acburdine/Ghost-Admin,dbalders/Ghost-Admin,airycanon/Ghost-Admin
2d5eeac4f046d09d7f2bab77f7f65a89a84d5f46
app/js/components/service_edit_attribute.js
app/js/components/service_edit_attribute.js
'use strict'; $(document).ready(function() { function enableOrDisableAttributeField() { var rows = $(this) .parents('.attribute-row-wrapper') .find('.form-row'); if ($(this).is(':checked')) { rows.removeClass('disabled'); var motivation = rows.find(...
'use strict'; $(document).ready(function() { function enableOrDisableAttributeField() { var rows = $(this) .parents('.attribute-row-wrapper') .find('.form-row'); if ($(this).is(':checked')) { rows.removeClass('disabled'); var motivation = rows.find(...
Fix service edit javascript bug
Fix service edit javascript bug The value that was set was overwritten directly.
JavaScript
apache-2.0
SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard
62b7d5f8a318de1ab1a9656e063127ae1377dae5
waffle/templates/waffle/waffle.js
waffle/templates/waffle/waffle.js
(function(){ var FLAGS = { {% for flag, value in flags %}'{{ flag }}': {% if value %}true{% else %}false{% endif %}{% if not forloop.last %},{% endif %}{% endfor %} }, SWITCHES = { {% for switch, value in switches %}'{{ switch }}': {% if value %}true{% else %}false{% endif %}{% if not forloop.last %},...
(function(){ var FLAGS = { {% for flag, value in flags %}'{{ flag }}': {% if value %}true{% else %}false{% endif %}{% if not forloop.last %},{% endif %}{% endfor %} }, SWITCHES = { {% for switch, value in switches %}'{{ switch }}': {% if value %}true{% else %}false{% endif %}{% if not forloop.last %},...
Add get_flags method to access all flags
Add get_flags method to access all flags
JavaScript
bsd-3-clause
webus/django-waffle,groovecoder/django-waffle,mwaaas/django-waffle-session,engagespark/django-waffle,webus/django-waffle,ilanbm/django-waffle,rodgomes/django-waffle,rlr/django-waffle,rodgomes/django-waffle,rlr/django-waffle,JeLoueMonCampingCar/django-waffle,crccheck/django-waffle,groovecoder/django-waffle,isotoma/djang...
9ec283d23a5c7f85e47e0e6ea8f78dce74d756c4
src/main/webapp/controllers/maincontroller.js
src/main/webapp/controllers/maincontroller.js
ords.controller('mainController', function($rootScope,$location, User, Project) { // // If we're not logged in, redirect to login // $rootScope.user = User.get( function successCallback() { $rootScope.loggedIn="yes" // // Load initial projects // Project.query({}, function(data)...
ords.controller('mainController', function(AuthService) { // // Conduct auth check // AuthService.check(); });
Use AuthService rather than custom controller code
Use AuthService rather than custom controller code
JavaScript
apache-2.0
ox-it/ords-ui,ox-it/ords-ui,ox-it/ords-ui,ox-it/ords-ui,ox-it/ords-ui
8e90194f7d38136be48bfebc8fc3c45d88dbc2d6
shells/browser/shared/src/renderer.js
shells/browser/shared/src/renderer.js
/** * In order to support reload-and-profile functionality, the renderer needs to be injected before any other scripts. * Since it is a complex file (with imports) we can't just toString() it like we do with the hook itself, * So this entry point (one of the web_accessible_resources) provcides a way to eagerly injec...
/** * In order to support reload-and-profile functionality, the renderer needs to be injected before any other scripts. * Since it is a complex file (with imports) we can't just toString() it like we do with the hook itself, * So this entry point (one of the web_accessible_resources) provcides a way to eagerly injec...
Add comment about 3rd party integrations
Add comment about 3rd party integrations
JavaScript
mit
facebook/react,TheBlasfem/react,mosoft521/react,terminatorheart/react,acdlite/react,acdlite/react,jzmq/react,chenglou/react,Simek/react,facebook/react,jzmq/react,flarnie/react,yungsters/react,rricard/react,flarnie/react,flarnie/react,camsong/react,ericyang321/react,tomocchino/react,Simek/react,camsong/react,camsong/rea...
b9f5c1d83112dd6cd4ac4ccfb3d1d7e2d74c072e
public/app/scripts/services/user.js
public/app/scripts/services/user.js
angular.module('publicApp').service('UserService', ['$http','$location', function($http, $location) { var user = { isLogged: false, username: '', login: function(username, password) { user = this $http.post('/api/v1/sessions', { name: username, password: password }).success(function(r...
angular.module('publicApp').service('UserService', ['$http','$location', function($http, $location) { var user = { isLogged: false, username: '', updateSession: function(fn){ $http.get('/api/v1/sessions').success(function(resp){ console.log('response') console.log(resp) if (...
Add the updateSession method to the UserService
[FEATURE] Add the updateSession method to the UserService
JavaScript
isc
zealord/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,zealord/gatewayd
142e8924e238a5eeae8a74a826ea3f66a21d969b
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Add bootstrap-sprockets to js manifest
Add bootstrap-sprockets to js manifest
JavaScript
mit
RomanovRoman/react-webpack-rails-tutorial,justin808/react-webpack-rails-tutorial,stevecj/term_palette_maker,stevecj/term_palette_maker,thiagoc7/react-webpack-rails-tutorial,RomanovRoman/react-webpack-rails-tutorial,StanBoyet/react-webpack-rails-tutorial,csterritt/react-webpack-rails-tutorial,csmalin/react-webpack-rails...
df1e74ea954460dd0379a11017d52d31b3f7df6c
src/scripts/config.js
src/scripts/config.js
'use strict'; module.exports = { CATEGORY_NAME_MAXLENGTH: 20, NOTE_TITLE_MAXLENGTH: 20, NOTE_BODY_MAXLENGTH: 500, UNSPECIFIED_CATEGORY_NAME: 'Unspecified' };
'use strict'; module.exports = { CATEGORY_NAME_MAXLENGTH: 20, NOTE_TITLE_MAXLENGTH: 20, NOTE_BODY_MAXLENGTH: 1000, UNSPECIFIED_CATEGORY_NAME: 'Unspecified' };
Increase note body max length
Increase note body max length
JavaScript
mit
iuux/adrx-quicknotes,iuux/adrx-quicknotes
a353142806098899952ebaa5dfb799411422948a
test/unit/prototype/detach.js
test/unit/prototype/detach.js
/* eslint-env jasmine */ var editTypes = require('../helpers/edit-types') var makeEditableElement = ('../helpers/make-editable-element') var Edited = require('../../..') describe('`detach` method', function () { it('detaches the instance\'s event listener from the instance\'s element', function () { var elem...
/* eslint-env jasmine */ var editTypes = require('../helpers/edit-types') var makeEditableElement = require('../helpers/make-editable-element') var Edited = require('../../..') describe('`detach` method', function () { it('detaches the instance\'s event listener from the instance\'s element', function () { v...
Fix typo in unit test
Fix typo in unit test
JavaScript
bsd-3-clause
PolicyStat/edited
0244e6d127837776eff2605fdd4d067eee8930d2
elements/uql-apps-button/uql-apps-button.js
elements/uql-apps-button/uql-apps-button.js
(function () { Polymer({ is: 'uql-apps-button', properties: { /** Whether to display title of the button */ showTitle: { type: Boolean, value: true }, /** Button title text */ buttonTitle: { type: String, value: "My Library" }, /** Val...
(function () { Polymer({ is: 'uql-apps-button', properties: { /** Whether to display title of the button */ showTitle: { type: Boolean, value: true }, /** Button title text */ buttonTitle: { type: String, value: "My Library" }, /** Val...
Change My Library auth url
Change My Library auth url
JavaScript
mit
uqlibrary/uqlibrary-reusable-components,uqlibrary/uqlibrary-reusable-components,uqlibrary/uqlibrary-reusable-components
47359eac53865925a8e97c5dffc7d064da7858ed
src/js/app/modules/user/RegisterController.js
src/js/app/modules/user/RegisterController.js
/** * Registers a new user. After signing up, the user gets an activation code per mail. With this * code, the user can activate his account. */ app.controller('RegisterController', function($scope, $location, $http){ // $scope.user = { // username: "henkie", // fullname: "Henkie Henk", // email: "hen...
/** * Registers a new user. After signing up, the user gets an activation code per mail. With this * code, the user can activate his account. */ app.controller('RegisterController', function($scope, $location, $http){ // $scope.user = { // username: "henkie", // fullname: "Henkie Henk", // email: "hen...
Use url encoded form data in http request
Use url encoded form data in http request
JavaScript
mit
tuvokki/hunaJS,tuvokki/hunaJS
1eda62d0824e7f903d031429f1a029b1ba091a28
tests/dummy/config/targets.js
tests/dummy/config/targets.js
/* eslint-env node */ module.exports = { browsers: [ 'ie 9', 'last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions' ] };
/* eslint-env node */ 'use strict'; const browsers = [ 'last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions' ]; const isCI = !!process.env.CI; const isProduction = process.env.EMBER_ENV === 'production'; if (isCI || isProduction) { browsers.push('ie 11'); } module.exports = { brows...
Drop support for IE9 and IE10 in dummy app
Drop support for IE9 and IE10 in dummy app
JavaScript
mit
jonathanKingston/ember-cli-eslint,ember-cli/ember-cli-eslint,jonathanKingston/ember-cli-eslint,ember-cli/ember-cli-eslint
22fa345844216bd692b62692b91d19e83b2565e1
tests/reducers/errors-test.js
tests/reducers/errors-test.js
import errors from '../../src/reducers/errors'; import { GET_DATA_FAILED } from '../../src/actions/data'; describe('errors reducer', () => { describe(`action type ${GET_DATA_FAILED}`, () => { it('returns the error passed in an errors array', () => { expect(errors([], { type: GET_DATA_FAILED, ...
import errors from '../../src/reducers/errors'; import { GET_DATA_FAILED } from '../../src/actions/data'; describe('errors reducer', () => { describe(`action type ${GET_DATA_FAILED}`, () => { it('returns the error passed in an errors array', () => { expect(errors([], { type: GET_DATA_FAILED, ...
Cover two uncovered lines in error reducer test
Cover two uncovered lines in error reducer test [skip ci]
JavaScript
mit
bjacobel/react-redux-boilerplate,bjacobel/rak,bjacobel/react-redux-boilerplate,bjacobel/rak,bjacobel/rak
902d7e748e7f20ab64c60ff4b1c8b3bc55881ce7
greatbigcrane/media/js/jquery.lineeditor.js
greatbigcrane/media/js/jquery.lineeditor.js
(function($) { jQuery.fn.lineeditor = function (options, callback) { return this.each(function () { var el = this; var $el = $(this); if ( el.nodeName.toLowerCase() != 'textarea' ) { return; } var hidden = $('<input type="hidden"/>').attr('id', el.id); var contain...
(function($) { jQuery.fn.lineeditor = function (options, callback) { return this.each(function () { var el = this; var $el = $(this); if ( el.nodeName.toLowerCase() != 'textarea' ) { return; } var hidden = $('<input type="hidden"/>').attr('id', el.id); var contain...
Make sure the input value is kept up-to-date ...
Make sure the input value is kept up-to-date ...
JavaScript
apache-2.0
pnomolos/greatbigcrane,pnomolos/greatbigcrane
0ec75f2cc954d2012d7be5cc1301f6153989b4de
modules/drinks/client/controllers/list-drinks.client.controller.js
modules/drinks/client/controllers/list-drinks.client.controller.js
(function () { 'use strict'; angular .module('drinks', ['ngAnimate', 'toastr']) .controller('DrinksListController', DrinksListController); DrinksListController.$inject = ['DrinksService', '$state' , '$scope', 'toastr']; function DrinksListController(DrinksService, $state, $scope, toastr) { var vm...
(function () { 'use strict'; angular .module('drinks', ['ngAnimate', 'toastr']) .controller('DrinksListController', DrinksListController); DrinksListController.$inject = ['DrinksService', '$state' , '$scope', 'toastr']; function DrinksListController(DrinksService, $state, $scope, toastr) { var vm...
Comment and toast delete tested
Comment and toast delete tested
JavaScript
mit
UF-SE-3B/SwampHead-Brewery,UF-SE-3B/SwampHead-Brewery,UF-SE-3B/SwampHead-Brewery
6eecd63cbe03ce0b0373b5a616621a1305071d25
examples/instances.js
examples/instances.js
var instances = require('./../taillard'); var NEH = require('./../neh'); // Iterate over filtered Taillard instances var filteredInstances = instances.filter(50, 20); for(var i = 0; i < filteredInstances.length; i++) { console.log(' name:', filteredInstances[i].name); console.log(' number of...
var instances = require('./../taillard'); var NEH = require('./../neh'); var seed = require('./../seed-random'); // Iterate over filtered Taillard instances var filteredInstances = instances.filter(50, 20); for(var i = 0; i < filteredInstances.length; i++) { // Overwrite Math.random by number generator with seed ...
Use number generator with seed
Use number generator with seed
JavaScript
mit
manfredbork/flowshop
88fb80bb09b7f73c27eff9e2bc5dc4551fdf8b71
src/main/webapp/scripts/app/app.constants.js
src/main/webapp/scripts/app/app.constants.js
"use strict"; // DO NOT EDIT THIS FILE, EDIT THE GRUNT TASK NGCONSTANT SETTINGS INSTEAD WHICH GENERATES THIS FILE angular.module('publisherApp') .constant('ENV', 'dev') .constant('VERSION', '1.1.3-SNAPSHOT') ;
"use strict"; // DO NOT EDIT THIS FILE, EDIT THE GRUNT TASK NGCONSTANT SETTINGS INSTEAD WHICH GENERATES THIS FILE angular.module('publisherApp') .constant('ENV', 'dev') .constant('VERSION', '1.1.4-SNAPSHOT') ;
Update ngconstant version after releasing
Update ngconstant version after releasing
JavaScript
apache-2.0
EsupPortail/esup-publisher,EsupPortail/esup-publisher,GIP-RECIA/esup-publisher-ui,EsupPortail/esup-publisher,GIP-RECIA/esup-publisher-ui,EsupPortail/esup-publisher,GIP-RECIA/esup-publisher-ui
5ef82e3cf4ee4d567a2a670278b1f93fe2cfe5e6
dev/_/components/js/singleSourceModel.js
dev/_/components/js/singleSourceModel.js
var AV = {} AV.source = Backbone.Model.extend({ url: 'redirect.php', defaults: { name: '', type: 'raw', contentType: 'txt', data: '' } });
var AV = {}; AV.source = Backbone.Model.extend({ url: 'redirect.php', defaults: { name: '', type: 'raw', contentType: 'txt', data: '' } });
Add missing semicolon, because JS is weird.
Add missing semicolon, because JS is weird.
JavaScript
bsd-3-clause
Swarthmore/juxtaphor,Swarthmore/juxtaphor
199aec30d6c5746f74f295f04c2509187ff0bcd5
src/directives/conversationControl.js
src/directives/conversationControl.js
;(function() { 'use strict'; angular.module('gebo-client-performatives.conversationControl', ['gebo-client-performatives.request', 'templates/server-reply-request.html', 'templates/client-reply-request.html', 'templates/server-propose-discharge-perform.html', ...
;(function() { 'use strict'; angular.module('gebo-client-performatives.conversationControl', ['gebo-client-performatives.request', 'templates/server-reply-request.html', 'templates/client-reply-request.html', 'templates/server-propose-discharge-perform.html', ...
Create a new scope for this directive
Create a new scope for this directive
JavaScript
mit
RaphaelDeLaGhetto/gebo-client-performatives
0fb5c958d6b210bfb1a55b9fb197b4c59e612951
server/app.js
server/app.js
const express = require('express'); const morgan = require('morgan'); const path = require('path'); const app = express(); // Setup logger app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms')); // Serve static assets app.use(expre...
const express = require('express'); const morgan = require('morgan'); const path = require('path'); const app = express(); // Setup logger app.use(morgan(':remote-addr - :remote-user [:date[clf]] ":method :url HTTP/:http-version" :status :res[content-length] :response-time ms')); // Serve static assets app.use(expre...
Change where the files are stored in the server
Change where the files are stored in the server
JavaScript
mit
escudero89/my-npc-manager,escudero89/my-npc-manager
82d5c2644f226b3f6e3403fd8234573691ab7917
web-app/js/smartR/Heatmap/heatmapValidator.js
web-app/js/smartR/Heatmap/heatmapValidator.js
//# sourceURL=heatmapValidator.js 'use strict'; /** * Heatmap Validator */ window.HeatmapValidator = (function() { var validator = { NO_SUBSET_ERR : 'No subsets are selected', NO_HD_ERR : 'No high dimension data is selected.', NUMERICAL_ERR : 'Input must be numeric' }; validato...
//# sourceURL=heatmapValidator.js 'use strict'; /** * Heatmap Validator */ window.HeatmapValidator = (function() { var validator = { NO_SUBSET_ERR : 'No subsets are selected', NO_HD_ERR : 'No high dimension data is selected.', NUMERICAL_ERR : 'Input must be numeric' }; validato...
Fix validator for existance of subsets
Fix validator for existance of subsets
JavaScript
apache-2.0
thehyve/heim-SmartR,thehyve/naa-SmartR,agapow/smartr,thehyve/heim-SmartR,agapow/smartr,agapow/smartr,thehyve/heim-SmartR,agapow/smartr,thehyve/naa-SmartR,thehyve/naa-SmartR,thehyve/heim-SmartR
f28561f4dcc6280c6f1b3bc3bbee3beb18209433
src/main/features/core/customStyle.js
src/main/features/core/customStyle.js
import fs from 'fs'; Emitter.on('FetchMainAppCustomStyles', () => { const mainAppPath = Settings.get('mainAppStyleFile'); const css = mainAppPath && fs.existsSync(mainAppPath) ? fs.readFileSync(mainAppPath, 'utf8') : ''; Emitter.sendToAll('LoadMainAppCustomStyles', css); }); Emitter.on('FetchGPMCustomStyles', (...
import fs from 'fs'; Emitter.on('FetchMainAppCustomStyles', () => { const mainAppPath = Settings.get('mainAppStyleFile'); if (mainAppPath && fs.existsSync(mainAppPath)) { fs.readFile(mainAppPath, 'utf8', (err, css) => { Emitter.sendToAll('LoadMainAppCustomStyles', err ? '' : css); }); } }); Emitte...
Handle dumb paths being given to the custom CSS tooling
Handle dumb paths being given to the custom CSS tooling
JavaScript
mit
petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MarshallOfSound/Google-Play...
261f74e6601be137fbd707884bd245e81215ae69
src/app/lib/feeder.js
src/app/lib/feeder.js
import events from 'events'; class Feeder extends events.EventEmitter { queue = []; pending = false; changed = false; constructor() { super(); this.on('change', () => { this.changed = true; }); } feed(data) { this.queue = this.queue.concat(data); ...
import events from 'events'; class Feeder extends events.EventEmitter { queue = []; pending = false; changed = false; constructor() { super(); this.on('change', () => { this.changed = true; }); } get state() { return { queue: this.queue....
Return the state object using getter
Return the state object using getter
JavaScript
mit
cncjs/cncjs,cncjs/cncjs,cheton/cnc.js,cheton/piduino-grbl,cheton/piduino-grbl,cheton/cnc,cheton/cnc.js,cheton/cnc.js,cncjs/cncjs,cheton/cnc,cheton/piduino-grbl,cheton/cnc
9d4d798038a75531741a31e1b5d62be0924c970e
components/box.js
components/box.js
import React from 'react' import PropTypes from 'prop-types' const Box = ({ children }) => ( <div> {children} <style jsx>{` @import 'colors'; div { background-color: $white; box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3); padding: 1.6em 2em; border-radius: 2px; ...
import React from 'react' import PropTypes from 'prop-types' const Box = ({ children, title }) => ( <div className='wrapper'> {title && <h3>{title}</h3>} <div className='inner'> {children} </div> <style jsx>{` @import 'colors'; .wrapper { background-color: $white; ...
Allow specifying a title to Box component
Allow specifying a title to Box component
JavaScript
mit
sgmap/inspire,sgmap/inspire
2e20144758ec8de935f924f70de092816422e770
components/pages/Create/CreatePage.js
components/pages/Create/CreatePage.js
/** * Created by allen on 02/06/2015. */ import React from "react"; import _Store from "../../../stores/_Store.js"; const defaultProps = { title : "New To Do | Mega awesome To Do List" }; export default React.createClass({ getDefaultProps : () => defaultProps, getInitialState : () => { ...
/** * Created by allen on 02/06/2015. */ import React from "react"; import _Store from "../../../stores/_Store.js"; const defaultProps = { title : "New To Do | Mega awesome To Do List" }; export default React.createClass({ getDefaultProps : () => defaultProps, getInitialState : () => { ...
Tidy up and apply bootstrap styles to the add to do task page.
Tidy up and apply bootstrap styles to the add to do task page.
JavaScript
mit
allenevans/react-isomorphic-demo
fbb128ca7c499d4ed3514554b9eba955c2860868
config/env/all.js
config/env/all.js
'use strict'; var path = require('path'); var rootPath = path.normalize(__dirname + '/../../..'); const REVIEW_STATE_FIELD = ''; // TODO: Adjust this to a new field GUID. module.exports = { root: rootPath, ip: process.env.IP || '0.0.0.0', port: process.env.PORT || 9000, cip: { baseURL: 'http://www.neao...
'use strict'; var path = require('path'); var rootPath = path.normalize(__dirname + '/../..'); const REVIEW_STATE_FIELD = ''; // TODO: Adjust this to a new field GUID. module.exports = { root: rootPath, ip: process.env.IP || '0.0.0.0', port: process.env.PORT || 9000, cip: { baseURL: 'http://www.neaonli...
Add license mapping to config
Add license mapping to config
JavaScript
mit
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
448cee0d641ec8b3f75774a339d3044d6a86c037
src/core/team-core.js
src/core/team-core.js
const {knex} = require('../util/database').connect(); import _ from 'lodash'; import {deepChangeKeyCase} from '../util'; function getTeams() { return knex.raw(`SELECT teams.id, teams.name, SUM(COALESCE(action_types.value, 0)) AS score FROM teams LEFT JOIN actions ON teams.id = actions.team_id LEFT JOIN action_...
const {knex} = require('../util/database').connect(); import _ from 'lodash'; import {deepChangeKeyCase} from '../util'; function getTeams() { return knex.raw(`SELECT teams.id, teams.name, teams.image_path, SUM(COALESCE(action_types.value, 0)) AS score FROM teams LEFT JOIN actions ON teams.id = actions.team_id ...
Return also teams.image_path from getTeams
Return also teams.image_path from getTeams
JavaScript
mit
futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend
70c1b3d7c216844748cc35bf1f71d23f568ce734
config/js/main.js
config/js/main.js
(function() { loadOptions(); submitHandler(); })(); function submitHandler() { var $submitButton = $('#submitButton'); $submitButton.on('click', function() { console.log('Submit'); var return_to = getQueryParam('return_to', 'pebblejs://close#'); document.location = return_to + encodeURIComponent(...
function submitHandler() { var $submitButton = $('#submitButton'); $submitButton.on('click', function() { console.log('Submit'); var return_to = getQueryParam('return_to', 'pebblejs://close#'); document.location = return_to + encodeURIComponent(JSON.stringify(getAndStoreConfigData())); }); } functi...
Add loadOptions and wrap submit logic.
Add loadOptions and wrap submit logic.
JavaScript
mit
nevraw/Fitbit-images,nevraw/Phi-Ocular,nevraw/Phi-Ocular,nevraw/Web,nevraw/Flux,nevraw/Quadrant,nevraw/Quadrant,nevraw/Edge,nevraw/Doodle,nevraw/Dual,nevraw/Test_Rocky,nevraw/Web,nevraw/IdentityCrisis,nevraw/Testing,nevraw/Quasar,nevraw/Testing,nevraw/SotoX,nevraw/Quasar,nevraw/Flux,nevraw/Doodle,nevraw/Flux,nevraw/Ide...