commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
69ca07299621212c295fc49e4a7c0b3881dba94f
Remove unused keys reference in format()
lib/format.js
lib/format.js
/** Format methods are **not directly available** on the API, but are used by the `Skematic.format()` function to modify provided data. @namespace Format */ /** Import utilities @ignore */ var is = require('mekanika-lsd/is'); var clone = require('mekanika-lsd/clone'); /** Import Skematic tools @igno...
JavaScript
0
@@ -3915,134 +3915,8 @@ );%0A%0A - // Keep a reference of datakeys (so we're not running this every loop)%0A var dkeys = opts.sparse ? Object.keys(data) : %5B%5D;%0A%0A //
4afa82d0cca58c8d23e28fcd0472f2a7ca022b4c
disable services named system
bridge/lib/bridge.js
bridge/lib/bridge.js
var defaultOptions = { url: 'http://localhost:8080/bridge', reconnect: true, log: 2, tcp: false }; // if node var util = require('./util.js'); var Connection = require('./connection.js').Connection; var Serializer = require('./serializer.js'); var Ref = require('./ref.js'); util.extend(defaultOptions, { h...
JavaScript
0.000001
@@ -3122,32 +3122,129 @@ ce, callback) %7B%0A + %0A if(name === %22system%22) %7B%0A util.error(%22Invalid service name: %22 + name);%0A return;%0A %7D%0A %0A var self = thi
2d089d136285d402187799cc5405747c0ecd2a46
use __dirname when finding jade files
lib/imghex.js
lib/imghex.js
// this is all about using jade, so, yah.., jade jade = require('jade'); // an ad-hoc minifier created with uglify minifier = require('./uglyMinifier').minifier; var exports = module.exports; exports.version = '0.0.1'; exports.clientMapTemplate = minifier(jade.compile("include hexMapMixin\nmixin hexMap(ranks, files...
JavaScript
0.000014
@@ -216,16 +216,167 @@ .0.1';%0A%0A +// note that we use __dirname to get the directory that this source file is in%0A// and use that to reference to the views folder to get to our includes%0A exports. @@ -612,17 +612,33 @@ lename: -' +__dirname + '/../ views/.'
9cb3fd8771206b36198510c17715184daa77d2a5
Fix minify source mapping, fixes #275 (#276)
lib/minify.js
lib/minify.js
var convert = require('convert-source-map') var uglify = require('uglify-es') var assert = require('assert') var path = require('path') // NOTE: This whole file is insanity. Uglify requires all sorts of mapping to // preserve source maps. Because of `common-shakeify` in our graph-scripts can // only operate on unminif...
JavaScript
0
@@ -106,138 +106,11 @@ t')%0A -var path = require('path')%0A%0A// NOTE: This whole file is insanity. Uglify requires all sorts of mapping to%0A// preserve source maps. +%0A// Bec @@ -114,19 +114,16 @@ Because -of %60common- @@ -156,19 +156,16 @@ ipts can -%0A// only op @@ -172,16 +172,19 @@ erate on +%0A// ...
516246404de95604faf1b54c5a6c730fd66d24dd
Allow upwards traversal of the original AST.
lib/parser.js
lib/parser.js
var assert = require("assert"); var types = require("./types"); var n = types.namedTypes; var b = types.builders; var Patcher = require("./patcher").Patcher; var Visitor = require("./visitor").Visitor; var normalizeOptions = require("./options").normalize; exports.parse = function(source, options) { options = norm...
JavaScript
0
@@ -53,24 +53,51 @@ %22./types%22);%0A +var Syntax = types.Syntax;%0A var n = type @@ -2366,28 +2366,36 @@ copyAst(node +, parent ) %7B%0A - if (type @@ -2543,16 +2543,18 @@ f Array) + %7B %0A @@ -2578,17 +2578,98 @@ map( -copyAst); +function(child) %7B%0A return copyAst(child, parent)...
06f694af1578f8bdc695403c8434594237c0230a
Fix a bug in computing the total number of warnings
lib/parser.js
lib/parser.js
var fs = require('fs'); var parse = require('parse-diff'); var warningsTotal = 0; function readFile(config, callback) { fs.readFile(config.file, "utf-8", function(err, data) { if (err) { console.error(err); callback(undefined); } else { findBug(data, config, func...
JavaScript
0.999508
@@ -69,20 +69,16 @@ ngsTotal - = 0 ;%0A%0Afunct @@ -106,24 +106,47 @@ callback) %7B%0A + warningsTotal = 0;%0A fs.readF @@ -461,24 +461,28 @@ callback) %7B%0A + %0A // Stor
c5be4639c6cd569bace5cabe8929a99551c577dd
Tweak parser options to work with Acorn.
lib/parser.js
lib/parser.js
var assert = require("assert"); var types = require("./types"); var n = types.namedTypes; var b = types.builders; var isObject = types.builtInTypes.object; var isArray = types.builtInTypes.array; var isFunction = types.builtInTypes.function; var Patcher = require("./patcher").Patcher; var normalizeOptions = require("./...
JavaScript
0
@@ -739,32 +739,55 @@ false%0A %7D);%0A%0A + var comments = %5B%5D;%0A var program @@ -842,32 +842,57 @@ loc: true,%0A + locations: true,%0A range: o @@ -920,32 +920,61 @@ comment: true,%0A + onComment: comments,%0A tolerant @@ -993,16 +993,40 @@ lerant,%0A + ...
83247302460be9ebdd10d7d61d78525d5aa6eec7
add connect options to clear deprecation warnings
lib/phobos.js
lib/phobos.js
'use strict'; const express = require('express'); const mongoose = require('mongoose'); const PhobosRouter = require('./router'); const TokenLib = require('./bearer'); class Phobos { constructor(options) { this._options = { port: 9292, appName: 'Phobos.js', bearerTokenSignature: null, b...
JavaScript
0
@@ -2823,32 +2823,156 @@ %7D);%0A %7D%0A%0A + const connectOptions = %7B%0A useNewUrlParser: true,%0A useUnifiedTopology: true,%0A useCreateIndex: true,%0A %7D%0A this.databas @@ -3006,33 +3006,22 @@ ri, -%7B useNewUrlParser: true %7D +connectOptions );%0A
533e1dca64fac02f880cbb6d5f8d4491c9730a82
fix up & down movement
lib/player.js
lib/player.js
'use strict'; const Vector = require('./vector.js'); function Player(pos) { this.pos = pos.plus(new Vector(0, -0.5)); this.size = new Vector(0.8, 1); this.speed = new Vector(0, 0); } Player.prototype.type = "player"; Player.prototype.act = function(step, level, keys) { this.moveX(step, level, keys); this...
JavaScript
0.000001
@@ -270,24 +270,25 @@ el, keys) %7B%0A +%0A this.moveX @@ -692,21 +692,18 @@ s.left) -%7B%0A +%7B this.sp @@ -724,22 +724,19 @@ rXSpeed; -%0A %7D%0A -%0A if (ke @@ -746,20 +746,16 @@ right) %7B -%0A this.sp @@ -776,18 +776,16 @@ rXSpeed; -%0A %7D%0A%0A le @@ -825,33 +825,32 @@ d.x * step...
954a61e87e9039a304fb7f1854274d366ad932d0
Set body to return root object.
lib/raspar.js
lib/raspar.js
var crypto = require('crypto'); var fs = require('fs'); var q = require('q'); var async = require('async'); var mkdirp = require('mkdirp'); var request = require('request'); var cheerio = require('cheerio'); module.exports.ttl = 60 * 60 * 24; module.exports.cacheDirectory = './temp/cache/'; module.exports._reques...
JavaScript
0
@@ -797,32 +797,39 @@ o.load(res.body) +.root() ;%0A%0A
767651297501d2fb9d4c75ebd803383b871e18f5
Change typeof check to proper check.
lib/reload.js
lib/reload.js
/* * Posible opts * port: A port to run the reload websocket on (as a number). (Optional) (Default: `8080`) * route: The route reload will create for the script file. (Optional) (Default `reload/reload.js`) * verbose: Will show logging on the server and client side. (Optional) (Default: `false`) */ function reload...
JavaScript
0
@@ -940,22 +940,24 @@ %5D) === ' -object +function ')) %7B%0A
b1eb088250bfe8c4ade7822de57b02650e9b6f4f
kill also session when SIGINT was triggered during init command - refs #746
lib/runner.js
lib/runner.js
var ConfigParser = require('./utils/ConfigParser'), request = require('request'), merge = require('deepmerge'), q = require('q'), WebdriverIO = require('../'), haltSIGINT = false, sigintWasCalled = false, hasSessionID = false; process.on('message', function(m) { switch(m.command) { ...
JavaScript
0
@@ -4942,72 +4942,313 @@ -if (sigintWasCalled) %7B%0A return process.exit(1 +/**%0A * kill session of SIGINT signal showed up while trying to%0A * get a session ID%0A */%0A if (sigintWasCalled) %7B%0A return globa...
427fd7e262c14fd1804c00b2fc27ff3da8a66edc
Revert previus changes regarding schema, add more descriptive error messages
lib/schema.js
lib/schema.js
/** * @jsx React.DOM */ 'use strict'; var utils = require('./utils'); class Node { } class PropertyNode extends Node { constructor(props) { props = props ? utils.merge({}, props) : {}; this.name = props.name; this.props = props; } } class SchemaNode extends Node { constructor(props) { ...
JavaScript
0
@@ -527,31 +527,8 @@ (arg - && arg instanceof Node ) %7B%0A @@ -1181,23 +1181,16 @@ rototype -%0A .slice.c @@ -1210,52 +1210,8 @@ , 1) -%0A .filter((arg) =%3E arg instanceof Node) ;%0A%0A
5c1e7cfc7146ab6fbf41b01ba427347eca922b48
Replace old call to sendNoRetry with lambda with a recursive call When calling recursively, we reduce the number of retries (because we used one, duhh); we double the backoff, so we wait even longer before next retry When we get the retried results back (from however many recursive calls), we map them onto the original...
lib/sender.js
lib/sender.js
/*! * node-gcm * Copyright(c) 2013 Marcus Farkas <toothlessgear@finitebox.com> * MIT Licensed */ var Constants = require('./constants'); var req = require('request'); var debug = require('debug')('node-gcm'); function Sender(key , options) { if (!(this instanceof Sender)) { return new Sender(key, optio...
JavaScript
0.000767
@@ -4489,31 +4489,24 @@ self.send -NoRetry (message, un @@ -4517,22 +4517,564 @@ RegIds, -lambda +retries - 1, backoff * 2, function(err, retriedResult) %7B%0A if(err) %7B%0A return callback(err);%0A %7D%0A%0A //Map retried results onto their previo...
89dc2991a949fdf2d5409127c6089a37dda940f8
send id
lib/server.js
lib/server.js
var express = require('express'); var http = require('http'); var WebSocketServer = require('ws').Server; var EventEmitter = require('events').EventEmitter; var util = require('./util'); var url = require('url'); function PeerKitServer(options) { if (!(this instanceof PeerKitServer)) return new PeerKitServer(options...
JavaScript
0.000001
@@ -2922,17 +2922,31 @@ : conns - +, id: client.id %7D));%0A @@ -3094,47 +3094,8 @@ //%0A - message.conn.id = client.id;%0A @@ -5598,32 +5598,38 @@ conns.push( +data: this._clients%5Bcl
63ffc788147add45d8701dd66228ffcd65f89584
enable livereload on directories, not strictly files ending with `.html` (fixes #72)
lib/server.js
lib/server.js
var http = require('http') var path = require('path') var defaultIndex = require('simple-html-index') var ecstatic = require('ecstatic') var Router = require('routes-router') var inject = require('inject-lr-script') var urlParse = require('url').parse var fs = require('fs') var log = require('bole')('budo') var asyncDe...
JavaScript
0
@@ -2009,16 +2009,23 @@ ('*.html +?%7C*%5B%5E.%5D ', wildc
f3f10ac7e46aca55d915ef2d92d67d0aa7c08515
Define abstract _disconnect method
lib/server.js
lib/server.js
module.exports = Server; var Socket = require("./socket"); var util = require("./util"); function Server(transportSocket, options){ var processConnect = forwardEmptyFrame(onConnect); options = util.extend(options, { commandHandlers:{ "STOMP": processConnect, "CONNECT"...
JavaScript
0.999855
@@ -3593,49 +3593,252 @@ -%0A beforeSendResponse(null, function()%7B +var self = this;%0A %0A this._disconnect.apply(this, %5Bframe, function(frame, responseEndCallback)%7B%0A beforeSendResponse(frame, function()%7B%0A if(typeof responseEndCallback === %22function%22)%7B%0A ...
bea30df54a7740cf7b335c5609f66356ff353813
fix `send` message unshifting
lib/socket.js
lib/socket.js
/** * Module dependencies. */ var parser = require('socket.io-parser') , Emitter = require('./emitter') , toArray = require('to-array') , debug = require('debug')('socket.io-client:socket') , on = require('./on') , bind; /** * Module exports. */ module.exports = exports = Socket; /** * Internal even...
JavaScript
0.000029
@@ -1317,16 +1317,18 @@ %0A args. +un shift('m
958fc669f1e0873d79a570797fa99b000e72d9f7
Add iv to mac, flip order
lib/ticket.js
lib/ticket.js
// Load modules var Utils = require('./utils'); var Crypto = require('./crypto'); // Declare internals var internals = {}; internals.defaults = { ttl: 60 * 60 * 1000, // 1 hour ticketSecretBits: 256, // Ticket secret size in bits ticketEncryptionKey: { saltBits: 256, // alg...
JavaScript
0
@@ -2155,109 +2155,116 @@ var -encryptedWithSalt = key.salt + ':' + encryptedB64;%0A var iv = Utils.base64urlEncode(key.iv) +iv = Utils.base64urlEncode(key.iv);%0A var macBaseString = key.salt + ':' + iv + ':' + encryptedB64 ;%0A%0A @@ -2414,33 +2414,29 @@ MacKey, -encryptedWithSalt +macBase...
b981d147c80147d2cebc224af9b4e12c8737c98f
Remove center style from stats table.
src/client/app/components/stats/stats.template.js
src/client/app/components/stats/stats.template.js
import { ToastsComponent } from "../toasts/toasts.component.js"; export class StatsTemplate { static update(render, { symbol = "" } = {}) { if (!symbol) { render` <h2>Last Asset Stats</h2> No stats available for last asset. `; return; ...
JavaScript
0
@@ -935,15 +935,8 @@ mw8 -center pa2%22
792887add562c384554679a0f76943f1bfbe6068
maintain focus on input when user clicks document
assets/js/app.js
assets/js/app.js
import framework from 'framework' import utils from 'utils' import queryDom from 'query-dom-components' import config from 'config' import events from 'dom-event' import classes from 'dom-classes' class App { constructor(opt = {}) { this.dom = queryDom({ el: config.body }) this.onSubmit = this.onSubmit.bi...
JavaScript
0.000001
@@ -277,16 +277,58 @@ ody %7D)%0A%0A + // this.focus = this.focus.bind(this)%0A this @@ -569,16 +569,81 @@ t event%0A + events.on(config.body, 'click', _ =%3E this.dom.input.focus())%0A even
edee0cfe4eeb5c6472d15dcd10be3e2e4051f281
Clean Up
assets/js/app.js
assets/js/app.js
// Fichier Definition de Module RequireJs define([ 'jquery', 'underscore', 'backbone', 'bootstrap', 'router' ], function($,_,Backbone,bootstrap,Router) { var initialize = function() { $('.navbar-brand').append('<sup>+</sup>'); Router.initialize(); }; return { ...
JavaScript
0
@@ -210,59 +210,8 @@ ) %7B%0A - $('.navbar-brand').append('%3Csup%3E+%3C/sup%3E');%0A
4a18ac72ce7f72af77bd2f5ad28cf39557e18033
Add some more comments to the example
docs/examples/greeting.js
docs/examples/greeting.js
/* A bot that welcomes new guild members when they join */ // Import the discord.js module const Discord = require('discord.js'); // Create an instance of a Discord Client const client = new Discord.Client(); // The token of your bot - https://discordapp.com/developers/applications/me const token = 'your bot token...
JavaScript
0
@@ -651,16 +651,65 @@ e member + to the guilds default channel (usually #general) %0A membe @@ -1038,16 +1038,61 @@ return;%0A + // Send the message, mentioning the member%0A channe
8ff1ef315c58ea6c4583a35c6c70ad77d971d71f
add test for array-values
addons/knobs/src/components/__tests__/Select.js
addons/knobs/src/components/__tests__/Select.js
import React from 'react'; import { shallow } from 'enzyme'; import SelectType from '../types/Select'; describe('Select', () => { let knob; describe('Object values', () => { beforeEach(() => { knob = { name: 'Colors', value: '#00ff00', options: { Green: '#00ff00', ...
JavaScript
0.000002
@@ -631,24 +631,433 @@ n');%0A %7D); +%0A%0A it('should set the default value for array-values correctly', () =%3E %7B%0A knob = %7B%0A name: 'Array values',%0A options: %7B%0A '100 x 100': %5B100, 100%5D,%0A '200 x 200': %5B200, 200%5D,%0A %7D,%0A value: %5B200...
b7edb82c511cda7cb3aaf107f948148718256d73
update tests
src/tests/reducer.test.js
src/tests/reducer.test.js
import reducers from '../reducer'; import mocks from './mocks'; describe('authorization reducer', () => { it('should return the initial state', () => { expect( reducers(undefined, {}) ).toEqual({'authorization': {'loggedIn': false}, 'form': {}, 'userProfile': {}}); }); it('should handle LOGIN', (...
JavaScript
0.999921
@@ -233,32 +233,54 @@ loggedIn': false +, 'access_token': null %7D, 'form': %7B%7D, ' @@ -448,32 +448,54 @@ 'loggedIn': true +, 'access_token': null %7D, 'form': %7B%7D, ' @@ -541,19 +541,20 @@ handle -GET +SAVE _INSTAGR @@ -556,20 +556,21 @@ STAGRAM_ -DATA +TOKEN ', () =%3E @@ -613,35 +613,36 @@ %0A ...
0cbd78b3017c097714c59a55146613780520f5ed
add realm filter to user-preference queries
app/views/register/user-preferences/user-preference-filter.js
app/views/register/user-preferences/user-preference-filter.js
define(['app', 'underscore', 'ngDialog', '/app/views/search/search-directive.js', 'scbd-angularjs-services/generic-service'], function (app, _) { app.directive("userPreferenceFilter", ['$rootScope', 'ngDialog', function ($rootScope, ngDialog) { return { restrict: "EA", template...
JavaScript
0
@@ -1346,32 +1346,113 @@ lectionFilter);%0A + %0A query.realm = realm.value;%0A @@ -2511,1013 +2511,8 @@ %0A - // $scope.deleteFilter = function(evt, record)%7B%0A%0A // evt.stopPropagation();%0A /...
dae09f5dfcbc012b0cc6e07a9b77ff92d076fa72
Add adjustment to FormToggle proptypes
src/widgets/FormInputs/FormToggle.js
src/widgets/FormInputs/FormToggle.js
/* eslint-disable react/forbid-prop-types */ /** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import React from 'react'; import PropTypes from 'prop-types'; import { FormLabel } from './FormLabel'; import { ToggleBar } from '../ToggleBar'; import { FlexView } from '../FlexView'; export const FormTo...
JavaScript
0
@@ -920,16 +920,69 @@ );%0A%7D;%0A%0A +FormToggle.defaultProps = %7B%0A isRequired: false,%0A%7D;%0A%0A FormTogg @@ -1267,24 +1267,13 @@ pes.bool -.isRequired ,%0A%7D;%0A
421811dfe6cd9fb0a48e678aabb41a0efb13e090
Update console messages.
utils/colophon.js
utils/colophon.js
function colophon() { const common = [ 'display: inline-block', 'font-size: 12px;', 'font-weight: bold', 'padding: 8px 10px', 'line-height: 30px', ] const heading = [ ...common, 'font-size: 14px', 'background: #fff', 'color: #2e304b', 'padding-left: 0', 'border-radius:...
JavaScript
0
@@ -171,176 +171,8 @@ %5D%0A%0A - const heading = %5B%0A ...common,%0A 'font-size: 14px',%0A 'background: #fff',%0A 'color: #2e304b',%0A 'padding-left: 0',%0A 'border-radius: 5px',%0A %5D.join(';')%0A%0A co @@ -441,301 +441,28 @@ %0A%0A -const footer = %5B%0A ...common,%0A 'font-weight...
a2094a49c9425d976dc414470ee9359d358e9398
Refactor IsAuthenticated component
src/components/IsAuthenticated/IsAuthenticated.js
src/components/IsAuthenticated/IsAuthenticated.js
import React, { PropTypes, Children } from 'react'; class IsAuthenticated extends React.Component { render () { const { children } = this.props; return ( Children.only(children) ); } } IsAuthenticated.propTypes = { children: PropTypes.node }; export default IsAuthenticated;
JavaScript
0.000001
@@ -44,16 +44,55 @@ 'react'; +%0Aimport %7B connect %7D from 'react-redux'; %0A%0Aclass @@ -167,16 +167,22 @@ children +, user %7D = thi @@ -209,16 +209,32 @@ (%0A + !!user.token && Childre @@ -324,28 +324,157 @@ node -%0A%7D;%0A%0Aexport default +,%0A user: PropTypes.object%0A%7D;%0A%0Aconst mapState...
457dd88686969ee1810623e51227b1de48c253aa
Use correct folder location for creating zip
utils/database.js
utils/database.js
var Promise = require('bluebird'), MongoClient = require('mongodb').MongoClient, dbServer = 'mongodb://localhost:27017/', archiver = require('archiver'), fs = require('fs'), db = {}; module.exports = { list : List, setDb : SetDB, getDb : GetDB, connectAll : ConnectAll, connect : Connect,...
JavaScript
0.000001
@@ -3806,16 +3806,50 @@ tFile),%0A + cwd = 'dump/' + database,%0A @@ -4155,23 +4155,19 @@ e, cwd: -'dump/' +cwd , src: %5B
c65783e74ee0515f967449ac3dae9e1bd9718eec
fix package.json
BackOffice/modules/pages/keys/components/JPadEditor/Rule/Rule.js
BackOffice/modules/pages/keys/components/JPadEditor/Rule/Rule.js
import React from 'react'; import R from 'ramda'; import { shouldUpdate } from 'recompose'; import style from './Rule.css'; import Matcher from '../Matcher/Matcher'; import RuleValue from '../RuleValue/RuleValue'; import classNames from 'classNames'; const ruleHasChanged = (props, nextProps) => !R.equals(props.rule,...
JavaScript
0.000017
@@ -232,25 +232,25 @@ from 'class -N +n ames';%0A%0Acons
a5705a59ee969e37430412126afb7566d284b347
Remove console.log
client/js/components/InteractiveLineChart.js
client/js/components/InteractiveLineChart.js
import React from 'react'; import ReactDOM from 'react-dom'; import InteractiveLineChart from '../charts/InteractiveLineChart'; /** * React bridge to a D3 chart. */ export default React.createClass({ displayName: 'InteractiveLineChart', propTypes: { data: React.PropTypes.arrayOf(React.PropTypes.sha...
JavaScript
0.000004
@@ -1378,48 +1378,8 @@ ) %7B%0A - console.log(this.state.active);%0A
551862d9a49cbaec06d98244ef4b07d6af248845
fix fallback worker.onmessage test
utils/messages.js
utils/messages.js
/*** * Copyright (c) 2015 Alex Grant (@localnerve), LocalNerve LLC * Copyrights licensed under the BSD License. See the accompanying LICENSE file for terms. * * Utilities for dealing with messages to different app domains. */ /* global window, MessageChannel */ 'use strict'; var Promise = (global && global.Promis...
JavaScript
0.000001
@@ -1735,23 +1735,17 @@ if ( -worker. +' onmessag @@ -1745,16 +1745,27 @@ nmessage +' in worker ) %7B%0A
83d0ce4040c2762115c1f72182f6994bc232d60c
Rename method
lib/cartodb/models/aggregation/aggregation-mapconfig.js
lib/cartodb/models/aggregation/aggregation-mapconfig.js
const MapConfig = require('windshaft').model.MapConfig; const aggregationQuery = require('./aggregation-query'); const aggregationValidator = require('./aggregation-validator'); const { createPositiveNumberValidator, createIncludesValueValidator, createAggregationColumnsValidator } = aggregationValidator; ...
JavaScript
0.000002
@@ -6625,21 +6625,23 @@ this._is -Empty +Default Aggregat @@ -6672,21 +6672,23 @@ %0A _is -Empty +Default Aggregat
6184e320649ac40a3f950970192cdbff10e2ffce
Fix typo
client/views/settings/users/enroll/enroll.js
client/views/settings/users/enroll/enroll.js
import usersEnrollSchema from '.schema'; Template.usersEnroll.helpers({ usersEnrollSchema () { return usersEnrollSchema; } });
JavaScript
0.999999
@@ -25,16 +25,17 @@ from '. +/ schema';
85756eb19cec45389e4589b9686b2b1272a3114c
Initialize OL6 view projection with OL2 one
assets/src/modules/Map.js
assets/src/modules/Map.js
import { mainLizmap, mainEventDispatcher } from '../modules/Globals.js'; import olMap from 'ol/Map'; import View from 'ol/View'; /** Class initializing Openlayers Map. */ export default class Map { constructor() { this._olMap = new olMap({ view: new View({ center: [0, 0], ...
JavaScript
0.000008
@@ -333,16 +333,67 @@ oom: 2,%0A + projection: mainLizmap.projection,%0A
32f87a2fee208d03c8550f03d5b1226fd2590cb8
Fix broken require
lib/node_modules/@stdlib/math/fast/special/lib/index.js
lib/node_modules/@stdlib/math/fast/special/lib/index.js
'use strict'; /* * When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. */ // MODULES // var setReadOnly = require( '@stdlib/utils/define-read-only-property' ); // MAIN // /** * Top-level namespace. * * @namespace fast.special */ var ns = {}; /** * @nam...
JavaScript
0.000001
@@ -1545,16 +1545,17 @@ cial/pow +- int' ) )
febe82b32cf808df1075087decd233e62260b1db
handle all EOL characters in tsv file
validators/tsv.js
validators/tsv.js
var Issue = require('../utils').issues.Issue; /** * TSV * * Takes a TSV file as a string and a callback * as arguments. And callsback with any issues * it finds while validating against the BIDS * specification. */ module.exports = function TSV (file, contents, fileList, callback) { var issues = []; va...
JavaScript
0
@@ -4839,46 +4839,8 @@ 89+%0A - var headers = rows%5B0%5D.split('%5Ct'); %0A @@ -4889,229 +4889,316 @@ -for (var i = 0; i %3C rows.length; i++) %7B%0A var row = rows%5Bi%5D;%0A var row = row.slice(0,-1) // remove /r after every row%0A var values = row.split('%5Ct');%0A var ag...
9e30c9132b3586ad51e71e52b7b45627dcb23f2a
Use clear status in helpers after verify
verify/helpers.js
verify/helpers.js
var fs = require('fs') var ul = document.getElementById('verify-list') var addtoList = function (message, status) { var li = document.createElement('li') var newContent = document.createTextNode(message) li.appendChild(newContent) if (status) { li.classList.add('verify-pass') } else li.classList.add('ve...
JavaScript
0
@@ -15,16 +15,69 @@ re('fs') +%0Avar completed = require('../challenge-completed.js') %0A%0Avar ul @@ -530,299 +530,164 @@ on ( -) %7B%0A var challengeBody = document.getElementById('challenge-body')%0A var challengeDesc = document.getElementById('challenge-desc')%0A var div = document.createElement('h2')%0A var...
2628dbb21ad4de4877d7fc0bb5eb57dbbec87186
check for event before reading from it
src/util/clickTracking.js
src/util/clickTracking.js
const DATA_ATTR = 'clicktrack'; function cleanTrackingUrl() { // TODO: investigate and refactor to support this feature /* // remove tracking information from the url to prevent bad link copying // and to clean up the url field var TRACKING_PARAM = '_xtd'; if ( history && history.replaceState && window.locatio...
JavaScript
0
@@ -839,16 +839,48 @@ gation = + typeof Event !== 'undefined' && Event.p
54dd1b994014666b6802c719cbdd3496f634ec1d
Remove unused validSelection() in dropdownQuestion directive
public/modules/core/directives/dropdown-question.client.directive.js
public/modules/core/directives/dropdown-question.client.directive.js
'use strict'; angular.module('core').directive('dropdownQuestion', ['$compile', 'TrialData', function($compile, TrialData) { return { restrict: 'E', scope: {}, link: function(scope, element, attrs) { scope.sendToTrialData = function(path, value) { if (!attrs.a...
JavaScript
0.000005
@@ -587,140 +587,8 @@ l;%0A%0A - scope.validSelection = function () %7B%0A%0A console.log(scope%5Battrs.questionId + 'Select'%5D);%0A%0A %7D;%0A%0A @@ -1225,34 +1225,8 @@ rol%22 - ng-valid=%22validSelection%22 req
c8f03245083b291a73d768062b04e7ad13702960
Make Garage tests pass
backend/index.js
backend/index.js
// ----- Config const PAGE_SIZE = 10 // ----- Errors export const ErrNoMoreSpace = new Error("No more space available") export const ErrIllegalFree = new Error("Illegal attempt to free a slot") export const ErrNotInGarage = new Error("Vehicle not present in the garage") // ----- Garage export function Garage (levels)...
JavaScript
0
@@ -264,16 +264,93 @@ garage%22) +%0Aexport const ErrAlreadyInGarage = new Error(%22Vehicle already in the garage%22) %0A%0A// --- @@ -600,24 +600,96 @@ (vehicle) %7B%0A + if (this.db%5Bvehicle.license%5D != null) %7B return ErrAlreadyInGarage %7D%0A let spot @@ -1619,14 +1619,24 @@ from +Index , from +Ind...
bbaaa8c5865344d2247447eb4a04d0abbf7ac5f6
add className
src/Image.js
src/Image.js
// @flow import * as React from 'react' import * as ReactDOM from 'react-dom' type Props = { src: string, alt?: string, placeholder?: string, color?: string, width: number, height: number } type State = { isLoading?: boolean, inlineStyle?: any, inlineStyleImage?: any, source?: string } class Bore...
JavaScript
0.00053
@@ -160,16 +160,38 @@ string,%0A + className?: string,%0A width: @@ -2759,16 +2759,90 @@ %3Cdiv + className=%7B this.props.className ? this.props.className : %22bored-image%22 %7D %3E%0A
9c1b8d8235b0d8592c3e452feb4be61926b8ae89
Fix sKey variable to not be global.
src/JSONC.js
src/JSONC.js
(function(ns) { var JSONC = {}, _nCode = -1, toString = {}.toString; if ( !Array.prototype.contains ) { Array.prototype.contains = function ( v ) { var i; for ( i = 0; i < this.length; i++ ) { if ( this[i][1] === v ) { return true; } ...
JavaScript
0.000001
@@ -3342,24 +3342,36 @@ %0A str,%0A + sKey,%0A nLenKe
b016b4e8ad1fb0cd18796ed061d39f8213a494dc
Converted to multitask
tasks/customize-bootstrap.js
tasks/customize-bootstrap.js
'use strict'; module.exports = function (grunt) { var fs = require('fs'); var _ = require('lodash'); var requiredOptions = [ 'components', 'src', 'dest' ]; grunt.registerTask('customizeBootstrap', function() { var done = this.async(); _.each(requiredOptions, function(option) { grunt.config.require...
JavaScript
0.999571
@@ -177,16 +177,21 @@ register +Multi Task('cu @@ -222,16 +222,35 @@ ion() %7B%0A +%09%09var self = this;%0A %09%09var do @@ -361,16 +361,29 @@ tstrap', + self.target, 'option @@ -1430,17 +1430,16 @@ ')(.*?)%22 -; ', 'g');
fe791ad3fb4c1cf7526b4b41cc813d2e0ea90e0b
Fix cheat hack bug
src/components/Game/Stages/Recording/Recording.js
src/components/Game/Stages/Recording/Recording.js
import TopComponent from '../../../TopComponent/TopComponent'; import GameText from '../../GameText/GameText'; import AudioPlayer from '../../AudioPlayer/AudioPlayer'; import RecordPlayer from '../../RecordPlayer/RecordPlayer'; import Button from '../../../Button/Button'; import './Recording.scss'; const textData = {...
JavaScript
0.000001
@@ -1648,31 +1648,427 @@ -return this.getElement( +this._initPlayers();%0A%0A return this.getElement();%0A %7D%0A%0A _initPlayers() %7B%0A const audioButton = this._components%5B1%5D.getButton();%0A const recordButton = this._components%5B3%5D.getButton();%0A%0A audioButton.addEv...
31748b7ec775552364d13b5e7027a510f6db6c4d
Correct case in CodiBot complete link
docs/src/app/Tutorials.js
docs/src/app/Tutorials.js
// -*- mode: javascript; js-indent-level: 2; -*- import React from 'react'; require('./table.css'); const styles = { assetsList: { margin: 10, marginLeft: 'auto', marginRight: 'auto', width: '100%', maxWidth: '720px' }, assetsImage: { width: '320px', left: '50%', transform: 'tran...
JavaScript
0.000001
@@ -2316,17 +2316,17 @@ CodiBot_ -c +C omplete.
0893b1f0daa9a663b3630c107f5e68eecb26f5ec
Fix bug in _Evented when trying to remove a listener that is not known
base/_Evented.js
base/_Evented.js
define([], function() { return { _on: function(type, cb){ this._listeners || (this._listeners = {}); var listeners = this._listeners[type] || (this._listeners[type] = []); listeners.push(cb); return function() { listeners.splice(listeners.indexOf(cb), 1); }; }, _emit: function(type, event){ ...
JavaScript
0
@@ -228,25 +228,166 @@ %09%09%09%09 -listeners.splice( +var indexOfCb = listeners.indexOf(cb);%0A%09%09%09%09if (indexOfCb === -1) %7B%0A%09%09%09%09%09console.warn(%22Trying to remove a listener that is not registered%22);%0A%09%09%09%09%7D else %7B%0A%09%09%09%09%09 list @@ -396,25 +396,36 @@ ers. +splice( indexO...
f5b09302e44e0286e4a42abb11d971f595a74d67
Add default 'id' description
src/idl/post_normalize/models/model/default_id.js
src/idl/post_normalize/models/model/default_id.js
'use strict'; // Add model.id if it does not exist const addDefaultId = function (model) { const { attributes, attributes: { id } } = model; if (id !== undefined) { return model; } return { ...model, attributes: { ...attributes, id: {} } }; }; module.exports = { addDefaultId, };
JavaScript
0.000619
@@ -190,16 +190,20 @@ return %7B +%0A ...mode @@ -204,16 +204,20 @@ ..model, +%0A attribu @@ -222,16 +222,22 @@ butes: %7B +%0A ...attr @@ -247,17 +247,65 @@ tes, - id: %7B%7D %7D +%0A id: %7B description: 'Unique identifier' %7D,%0A %7D,%0A %7D;%0A
da0d981116d2c47d3e178d1e7aaf7f1b205cbd39
add additional sql highlight rules
src/gwt/acesupport/acemode/sql_highlight_rules.js
src/gwt/acesupport/acemode/sql_highlight_rules.js
/* * sql_highlight_rules.js * * Copyright (C) 2015 by RStudio, Inc. * * The Initial Developer of the Original Code is Jeffrey Arnold * Portions created by the Initial Developer are Copyright (C) 2014 * the Initial Developer. All Rights Reserved. * * Unless you have received this program directly from RStudio pursuant *...
JavaScript
0
@@ -1,11 +1,12 @@ /*%0A + * sql_hi @@ -22,18 +22,20 @@ ules.js%0A + *%0A + * Copyri @@ -64,18 +64,20 @@ o, Inc.%0A + *%0A + * The In @@ -131,16 +131,17 @@ Arnold%0A + * Portio @@ -199,16 +199,17 @@ C) 2014%0A + * the In @@ -246,18 +246,20 @@ served.%0A + *%0A + * Unless @@ -321,16 +321,17 @@ u...
2bc03a7376d670a5b989fa091191c9d38b639250
fix index.js detection...
src/Phone.js
src/Phone.js
"use strict"; var fs = require("fs"); var os = require("os"); var path = require("path"); var five = require("johnny-five"); var fetch = require("node-fetch"); if (os.platform() !== 'darwin') { var Raspi = require("raspi-io"); } var xs = require('xstream').default; var fromEvent = require('xstream/extra/fromEvent'...
JavaScript
0
@@ -4203,16 +4203,45 @@ if ( +fs.existsSync(modulePath) && fs.statS
4f55e51c558babd643d119626696fead7be7385f
Update source for className support
src/Tipsy.js
src/Tipsy.js
import React, {Component} from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; /** * Inspired by Bootstrap's jQuery tooltip plugin, which drew its inspiration * from the jQuery.tipsy plugin written by Jason Frame, Tipsy is a * simple component that allows you to easily add tooltips to...
JavaScript
0
@@ -2984,16 +2984,40 @@ acement%7D + $%7Bthis.props.className%7D %60%7D role=
280d8584f2548b49066d2851de445ef55dd9ab44
Set api_root for production
src/agent.js
src/agent.js
import superagentPromise from 'superagent-promise'; import _superagent from 'superagent'; const superagent = superagentPromise(_superagent, global.Promise); //const API_ROOT = 'https://conduit.productionready.io/api'; const API_ROOT = 'http://localhost:3000/api'; const encode = encodeURIComponent; const responseBody...
JavaScript
0.000001
@@ -156,14 +156,10 @@ );%0A%0A -//cons +le t AP @@ -176,90 +176,100 @@ http -s :// -conduit.productionready.io/api';%0Aconst API_ROOT = 'http://localhost:3000 +localhost:3000/api';%0A%0Aif (process.env.NODE_ENV === 'production') %7B%0A API_ROOT = ' /api'; +%0A%7D %0A%0Aco
f38efecfc03a2a50af6424a62f003f77791a0c29
Make format dynamic instead of hardcoded
src/lib/personal-information-formatter-service.js
src/lib/personal-information-formatter-service.js
import Strings from '../../src/coaching-chatbot/strings.json'; import CommunicationMethods from '../../src/coaching-chatbot/communication-methods.json'; const Formatter = { format, formatFromTemplate, createProfile, getCommunicationMethods, matchCommunicationMethod, }; export default Formatter; function f...
JavaScript
0.000156
@@ -558,348 +558,217 @@ %0A%0A -if (context.name) %7B%0A s = s.replace('%7Bname%7D', context.name);%0A %7D%0A%0A if (context.job) %7B%0A s = s.replace('%7Bjob%7D', context.job);%0A %7D%0A%0A if (context.age) %7B%0A s = s.replace('%7Bage%7D', +return s.replace(%0A /%7B(%5Cw+)%7D/g,%0A (match, name...
98ef3a6aea0e7f3807cab56109b4a32ecbee2c15
Improve cross-browser Web Audio compatibility
src/audio.js
src/audio.js
var AudioContext = window.AudioContext || window.webkitAudioContext; var audioContext = new AudioContext(); var sampleRate = audioContext.sampleRate; function toFreq(note) { // A4 is 69. return Math.pow(2, (note - 69) / 12) * 440; } function playSound(sound, delay, destination) { destination = destination || au...
JavaScript
0.000006
@@ -62,16 +62,106 @@ ontext;%0A +var OfflineAudioContext = window.OfflineAudioContext %7C%7C window.webkitOfflineAudioContext;%0A var audi @@ -2146,13 +2146,11 @@ );%0A%0A -const +var con @@ -3197,16 +3197,29 @@ rt();%0A%0A + var render = offline @@ -3242,78 +3242,355 @@ ng() +;%0A %0A - .then(function(bu...
f581d97dd6de4d2c40b431ea3eb35034a2f359d8
Fix issue with seeking audio in albums
templates/fragments/audio.js
templates/fragments/audio.js
window.addEventListener('load', function() { try { if (!window.localStorage.volume) { window.localStorage.volume = 1; } } catch (ex) { /* this causes security exceptions in sandboxed iframes */ } var controls = document.querySelectorAll('.audio .control'); for (var i = 0; i < con...
JavaScript
0
@@ -1175,16 +1175,22 @@ click', +audio_ handleSe @@ -3064,16 +3064,22 @@ unction +audio_ handleSe
f3abd05532c8e7d2d91f059993aac6c47a960102
fix score calculation for Game tests
backend/GameTestServer.js
backend/GameTestServer.js
define(["underscore", "moment-timezone"], function(_, moment) { var GameTestServer = {}; GameTestServer.getDefaultOptions = function() { return { allowQuestionSubmit: true, }; }; GameTestServer.updateTest = function(test, options) { test.qids = _(options.questions...
JavaScript
0.000001
@@ -2699,18 +2699,18 @@ = Math.m -ax +in (newScor
9c33791066acb32db6d7769511eb7f034cc1dc56
update debug build paths in tests (#6673)
tests/browser/paths.js
tests/browser/paths.js
// @ts-check const {exec} = require('child_process'); const fs = require('fs-extra'); const path = require('path'); async function winProgramFiles(relPath) { const x64Path = path.join(process.env.PROGRAMFILES, relPath); if (await fs.exists(x64Path)) { return x64Path; } return path.join(process....
JavaScript
0
@@ -1428,21 +1428,34 @@ '../../ -debug +build/debug/chrome ');%0Acons @@ -1515,14 +1515,20 @@ /../ +build/ debug -- +/ fire
027431f2878c373d262b13e32892c26ee4efdcae
Test marker size
tests/d3links-tests.js
tests/d3links-tests.js
var testLevel = "meteor-d3graph tests - d3links - "; Tinytest.add(testLevel + 'addLink', function (test) { // Setup var d3graphStub = new D3graphStub(); var nodeLibStub = new NodeLibStub(); nodeLibStub.stubNodes("fromNode", "toNode"); var linklib = new d3links(d3graphStub, nodeLibStub); /...
JavaScript
0
@@ -1071,12 +1071,15 @@ n: %22 -blue +#ff0000 %22, l @@ -1091,11 +1091,15 @@ x: %22 -red +#00ff00 %22 %7D @@ -1103,16 +1103,86 @@ %7D %7D; %7D%0A + d3graphStub.settings = %7B minMarkerSize: 10, maxMarkerSize: 100 %7D;%0A %0A @@ -1531,20 +1531,22 @@ var -node +marker Elements @@ -1582,20 +1582,2...
2ac178c54ee75d17e217ea1a96c5f8046d99c562
fix deprecation
tests/dummy/app/app.js
tests/dummy/app/app.js
import Ember from 'ember'; import Resolver from './resolver'; import loadInitializers from 'ember-load-initializers'; import config from './config/environment'; let App; Ember.MODEL_FACTORY_INJECTIONS = true; App = Ember.Application.extend({ modulePrefix: config.modulePrefix, podModulePrefix: config.podModulePre...
JavaScript
0.002017
@@ -169,48 +169,8 @@ p;%0A%0A -Ember.MODEL_FACTORY_INJECTIONS = true;%0A%0A App
3cdd3964489da55fc9e0f0062d2f046d63611a32
add function to populate view form select boxes via jquery
js/app.js
js/app.js
$.ajax({ url: WDP.baseUrl + 'data', type: 'POST', dataType: 'html', data: {domain : 'craigslist', city : 'new_york', category : 'jobs', subcategory : 'web'} }) .done(function(searchResults) { if(searchResults.match(/^This IP has been automatically blocked./i)){ WDP.displayError("Sorry, but it appears t...
JavaScript
0
@@ -1,83 +1,231 @@ -$.ajax(%7B%0A%09url: WDP.baseUrl + 'data',%0A%09type: 'POST',%0A%09dataType: 'html',%0A%09data: %7B +WDP.initSearchForm = function()%7B%0A%09var searchForm = $(%22#search_form%22);%0A%09searchForm.submit(function(e)%7B%0A %09return false;%0A%09%7D);%0A%0A%09searchForm.find(%22input%5Btype='submit...
e7aa9722e5770e3044a7c99e9b61fc52d6ad5d64
allow switching to scenes 0-9
js/app.js
js/app.js
'use strict'; var camera; var renderer; var audio; var numScenes = 3; // number of scenes var scenes = []; // list of all scenes var scenesElapsedTime = 0; // added to after each scene change, time since start of demo var curScene = -1; var curThreeScene = null; var curTime = 0; var init = function() { $(docume...
JavaScript
0.000001
@@ -372,17 +372,17 @@ ich %3E= 4 -9 +8 && even @@ -393,17 +393,17 @@ ich %3C= 5 -1 +7 ) %7B%0A @@ -441,9 +441,9 @@ - 4 -9 +8 );%0A @@ -1239,24 +1239,109 @@ tion(num) %7B%0A + // check that scene exists%0A if (num %3E numScenes - 1) %7B%0A return;%0A %7D%0A%0A // deini
0cec45a916202515925d1f08b9008595b7100e61
Remove offcanvas initialization opts.
js/app.js
js/app.js
var parser, sourceCode, pegedit_opts, return_val = [], remove_child_objs, traverse, symbol_table; $('document').ready( function() { initializeFoundation(); var editor = initializeAceEditor('editor'), terminal = initializeAceEditor('terminal'), contents_uri = 'https://api.github...
JavaScript
0
@@ -570,93 +570,8 @@ ion( -%7B%0A offcanvas: %7B%0A open_method: 'overlap',%0A close_on_click: true%0A %7D%0A %7D );%0A%7D
7a99947d7d4c7b798ea0048b19492222f628edab
Clear flashed messages on reset
js/app.js
js/app.js
$('#send').submit(function(e) { $('.flash').text(""); var name = $('#name').val(); var email = $('#email').val(); var text = $('#text').val(); if (name && email && text) { console.log('Conditions met.'); emailjs.send("gmail", "standard", { "name": name, "email": email, "message": text }).t...
JavaScript
0.000001
@@ -691,8 +691,73 @@ lt();%0A%7D) +;%0A%0A$('#send').on('reset', function() %7B%0A%09$('.flash').text(%22%22);%0A%7D);
911ed395e7ea25ae6ae3f9dd9277f01da7acbe98
Update jsdoc indentation.
src/clone.js
src/clone.js
'use strict'; /** * Returns a shallow-copied clone of a given object. * @param {Object} obj - A given object to clone. * @returns {Object} * @example * clone(object); */ function clone(obj) { let copy = {}; for (let prop in obj) { if (obj[prop]) { copy[prop] = obj[prop]; } } return c...
JavaScript
0
@@ -12,14 +12,12 @@ ';%0A%0A - /**%0A - * R @@ -65,17 +65,16 @@ object.%0A - * @para @@ -115,17 +115,16 @@ clone.%0A - * @retu @@ -136,17 +136,16 @@ Object%7D%0A - * @exam @@ -148,17 +148,16 @@ example%0A - * clone @@ -166,17 +166,16 @@ bject);%0A - */%0Afunc
225021087098eafe9831b6cf81794903909c557d
fix bad _.handler wrapper
src/combo.js
src/combo.js
_.comboRE = /\+|>/; // overwrite fire.js' _.fireAll to watch for combo events _.combo_trigger = _.fireAll; _.fireAll = function(target, events, props, _resumeIndex) { var event, sequence; for (var i=0; i<events.length; i++) { sequence = props.sequence = events[i].split(_.comboRE); for (var j=_resumeIn...
JavaScript
0.0001
@@ -1793,16 +1793,33 @@ t();%0A%09%7D%0A +%09return handler;%0A %7D;%0A_.com
83ea3fe6ac098a6b0abfc67d8dd6465770fd9c65
replace $route with custom routing since it's more flexible
js/app.js
js/app.js
/** * Application controller for the entire page */ function AppCtrl($route, $location) { var scope = this; scope.angular = {version: '0.9.15', name: 'lethal-stutter'} $route.when('/') $route.when('/:subpage'); $route.onChange(function() { if ($route.current) { scope.subpage = $route.current.par...
JavaScript
0
@@ -68,16 +68,8 @@ trl( -$route, $loc @@ -167,71 +167,111 @@ %0A%0A -$route.when('/')%0A $route.when('/:subpage');%0A $route.onChange( +//normalize hash, set subpage and track page view%0A scope.$watch(function() %7B return $location.hash %7D, func @@ -287,218 +287,209 @@ -if ($route.current) %7B%0A ...
b9b3603342f7dbc8ce629a7449470469d119e5b0
Resolve scope issues with save function callback
js/app.js
js/app.js
angular.module('ChillaxApp', []) .controller("ChillaxController", function () { var chillax = this; chillax.init = function() { chillax.nextNotification="Chillax loaded!"; chillax.retrieveSettings(); }; chillax.retrieveSettings = function() { var settings = {}; ...
JavaScript
0
@@ -663,29 +663,21 @@ -%0A +this. chillax.
f41b793f2625310e9dec136a0421af7f7b198707
reset timer on answer submit
js/app.js
js/app.js
'use strict'; var levels = ['diff-one','diff-two', 'diff-three']; var characters = ['char-one', 'char-two', 'char-three']; var chosenChar; var chosenLevel; var human; var computer; var timeLimit = 20; // in Seconds for question var overlayDuration = 1000; //in Milsecs var tick; // an interval varaible needs to be globa...
JavaScript
0
@@ -5775,16 +5775,18 @@ %7D%0A +%7D%0A clearI @@ -5839,17 +5839,30 @@ leak%0A -%7D +fireUpTimer(); %0A quest
843110878d7c7e708e860f3d1ec4aad0dc392066
event is global
js/app.js
js/app.js
$(function(){ "use strict"; var $result = $('#result'); var $message = $('#message'); var $form = $('#cakeday-form'); var $cakedayDate = $('#cakeday-date'); var $response = $('#response'); var $userNameInput = $('#user-name-input'); var gotInput = function(userName) { var userUrl = cr...
JavaScript
0.999999
@@ -2734,21 +2734,24 @@ %0D%0A%0D%0A $( -$form +document ).on(%22su @@ -2756,16 +2756,32 @@ submit%22, + '#cakedayForm', functio
87f586add709c852925692d770edbc487370e774
Update app.js
js/app.js
js/app.js
var calDate = new Date(); var calendar = null; var monthsContainer = ['prev-month', 'current-month', 'next-month']; $(function () { calendar = new Calendar($('#current-month'), calDate, launchNotesModal, loadNotes); showCurrentMonthCaption(); $('.prev-month').click(function () { scrollCalendar(-1); }); ...
JavaScript
0.000002
@@ -43,77 +43,8 @@ ull; -%0Avar monthsContainer = %5B'prev-month', 'current-month', 'next-month'%5D; %0A%0A$( @@ -216,30 +216,36 @@ ) %7B%0A -scrollCalendar +calendar.scrollMonth (-1);%0A @@ -292,30 +292,36 @@ ) %7B%0A -scrollCalendar +calendar.scrollMonth (1);%0A %7D @@ -3337,1088 +3337,4 @@ ;%0A%7D%...
e126c1ade5952353719ff696e2bcc46c90d6c522
Improve app.js
js/app.js
js/app.js
define([ 'topBar', 'echoContent', 'services', 'utils', 'jquery' ], function(topBar, eCont, services, utils, $) { 'use strict'; // RSS var infoWorld = 'http://www.infoworld.com/news/index.rss', echoJS = 'http://www.echojs.com/rss', dailyJS = 'http://dailyjs.com/rss/', ...
JavaScript
0.000077
@@ -167,102 +167,124 @@ var -infoWorld = 'http://www.infoworld.com/news/index.rss',%0A echoJS = +rssObj = %7B%0A EchoJS: 'http://www.echojs.com/rss',%0A Javascript: 'http +s ://www. -echojs.com +javascript.com/feed /rss @@ -298,17 +298,20 @@ + -d + D ailyJS - = +: 'ht @@ -...
e88276849526b17a9971c94457e53e2d771a2360
Add some stuff to app.js
js/app.js
js/app.js
Let's pretend here is some javascript in here.
JavaScript
0.000001
@@ -40,8 +40,44 @@ n here.%0A +Look at me, I'm making some changes!
f9c839a03ff01dfbf497e6cc21c674ad431d7cf3
Add console statement to check state changes
js/app.js
js/app.js
import React from 'react'; import ReactDOM from 'react-dom'; import i18next from 'i18next'; import PubSub from 'pubsub-js'; import Constants from './constants'; import Nav from './components/nav'; import Player from './components/player/player'; import Content from './components/content'; // Fix incoming hashed URLS ...
JavaScript
0.000001
@@ -1663,32 +1663,56 @@ MIXCLOUD_URL) %7B%0A + console.log(info)%0A this.setSt
26f9d81a41d8df3e02221c7a97303a108e69b7b4
put hide markers in separate function
js/app.js
js/app.js
(function(){ var app = angular.module('app', ['app.locationservice', 'uiGmapgoogle-maps']); app.controller('LocationCtrl', function($scope, LocationService){ // default value for how to show markers (cluster, spider, none) $scope.clusterVal = 'none'; // default value for input $scope.locationVa...
JavaScript
0.000001
@@ -1476,24 +1476,165 @@ model) %7B%0A + $scope.hideMarkers();%0A // and show the clicked one%0A model.show = true;%0A %7D;%0A%0A $scope.hideMarkers = function(model)%7B%0A // rem @@ -1655,18 +1655,16 @@ markers%0A - fo @@ -1710,34 +1710,32 @@ ; i++)%7B%0A - $sc...
40ab2a31391b286ff0ba788a42e5be82c183bde9
Update git.js
js/git.js
js/git.js
$.get("https://api.github.com/repos/bros-bioinfo/bros-bioinfo.github.io/git/trees/master?recursive=1", function(data) { test = String(data).replace(/^((?!md).)*$/gm, ""); x = 0; while (x < 80) { test = test.replace(",", ""); test = test.replace('"path": "', ''); test = test.replace('"', ''); test...
JavaScript
0.000001
@@ -166,16 +166,17 @@ m, %22%22);%0A + %0A x = 0
f4556c079b9a28d607cd144189f8e5422ea97557
Fix defaultApiRoot
js/hue.js
js/hue.js
// Entrypoint / Main controller for the app. // It creates a HueApi object and uses it to load all the HueLights. // HueLights are rendered via Ractive.js, which syncs data between // Api and UI. Hue = { __ : { api : null, rac : null, picker : null, lights : {} }, config : { defaultApiRoot: ...
JavaScript
0.000001
@@ -829,24 +829,23 @@ .default +Api Root -Path + %22. Se @@ -926,16 +926,15 @@ ault +Api Root -Path ;%0A
603fe8fc5df27c91c8e32fb89415666d04171df6
Change the map.js code so the object that gets past via the template matches the object that is received from the lastest API call
js/map.js
js/map.js
/** * Created by Neil on 29/09/13. */ function initialize() { var mapOptions = { zoom: 16, center: new google.maps.LatLng(locations[0].latitude, locations[0].longitude), mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById('map_canvas'),...
JavaScript
0
@@ -570,16 +570,18 @@ imeStamp +Ms %3E 0) %7B%0A @@ -1505,16 +1505,25 @@ ew Date( +parseInt( location @@ -1532,16 +1532,19 @@ imeStamp +Ms) );%0A @@ -2276,16 +2276,32 @@ de + %22,%22 +%0A + locat
b1e0675a323f72c8665ff50aefcca3ca87d017f6
Add live representation of user leaving app, their marker now disappears when they sign out
js/map.js
js/map.js
var map; var MY_MAPTYPE_ID = 'custom_style'; fetchSkateparks(); $.when(getCurrentLocation()) .then(setCurrentUserPosition) .fail(setDefaultUserPosition); // Figure out a way to optimize this, so that you // don't see "Skater" before the name changes. $(document).on('pagebeforeshow', '#login-page', function () ...
JavaScript
0
@@ -4107,21 +4107,309 @@ %7D%0A %7D);%0A %7D); +%0A%0A userMarkerRef.on('child_removed', function (snapshot) %7B%0A userMarkers.forEach(function (marker) %7B%0A if (snapshot.val().uid === marker.uid) %7B%0A var index = userMarkers.indexOf(marker);%0A marker.setMap(null);%0A userMarke...
84a789ddb855e882edd9348846e7e61be9278864
add events
js/pwl.js
js/pwl.js
/*global window:true, Raphael, console*/ ;(function(pwl, raphael, undefined){ /* pwl stands for papers-we-love */ 'use strict'; var Observable = function(){ this.observers = {}; }; Observable.prototype.on = function(event, callback){ (this.observers[event] = this.observers[event] ||...
JavaScript
0.000054
@@ -2131,34 +2131,51 @@ date = function( -)%7B +cx)%7B%0A%09cx = cx %7C%7C 0; %0A%09var position = @@ -2296,13 +2296,20 @@ ttr( +%7B%0A%09 'cy' -, +: pos @@ -2305,32 +2305,50 @@ 'cy': position +,%0A%09 'cx': cx%0A%09%7D );%0A %7D;%0A Ev @@ -3398,56 +3398,23 @@ n = -( this. -index + 1) * this.p...
bccc13d4edf5dc55987590cb6cc519f04d262ed4
Update compare.js
tests/utils/compare.js
tests/utils/compare.js
/* global XMLHttpRequest, expect */ function loadBinaryResource (url) { const req = new XMLHttpRequest() req.open('GET', url, false) // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com] req.overrideMimeType('text\/plain; charset=x-user-defined'); req.send(null) if (req.status !== 2...
JavaScript
0.000001
@@ -375,16 +375,44 @@ return +unescape(encodeURIComponent( req.resp @@ -415,16 +415,18 @@ response +)) ;%0A%7D%0A%0Afun
ebfb9db1071e65dfb343fc412b843617a84a52fa
fix strange mongoose bug
src/entry.js
src/entry.js
'use strict'; var Kind = require('./kind'), util = require('./util'), Promise = require('bluebird'); exports.create = function createEntry(kind, value) { var kindModel = Kind.getSync(kind); return new kindModel(value); }; exports.insertTree = function (tree, callback) { var prom = new Promise(fu...
JavaScript
0.000011
@@ -1072,32 +1072,111 @@ %7D);%0A%0A + // TODO hack mongoose bug !%0A setTimeout(util.noop, 0);%0A%0A %7D, rejec
fb1e36f5f314966e5fe0aaefc2f6bab4eaf595df
make exclude code comment more specific
jslint.js
jslint.js
/* * Copyright (c) 2011-2013, Yahoo! Inc. All rights reserved. * Copyrights licensed under the New BSD License. * See the accompanying LICENSE file for terms. */ 'use strict'; var lintifier = require('./lib/lintifier'), reporter = require('./lib/reporter'), config = require('./config'), log = require(...
JavaScript
0
@@ -1153,30 +1153,44 @@ // -directories to exclude +add type-specific exclusions, if any %0A
441a8ad51dc23c708fdbcd082ac5dae089607f1a
clean code
src/faker.js
src/faker.js
// import Logger from './logger'; // import Cookies from './cookies'; // import md5 from 'blueimp-md5'; class Faker { static fakeMacPlatform() { const PLAFORM_MAC = 'mac'; Object.defineProperty(unsafeWindow.navigator, 'platform', {get: () => PLAFORM_MAC}); } static fakeSafari() { c...
JavaScript
0.000008
@@ -1,108 +1,4 @@ -// import Logger from './logger';%0A// import Cookies from './cookies';%0A// import md5 from 'blueimp-md5';%0A %0Acla
6cfbad162c58de0d814b85873fcdd27b34a56513
Correct 'require' path
src/index.js
src/index.js
require('dotenv').load(); const express = require('express'); const bodyParser = require('body-parser'); const session = require('express-session'); const passport = require('passport'); const crypto = require('crypto'); const model = require('./model'); const auth = require('./authorize'...
JavaScript
0.99487
@@ -307,21 +307,16 @@ ('./auth -orize ');%0Acons
d36801428739c49b023370cd1ccd707bb2c21054
Fix a react warning
src/index.js
src/index.js
// @flow import React from 'react' class ScriptLoader extends React.Component { propTypes = { src: React.PropTypes.string.isRequired, onLoad: React.PropTypes.func.isRequired, }; loadFired: boolean; invokeOnLoad() { if (!this.loadFired) { setTimeout(() => { this.loadFired = true ...
JavaScript
0.000043
@@ -77,16 +77,23 @@ ent %7B%0A +static propType
3ba9e79c1660cd82c5a51f876c744f3fab919067
test fix
src/index.js
src/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import axios from 'axios'; import { AppContainer } from 'react-hot-loader'; import App from './routes/App' import ComingSoon from './components/ComingSoon/ComingSoon' const fetchUserData = async function() { try { const resp = await axios.get('/a...
JavaScript
0.000001
@@ -384,49 +384,118 @@ log( -JSON.string +resp);%0A if -y (resp -));%0A render(App); +.data.length %3E 0)%7B%0A render(App);%0A %7D else %7B%0A render(ComingSoon);%0A %7D %0A
b543bdf9ccb31621a3ce57d0a51fde217bc2f210
make nonce overridable
kraken.js
kraken.js
var request = require('request'); var crypto = require('crypto'); var querystring = require('querystring'); /** * KrakenClient connects to the Kraken.com API * @param {String} key API Key * @param {String} secret API Secret * @param {String} [otp] Two-factor password (optional) (also, doesn't work) */ funct...
JavaScript
0.000314
@@ -2664,16 +2664,39 @@ path;%0A%0A +%09%09if(!params.nonce) %7B%0A%09 %09%09params @@ -2743,16 +2743,20 @@ rosecond +%0A%09%09%7D %0A%0A%09%09if(c
a565e6bfe8dec9c3e40d60eb4deb0d4b7614bbdb
Revert "fix: Fix to import the browser version of document-register-element."
src/index.js
src/index.js
// We load the Safari fix before document-register-element because DRE // overrides attachShadow() and calls back the one it finds on HTMLElement. import './fix/safari'; import 'document-register-element/build/document-register-element'; import '@webcomponents/shadydom'; import '@webcomponents/shadycss';
JavaScript
0
@@ -200,40 +200,8 @@ ment -/build/document-register-element ';%0Ai
ab9e85d9a978383c6b811587ea523e9dfe9a7ea3
fix comments
src/index.js
src/index.js
'use strict'; module.exports = function(url, length) { if (typeof url !== 'string') { throw new TypeError('Expected url to be a string'); } if (typeof length !== 'number') { throw new TypeError('Expected length to be a number'); } if (url.length <= length) { return url; } // Remove http:/...
JavaScript
0.000001
@@ -969,19 +969,20 @@ %0A // Re -mov +plac e first @@ -1129,19 +1129,20 @@ %0A // Re -mov +plac e endles
44f7a015c0f15251bd07b327e42c875eaccbb735
update to latest configuration api
src/index.js
src/index.js
export function configure(aurelia){ aurelia.globalizeResources('./hello-world'); }
JavaScript
0.000001
@@ -23,37 +23,32 @@ ure( -aurelia)%7B%0A aurelia +config)%7B%0A config .global -ize Reso
0a2e24f3fac3d051811eef85549ac35ebb437d03
Delete init code (mount App)
src/index.js
src/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, IndexRoute, browserHistory } from 'react-router'; import './index.css'; import App from './App'; import { CoursesListPage } from './pages/courses-list/couses-list'; import { CoursesItemPage } from './pages/courses-item/cours...
JavaScript
0
@@ -394,74 +394,8 @@ ';%0A%0A -ReactDOM.render(%0A %3CApp /%3E,%0A document.getElementById('root')%0A);%0A%0A Reac
1a396da5f02df6666adb0d58a39bdb03bfdd9ff6
fix hex color typechecks
src/index.js
src/index.js
export const test = (ele, types = [], ...addTypes) => { if (isString(types) && isEmpty(addTypes)) { const type = types return Object.prototype.toString(ele) === type || typeof ele === type } const tested = addTypes .concat(types) .some( t => test(ele, t) ) ...
JavaScript
0.000001
@@ -1625,16 +1625,28 @@ 0-9A-F%5D%7B +3%7D%7C%5B0-9A-F%5D%7B 6%7D$/i.te @@ -1712,16 +1712,28 @@ 0-9A-F%5D%7B +4%7D%7C%5B0-9A-F%5D%7B 8%7D$/i.te
40e1ed96329f8da7b3d1f0bbf15664d2777e3573
test pre-commit
src/index.js
src/index.js
import Vue from 'vue' import router from './router.js' import store from './store' import logPlugin from './log-plugin.js' import myRender from './my-render.js' import SideBar from './components/SideBar' import './style/index.styl' Vue.use(logPlugin) myRender() /* eslint no-new: 0 */ new Vue({ el: '#app', comp...
JavaScript
0
@@ -361,8 +361,15 @@ uter%0A%7D)%0A +abdsfs%0A
fbb2d699beca49c7b5725f0422aa887e870af163
make branch-list
src/index.js
src/index.js
/** * Created by oleg on 08.07.15. */ goog.require('goog.base'); goog.require('Syncer'); var init = function() { var syncer = new Syncer; var goto = function(url) { window.open(url); }; chrome.tabs.getSelected(function(tab) { var url = tab.url; syncer.setUrl(url); }); document.getElementById('redmine')...
JavaScript
0.000406
@@ -516,72 +516,638 @@ ches -Name( +()%0A%09%09%09.then(function(branches) %7B%0A%09%09%09%09var makeLi = function(ul, name, clickListener) %7B%0A%09%09%09%09%09var li = document.createElement(%22li%22 );%0A%09%09%09 +%09 -//.then(function(all) %7B%0A%09%09%09%09//console.log(all);%0A%09%09%09// +%09li.onclick = clic...
b0657a06ed6b35f59e4b101781a79d9a533f6b5b
Fix this wrong usage
src/index.js
src/index.js
import React, { Component, PropTypes } from 'react'; import { ListView, RefreshControl } from 'react-native'; const { array, func } = PropTypes; class ScrollableList extends Component { static propTypes = { data: array.isRequired, renderRow: func.isRequired, }; constructor(props) { super(props); ...
JavaScript
0.999999
@@ -744,37 +744,32 @@ a) %7B%0A%0A if ( -this. props.data == nu @@ -782,21 +782,16 @@ -this. props.da
797a337777c6076e14422d08a5ffc9d194423512
return full profile as result
src/index.js
src/index.js
import { logoBase64, svgLogo } from './sources'; class Github { constructor(options, request) { this.options = options || {}; if (!this.options.user && !this.options.org) { throw new Error('options must have `user` or `org` param'); } this.request = request; this.options.isUser = this.isUse...
JavaScript
0.000001
@@ -1422,16 +1422,46 @@ %0A %5D;%0A + result.profile = profile;%0A retu
48ebe3e40634bd2e804cf2f11d6b01a6722180fa
add friendly warning
src/index.js
src/index.js
import React, { PropTypes } from 'react'; /** * @param {string} options.form A unique key to identify your form throughout the app * @param {array} options.fields An array of string or object to configure the form fields * @return {object} Enhanced React Component */ export function createForm({ form, fie...
JavaScript
0
@@ -705,16 +705,17 @@ atch %7C%7C +( this.con @@ -719,24 +719,52 @@ context. +store && this.context.store. dispatch ;%0A @@ -755,16 +755,17 @@ dispatch +) ;%0A @@ -1858,32 +1858,266 @@ rev, curr) =%3E %7B%0A + if (!this.props.form) %7B%0A throw new Error(%60%5Bredux-form-uti...
0b3715fc8c005317e556e2df246b9d44eb48fa35
add date to json files
src/index.js
src/index.js
const Discord = require('discord.js'); const config = require('./config.json'); const fs = require('fs'); const client = new Discord.Client({ max_message_cache: 5, }); const prefix = '🔨'; client.on('ready', () => { console.log('ready!'); }); function genLog(banner, banned, reason, channel, ban, owner) { fs.w...
JavaScript
0.000001
@@ -490,16 +490,38 @@ %0A %7D,%0A + date: Date.now(),%0A %7D));%0A%7D
c13122d025073d892b6b53763688445b4826a871
add hex functions
src/index.js
src/index.js
const t = {} t.isArray = t.array = e => Array.isArray(e) t.isBoolean = t.boolean = e => typeof e === 'boolean' t.isDefined = t.defined = e => typeof e !== 'undefined' t.isFunction = t.function = e => typeof e === 'function' t.isNumber = t.number = e => e === +e t.isInteger = t.integer = e => e === +e && e === (e ...
JavaScript
0.000001
@@ -859,72 +859,527 @@ sHex -AlphaColor = t.hexAlphaColor = t.hexa = e =%3E%0A /#%5Cb(%5Ba-f0-9%5D%7B4%7D%7C +Color3 = t.hexColor3 = t.hex3 = e =%3E /#%5Cb(%5Ba-f0-9%5D%7B3%7D)%5Cb/i.test(e)%0At.isHexColor4 = t.hexColor4 = t.hex4 = e =%3E /#%5Cb(%5Ba-f0-9%5D%7B4%7D)%5Cb/i.test(e)%0A%0At.isHexColor6 = t.hexColor6 = t....