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
cb70030325343df9f8b79396b467e03f4e340c30
add put and delete methods handler
modules/haproxy/controllers/setting.js
modules/haproxy/controllers/setting.js
'use strict'; const mongoose = require('mongoose'); const express = require('express'); const path = require('path'); const db = require('../../../lib/db'); const moduleDB = require('../db'); const app = express(); const router = express.Router(); const core = require('../../../src/core'); const prefix = '/hapro...
JavaScript
0.000001
@@ -150,24 +150,91 @@ ./lib/db');%0A +const checkIdOnRequest = require('../../common').checkIdOnRequest;%0A const module @@ -1507,24 +1507,1010 @@ );%0A %7D);%0A%0A + router.param('id', checkIdOnRequest(%7B%0A model: moduleDB.HAProxySettingModel,%0A current: 'currentModel'%0A %7D));%0A%0A c...
e2696ad6e233ab66ab66241cf76c8d6eb848ca20
Fix debug_traceTransaction call
packages/truffle-debugger/lib/web3/adapter.js
packages/truffle-debugger/lib/web3/adapter.js
import debugModule from "debug"; import Web3 from "web3"; const debug = debugModule("debugger:web3:adapter"); export default class Web3Adapter { constructor(provider) { this.web3 = new Web3(provider); } async getTrace(txHash) { return new Promise( (accept, reject) => { this.web3.currentProvider....
JavaScript
0.000024
@@ -414,16 +414,20 @@ %5BtxHash +, %7B%7D %5D,%0A @@ -511,32 +511,69 @@ rn reject(err);%0A + debug(%22result: %25o%22, result);%0A accept(r
39f67ab136c7064d55acd75902d7c730e03dfc88
change localhost to relative root
public/chat.js
public/chat.js
(function() { function urlsToHtml(text) { var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; return text.replace(exp,"<a href='$1' target='_blank'>$1</a>"); } $.fn.linkify = function() { var text = urlsToHtml(this.text()); this.html(text); return thi...
JavaScript
0.000046
@@ -413,29 +413,9 @@ ct(' -http://localhost:3000 +/ '),%0A @@ -431,17 +431,17 @@ r = 'Fed -M +m ate ' +
3a69b4943071161a01e4c8623d6a5c0f2530c3c3
Remove console.log
src/store/actions.js
src/store/actions.js
// ------------------------------------------------------------------- // Dependencies // Import // Built-in // Mine import * as types from './types' import Config from '../config' import OpenSubtitleService from '../services/open-subtitle' // ------------------------------------------------------------------- /...
JavaScript
0.000004
@@ -1599,31 +1599,8 @@ res%0A - console.log(res); %0A @@ -2790,55 +2790,8 @@ ash) -%0A console.log(vidHash, vidHash, size, IMBDId); %0A%0A
6f6e8ab53cc93dc5d86083f6cf08ef47b0d3cd39
make error message more descriptive.
src/store/machine.js
src/store/machine.js
function StateMachine() { return { state: 'idle', do: function(action) { try { this.state = this.behavior[this.state][action] } catch (error) { throw 'Action cannot be performed with this state.' } }, behavior: { ...
JavaScript
0
@@ -223,53 +223,84 @@ row -'Action cannot be performed with this +%60StateMachine Error: Tried to perform $%7Baction%7D during $%7Bthis.state%7D state. -' +%60 %0A
69deafcdffea3a52ec4bb22fbc76ad6605629f81
Update filter.js
src/styles/filter.js
src/styles/filter.js
function notNull(x) { return x != null; } function wrap(x) { return '(' + x + ')';} function maybeQuote(value) { if (typeof value === 'string') { return '"' + value + '"'; } return value; } function lookUp(key) { if (key[0] === '$') { return 'context[\'' + key.substring(1) + '\']'...
JavaScript
0
@@ -3647,10 +3647,10 @@ y sy -t n +t ax:
be45f2627ca37c76165d33fad0118a87139f291b
Fix a JavaScript error on the topic form
app/assets/javascripts/thredded/components/topic_form.es6
app/assets/javascripts/thredded/components/topic_form.es6
//= require thredded/dependencies/autosize //= require thredded/core/on_page_load //= require thredded/components/mention_autocompletion //= require thredded/components/preview_area (() => { const Thredded = window.Thredded; const ThreddedMentionAutocompletion = window.ThreddedMentionAutocompletion; const Thredd...
JavaScript
0.00002
@@ -800,24 +800,65 @@ _SELECTOR);%0A + if (!textarea) %7B%0A return;%0A %7D%0A autosize @@ -2459,25 +2459,25 @@ -autosize.destroy( +const textarea = form @@ -2517,16 +2517,88 @@ ELECTOR) +;%0A if (!textarea) %7B%0A return;%0A %7D%0A autosize.destroy(textarea );%0A %7D;%0A
e20e7be77ddcab2beea7a302a0588685d63b2793
Use selector string to specify bone-tree panel element
editer/src/js/view.panel.boneTree.js
editer/src/js/view.panel.boneTree.js
/** 骨骼数面板的view @module **/ define([ 'underscore', 'view.panel.abstractSkeleton', 'view.abstractBone', 'tmpl!html/panel.boneTree.bone.html' ], function( _, AbstractSkeleton, AbstractBone, boneTmpl ){ var BoneTreePanel, Bone; /** @class BoneTreePanel @extends AbstractSkeleton ...
JavaScript
0
@@ -338,27 +338,24 @@ anel - = AbstractSkeleton +View = PanelView .ext @@ -372,18 +372,16 @@ el: -$( '#js-bon @@ -391,17 +391,16 @@ eePanel' -) ,%0A%0A
4457d8ee0735ec0cf504345118dc4e0431c407bc
fix editing non-existing message
src/commands/addquote.js
src/commands/addquote.js
const Command = require('../structures/Command'); const { RichEmbed } = require('discord.js'); const moment = require('moment'); class AddQuoteCommand extends Command { constructor() { super({ name: 'addquote', description: 'Save a quote of a message (Out of the last 100 overall messages)', aliases: ['aq']...
JavaScript
0.000045
@@ -1720,12 +1720,20 @@ age. -edit +channel.send (%60An
b0557b3cd436bd93213dd979a6713b635d4fa689
Remove silent: false
scripts/prepare.js
scripts/prepare.js
/* eslint-disable no-console */ const path = require('path'); const shell = require('shelljs'); const chalk = require('chalk'); const log = require('npmlog'); const { babelify } = require('./compile-js'); const { tscfy } = require('./compile-ts'); function getPackageJson() { const modulePath = path.resolve('./'); ...
JavaScript
0.999991
@@ -1249,23 +1249,8 @@ fy(%7B - silent: false, err
4a1d00f6d21348cacb5b9ef1951c69a83644486c
Add all changes for commit
scripts/release.js
scripts/release.js
/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */ /* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */ /* eslint-disable no-console, max-len */ import async from 'async'; import fs from 'fs'; import path from 'path'; import minimist from 'minimist'; import prompt from 'p...
JavaScript
0
@@ -1757,81 +1757,8 @@ %09%7D,%0A -%09%7B ignoreCommand: !isBuildServer,%0A%09%09command: %60git add $%7Brelease%7D.md%60%0A%09%7D,%0A %09%7B%0A%09 @@ -1892,24 +1892,27 @@ 'git commit +-a -m %22Clean up @@ -1925,24 +1925,45 @@ elease%22 -m %22 +Build Server commit: Update relea
9b946103e0adcc0b6600092b73abb5906e1000b6
Change tags push command
scripts/release.js
scripts/release.js
const shell = require('shelljs'); const path = require('path'); const fs = require('fs'); const RELEASE_BRANCH = '1.0.x'; const cwd = path.resolve('.'); const pkgPath = path.join(cwd, 'package.json'); const bowerPath = path.join(cwd, 'bower.json'); function main() { shell.exec(`git stash`); shell.exec(`git checkout...
JavaScript
0.000001
@@ -725,22 +725,51 @@ push - --follow-tags +%60);%0A%09shell.exec(%60git push origin $%7Bversion%7D %60);%0A
6e157587ad51cf395fcbec9b8cf76bd78c00bb1d
increase the blueprints swiper-version to 3.4.1
blueprints/ember-cli-swiper/index.js
blueprints/ember-cli-swiper/index.js
module.exports = { description: 'add swiper bower package', normalizeEntityName() { }, afterInstall() { return this.addBowerPackageToProject('swiper', '~3.3.1 '); } };
JavaScript
0.000005
@@ -162,17 +162,17 @@ r', '~3. -3 +4 .1 ');%0A
c195fae44b6043805db8862d5f8fb9da560a9d68
remove method that is no longer used
scripts/scripts.js
scripts/scripts.js
'use strict' const date = new Date(); module.exports = { // Utility Functions for Bot.js /** * normalizes input from chat for grimoire card searches * - converts all characters to lowercase * - removes any colons found in chat input * - removes any spaces and replaces with slug "-" */ normalizeCardInput: ...
JavaScript
0.000002
@@ -903,249 +903,8 @@ %7D,%0A%0A -/**%0A * very poor method of checking file type.%0A */%0Afiletype: function (file) %7B%0A let jpg = file.endsWith('.jpg');%0A let gif = file.endsWith('.gif');%0A%0A if (jpg) %7B%0A return %22.jpg%22;%0A %7D else %7B%0A return %22.gif%22;%0A %7D;%0A%7D,%0...
243050586e55033f74debae5f2eac4ad17931161
Add boundaries to game board
myapp/public/javascripts/game-board.js
myapp/public/javascripts/game-board.js
/** * game-board.js * * Maintain game board object properties */ // Alias our game board var gameBoard = game.objs.board; /** * Main game board factory * * @returns {object} */ var getGameBoard = function() { var gameBoard = document.getElementById('game-board'); var width = gameBoard.width.baseVal.va...
JavaScript
0.000001
@@ -519,16 +519,134 @@ ea: area +,%0A topBound: 0,%0A rightBound: width - border,%0A leftBound: 0,%0A bottomBound: height - border%0A %0A %7D%0A%7D
fca48c9adf671af10d3516db74d338ceb8cfae09
change to proper quotes
src/components/Donuts.js
src/components/Donuts.js
import { connect } from 'react-redux'; import React, { Component } from 'react'; import DonutList from './DonutList' import '../css/Donuts.css'; class Donuts extends Component { render() { const { donuts } = this.props; if (!donuts || !donuts.length) { return ( <div> <h1>We see that y...
JavaScript
0.000006
@@ -315,17 +315,17 @@ that you -' +%E2%80%99 re very, @@ -392,14 +392,13 @@ ppin -' +%E2%80%99 in. - Hea @@ -421,16 +421,16 @@ nut -%22 +%E2%80%9C Viewer -%22 +%E2%80%9D and
0109bf88990c5746ff21c39c049c08542d0dca37
fix offscreen display triggered by text-indent
src/components/Search.js
src/components/Search.js
// @flow import React, { Component } from 'react'; import FontIcon from 'material-ui/FontIcon'; import TextField from 'material-ui/TextField'; import BookList from './BookList'; import { search } from '../utils/BooksAPI'; import searchTerms from '../common/searchTerms'; const styles = { searchContainer: { positio...
JavaScript
0
@@ -369,11 +369,10 @@ h: ' -100 +97 %25'%0A%09
ce1c864064ba29720e4a4479ef3ca1a9bc415dc1
Update Select padding and arrow position
src/components/Select.js
src/components/Select.js
const React = require('react'); const Icon = require('./Icon'); const objectAssign = require('object-assign'); const Select = React.createClass({ propTypes: { isMobile: React.PropTypes.bool, onChange: React.PropTypes.func, optionHoverStyle: React.PropTypes.object, options: React.PropTypes.array, ...
JavaScript
0
@@ -5433,33 +5433,43 @@ %0A padding: '1 -0 +1px 10px 12 px',%0A positio @@ -5707,25 +5707,30 @@ %0A right: -0 +'-5px' ,%0A top: ' @@ -5969,9 +5969,10 @@ n: ' -8 +10 px 0
c15e5f6d0c26f85bb63849d48681aaf18a709591
Add in hidden dependency.
src/components/routes.js
src/components/routes.js
var { Route, DefaultRoute } = require("react-router"), { OneColumnLayout } = require("./layouts"), { SearchPage } = require("./dna"); module.exports = ( <Route handler={OneColumnLayout} path="/"> <DefaultRoute handler={SearchPage} /> <Route name="search" path="/search" handler={SearchPage} /> </Rou...
JavaScript
0
@@ -1,12 +1,42 @@ var +React = require(%22react%22),%0A %7B Route,
f82e96b9b97435d80f08621c857154ed5ea146af
complete previous commit with js file
scripts/whereis.js
scripts/whereis.js
// steps = 0 => coming from whereis2.html i.e. not show steps // steps = 1 => coming from whereis-text.html i.e. show steps function loader(method, steps) { var state = document.readyState; if (typeof(localStorage) == 'undefined' ) { alert('Upgrade your browser as it does not support HTML5 localStorage.'); ...
JavaScript
0
@@ -1604,24 +1604,47 @@ map%3C/a%3E');%0A +%09$('#sidebar').show();%0A %7D else %7B
b73bc4f1fab4d0ed1f04daee3f23e03c274587bd
remove use of constant in strict mode
node-tests/unit/commands/build-test.js
node-tests/unit/commands/build-test.js
'use strict'; var td = require('testdouble'); var ui = require('../../../lib/utils/ui'); var expect = require('../../helpers/expect'); var Promise = require('ember-cli/lib/ext/promise'); var BuildCmd = require('../../../lib/commands/build'); var BuildTask = req...
JavaScript
0.000002
@@ -554,21 +554,19 @@ orm');%0A%0A -const +var mockPro @@ -628,21 +628,19 @@ ject');%0A -const +var mockAna @@ -708,13 +708,11 @@ ');%0A -const +var par
beb765e6b60ad70e901cba7ec965b1f1925ce69f
Add t= new Date() field to NamespaceStats output
nodejs/lib/monitors/namespace_stats.js
nodejs/lib/monitors/namespace_stats.js
var util = require('util'), wompt = require('../includes'), Cron = require('../cron'), async = wompt.dependencies.async; function NamespaceStatsPreparer(channelManager){ this.roomManager = channelManager; var stats = this.stats = new wompt.ClientPoolStats(this.roomManager.clients); var monitors = { c...
JavaScript
0.000001
@@ -505,16 +505,43 @@ sults)%7B%0A +%09%09%09results.t = new Date();%0A %09%09%09stats
fab3e315c429ee61fea21ee60ac57e82e5b81897
Add missing "until" option to deprecation message
build-support/ember-mocha-adapter.js
build-support/ember-mocha-adapter.js
/* Ember Mocha Adapter | (C) 2014 Teddy Zeenny | https://github.com/teddyzeenny/ember-mocha-adapter */ (function() { var done, doneTimeout, isAsync, emberBdd, isPromise; done = null; doneTimeout = null; isAsync = 0; Ember.Test.MochaAdapter = Ember.Test.Adapter.extend({ init: function() { this._su...
JavaScript
0.000001
@@ -2193,16 +2193,40 @@ async',%0A + until: '1.0.0',%0A
1247f236db23b4a41d8b036927d14283711adfa1
Fix CORS (and cookies) with localhost with travix js (#132)
src/travix/js/run.js
src/travix/js/run.js
const puppeteer = require('puppeteer'); const server = require('http-server-legacy').createServer({root: __dirname}); var url = 'http://localhost:8912/run.html'; (async () => { server.listen(8912); const browser = await puppeteer.launch(); const page = await browser.newPage(); page.on('console', msg => console...
JavaScript
0.000007
@@ -235,16 +235,194 @@ .launch( +%7B%0A headless: true,%0A devtools: true,%0A args: %5B%0A '--disable-web-security',%0A '--disable-features=IsolateOrigins',%0A '--disable-site-isolation-trials'%0A %5D%0A %7D );%0A con @@ -1181,8 +1181,9 @@ );%0A%7D)(); +%0A
4f50045bed9d0eed2cbbf66ad25332d5bfc7daf8
implement onClose and onOpen callback
src/ui/views/menu.js
src/ui/views/menu.js
// Copyright (c) 2013 M-Way Solutions GmbH // http://github.com/mwaylabs/The-M-Project/blob/absinthe/MIT-LICENSE.txt /** * M.MenuView inherits from M.View. * To add childViews to this view name it 'menu-content' * @module M.MenuView * * @type {*} * @extends M.View * @example * var menu = M.MenuView.extend({},{...
JavaScript
0.000001
@@ -302,32 +302,185 @@ enuView.extend(%7B +%0A * onOpen: function()%7B%0A * console.log('menu open');%0A * %7D,%0A * onClose: function()%7B%0A * console.log('menu close');%0A * %7D%0A * %7D,%7B%0A 'men @@ -3111,16 +3111,41 @@ ation);%0A + this._onClose();%0A %7D,%0...
032c70fb6c48862d41557ca43df927b7ab1400cc
Change empty detection
src/util/pipeline.js
src/util/pipeline.js
'use strict' const Splicer = require('stream-splicer') /** * This represents linear pipeline of the series of the duplex streams. */ class Pipeline extends Splicer { /** * @param {Duplex[]} streams The duplex streams * @param {object} opts The options */ constructor(streams, opts = {}, objec...
JavaScript
0.000002
@@ -414,28 +414,142 @@ his. -on('data', data =%3E %7B +version = 0%0A%0A this.on('data', data =%3E %7B%0A%0A this.version = this.version + 1%0A%0A const version = this.version%0A %0A @@ -591,24 +591,25 @@ () === 0) %7B%0A +%0A @@ -616,33 +616,179 @@ -this.emit('buf...
6c49e632aa55bf573e25963b5d37d69b418e11bd
migrate data: get room ID from Json file
src/utils/migrate.js
src/utils/migrate.js
/* USAGE: -------------------- Migrate a single json file: migrate.migrateJSON('1030266141029-b5ba6ff6.json?tutorial'); -------------------- Migrate a playlist by loading if from the web: migrate.loadAndMigratePlaylist('https://dance-tonite.puckey.studio/public/playlists/curated.json') -------------------- Mi...
JavaScript
0
@@ -1882,25 +1882,30 @@ N(filename, -r +forceR oomID) %7B%0A c @@ -2237,65 +2237,309 @@ -firebaseUploader.upload(%0A jsonString.split('%5Cn') +// get roomID from json (unless specified in parameter)%0A const dataLines = jsonString.split('%5Cn');%0A const headerData = JSON.parse(dataLine...
b01213f4cd6c4b702d9b7f2427476c280f914b4d
Remove multiple resolutions error
src/utils/promise.js
src/utils/promise.js
define( function () { 'use strict'; var promise, PENDING = {}, FULFILLED = {}, REJECTED = {}, multipleResolutionMessage; multipleResolutionMessage = 'A Promise cannot be resolved or rejected multiple times'; promise = function ( callback ) { var fulfilledHandlers, rejectedHandlers, state, result, mak...
JavaScript
0.000007
@@ -99,127 +99,8 @@ = %7B%7D -,%0A%0A%09%09multipleResolutionMessage;%0A%0A%09multipleResolutionMessage = 'A Promise cannot be resolved or rejected multiple times' ;%0A%0A%09 @@ -848,52 +848,14 @@ %09%09%09%09 -throw new Error( multipleResolutionMessage ) +return ;%0A%09%09 @@ -2876,8 +2876,9 @@ %0A%09%7D%0A%0A%7D...
c951db0db809bc1cae20c749d32095d4321cc509
Bring back Step CLI view
src/view/Step/CLI.js
src/view/Step/CLI.js
/** A command-line interface that outputs and formats a Step's failures. * *@class */ var StepCLI = new Class(/** @lends StepCLI# */{ Extends: require('../PromiseView'), /** Presents details of a step failure to the user. * *@param {String} message The reason why the step failed. */ showFailure: function showFai...
JavaScript
0
@@ -420,16 +420,21 @@ back%0A%09%09 +this. animator
70fa0e3b38aaf99131eed5553a792ade7881b30a
Fix test
integration/tests/frontpage.test.js
integration/tests/frontpage.test.js
/* eslint-disable no-undef */ const {assert} = require('chai'); describe('Testing frontpage', () => { beforeEach(() => { browser.url('/'); browser.pause(200); }); it('Should render frontpage', () => { const text = browser.getText('body'); const expected = 'Tanterne'; assert.include(text, exp...
JavaScript
0.000004
@@ -278,16 +278,19 @@ = ' -Tanterne +Find en bog ';%0A
7f1bf55ba06489b59cddb8d9ad9a6fc701b9011e
Fix GitHub source links in the demo toolbar (#31339)
docs/src/modules/components/MarkdownDocs.js
docs/src/modules/components/MarkdownDocs.js
import * as React from 'react'; import PropTypes from 'prop-types'; import { useRouter } from 'next/router'; import Demo from 'docs/src/modules/components/Demo'; import MarkdownElement from 'docs/src/modules/components/MarkdownElement'; import { exactProp } from '@mui/utils'; import ComponentLinkHeader from 'docs/src/m...
JavaScript
0
@@ -2788,32 +2788,209 @@ );%0A %7D%0A%0A + const splitLocationBySlash = location.split('/');%0A splitLocationBySlash.pop();%0A const fileNameWithLocation = %60$%7BsplitLocationBySlash.join('/')%7D/$%7Bname%7D%60;%0A%0A return ( @@ -3498,24 +3498,30 @@ ION%7D -/docs/src/$%7Bname ...
f96280a03a61d892e7a09295b20bf32c3af45e1d
Write tests for getSearchResult
jasmine/spec/inverted-index-test.js
jasmine/spec/inverted-index-test.js
'use strict'; describe("Inverted index test", function() { var index; beforeEach(function() { index = new Index(); }); describe("Read book data", function() { it("Should read a JSON file and assert not empty", function() { expect(Index).toBeDefined(); expect(index.getData).toBeDefined(); va...
JavaScript
0.000005
@@ -859,22 +859,16 @@ ined();%0A - %0A v @@ -3010,22 +3010,467 @@ (%5B%5D));%0A%09%09%7D); +%0A%0A it(%22Should take an array of search parameters and return an array of the indices of the parameters%22, function() %7B%0A expect(index.getSearchResult).toBeDefined();%0A%0A var obj = %7B%0A ...
1f298715d7a860690eec1b1324d07a8d8488d8d5
Add "type":"module" to published root package.json file.
config/prepareDist.js
config/prepareDist.js
// The Apollo Client source that is published to npm is located in the // "dist" directory. This utility script is called when building Apollo Client, // to make sure the "dist" directory is prepared for publishing. // // This script will: // // - Copy the current root package.json into "dist" after adjusting it for //...
JavaScript
0.000013
@@ -808,16 +808,324 @@ .js');%0A%0A +// Enable default interpretation of .js files as ECMAScript modules. We don't%0A// put this in the source ../package.json file because it interferes with tools%0A// like ts-node, which we use to run various ../config/*.ts scripts.%0A// TODO(benjamn) Fully diagnose that interference...
7fd72c7f9d567e9932c343b73d9851cc60998fdc
add vertex and graph class
Algorithms/JS/graphs/adjacencyList.js
Algorithms/JS/graphs/adjacencyList.js
// Build a graph using an adjacency list. // No vertex class // Should have a storage property that holds vertex id along with all the edges. // Methods: // addVertex // removeVertex // addEdge // removeEdge // neighbors(vertex) -> return the array of neighbors for a vertex
JavaScript
0.000001
@@ -271,8 +271,207 @@ ertex%0A%0A%0A +class Vertex%7B%0A constructor( val )%7B%0A this.value = val;%0A this.edges = %7B%7D;%0A %7D%0A%7D%0A%0Aclass Graph%7B%0A constructor()%7B%0A this.vertices = %7B%7D;%0A this.totalVertices = 0;%0A this.totalEdges = 0;%0A %7D%0A%7D%0A
eabae75f3e09c4176255b1272c4b623f07e39051
fix incorrect `no-browser-hacks` option for SCSS syntax
config/syntax/scss.js
config/syntax/scss.js
'use strict'; module.exports = { "rules": { "no-browser-hacks": false } };
JavaScript
0.000059
@@ -74,13 +74,12 @@ s%22: -false +null %0A
03653efc0acbf51875a78c3647d4ed6676052e1f
Solve Word Count in JS
javascript/word-count/word-count.js
javascript/word-count/word-count.js
// super ugly but I'm tired var Words = function() {}; Words.prototype.count = function(input) { var wordArray = normalize(input.replace(/[\n\t]/g, ' ').trim()).split(' '); var result = {}; toLower(wordArray).forEach(function(item) { if (result[item] && Number.isInteger(result[item])) result[item] += ...
JavaScript
0.999999
@@ -388,32 +388,8 @@ ) %7B%0A - console.log(array);%0A @@ -480,32 +480,8 @@ %7D%0A - console.log(array);%0A @@ -534,79 +534,8 @@ ) %7B%0A - console.log(string);%0A console.log(string.replace(/%5Cs+/g, ' '));%0A
c5c65ffbfb096c3173457cfd5196a143794a7038
delete comments that pre-date VSlider
js/common/view/CoefficientSlider.js
js/common/view/CoefficientSlider.js
// Copyright 2018, University of Colorado Boulder //TODO https://github.com/phetsims/phet-io/issues/1374 how to instrument a VSlider + DynamicProperty /** * Vertical slider for changing one of the coefficients in a quadratic equation. * The default response of this slider is linear. To change the response, use opti...
JavaScript
0
@@ -3869,140 +3869,8 @@ der. - Position this after rotating the slider,%0A // but before adding ticks, so that the label is horizontally centered on the track. %0A @@ -4149,92 +4149,8 @@ bels -, rotated opposite the HSlider, so that they'll look correct on the rotated HSlider. %0A
33f2c66d6f32507e86851cbac58be398ff4ca8de
Use @returns instead of @return, see https://github.com/phetsims/chipper/issues/557
js/common/view/GQEquationFactory.js
js/common/view/GQEquationFactory.js
// Copyright 2018, University of Colorado Boulder /** * GQEquationFactory creates strings that display various equations needed by this sim. * The strings contain markup that is compatible with SCENERY/RichText. * Equations are reduced so that they don't contain terms that evaluate to zero, * and coefficients are ...
JavaScript
0
@@ -3422,16 +3422,17 @@ @return +s %7Bstring
c82592d224ef6090c8f0a1045e583f4a87ff81a6
Fix #2196: Rehash inline style for spinner (CSP)
server/security.js
server/security.js
"use strict"; let helmet = require("helmet"); let csurf = require("csurf"); const ONE_YEAR = 31536000000; let defaultCSPDirectives = { defaultSrc: [ "'self'" ], connectSrc: [ "'self'", "https://pontoon.mozilla.org", "https://mozilla.github.io/thimble-homepage-gallery/activities.json", "https://ap...
JavaScript
0
@@ -1315,82 +1315,58 @@ %22' -unsafe-inline'%22%0A // %22'sha256-jxjTomDIR9qe7wntK24mAd+gIoz39DrBll8o6DEBALs +sha256-AnlD8XRHNPxhNZ/6MucKFJr9yYGQtn8bmvveYkBg7a4 ='%22%0A
4460f6c3257efb7c22f8ee4241f3247bc081ec10
Clear the coupon error when a coupon is removed.
js/views/modals/purchase/Coupons.js
js/views/modals/purchase/Coupons.js
import $ from 'jquery'; import loadTemplate from '../../../utils/loadTemplate'; import BaseModal from '../BaseModal'; import multihashes from 'multihashes'; export default class extends BaseModal { constructor(options = {}) { super(options); this.options = options; if (!options.listingPrice) { thr...
JavaScript
0
@@ -3231,24 +3231,71 @@ uponCodes);%0A + this.codeResult = %7B type: 'valid', code %7D;%0A this.ren
dfdb80d9ddb019bb239d95f16223274a683d10d0
remove stray comment block
js_sandbox/lib/go-rts-zambia-sms.js
js_sandbox/lib/go-rts-zambia-sms.js
var vumigo = require("vumigo_v01"); var jed = require("jed"); if (typeof api === "undefined") { // testing hook (supplies api when it is not passed in by the real sandbox) var api = this.api = new vumigo.dummy_api.DummyApi(); } var Promise = vumigo.promise.Promise; var success = vumigo.promise.success; var Ch...
JavaScript
0
@@ -4348,68 +4348,8 @@ rs%0A%0A - // START CMS Interactions%0A%0A%0A // END CMS Interactions%0A %0A
76d9877412b864f1ce3e4277c12877999b9b5978
Fix typo.
lib/axiom_shell/commands.js
lib/axiom_shell/commands.js
// Copyright (c) 2014 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import AxiomError from 'axiom/core/err'; export var ShellCommands = function(moduleManager) { this.moduleManager = moduleManager; this.extensi...
JavaScript
0.001604
@@ -204,16 +204,18 @@ core/err +or ';%0A%0Aexpo
82ef2621ae56fde24d16c424df858298d13456a1
Fix logic
content/tabbrowser.js
content/tabbrowser.js
/* * Patches for the tabbrowser-tabs object. * * These are necessary where the original implementation assumes a * horizontal layout. */ var VTTabbrowserTabs = { patch: function() { var tabs = document.getElementById("tabbrowser-tabs"); tabs._getDropIndex = this._getDropIndex; tabs._s...
JavaScript
0.000203
@@ -784,45 +784,282 @@ -if (this.VTGroups.isGroup(tabs%5Bi%5D)) %7B +// If we're dropping anywhere on a group, drop to within the group%0A if (event.screenY %3C tabs%5Bi%5D.boxObject.screenY + tabs%5Bi%5D.boxObject.height%0A && this.VTGroups.isGroup(tabs%5Bi%5D)) %7B%0A //...
9083fc2e20ff5e5dd911c06774e93546e139845e
fix forgotten comment
lib/cartodb/api/auth_api.js
lib/cartodb/api/auth_api.js
var assert = require('assert'); var step = require('step'); /** * * @param {PgConnection} pgConnection * @param metadataBackend * @param {MapStore} mapStore * @param {TemplateMaps} templateMaps * @constructor * @type {AuthApi} */ function AuthApi(pgConnection, metadataBackend, mapStore, templateMaps) { thi...
JavaScript
0.000004
@@ -2417,36 +2417,33 @@ ram -params res.locals parameters +res - standard res object . Co @@ -2468,16 +2468,26 @@ rameters + in locals %0A * @par
55cb70319167c9e3b8a9c1e2547e250b224b3484
Add issue when loggin with wrong username
api/route/users.js
api/route/users.js
var db = require('../config/database'); var jwt = require('jsonwebtoken'); var secret = require('../config/secret'); exports.login = function(req, res) { var username = req.body.username || ''; var password = req.body.password || ''; if (username == '' || password == '') {  return res.send(401); } db.userMo...
JavaScript
0.000001
@@ -434,16 +434,75 @@ );%0A%09%09%7D%0A%0A +%09%09if (user == undefined) %7B%0A%09%09%09return res.send(401);%0A%09%09%7D%0A%09%09%0A %09%09user.c
18159a6f3ba87ae755a2a1c6fccb64e4ef41d9d2
improve comment
src/api/dashboard.js
src/api/dashboard.js
var URLHelper = require('./url-helper'); var _ = require('underscore'); function Dashboard (dashboard) { this._dashboard = dashboard; } Dashboard.prototype = { /** * @return {View} used in the dashboard */ getView: function () { return this._dashboard.dashboardView; }, /** * @return {Map} the...
JavaScript
0
@@ -681,77 +681,18 @@ var -widgetsState = this._dashboard.widgets._widgetsCollection.getStates() +state = %7B%7D ;%0A @@ -736,36 +736,16 @@ // TODO%0A - var state = %7B%7D;%0A if ( @@ -787,24 +787,232 @@ apState;%0A + /*%0A * Disabled widget states until issues are fixed.%0A * See https://github...
c1f44b4c263420feb6c2644d96d4430d86d5b2eb
Full month in formatted date
vanilla/jscode/commons/common.filters.js
vanilla/jscode/commons/common.filters.js
(function() { 'use strict'; angular.module('web').filter('bytes', Bytes); angular.module('web').filter('moment', Moment); angular.module('web').filter('moment_unix', MomentUnix); angular.module('web').filter('unix_date', Unix2Date); function Bytes() { return function(bytes, precision) { ...
JavaScript
0.999985
@@ -238,16 +238,163 @@ Date);%0A%0A + var months = new Array(%22January%22, %22February%22, %22March%22, %22April%22, %22May%22, %22June%22, %22July%22, %22August%22, %22September%22, %22October%22, %22November%22, %22December%22); %0A%0A func @@ -1064,16 +1064,132 @@ %0A %7D%0A%0A + function getMonthName(m)...
f1959c14a1d22bed5b5197d0139c485dc6416422
Fix wrapper size
src/app/Hit/index.js
src/app/Hit/index.js
import classnames from 'classnames' import React, {createClass} from 'react' import TimeAgo from 'react-timeago' import {Highlight} from 'react-instantsearch/dom' import Badge from '../Badge' import './style.scss' function isRecently (timestamp) { const now = Date.now() const diff = now - timestamp const last2...
JavaScript
0.000001
@@ -700,16 +700,22 @@ t-image +w-100 db br3',
ea85d2b76e7a16f6b50fe6bc3109b07e2f6eb1a1
fix exception if no accept-header set
tasks/couchserver.js
tasks/couchserver.js
// Licensed under the Apache License, Version 2.0 (the "License"); you may not // use this file except in compliance with the License. You may obtain a copy of // the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed un...
JavaScript
0
@@ -1751,16 +1751,38 @@ accept = + req.headers.accept && req.hea @@ -3481,16 +3481,26 @@ = '/' && + accept && accept%5B
109101b6d6fc7131a41f9f4ffd24305c1d5d1c09
Add helper.js to grunt watch
tasks/development.js
tasks/development.js
module.exports = function (grunt) { grunt.config.merge({ connect: { server: { options: { base: { path: 'build', options: { index: 'index.html' } }, livereload: true } } }, watch: { sources: { ...
JavaScript
0
@@ -404,16 +404,29 @@ app.js%22, + %22helper.js%22, %22lib/**
1d0a11f13072b78909585ac2e53626d620e7d922
Use async/await in sauce-tests.js (#63)
tasks/sauce-tests.js
tasks/sauce-tests.js
/*jslint node: true */ 'use strict'; const saucelabs = require('sauce-test-runner'); const StaticServer = require('static-server'); const port = 9999; let reportStatus = 1; const config = { urls: [`localhost:${port}/test/sauce-tests.html`], testname: 'Elix tests', framework: 'mocha', throttled: 3, sauceCo...
JavaScript
0
@@ -1158,27 +1158,49 @@ %7D;%0A%0A -function runTests() +const startStaticHttpServer = async () =%3E %7B%0A @@ -1330,179 +1330,261 @@ %7D);%0A + %0A -server.start(() =%3E %7B%0A saucelabs(config)%0A .then(() =%3E +await new Promise((resolve) =%3E %7Bserver.start(resolve);%7D);%0A return server;%0A%7D;%...
39fc50913c2df07b06595e8ab38a934b1dca1ae5
Fix debug output of objects, which I broke in da09a8df
chrome/content/zotero/xpcom/debug.js
chrome/content/zotero/xpcom/debug.js
/* ***** BEGIN LICENSE BLOCK ***** Copyright © 2009 Center for History and New Media George Mason University, Fairfax, Virginia, USA http://zotero.org This file is part of Zotero. Zotero is free software: you can redistribute it and/or modify ...
JavaScript
0.000006
@@ -1974,21 +1974,19 @@ %7D%0A%09%09%7D%0A%09%09 -else +%0A%09%09 if (type
b56d78047b8865e382810b750abc61db381160b9
Move from `expandFiles` to grunt 0.4's `expand` This largely fixes 0.4 compatibility for me
tasks/spritesheet.js
tasks/spritesheet.js
module.exports = function(grunt) {"use strict"; var Builder = require('../').Builder; grunt.registerMultiTask("spritesheet", "Compile images to sprite sheet", function() { var helpers = require('grunt-lib-contrib').init(grunt); var options = helpers.options(this); var done = this.async...
JavaScript
0
@@ -777,21 +777,16 @@ e.expand -Files (file.sr
9423fd58d45b707d002498b8b79df292460f248a
increase jest timeout to 30s for default
configs/setupTestFramework.js
configs/setupTestFramework.js
/** * Increase or disable jest tests timeout * Timeout value should not be 0 * Default is 5s */ jest.setTimeout(process.env.TIMEOUT || 5000);
JavaScript
0.000001
@@ -86,17 +86,18 @@ ault is -5 +30 s%0A */%0Aje @@ -137,9 +137,10 @@ %7C%7C -5 +30 000)
26c553153e1d4b50e66839525973f23e5ecc1089
fix weird edge cases
src/assets/js/app.js
src/assets/js/app.js
// Run all of this when the document's ready $(function(){ // Load all of our UI elements here so that they're cached and super fast var metaform = $('#metaform'), wordEntry = $('#word-entry'), btnEntry = $('.btn-entry'), question = $('#question'), answer = $('#answer'), answerWord = ...
JavaScript
0.000078
@@ -2446,16 +2446,42 @@ ry.val() +.trim().replace(/%5C//, ' ') ;%0A%0A / @@ -2533,16 +2533,31 @@ rd != %22%22 + && word != %22.%22 )%7B%0A
4f9e75009267d7a0c6160a54ff732d3685a5f16b
Fix typo in autoRehydrate.js (#103)
src/autoRehydrate.js
src/autoRehydrate.js
import { REHYDRATE } from './constants' import isStatePlainEnough from './utils/isStatePlainEnough' export default function autoRehydrate (config = {}) { return (next) => (reducer, initialState, enhancer) => { return next(createRehydrationReducer(reducer), initialState, enhancer) } function createRehydratio...
JavaScript
0
@@ -1491,24 +1491,17 @@ nEnough( -reducedS +s tate%5Bkey
eb5fa5906d121e67f920f71059287b25abe8237f
Remove redundant watching of JS files
gulp/tasks/watch.js
gulp/tasks/watch.js
'use strict'; var config = require('../config'); var gulp = require('gulp'); gulp.task('watch', ['browserSync', 'server'], function() { gulp.watch(config.scripts.src, ['lint', 'browserify']); gulp.watch(config.styles.src, ['styles']); gulp.watch(config.images.src, ['images', 'reload']); gul...
JavaScript
0
@@ -148,16 +148,104 @@ on() %7B%0A%0A + // Scripts are automatically watched and rebundled by Watchify inside Browserify task%0A gulp.w @@ -280,22 +280,8 @@ int' -, 'browserify' %5D);%0A
c35f4ff43255e407cd5e769735cc070fe82f6fcb
fix typo
FUSION_CONFIG.sample.js
FUSION_CONFIG.sample.js
appConfig = { //eslint-disable-line // If you don't know what you want for some configuration items, // leave them as-is and see what happens in UI. // You may need to clear browser history/cache before your changes take affect. // Styles and colors: in addition to the functional settings in this file, // yo...
JavaScript
0.999991
@@ -4433,17 +4433,16 @@ ata rega -u rding se
7bb24cb8018b34e33c2c8de5640fac45585dfd36
Remove unused utility function
utils.js
utils.js
/* * Copyright 2016 Hippo B.V. (http://www.onehippo.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
JavaScript
0.000001
@@ -869,169 +869,8 @@ %0A%7D%0A%0A -function getRelativeModuleFolderPath(moduleName) %7B%0A const relativeModulePath = getRelativeModulePath(moduleName);%0A return path.dirname(relativeModulePath);%0A%7D%0A%0A modu @@ -913,38 +913,7 @@ th,%0A - getRelativeModuleFolderPath,%0A %7D;%0A
f3e7829986a7cd33e57067877c83879071b3efd7
fix build on Node.JS ≤ 5
utils.js
utils.js
module.exports.parseSql = function parseSql(str) { const lines = str.split('\n'); const result = { up: '', down: '', trash: '' }; let current = 'trash'; for (let line of lines) { if (line.indexOf('-- +migrate Up') === 0) { current = 'up'; continue; } if (line.indexOf('-- +migrate Down') === 0...
JavaScript
0.000009
@@ -1,8 +1,23 @@ +'use strict';%0A%0A module.e
f88b312293287a711599235f7cf58d852a618a66
Switch to querySelector(All)
assets/javascripts/actuator.js
assets/javascripts/actuator.js
function Actuator (game, board) { this.game = game; this.board = board; this.markup = { board: document.getElementById('board'), cells: document.getElementsByClassName('cell') this.events = { loss: new Event('loss'), draw: new Event('draw') }; this.bindEvents(); this.bindCustomEvents();...
JavaScript
0
@@ -112,24 +112,24 @@ ent. -getElementById +querySelector (' +# boar @@ -157,32 +157,27 @@ ent. -getElementsByClassName +querySelectorAll (' +. cell
fb4403c7c00790efa2c187186b86ea3152d94d84
fix quit
modules/basicfunctions.js
modules/basicfunctions.js
var bot = require( '..' ); bot.addListener( 'message', function ( nick, to, text ) { if ( text.substr( 0, 4 ) === '!say' ) { bot.notice( to, text.substr( text.indexOf( ' ' ) + 1 ) ); } else if ( text.substr( 0, 4 ) === '!src' ) { bot.notice( to, nick + ' : https://github.com/zuzakistan/civilservant' ); } else i...
JavaScript
0.000002
@@ -325,33 +325,33 @@ text.substr( 0, -4 +5 ) === '!quit' )
f42d2b8c5d13c0e83fe0f4fd7af2c01fe18431c6
disable exiting help overlay until 100% loaded
site/js/toolbar.js
site/js/toolbar.js
$(document).ready(function() { // toolbar animation and help overlay functions $("#toolbar").hide(); $("#tab").click( function(){ $("#toolbar").slideToggle("fast"); } ); // functions for controlling the help overlay visibility and position function loadPopup(){ ...
JavaScript
0
@@ -1422,32 +1422,92 @@ ick(function()%7B%0A +%09if ($(%22#progress_pbImage%22).attr(%22title%22) == %22 100%25%22) %7B%0A disableP @@ -1506,32 +1506,35 @@ disablePopup();%0A +%09%7D%0A %7D);%0A%0A cen
df86e266bf4a93c453364e790ce41b16d072d45d
Put cache false on ajax
dbaas/admin/static/admin/js/notification.js
dbaas/admin/static/admin/js/notification.js
Base = window.Base || {}; Base.init = function(options) { Base.DbaasNotification.init(options); } Base.DbaasNotification = {}; (function (window, document, $) { 'use strict'; var url, $container, self; function init(config) { self = this; self.url = config.url; self.taskUrl = config...
JavaScript
0.000003
@@ -1087,16 +1087,38 @@ false,%0A + cache: false,%0A
1ecb16e2cc599594d04c37ba8cb84c0c299d108b
switch db
models/db.js
models/db.js
// Mongoose with mongolab var mongoose = require('mongoose'); //mongoose.connect('mongodb://jemah:enchord2016@ds029117.mongolab.com:29117/enchord'); mongoose.connect('mongodb://jemah_local:enchord2016@ds041387.mongolab.com:41387/enchord_local'); exports.mongoose = mongoose.connection;
JavaScript
0.000005
@@ -55,18 +55,16 @@ oose');%0A -// mongoose @@ -136,24 +136,26 @@ /enchord');%0A +// mongoose.con
573b80a2bf95211eb11921f8aa057b09250987e5
update input-number
packages/element/input-number/index.js
packages/element/input-number/index.js
export default class NumberInputElement extends HTMLElement { static get observedAttributes() { return ['value', 'disabled', 'min', 'max', 'step']; } constructor() { super(); this.attachShadow({ mode: 'open' }).innerHTML = ` <style> :host { display: inline-flex; } ...
JavaScript
0.003208
@@ -522,22 +522,21 @@ stener(' -change +input ', () =%3E
c221e6c5d63a2ac60215d09d459dd23930f9671a
Revert "fixed API docs"
packages/ember-simple-auth/lib/core.js
packages/ember-simple-auth/lib/core.js
'use strict'; function extractLocationOrigin(location) { var port = location.port; if (Ember.isEmpty(port)) { //need to include the port whether its actually present or not as some versions of IE will always set it port = location.protocol === 'http:' ? '80' : (location.protocol === 'https:' ? '443' : '');...
JavaScript
0
@@ -2960,74 +2960,37 @@ ort -also has to be specified when the default ports 80 or 443 are used +can be left out when it is 80 ))_%0A
c6f398add9622d5dd84b8347a4f85fa98da6c5ad
Use platform EOL for newlines
spec/import-notebook-spec.js
spec/import-notebook-spec.js
"use babel"; // const { dialog } = require("electron").remote; const { existsSync } = require("fs"); import { _loadNotebook } from "../lib/import-notebook"; import { waitAsync } from "./helpers/test-utils"; describe("Import notebook", () => { const sampleNotebook = require.resolve("./helpers/test-notebook.ipynb"); ...
JavaScript
0
@@ -95,16 +95,47 @@ (%22fs%22);%0A +const %7B EOL %7D = require(%22os%22);%0A import %7B @@ -690,12 +690,11 @@ lit( -%22%5Cn%22 +EOL )).t
4775e84e3f186d444a07920d016bd3053b2c768b
restructure of context
lib/emitter/push/context.js
lib/emitter/push/context.js
'use strict' module.exports = function bindContextInternal (emitter, bind, event) { var stamp = event.stamp var binds = emitter.contextBinds var stampBinds = binds && binds[stamp] var chain = bind.storeContextChain() var key = createKey(chain) if (!stampBinds || !stampBinds[key]) { if (!emitter.hasOwnP...
JavaScript
0.005556
@@ -225,34 +225,230 @@ )%0A -var key = createKey(chain) +// kan de data nog verschillen? niet echt...%0A // maybe make a map%0A // %7B%0A // %5Buid%5D: %7B%0A // context: %5B%5D%0A // %7D%0A // %7D%0A var key = createKey(chain)%0A%0A console.log('CONTEXT', bind.uid, key) // would this be enough?%0A ...
544b118a58ccd570db7e301451107d6afc942182
fix Chrome bug
js/Controller.js
js/Controller.js
var demo = demo || {}; demo.Controller = (function ($) { // HTML Imports support feature test var supportsHTMLImports = Boolean('import' in document.createElement('link')); // Test to see if the browser supports the HTML template element by checking // for the presence of the template element's conte...
JavaScript
0.000001
@@ -488,108 +488,8 @@ %7B%0A%0A - mainPage = $('div%5Bdata-main-page%5D');%0A mainPageId = mainPage.attr('data-main-page');%0A%0A @@ -1322,24 +1322,280 @@ options) %7B%0A%0A + // Use an empty page for main page placeholder%0A // and prevent jQuery Mobile to inject a blank page%0A ...
6f608b9729cb5e3eab56c15c0ab8675e78ae8d4f
Rename Dimension2 flipped to swapped, https://github.com/phetsims/dot/issues/108
js/Dimension2.js
js/Dimension2.js
// Copyright 2013-2020, University of Colorado Boulder /** * Basic width and height, like a Bounds2 but without the location defined. * * @author Jonathan Olson <jonathan.olson@colorado.edu> */ import Bounds2 from './Bounds2.js'; import dot from './dot.js'; class Dimension2 { /** * Creates a 2-dimensional s...
JavaScript
0
@@ -2349,16 +2349,12 @@ * -Flip the +Swap wid @@ -2378,19 +2378,16 @@ return -in a new Di @@ -2447,11 +2447,11 @@ /%0A -fli +swa pped
e4ea1625bacfa2caf97f907ff3dbb8fe71782639
remove unused variable
js/FaceDetect.js
js/FaceDetect.js
(function () { "use strict"; var FaceDetect = (function () { // Configurations var detectionInterval = 33; // 33ms is fastest, 200ms is default var faceboxColors = ["#e74c3c", "#3498db", "#2ecc71", "#f1c40f", "#9b59b6", "#e67e22"]; // Hex color values for each facebox; will cycle if th...
JavaScript
0.00003
@@ -352,124 +352,8 @@ ors%0A - var minConfidence = 0.75; // Minimum confidence level for successful face authentication, range from 0 to 1%0A
81daf7644a82edf9fd19483afcb74b8922f22f8a
increase player to 120fps, remove pause function
js/app/player.js
js/app/player.js
define(['jquery', './gbc', './joypad', './roms', 'jquery-cookie'], function($, gbc, joypad, roms) { var interval = null; var gameboy = null; var romImage = null; function main() { var lastPath = $.cookie("romPath"); if(lastPath == null || roms.indexOf(lastPath) < 0) { lastPath = roms[0]; ...
JavaScript
0.000001
@@ -1,8 +1,20 @@ +gb = null;%0A%0A define(%5B @@ -1335,24 +1335,29 @@ ;%0A %7D%0A%0A + gb = gameboy = g @@ -1461,9 +1461,10 @@ 0 / -6 +12 0.0)
56aaeff67e3c53d6890659954ad96ea7fc3f95b9
Cut debugging statement.
js/bogorouter.js
js/bogorouter.js
/*global document: false, require: false, __webpack_public_path__: true */ 'use strict'; // A minimalist router, using webpack to build chunks for each page. // To add new pages, extend the condition with additional url patterns // and require.ensure() blocks. var config = require('config'); __webpack_public_path__ ...
JavaScript
0
@@ -617,35 +617,8 @@ me;%0A -console.log(%22path%22, path);%0A if (
f892c6842a7179ce872e5512c58742597ffca4d6
Make 'options' attribute optional. Currently throws non-assignable expression error when undefined. Create options variable which copies $scope.options or defaults to {} if undefined.
angles.js
angles.js
var angles = angular.module("angles", []); angles.chart = function (type) { return { restrict: "A", scope: { data: "=", options: "=", id: "@", width: "=", height: "=", resize: "=", chart: "@", segments:...
JavaScript
0
@@ -82,17 +82,16 @@ return %7B - %0A @@ -1311,35 +1311,16 @@ troy();%0A - %0A @@ -1324,31 +1324,28 @@ -$scope. +var options = $s @@ -1364,36 +1364,16 @@ %7C%7C %7B%7D;%0A - %0A @@ -1546,32 +1546,16 @@ hart; %7D%0A - %0...
7bb0167679f38da1a71c66f270a25ecda948213a
Decrease amount of instances of echostream
frontend/js/services/websocket.js
frontend/js/services/websocket.js
/** * Created by stas on 24.01.16. */ 'use strict'; playzoneServices.factory('WebsocketService', function($websocket, $location, $rootScope, $timeout, $interval, UserRest) { var listenersMap = {}; // Open a WebSocket connection var webSocketPath = 'ws://ws.' + $location.host() + ':8081/'; var webSock...
JavaScript
0.000002
@@ -1222,90 +1222,8 @@ var -testLag = function() %7B%0A var echoStream;%0A var stop = false;%0A%0A echo @@ -1262,24 +1262,43 @@ oPath);%0A +var stop = false;%0A%0A echoStre @@ -1311,36 +1311,32 @@ essage(%0A - - function (messag @@ -1325,31 +1325,24 @@ function ( -mes...
8d0e9c3b3e52eda6a88e9810c402742af1154b5b
Merge after update
js/controller.js
js/controller.js
$(document).ready(function() { var grid = new Grid(25,50); grid.renderGrid(); var plane = new Plane(grid.width, grid.height); plane.setPlane(); var viewPlane = new ViewPlane(plane, grid); viewPlane.init(); generateAsteroids(); moveAsteroids(); });
JavaScript
0
@@ -241,16 +241,18 @@ s();%0A%0A +// moveAste
0f2e2357c0a7c4c6b5dd7833d9a2533b14351262
Fix variable name
src/builder/Entry.js
src/builder/Entry.js
class Entry { /** * Create a new Entry instance. */ constructor() { this.structure = {}; this.base = ''; } /** * Fetch the underlying entry structure. */ get() { return this.structure; } /** * Get the object keys for the structure. */ ...
JavaScript
0.99981
@@ -3027,16 +3027,29 @@ let path +FromPublicDir = outpu @@ -3090,32 +3090,45 @@ !path +FromPublicDir .startsWith('/' @@ -3168,16 +3168,29 @@ !path +FromPublicDir .startsW
6374404639fc27d9e0b9de23ac8ce732664aaad4
fix linter errors, DRY up babel plugin config
packages/config/loaders/babel.js
packages/config/loaders/babel.js
'use strict'; var hopsConfig = require('..'); function createIdentifier(targets) { return JSON.stringify({ env: process.env.NODE_ENV + ',' + process.env.BABEL_ENV, version: require('../package.json').version, targets: targets }); } function getBabelLoader(targets, plugins) { return { test: /\.m...
JavaScript
0
@@ -58,32 +58,33 @@ createIdentifier + (targets) %7B%0A re @@ -268,16 +268,17 @@ elLoader + (targets @@ -614,23 +614,49 @@ argets: -targets +%7B browsers: hopsConfig.browsers %7D %0A @@ -721,23 +721,168 @@ lugins: -plugins +%5B%5D.concat(plugins %7C%7C %5B%5D, %5B%0A 'flow-react-proptypes',%...
633b67aee6cea344d883ff5a901d1dba41937bc1
Fix Codacy issues
src/bundle-reaper.js
src/bundle-reaper.js
var program = require("commander"); var colors = require("colors"); var proxyStatus = require("./package/getProxyStatus"); function make_red(txt) { return colors.red(txt); //display the help text in red on the console } program .version("0.0.1") .option("-h, --host [host]", "Please provide Management API Host ...
JavaScript
0
@@ -117,16 +117,17 @@ tus%22);%0A%0A +%0A function @@ -135,10 +135,9 @@ make -_r +R ed(t @@ -218,16 +218,17 @@ ole %0A%7D%0A%0A +%0A program%0A @@ -273,14 +273,14 @@ ost -%5B +%3C host -%5D +%3E %22, %22 @@ -386,17 +386,17 @@ ization -%5B +%3C organiza @@ -395,25 +395,25 @@ organization -%5D +%3E %22, %2...
660ac186074826e1006a3d7292291b68d47a40df
Stop abbreviating 'distribution'.
aplomb.js
aplomb.js
var RBTree = require('bintrees').RBTree var fnv = require('hash.fnv') var monotonic = require('monotonic') function Router (options) { this.routes = [] options.version = options.version ? monotonic.parse(options.version) : monotonic.parse('1.0') this.distribute(options.delegates, 256, options.versi...
JavaScript
0.000004
@@ -1254,32 +1254,40 @@ ) %7B%0A var dist +ribution = Math.floor(le @@ -1400,24 +1400,32 @@ 0; i %3C dist +ribution ; i++) %7B%0A @@ -2907,32 +2907,40 @@ %7D%0A%0A var dist +ribution = Math.floor(in @@ -3073,16 +3073,24 @@ ; i%3Cdist +ribution ; i++) %7B
5ec1249b254cddb78f2131d1edead59907e7437b
fix alexa
snowboy/snowboy.js
snowboy/snowboy.js
const Detector = require('.').Detector; const Models = require('.').Models; const models = new Models(); //console.log(__dirname+"/resources/common.res"); models.add({ //file: __dirname+'/resources/snowboy.umdl', file: __dirname+'/resources/alexa.umdl', //file: 'resources/xiaoduxiaodu_xiaoyuxiaoyu_large.umdl', ...
JavaScript
0.000041
@@ -335,9 +335,9 @@ '0. -8 +5 ',%0A
dbde031ed07e483b04f75a361c3d89262b0bb993
Remove old cache
app/sw.js
app/sw.js
var v = "1.3"; if ('undefined' === typeof window) { importScripts('manifest.js'); } this.addEventListener('install', function (event) { console.log("install event"); event.waitUntil( caches.open(v).then(function (cache) { //return cache.addAll([ // '/app/view1/view1.html',...
JavaScript
0.000005
@@ -647,16 +647,19 @@ request) +/** .catch(f @@ -663,32 +663,32 @@ h(function () %7B%0A - console. @@ -750,16 +750,19 @@ ;%0A %7D) +**/ .then(fu @@ -782,16 +782,20 @@ + response @@ -800,32 +800,945 @@ se = r;%0A + if (r) %7B%0A return r;%0A %7D else ...
5bc0da7d0c9bdc2b2d3035984c2f50d4a403a895
Fix @foal/core build
packages/core/copy-debug-page.js
packages/core/copy-debug-page.js
const fs = require('fs'); if (!fs.existsSync('./lib')) { fs.mkdirSync('./lib'); } if (!fs.existsSync('./lib/common')) { fs.mkdirSync('./lib/common'); } if (!fs.existsSync('./lib/common/utils')) { fs.mkdirSync('./lib/common/utils'); } fs.copyFileSync('./src/common/utils/500.debug.html', './lib/common/utils/500.deb...
JavaScript
0
@@ -182,20 +182,24 @@ /common/ -util +template s')) %7B%0A @@ -226,20 +226,24 @@ /common/ -util +template s');%0A%7D%0Af @@ -263,36 +263,40 @@ c('./src/common/ -util +template s/500.debug.html @@ -316,12 +316,16 @@ mon/ -util +template s/50
205b9b11490566e16e475a6277a89faafc5d5daa
add find-index polyfill for IE
packages/core/polyfills/index.js
packages/core/polyfills/index.js
import 'es6-promise/auto'; import 'element-closest'; import 'mdn-polyfills/Node.prototype.prepend'; import 'core-js/modules/es.array.iterator'; import 'core-js/modules/es.array.from'; import 'core-js/modules/es.string.starts-with'; import 'core-js/modules/es.array.includes'; import 'core-js/modules/es.array.for-each'; ...
JavaScript
0.000001
@@ -514,24 +514,70 @@ rray.find';%0A +import 'core-js/modules/es.array.find-index';%0A import './sy
f68aaf7ff954d6f680d757eb64af5edc9802c134
Fix cover option for ebook
lib/generate/ebook/index.js
lib/generate/ebook/index.js
var util = require("util"); var path = require("path"); var Q = require("q"); var _ = require("lodash"); var exec = require('child_process').exec; var fs = require("fs"); var parse = require("../../parse"); var BaseGenerator = require("../page"); /* * This generator inherits from the single page generator * and c...
JavaScript
0
@@ -755,87 +755,8 @@ );%0A%0A - var _options = %7B%0A %22--cover%22: that.options.cover%0A %7D;%0A%0A @@ -937,16 +937,95 @@ %7D%0A%0A + var _options = %7B%0A %22--cover%22: that.options.cover%0A %7D;%0A%0A @@ -1460,24 +1460,55 @@ join(%22 %22);%0...
9358f04897748a813bf1b9c20fe4d22def8d0345
Fix setting className is invalid.
packages/core/src/input/index.js
packages/core/src/input/index.js
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import Icon from '../icon'; import FancyButton from './FancyButton'; import './style/input.less'; // const FancyButton = React.forwardRef((props, ref) => ( // <span ref={ref} className={props.className}> // {props...
JavaScript
0
@@ -792,16 +792,27 @@ efixCls, + className, size, t @@ -899,16 +899,27 @@ efixCls, + className, %7B%0A
69082c811acc2e21f80fffad81265a1c37a32b70
Fix typo
src/canvas/Entity.js
src/canvas/Entity.js
var Class = require('../lang/Class'); 'use strict'; var self = Class.create({ initialize: function() {}, resize: function(width, height) {}, act: function(delta) {}, renser: function(ctx) {} }); module.exports = self;
JavaScript
0.999999
@@ -176,17 +176,17 @@ ,%0A%09%0A%09ren -s +d er: func
6d0b8cb2831eed6f0f59eb24432b37b70a8184dc
Copy .gitignore from BBB
lib/generators/app/index.js
lib/generators/app/index.js
/** * BBB `app` generator for Yeoman * Scaffold the project structure */ "use strict"; var util = require("util"); var path = require("path"); var _ = require("lodash"); var grunt = require("grunt"); var Tree = require("ast-query"); var InitGenerator = require("../init/index"); /** * Module exports */ module.ex...
JavaScript
0
@@ -4689,24 +4689,62 @@ rateGit() %7B%0A + // NPM use .gitignore as .npmignore%0A this.dest. @@ -4767,32 +4767,35 @@ e%22, -%22/dist/%5Cn/node_modules/%22 +this.src.read(%22.npmignore%22) );%0A%7D @@ -4857,35 +4857,44 @@ ototype.generate -Git +EditorConfig = function gene @@ -4893,27 +4893,36 @@ ion generat...
5d1eba95f7d5027427c2c35a88784f1fe6a1349c
Increase timeout for /lotto/ endpoint.
endpoints/lottery/tests/integration_test.js
endpoints/lottery/tests/integration_test.js
var request = require('request'); var assert = require('assert'); var helpers = require('../../../lib/test_helpers.js'); describe('lotto', function() { // The only thing that changes is the form attribute, so why not just re-use the object var fieldsToCheckFor = ["date", "lotto", "joker", "prize", "link"]; ...
JavaScript
0
@@ -319,33 +319,33 @@ this.timeout( -4 +6 000);%0A%0A it(%22s @@ -839,9 +839,9 @@ out( -4 +6 000)
ac06a17bb3b00bd9bb2b9ab4be4a45dbaeca909d
update data
js/forceGraph.js
js/forceGraph.js
var width = 960, height = 500; var color = d3.scale.category20(); var force = d3.layout.force() .charge(-120) .linkDistance(200) .size([width, height]); var forceSvg = d3.select("div#chord_chart").append("svg") .attr("width", width) .attr("height", height); d3.json("newsGraph.json", function...
JavaScript
0.000001
@@ -1057,16 +1057,17 @@ urce != +%22 undefine @@ -1067,16 +1067,18 @@ ndefined +%22; %7D);%0A c
b2b2ce6c800c3ee23083c166c3ab26758a972325
remove backspace handling cruft
serve.js
serve.js
// serve.js ~ Copyright 2015 Paul Beaudet // This serves a test application that lets people talk to strangers var express = require('express'); var compress = require('compression'); var app = express(); var http = require('http').Server(app); app.use(compress()); // gziping middleware app.use(express.static(__dirn...
JavaScript
0
@@ -447,22 +447,25 @@ );%0A%0Avar -breaks +unmatched = %7B%0A @@ -543,22 +543,25 @@ n(user)%7B -breaks +unmatched .clients @@ -610,22 +610,25 @@ index = -breaks +unmatched .clients @@ -647,14 +647,17 @@ r); -breaks +unmatched .cli @@ -683,51 +683,8 @@ 1);%7D -,%0A on: function(user, callback)%7B%0A%0...
cb4eb9b1c1e195edec12c4408ad9dee05646bd34
Update app-e2e-test.js
test/app-e2e-test.js
test/app-e2e-test.js
// LICENSE : MIT "use strict"; var injectBrowser = require('testium/mocha'); var assert = require("power-assert"); var browser; function addTodo(text) { browser.setValue('.todoText', text); browser.click('.todoBtn'); } describe("app-test", function () { var text = 'todo text'; before(injectBrowser()); ...
JavaScript
0.000001
@@ -1758,36 +1758,35 @@ // confirm%E3%81%8C -fals +tru e%E3%82%92%E8%BF%94%E3%81%99%E3%82%88%E3%81%86%E3%81%AB%E3%81%99%E3%82%8B = %E3%82%AD%E3%83%A3%E3%83%B3%E3%82%BB @@ -1773,37 +1773,34 @@ %E3%81%8Ctrue%E3%82%92%E8%BF%94%E3%81%99%E3%82%88%E3%81%86%E3%81%AB%E3%81%99%E3%82%8B = -%E3%82%AD%E3%83%A3%E3%83%B3%E3...
d74aa2132e331a1cdaf775b4a84920289fe395f6
fix syntax error
hn/who_is_hiring.js
hn/who_is_hiring.js
/* @deploy @title HN Who is hiring? @output { "content-type" : "application/json" } @cache 3600 */ var rp = require('request-promise') , Promise = require('bluebird') , _ = require('underscore') , math = require('mathjs') ; module.exports = function(req, res, next) { rp .get('https://hac...
JavaScript
0.000003
@@ -956,17 +956,16 @@ : 10 %7D) -) %0A
a7f2519f6b94ead24084978a611c8f799abf760b
Remove HTTP as part of POST handler response
lib/handlers/PostHandler.js
lib/handlers/PostHandler.js
'use strict'; const BaseHandler = require('./BaseHandler'); const ERRORS = require('../constants').ERRORS; const EVENT_ENDPOINT_CREATED = require('../constants').EVENT_ENDPOINT_CREATED; class PostHandler extends BaseHandler { /** * Create a file in the DataStore. * * @param {object} req http.incom...
JavaScript
0.000001
@@ -528,13 +528,8 @@ = %60 -http: //$%7B
d22e1cc72041a3453f7a54bfb989ca71bd76c96a
Fix syntax error, rename manifest
webpack.config.client.production.js
webpack.config.client.production.js
const webpack = require('webpack') const path = require('path') const Dotenv = require('dotenv-webpack') const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin') const WebpackChunkHash = require('webpack-chunk-hash') module.exports = { entry: { client: './src/client' }, target: 'web', module: {...
JavaScript
0.000031
@@ -669,16 +669,17 @@ Plugin() +, %0A new @@ -1074,23 +1074,16 @@ name: ' -client. manifest @@ -1172,15 +1172,8 @@ e: ' -client. chun
5d434142e45356ff8303ba5198e8eed17102a73e
Add loader to button
js/http2-push.js
js/http2-push.js
function search() { document.getElementById("result").style.maxHeight = '0'; var start = new Date().getTime(); var xhttp = new XMLHttpRequest(); var button = document.getElementsByClassName("button")[0]; button.getElementsByTagName("span").style.display = "none"; addClass(button, "btn-loading"); xhttp.onr...
JavaScript
0.000001
@@ -234,32 +234,35 @@ yTagName(%22span%22) +%5B0%5D .style.display = @@ -1573,16 +1573,19 @@ (%22span%22) +%5B0%5D .style.d
327229d6ecb23f0eb28aabe4f9c3372a2a781a70
Fix call event handler multiple times.
js/index_load.js
js/index_load.js
var refresh_clock = 2000; var t, id; function ask_name() { $("#index_body").animate({height: '150px', marginTop: '-75px'}); check_game_status(); t = self.setInterval(check_game_status, refresh_clock); $('#name_input_form').submit(function() { $(this).ajaxSubmit({ success: function...
JavaScript
0
@@ -208,24 +208,34 @@ clock);%0A%0A + var obj = $('#name_in @@ -244,16 +244,25 @@ t_form') +;%0A obj .submit( @@ -274,39 +274,35 @@ ion() %7B%0A -$(this) +obj .ajaxSubmit(%7B%0A @@ -411,16 +411,54 @@ data;%0A%0A + obj.unbind(%22submit%22);%0A @@ -1306,24 +1306,77 @@ ct...
7d96c702702c861b79959dad6f05a19258010fbd
Update tests for defined VNode layout
test/browser/keys.js
test/browser/keys.js
import { createElement as h, Component, render } from '../../src/index'; import { setupScratch, teardown } from '../_util/helpers'; /** @jsx h */ describe('keys', () => { let scratch; beforeEach(() => { scratch = setupScratch(); }); afterEach(() => { teardown(scratch); }); // See developit/preact-compat#...
JavaScript
0
@@ -1350,32 +1350,323 @@ y', '1');%0A%09%7D);%0A%0A +%09it('should set VNode#ref property', () =%3E %7B%0A%09%09expect(%3Cdiv /%3E).to.have.property('ref').that.is.undefined;%0A%09%09expect(%3Cdiv a=%22a%22 /%3E).to.have.property('ref').that.is.undefined;%0A%09%09const emptyFunction = () =%3E %7B%7D;%0A%09%09expect(%3...
e02ac06ef83e9bc6d1fbc66c88fd0298b0db71d2
Handle errors from simpleQueryResponder
pg/util.js
pg/util.js
var conn = require('./conn.js'); var resp = require('./response.js'); module.exports = { simpleQueryResponder: function(sqlQuery, paramsFn) { return function(req, res) { var callback = function(err, result) { resp.writeResponse(result.rows, res); } conn.query(function(client) { ...
JavaScript
0
@@ -62,16 +62,73 @@ se.js'); +%0Avar logger = (require('../logging/vip-winston')).Logger; %0A%0Amodule @@ -269,24 +269,251 @@ , result) %7B%0A + if(err) %7B%0A logger.error(err.name + %22: %22 + err.message);%0A res.writeHead(500, %7B'Content-Type': 'text/plain'%7D);%0A res.write(er...