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
e8593945b0aeb79e1ecc3ed2a0d83bbd3227a091
Update js
folke-ko-localization.js
folke-ko-localization.js
define(["require", "exports", "res/default", "knockout"], function (require, exports, default_1, ko) { exports.text = default_1["default"]; exports.keys = {}; for (var key in exports.text) { var mod = exports.text[key]; for (var sub in mod) { var line = mod[sub]; expo...
JavaScript
0
@@ -128,19 +128,16 @@ lt_1 -%5B%22 +. default -%22%5D ;%0A
f871a57e5803109dd3d573c66e07b722ec052f69
Improve order of operations
src/notificationStack.js
src/notificationStack.js
/* eslint-disable react/jsx-no-bind */ import React, { PropTypes } from 'react'; import StackedNotification from './stackedNotification'; function defaultStyleFactory(index, style) { return Object.assign( {}, style, { bottom: `${2 + index * 4}rem` } ); } /** * The notification list does not have any s...
JavaScript
0.028775
@@ -241,16 +241,17 @@ %60$%7B2 + +( index * @@ -251,16 +251,17 @@ ndex * 4 +) %7Drem%60 %7D%0A
566dbc6654775877fb170a1559b646a384593850
change velocity in character
src/objects/Character.js
src/objects/Character.js
class Character extends Phaser.Sprite { constructor(game, x, y, key, frame) { super(game, x, y, key, frame); //Enable physics on the player game.physics.arcade.enable(this); this.body.bounce.x = this.body.bounce.y = 0; this.cursor = game.input.keyboard.createCursorKeys(); this.body.gravity.y ...
JavaScript
0.000008
@@ -649,9 +649,85 @@ = -2 -7 +00;%0A %7D else if (this.cursor.down.isDown) %7B%0A this.body.velocity.y = 20 0;%0A
966cb6496ae308348d6da14c008accedd68fe804
Remove unused rq.createFunction function
src/api.js
src/api.js
/* * This file contains the rq Javascript API implementation. It's used by for example `prelude.js`. */ /** * The `rq` namespace, containing the `rq` API. * * @namespace */ var rq = rq || {}; /** * The type of `this` for all of the rq stream processing functions (defined for example in * `prelude.js`) * * ...
JavaScript
0.000006
@@ -6569,127 +6569,8 @@ %7D;%0A%0A -rq.createFunction = function createFunction(args, body) %7B%0A return require('minieval').createFunction(body, args);%0A%7D;%0A%0A Obje
f4ecd0d648a10cabc7cc28868e17523a59485790
add missing flow annotation to api._get
src/api.js
src/api.js
/* @flow */ import https from 'https' import Debug from 'debug' const debug = Debug('crypto-exchange-api:api') export class API { /** * Store and check per-second rate limits * * @private */ _checkRateLimit (ts: number, limit: number, rates: number[]) { rates.push(ts) let edge = rates.find((d...
JavaScript
0.000001
@@ -1108,16 +1108,28 @@ string) +: Promise%3C*%3E %7B%0A r
165330ee29baee2dae25537a411c2858c73b4a68
test new api
src/api.js
src/api.js
const axios = require('axios') let { repo, sha, ci } = require('ci-env') const { warn } = require('prettycli') const token = require('./token') const debug = require('./debug') const url = 'https://bundlesize-store.now.sh/values' let enabled = false if (repo && token) enabled = true else if (ci) { warn(`github to...
JavaScript
0
@@ -209,16 +209,27 @@ ze-store +-oeurqgwjlz .now.sh/
c48cc3c85a4d653fecb5c08f96f65939ae815c33
Handle errors during preview
forum/static/js/forum.js
forum/static/js/forum.js
$(function(){ $('.dropdown-submenu a.dropdown-toggle').click(function(e){ $(this).next('ul').toggle(); $(this).parent().toggleClass('submenu-open'); e.stopPropagation(); e.preventDefault(); }); $('textarea[data-provide=markdown]').markdown({ onPreview: function (e, previewContainer) { $.ajax({ method: ...
JavaScript
0
@@ -268,17 +268,16 @@ function - (e, prev @@ -301,36 +301,13 @@ %09%09$. -ajax(%7B method: %22POST%22, url: +post( %22/fo @@ -323,14 +323,8 @@ ew%22, - data: $(' @@ -351,20 +351,18 @@ ze() - %7D )%0A%09%09%09. -then +done (fun @@ -366,17 +366,16 @@ function - (result) @@ -412,16 +412,153 @@ esult);%0A +...
27a01ed63f452131aad2aa09204af84d2ef6fe19
Fix the coffee task
tasks/coffee.js
tasks/coffee.js
module.exports = function (grunt) { var path = require('path'); var fs = require('fs'); var coffee = require('coffee-script'); grunt.registerMultiTask('coffee', 'Compile CoffeeScript files', function () { var src = this.data.src, dest = this.data.dest; var filepaths = grunt.file.expandFiles(pa...
JavaScript
0.999999
@@ -1257,25 +1257,20 @@ %7B%7D;%0A -%0A -if ( options. bare @@ -1269,58 +1269,23 @@ ons. -bare !== false) %7B%0A options.bare = true;%0A %7D +filename = src; %0A%0A
a212dba8bb07f8bfe516ba6b53c9e02ba12b8f1f
Enable the additional validation methods.
src/patterns/validate.js
src/patterns/validate.js
define([ 'require', '../../lib/jquery.validate', '../logging' ], function(require) { var log = require('../logging').getLogger('validate'); var init = function($el, opts) { var rules = $el.find('[data-required-if]').toArray().reduce(function(acc, el) { var $el = $(el), ...
JavaScript
0
@@ -46,24 +46,88 @@ .validate',%0A + '../../lib/jquery-validation-1.9.0/additional-methods.min',%0A '../logg @@ -979,8 +979,9 @@ ern;%0A%7D); +%0A
d512bfc77467b5762900db9776e10707b431deb2
fix indentation
tasks/cssmin.js
tasks/cssmin.js
/* * grunt-contrib-cssmin * http://gruntjs.com/ * * Copyright (c) 2012 Tim Branyen, contributors * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { var helper = require('grunt-lib-contrib').init(grunt); var path = require('path'); grunt.registerMultiTask('cssmin', 'Mini...
JavaScript
0.000358
@@ -790,18 +790,16 @@ d%0A - .map(gru @@ -812,18 +812,16 @@ e.read)%0A - .j
473b2f18ae38264c55a5ecd54926b62a6064a2c4
enhance code style
tasks/deploy.js
tasks/deploy.js
module.exports = function(grunt) { 'use strict'; grunt.config.merge({ concat: { ui: { src: ['dist/**/*.js'], dest: 'dist/caoutchouc-min.js', }, }, }); grunt.config.merge({ clean: { js: { src: ['dist/**/*', '!dist/skin', '!dist/caoutchouc-min.js'] } } }); grunt.config.merge({ r...
JavaScript
0.000001
@@ -148,17 +148,16 @@ -min.js' -, %0A%09%09%09%7D,%0A%09
99e4e616cec2a57e5a3c7fb57801dc83cb625f13
Copy in vendored js dependencies
tasks/deploy.js
tasks/deploy.js
const gulp = require('gulp'); const runSequence = require('run-sequence'); const {spawn} = require('child_process'); gulp.task('push', (callback) => { spawn('cf', ['push'], {stdio: 'inherit', env: process.env}).once('close', callback); }); gulp.task('copy-staticfile', () => { return gulp.src('Staticfile').pipe(gu...
JavaScript
0
@@ -330,32 +330,130 @@ public'));%0A%7D);%0A%0A +gulp.task('copy-vendor', () =%3E %7B%0A return gulp.src('vendor/*.js').pipe(gulp.dest('public'));%0A%7D);%0A%0A gulp.task('deplo @@ -588,16 +588,31 @@ icfile', + 'copy-vendor', 'push',
5900f2c85217c281a73c7f89e05ffd68032f7e2c
rename eslint:validate
tasks/eslint.js
tasks/eslint.js
'use strict'; // Eslint validation // For more information about Grunt ESLint, have a look at https://www.npmjs.com/package/grunt-eslint module.exports = { // Validate the whole project validate: { src: [ 'index.js', 'conf.js', 'Gruntfile.js', 'install.js', 'flightplan.js', ...
JavaScript
0.000281
@@ -185,23 +185,21 @@ oject%0A -validat +manag e: %7B%0A
cf962a3ed947e3de1315af7eb34adb30b7687c17
update usemin
tasks/usemin.js
tasks/usemin.js
import gulp from 'gulp'; import config from '../config'; import plumber from 'gulp-plumber'; import flatmap from 'gulp-flatmap'; import usemin from 'gulp-usemin'; import cssnano from 'gulp-cssnano'; import uglify from 'gulp-uglify'; import gulpif from 'gulp-if'; import notify from 'gulp-notify'; import htmlmin from 'gu...
JavaScript
0
@@ -1205,27 +1205,28 @@ buteQuotes: -tru +fals e,%0A
7d87ab75c3539fba8c78c2d39af4e82bc6a9b16e
change name of autocomplete suggestion class
src/pipeline/Response.js
src/pipeline/Response.js
import React from 'react' import State from './state' import { Results as RawResults } from 'sajari-react/ui/Results' const getState = (namespace) => { return { searchResponse: State.ns(namespace).getResults() || {} } }; class Response extends React.Component { constructor(props) { super(props) th...
JavaScript
0.000001
@@ -3047,16 +3047,29 @@ summary- +autocomplete- override
e4c8a91bc8b6e271b7db87275f8f6f5e05acab78
add default behavior to simplify usage
src/app.js
src/app.js
#!/usr/bin/env node 'use strict' const fs = require('fs') const templates = require('./templates.js'); const log = (...args) => {console.log(...args)} const logError = (...args) => {console.error(...args)} const handleFileWritingErr = (err) => { switch (err.code) { case 'EEXIST': logError(`A file named ${err....
JavaScript
0.000001
@@ -552,32 +552,107 @@ reak%0A%09%09default:%0A +%09%09%09if (args.length == 3) %7B%0A%09%09%09%09generateComponents(%5Bargs%5B2%5D%5D);%0A%09%09%09%7D else %7B%0A%09 %09%09%09printUsage()%0A @@ -643,32 +643,37 @@ %09%09%09printUsage()%0A +%09%09%09%7D%0A %09%7D%0A%7D%0A%0Aconst prin
2b46fc16e18c29fc6193f05cc960d4a75850cf7b
Fix Heroku
src/app.js
src/app.js
//import proper libraries var path = require('path'); var express = require('express'); var compression = require('compression'); var favicon = require('serve-favicon'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var mongoose = require('mongoose'); var session = require('expre...
JavaScript
0.998876
@@ -727,19 +727,16 @@ ame+'../ -../ client/'
8812e2aa9883ecbc2b9de88945fccfeb54d3e38f
Clear pending AJAX request if error occurs on page chooser
wagtail/admin/static_src/wagtailadmin/js/page-chooser-modal.js
wagtail/admin/static_src/wagtailadmin/js/page-chooser-modal.js
PAGE_CHOOSER_MODAL_ONLOAD_HANDLERS = { 'browse': function(modal, jsonData) { /* Set up link-types links to open in the modal */ $('.link-types a', modal.body).on('click', function() { modal.loadUrl(this.href); return false; }); /* Set up submissions o...
JavaScript
0
@@ -1839,32 +1839,135 @@ earchResults();%0A + %7D,%0A error: function() %7B%0A request = null;%0A
ca0ce5c4a79acace9a0850400a7f335354aacdbb
Add id
walk-in-interview/src/main/webapp/business-jobs-list/script.js
walk-in-interview/src/main/webapp/business-jobs-list/script.js
/** * This file is specific to show-job-posts-made.html */ // TODO(issue/21): get the language from the browser const CurrentLocale = 'en'; /** * Import statements are static so its parameters cannot be dynamic. * TODO(issue/22): figure out how to use dynamic imports */ import {AppStrings} from '../strings.en.js...
JavaScript
0.000003
@@ -4272,16 +4272,36 @@ te('id', + 'job-listing-id-' + job%5B'jo
392c01b967dd3861cd3c6494906cdd656ef47e10
fix size of the paddle
src/pong/object/Paddle.js
src/pong/object/Paddle.js
import { WidthPaddle, HeightPaddle } from "../constants"; const LineWidthPaddle = 5; function createBmp(game, direction, color) { const bmd = direction === "horizontal" ? game.add.bitmapData(WidthPaddle + 2 * LineWidthPaddle, HeightPaddle + 2 * LineWidthPaddle) : game.add.bitmapData(HeightPaddle + ...
JavaScript
0.000001
@@ -212,60 +212,16 @@ ddle - + 2 * LineWidthPaddle, HeightPaddle + 2 * LineWidth +, Height Padd @@ -270,54 +270,10 @@ ddle +, -+ 2 * LineWidthPaddle, WidthPaddle + 2 * Line Widt @@ -450,32 +450,36 @@ (LineWidthPaddle + / 2 , LineWidthPaddl @@ -475,24 +475,28 @@ eWidthPaddle + / 2 , WidthPaddl @@ -492,32 +492...
792535f8cb9fab02aa83556ce6d9982c62be1e91
Revert "Updating Jade to pug"
src/app.js
src/app.js
// Todo App var DocumentDBClient = require('documentdb').DocumentClient; var config = require('./config'); var TaskList = require('./routes/tasklist'); var TaskDao = require('./models/taskDao'); var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('...
JavaScript
0
@@ -610,11 +610,12 @@ ', ' -pug +jade ');%0A
2b8df63ff919f3127d0f906970ff002f2df70b47
use environment variable to control PORT
src/app.js
src/app.js
var express = require('express'); var swig = require('swig'); var routes = require('./routes'); var app = express(); app.set('views', __dirname + '/templates'); app.set('view engine', 'html'); app.engine('html', swig.renderFile); app.use(routes); app.listen(3000, function() { console.log('listening on port 3000');...
JavaScript
0.000001
@@ -239,24 +239,61 @@ e(routes);%0A%0A +var PORT = process.env.PORT %7C%7C 3000;%0A app.listen(3 @@ -291,20 +291,20 @@ .listen( -3000 +PORT , functi @@ -347,13 +347,16 @@ ort -3000' +' + PORT );%0A%7D
6996a084c1b59923597760d9951b60d26faf79a7
correct date for christmas theme
src/public/style/theme.js
src/public/style/theme.js
import DefaultColor from './themes/default/color' import ChristmasColor from './themes/christmas/color' const currentDate = new Date() const year = currentDate.getFullYear() const christmasDates = { begin: new Date(`12/15/${year}`), end: new Date(`01/15/${year + 1}`) } let Color if (currentDate > christmasDates...
JavaScript
0.005502
@@ -263,12 +263,8 @@ year - + 1 %7D%60)%0A
6f828873a2cf1c1f3f40da8e2e67aecd7eb72f3e
add materialie import to app level
sample/src/main.js
sample/src/main.js
export function configure(aurelia) { aurelia.use .standardConfiguration() .developmentLogging() .plugin('aurelia-materialize-bridge', plugin => { plugin.useClickCounter() .useBadge() .useBreadcrumbs() .useBox() .useButton() .useCard() .useCarousel() ...
JavaScript
0
@@ -1,8 +1,31 @@ +import 'materialize';%0A%0A export f
183e485c430745068b96910660d64e8cf9e13cdf
use render App instead of ...App
src/app.js
src/app.js
import 'styles/bootstrap' import 'styles/app' import Vue from 'vue' import {createRouter} from 'router' import {createStore} from 'store' import 'plugins' import App from 'views/App' export const createApp = ssrContext => { const store = createStore() const router = createRouter(store) const app = new Vue({...
JavaScript
0
@@ -318,20 +318,8 @@ e(%7B%0A - ...App,%0A @@ -351,16 +351,41 @@ rContext +,%0A render: h =%3E h(App) %0A %7D)%0A%0A
3d4df753fdbac1efed02e6190dd2f9a61ea50bf6
remove logging of the NODE_ENV
src/app.js
src/app.js
import 'babel-polyfill' import React from 'react' import ReactDOM from 'react-dom' import { applyMiddleware, compose, createStore, combineReducers } from 'redux' import { Provider } from 'react-redux' import { Router, Route, IndexRoute } from 'react-router' import createHistory from 'history/lib/createHashHistory' impo...
JavaScript
0
@@ -1241,102 +1241,8 @@ r)%0A%0A -console.log('-------------------------------------------');%0Aconsole.dir(process.env.NODE_ENV)%0A /*%0A%0A
e5a131eaefe2512abca26a89182732f1bff7fc9e
Remove comment.
src/app.js
src/app.js
var SVG_NS = "http://www.w3.org/2000/svg" export default function (app) { var view = app.view || function () { return "" } var model var actions = {} var subscriptions = [] var hooks = { onError: [], onAction: [], onUpdate: [], onRender: [] } var node var root var batch = [] ...
JavaScript
0
@@ -1089,18 +1089,16 @@ %7D%0A %7D)%0A - %0A funct @@ -5453,212 +5453,8 @@ ) %7B%0A - // Removing a child one at a time updates the DOM, so we end up%0A // with an index out of date that needs to be adjusted. Instead,%0A // collect all the elements and delete them in a batch.%0A%0A
cbf2e93bd65a9296c9f35e114bea7e43ec8a1163
Save position on resize without move
src/app.js
src/app.js
/** * @file This is the central application logic and window management src file. * This is the central render process main window JS, and has access to * the DOM and all node abilities. **/ "use strict"; // Libraries ==============================================--------------------- // Must use require syntax fo...
JavaScript
0.000001
@@ -2344,16 +2344,51 @@ ize to.%0A + $(mainWindow).trigger('move');%0A %7D).res
9331944802d63a21f532f29f0815a3fc38b8b451
use for..of instead of map (because of async)
src/app.js
src/app.js
'use strict' const { CDP_USER, CDP_SESSION_COOKIE, PEN_ID, NODE_ENV, PORT = 3000 } = process.env if (!CDP_USER || !CDP_SESSION_COOKIE || !PEN_ID) { throw Error('CDP_USER, CDP_SESSION_COOKIE and PEN_ID required!') } const socketio = require('socket.io') const http = require('http') const express = require...
JavaScript
0
@@ -3173,113 +3173,66 @@ -/**%0A * token Array%3CPromise%3E%0A +let tokens = %5B%5D%0A -*/ %0A -const tokens = comments.map(async comment =%3E %7B%0A +for (let comment of comments) %7B %0A @@ -3993,32 +3993,33 @@ eturn%0A %7D%0A +%0A if (resu @@ -4305,23 +4305,28...
218c5632c8925769b8c04a9be1c4030c898f518f
use some instead of forEach
src/app.js
src/app.js
import $ from 'jquery' import * as lib from './mylib' chrome.storage.onChanged.addListener(function(changes, namespace) { for (var key in changes) { var storageChange = changes[key]; console.log(`Storage key "${key}" in namespace "${namespace}" changed. Old value was "${storageChange.oldValue}", new value is...
JavaScript
0.000003
@@ -492,37 +492,8 @@ ng;%0A - let set = new Set(exc);%0A%0A @@ -645,19 +645,30 @@ -set.forEach +const found = exc.some ((va @@ -765,19 +765,63 @@ -%7D else %7B%0A + return true;%0A %7D%0A %7D);%0A if (!found) %7B%0A @@ -858,37 +858,25 @@ de%22);%0A - %7D%0A ...
f459ffcfaae25dd4d2946f6fc2af7ec1bb08246d
Fix unhandled exception
src/queryMatchBrackets.js
src/queryMatchBrackets.js
(function() { var ie_lt8 = /MSIE \d/.test(navigator.userAgent) && (document.documentMode == null || document.documentMode < 8); var Pos = CodeMirror.Pos; function findMatchingBracket(cm, where, strict) { var cur = cm.getCursor(), state = cm.getStateAfter(); if (state.matches.length > cur.line) { var m...
JavaScript
0.000431
@@ -347,16 +347,39 @@ .line%5D, +i;%0A%09%09if (matches) %7B%0A%09%09%09 i = matc @@ -392,16 +392,17 @@ ngth;%0A%09%09 +%09 while (i @@ -407,16 +407,17 @@ (i--) %7B%0A +%09 %09%09%09var p @@ -436,16 +436,17 @@ %5Bi%5D;%0A%09%09%09 +%09 if (pos%5B @@ -531,24 +531,25 @@ ch - 1)%0A%09%09%09%09 +%09 return %7Bfr...
81bfc55dcca1b8e8093ddb5bb28b4d4a6bd80110
add method for scaling container
src/app.js
src/app.js
var Video = require('./video'); var Assets = require('./assets'); var Debugger = require('potion-debugger'); var PotionAudio = require('potion-audio'); var App = function(container) { this.container = container; container.style.position = 'relative'; var canvas = document.createElement('canvas'); canvas.st...
JavaScript
0.000001
@@ -971,101 +971,28 @@ his. -container.style. +scale( width - = this.width + 'px';%0A this.container.style.height = this.height + 'px' +, height) ;%0A%0A @@ -1105,16 +1105,16 @@ ();%0A - %7D%0A%7D;%0A%0A modu @@ -1109,16 +1109,160 @@ %7D%0A%7D;%0A%0A +App.prototype.scale = function(width, height) %7B%0A t...
eeb6bb4917bc2668769dd6d547209366b36464c4
Fix indentation for select, plural, selectordinal
src/quill.intl-toolbar.js
src/quill.intl-toolbar.js
export default function(doc) { const typeMap = { number: '{foo, number}', date: '{foo, date, medium}', time: '{foo, time, medium}', select: ` {foo, select, foo {Foo} bar {Bar} other {Baz} }`.trim(), plura...
JavaScript
0.000268
@@ -1,194 +1,21 @@ -export default function(doc) %7B%0A const typeMap = %7B%0A number: '%7Bfoo, number%7D',%0A date: '%7Bfoo, date, medium%7D',%0A time: '%7Bfoo, time, medium%7D',%0A select: %60%0A +const SELECT = %60%0A %7Bfoo @@ -24,28 +24,16 @@ select,%0A - ...
2a0e686d64228750794b8796cd6298c94704134f
Refactor scr.state.js to use a sorter from scr.processor.js in renderer
src/renderer/scr.state.js
src/renderer/scr.state.js
var STATE = (function(){ var ROOT = {}; // --------------- // State variables // --------------- var FILE; var MSGS; var selectedChannel; var currentPage; var messagesPerPage; // ----------------- // Utility functions // ----------------- var messageKeySorter = (key1, key2) => {...
JavaScript
0
@@ -203,293 +203,8 @@ %0A %0A - // -----------------%0A // Utility functions%0A // -----------------%0A %0A var messageKeySorter = (key1, key2) =%3E %7B%0A if (key1.length === key2.length)%7B%0A return key1 %3E key2 ? 1 : key1 %3C key2 ? -1 : 0;%0A %7D%0A else%7B%0A return key1.length %3E key2...
dd7d737c31ed713f84d5257f1e1ccd0ef599fa67
Modify info log
src/bot.js
src/bot.js
/** * Copyright 2018 Google Inc. * * 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 ...
JavaScript
0.000001
@@ -4996,48 +4996,8 @@ ) %7B%0A - this.robot.logger.info('Running');%0A%0A @@ -5177,24 +5177,102 @@ r();%0A %7D%0A%0A + this.robot.logger.info('Hangouts Chat adapter initialized successfully');%0A // To ma
bf75faaa9d13c3926f82f1cb8fbaf7bd46a910dc
Fix prefix trimming logic & move prefix to class var
src/bot.js
src/bot.js
const Discord = require('discord.js'); const glob = require('glob'); const path = require('path'); class Bot { constructor() { this.client = new Discord.Client(); this.token = 'MzAzMzI4NjQzNTUwMDE5NTg2.C9Wgwg.2SjC-LzYWuLNGPdhG0F0axdAqtM'; this.commands = {}; this.cmdCount = 0; ...
JavaScript
0
@@ -253,16 +253,50 @@ dAqtM';%0A + this.commandPrefix = '!';%0A @@ -1188,35 +1188,50 @@ const prefix = -'!' +this.commandPrefix ;%0A const @@ -1386,36 +1386,34 @@ h);%0A -cons +le t commandArray = @@ -1486,11 +1486,16 @@ rray -%5B0%5D +.shift() ;%0A @@ -1533,11 +1533,18 @...
9d19e01a1bd307d3a76fa831d835efff78712ab6
Fix #271
src/bus.js
src/bus.js
"use strict"; var Bus = {}; /** @constructor */ function BusConnector() { this.listeners = {}; this.pair = undefined; }; /** * @param {string} name * @param {function(*=)} fn * @param {Object} this_value */ BusConnector.prototype.register = function(name, fn, this_value) { var listeners = this.listen...
JavaScript
0
@@ -122,17 +122,16 @@ fined;%0A%7D -; %0A%0A/**%0A * @@ -172,18 +172,17 @@ unction( -*= +? )%7D fn%0A * @@ -865,16 +865,17 @@ n !== fn +; %0A %7D);
a5c825ed645a785de1ea5246151bd18e141ace18
Fix bugs.
src/cfg.js
src/cfg.js
'use strict'; var logger = require('./log'); var path = require('path'); var chalk = require('chalk'); /** * Resolve and configuration file path. * * @param {string} config * @return {string} */ function resolveConfig(config) { if (config[0] === '/') { // Absolute return config; } // Relative re...
JavaScript
0
@@ -502,37 +502,15 @@ if ( -typeof config === 'undefined' +!config ) %7B%0A @@ -604,32 +604,30 @@ try %7B%0A -config = +return require(con @@ -702,32 +702,30 @@ s level%0A -config = +return require('.. @@ -878,22 +878,18 @@ e(dir, p -ackage +kg ) %7B%0A if @@ -894,38 +894,12 @@ if ( -typeof packag...
7e234e49a6a442e40a62b333555fa66a9a431b39
Remove not checking package.json for changes (multimatch not working with paths)
src/cli.js
src/cli.js
#!/usr/bin/env node import path from 'path'; import execa from 'execa'; import inquirer from 'inquirer'; import isGitClean from 'is-git-clean'; import meow from 'meow'; import updateNotifier from 'update-notifier'; function checkGitStatus(force) { let clean = false; let errorMessage = 'Unable to determine if ...
JavaScript
0
@@ -397,38 +397,8 @@ wd() -, %7B files: %5B'!package.json'%5D %7D );%0A
c6d1ffdb899a729d57c1277099402d44165f86f0
Normalize arguments for packaged Electron app
src/cnc.js
src/cnc.js
/* eslint max-len: 0 */ /* eslint no-console: 0 */ import path from 'path'; import program from 'commander'; import pkg from './package.json'; // Defaults to 'production' process.env.NODE_ENV = process.env.NODE_ENV || 'production'; const increaseVerbosityLevel = (val, total) => { return total + 1; }; const parse...
JavaScript
0.000015
@@ -2538,16 +2538,457 @@ gv);%0A%7D%0A%0A +// Commander assumes that the first two values in argv are 'node' and appname, and then followed by the args.%0A// This is not the case when running from a packaged Electron app. Here you have the first value appname and then args.%0Aconst normalizedArgv = ('' + process.argv%...
04739d2530a9ada9f39ca661d01d95a462fbe7b3
Update dlb.js
src/dlb.js
src/dlb.js
//dont-look-back //by DOLLOR ~(function(global){ "use strict"; var obj,init; obj={}; obj.enable=true init=function(){ //封装改变hash方法 obj.changeHashTo=function(newhash){ newhash="#"+newhash; if(history && history.pushState){ if(newhash!=="#"){ history.pushState({},document.title,newhash); } ...
JavaScript
0
@@ -1640,47 +1640,289 @@ t%0A%09i -f(!global.dlb)%7B%0A%09%09init();%0A%09%09global.dlb= +nit();%0A%09// Node.js%0A%09if (typeof module !== 'undefined' && module.exports) %7B%0A%09%09module.exports = obj;%0A%09%7D%0A%09// AMD / RequireJS%0A%09else if (typeof define !== 'undefined' && define.amd) %7B%0A%09%09define(%5B...
9da922c28d0ab9e01f42148d67bdb11dd9d70cde
remove isType function in component in favor of static types array
src/dom.js
src/dom.js
import { toArray } from './util' export function $ (selector, el = document) { return el.querySelector(selector) } export function $$ (selector, el = document) { return toArray(el.querySelectorAll(selector)) } export function id (name, el = document) { return el.getElementById(name) } export function replace ...
JavaScript
0.000012
@@ -2929,16 +2929,61 @@ fig(el)) +%0A const componentPrefix = %60$%7Bname%7D-%60 %0A%0A @@ -3057,83 +3057,88 @@ -isType (type) %7B%0A return def.indexOf(%60$%7Bname%7D-$%7Btype%7D%60) !== -1%0A +types: def%0A .filter(name =%3E name.indexOf(componentPrefix) === 0)%0A ...
f509831272a137b420ea4e74cdd9b072807667e1
make callback optional
src/hub.js
src/hub.js
'use strict'; var bcrypt = require('bcrypt-nodejs'), Server = require('socket.io'), express = require('express'), http = require('http'), path = require('path'), mongo = require('mongojs'); var util = require('util'); var session = require('./session'); var _ = require('lodash'); var cors = requir...
JavaScript
0
@@ -1559,38 +1559,88 @@ -callback(err); +if (callback) %7B%0A callback(err); %0A %7D %0A %7D);
7298b6c297cb61e9f268af7bdca7fa25ef117428
Fix the date display.
appengine-experimental/src/static/javascript/traffic.js
appengine-experimental/src/static/javascript/traffic.js
var map; var incident_markers = {}; function initialize() { var zoom = 6; if (supports_local_storage() && localStorage['map_zoom']) { zoom = parseInt(localStorage['map_zoom']); } var center = new google.maps.LatLng(37.5, -119.2); var wantGPScenter = true; if (supports_local_storage() && localStorage['map_cent...
JavaScript
0.000152
@@ -1626,24 +1626,83 @@ active%22)) %7B%0A +%09%09%09%09var logtime = new Date(incident.LogTimeEpoch * 1000);%0A%0A %09%09%09%09var info @@ -1928,32 +1928,40 @@ me%22%3E' + -incident.LogTime +logtime.toLocaleString() + '%3C/di
ca11e44f1639cc92d5014e5c226d8e259cb53ac6
make hops-config use hops-root everywhere
packages/config/index.js
packages/config/index.js
'use strict'; var fs = require('fs'); var path = require('path'); var appRoot = require('app-root-path'); var config = module.exports = { buildConfig: require.resolve('./configs/build'), developConfig: require.resolve('./configs/develop'), renderConfig: require.resolve('./configs/render'), locations: [] }; ...
JavaScript
0.000001
@@ -65,19 +65,20 @@ );%0A%0Avar -app +hops Root = r @@ -89,21 +89,17 @@ re(' -app +hops -root --path ');%0A @@ -320,35 +320,36 @@ (fs.existsSync( -app +hops Root.resolve('pa @@ -381,35 +381,36 @@ .assign(config, -app +hops Root.require('pa @@ -450,19 +450,20 @@ stsSync( -app +hops Root.res @@ -513,19 +513...
0d4568176d9d58f95fb585be5726f3859902d14f
Update config for production
config/webpack/server/production.js
config/webpack/server/production.js
const _ = require("lodash"); const webpack = require("webpack"); const BabiliPlugin = require("babili-webpack-plugin"); const defaultConfig = require("./default"); const productionConfig = require("./default"); _.mergeWith(defaultConfig, { devtool: false }); productionConfig.plugins.push( new webpack.LoaderOption...
JavaScript
0
@@ -1,33 +1,4 @@ -const _ = require(%22lodash%22);%0A cons @@ -94,141 +94,46 @@ nst -defaultConfig = require(%22./default%22);%0Aconst productionConfig = require(%22./default%22);%0A%0A_.mergeWith(defaultConfig, %7B%0A devtool: false%0A%7D +productionConfig = require(%22./default%22 );%0A%0A
3edd1c55503082132717dcb3d2ab57b5f1e62117
Add getGridData test to apiSpec.
test/apiSpec.js
test/apiSpec.js
// helper functions defined in helpers.js var data = generateData(10); var columns = getColumns(data); describe("sensei-grid api", function () { var grid; var $el = $('<div class="sensei-grid-test">'); // create dom element before each test beforeEach(function () { // suppress console.log st...
JavaScript
0
@@ -3433,12 +3433,181 @@ %0A %7D); +%0A%0A describe(%22getGridData%22, function () %7B%0A it(%22should return grid data%22, function () %7B%0A expect(grid.getGridData()).toEqual(data);%0A %7D);%0A %7D); %0A%7D);
e589d0eaebd2c99a1a3b945d7c2368bb33ec1449
update aegir
test/browser.js
test/browser.js
/* eslint-env mocha */ 'use strict' const eachSeries = require('async/eachSeries') const Store = require('idb-pull-blob-store') const _ = require('lodash') const IPFSRepo = require('ipfs-repo') const pull = require('pull-stream') const repoContext = require.context('buffer!./example-repo', true) const basePath = 'ipf...
JavaScript
0.000015
@@ -16,16 +16,35 @@ ocha */%0A +/* global self */%0A%0A 'use str @@ -364,22 +364,20 @@ t idb = -window +self .indexed @@ -384,22 +384,20 @@ DB %7C%7C%0A -window +self .mozInde @@ -407,22 +407,20 @@ DB %7C%7C%0A -window +self .webkitI @@ -437,14 +437,12 @@ %7C%0A -window +self .msI
9a6da82179dd789a7dc1d680139e530486cd27c0
test alternate script eval for async-require
src/main/shadow/build/async-closure-import.js
src/main/shadow/build/async-closure-import.js
var CLOSURE_IMPORT_SCRIPT = (function() { if (typeof(window.fetch) === 'undefined') { return undefined; } var loadOrder = []; var loadState = {}; function responseText(response) { // FIXME: check status return response.text(); } function loadPending() { for (var i = 0, len = loadOrder.l...
JavaScript
0
@@ -245,24 +245,417 @@ ext();%0A %7D%0A%0A + // apparently calling eval causes the code to never be optimized%0A // creating a script node, appending it and removing it seems to%0A // have the same effect without the speed penalty?%0A function scriptEval(code) %7B%0A var node = document.createElement(%22script...
90d00c10b1940cc92e6474d048236b6fb70b7f53
Make metadata-manager a bit more robust
www/common/metadata-manager.js
www/common/metadata-manager.js
define(['json.sortify'], function (Sortify) { var UNINIT = 'uninitialized'; var create = function (sframeChan) { var meta = UNINIT; var members = []; var metadataObj = UNINIT; // This object reflects the metadata which is in the document at this moment. // Normally when a...
JavaScript
0.000133
@@ -2398,27 +2398,20 @@ erStr = -JSON.string +Sort ify(meta @@ -2518,27 +2518,20 @@ Str !== -JSON.string +Sort ify(meta @@ -4339,16 +4339,52 @@ omputer%0A + if (!m) %7B return; %7D%0A
6bb748e06be938429a4e7925d0da0f275f37c9fc
Update googleplayservices.js
www/googleplayservices.js
www/googleplayservices.js
var argscheck = require ('cordova/argscheck') var exec = require ('cordova/exec') module.exports = function () { var exports = {} exports.getPlayerId = function (init) { var success = (typeof init.success != "undefined") ? init.success : function () {} var error = (typeof init.error != "undefined") ? ...
JavaScript
0.000001
@@ -690,20 +690,18 @@ %22, %22 -doInitialize +tryConnect %22, %5B
f5b77fb23a082842d1fff46c41701a395174eab8
Use correct current url
endScript.js
endScript.js
function extractPageFeeds() { var feeds = {}; feeds["site"] = getBaseURL(); feeds["list"] = []; var headLinks = document.getElementsByTagName("head")[0].getElementsByTagName("link"); for (var i = 0; i < headLinks.length; i++) { var link = headLinks[i]; if (link.attributes.getNamedItem("rel") !== nul...
JavaScript
0.000123
@@ -59,28 +59,36 @@ ite%22%5D = -getBaseURL() +window.location.href ;%0A feed
6027d67ee66a3daa164111853fe8486f38fe1565
Fix show/hide slide out menu onresize :tada:
assets/js/main.js
assets/js/main.js
'use strict'; var navMenu = navMenu || {}; navMenu = function() { this.init = function() { $('html').addClass('menu_mobile'); $('.menu-btn').on('click', function() { $('body').hasClass('menu--active') ? app.hide() : app.show(); }); } this.hide = function() { $('nav').veloci...
JavaScript
0
@@ -52,24 +52,25 @@ u = function + () %7B%0A%0A this @@ -77,32 +77,33 @@ .init = function + () %7B%0A %0A $( @@ -171,32 +171,33 @@ click', function + () %7B%0A $('bo @@ -253,16 +253,225 @@ show();%0A + %7D)%0A %0A $(window).on('resize', function () %7B%0A %0A var win = $(this);%...
b9ab427cf1646e88cdc0b69e07a19cfe82addb08
Improve clearity in answers and questions for metoder
build/metoder.js
build/metoder.js
var data = { "title": "Metoder", "questions": [ { "description": "Datatypen list är ett exempel på inbyggda objekt i Python", "alternatives": ["Sant", "Falskt"], "answer": "Sant" }, { "description": "Vilket uttryck returnerar heltalet 2?", ...
JavaScript
0.000001
@@ -264,39 +264,54 @@ ption%22: %22Vilket -uttryck +av f%C3%B6ljande alternativ returnerar helt @@ -856,28 +856,28 @@ %22: %22 -90bad65e763b70b7c115 +417010f657e678e8a7f0 %22,%0A @@ -905,17 +905,19 @@ ves%22: %5B%22 -x +seq .remove( @@ -918,25 +918,27 @@ emove(5)%22, %22 -x +seq .pop(5)%22, %22x @@ -936,17 +...
2b71556bc6b95624f91a883745258b8cd69801a1
Add GA event when user reaches bottom of page
assets/js/main.js
assets/js/main.js
$(document).ready(function () { /* Add the current year to the footer */ function getYear() { var d = new Date(); var n = d.getFullYear(); return n.toString(); } $('#year').html(getYear()); });
JavaScript
0
@@ -225,12 +225,341 @@ ar());%0A%0A + (function()%7B%0A var triggered = false;%0A $(window).scroll(function () %7B%0A if (($(window).scrollTop() %3E= $(document).height() - $(window).height() - 10) && !triggered) %7B%0A triggered = true;%0A ga('send', 'event', ...
660a617ce9f74bd5df1058d9d1608fc48e3f3410
Update main.js
assets/js/main.js
assets/js/main.js
// To make images retina, add a class "2x" to the img element // and add a <image-name>@2x.png image. Assumes jquery is loaded. function isRetina() { var mediaQuery = "(-webkit-min-device-pixel-ratio: 1.5),\ (min--moz-device-pixel-ratio: 1.5),\ (-o-min-device-pixel-ratio: 3/2),\ (min-resolution:...
JavaScript
0.000001
@@ -840,22 +840,8 @@ $('a -%5Bhref%5E=%22http%22%5D ').e
9042e55fb1676dcd4b8d3b1e6aa3f0565a6a8bf1
Update tags.js
assets/js/tags.js
assets/js/tags.js
/*标签的js */ /** * 分类展示 * 点击左侧的标签展示时 * 右侧的相关裂变展开或者收起 * @return {[type]} [description] */ function tagDisplay() { /*only show first tag*/ var $first_tag_posts=$('.post-list-body').find('div:first'); $first_tag_posts.nextAll().hide(); //初始化第一个标签的隐藏文章 $first_tag_posts.find("a.post-list-item").hide()...
JavaScript
0
@@ -1140,33 +1140,37 @@ osest(%22div.p -agination +ost-list-body %22);//%E5%BE%97%E5%88%B0%E5%BD%93%E5%89%8D%E7%9A%84ta @@ -2649,33 +2649,37 @@ osest(%22div.p -agination +ost-list-body %22);//%E5%BE%97%E5%88%B0%E5%BD%93%E5%89%8D%E7%9A%84ta @@ -3294,25 +3294,29 @@ t(%22div.p -agination +ost-list-body %22);//%E5%BE...
c7d508c7135e7d7569b0a0c3c69c88051f4334c1
update blueprint
blueprints/ember-frost-text/index.js
blueprints/ember-frost-text/index.js
module.exports = { description: '', normalizeEntityName: function () {}, /** Installs specified packages at the root level of the application. Triggered by 'ember install <addon name>'. @returns {Promise} package names and versions */ afterInstall: function () { return this.addAddonsToProjec...
JavaScript
0
@@ -387,9 +387,9 @@ '%5E1. -2 +3 .0'%7D
2b74861c9c19cd12f5a3ae89a96d3753cbb6747d
Remove pending RubyGemsRefresh spec
spec/javascripts/rubygemsRefreshSpec.js
spec/javascripts/rubygemsRefreshSpec.js
describe('RubyGemsRefresh.init', function() { beforeEach(function() { var fixtures = [ "<div class='rubygems' style='display: none;'>", "</div>" ].join("\n"); setFixtures(fixtures); jasmine.clock().install(); jasmine.Ajax.install(); }); afterEach(function() { RubyGemsRefresh.c...
JavaScript
0
@@ -3929,661 +3929,8 @@ );%0A%0A - // marking this disabled, as we removed this functionality in%0A // e0d9cdd3720f5f34a292f5ff719483a7a4968bb0%0A xdescribe(%22when our app is unreachable%22, function() %7B%0A it(%22shows unreachable%22, function() %7B%0A spyOn(RubyGemsRefresh, %22clearStatuses%22);%0A ...
91ac5fed5244ec328d1a47e95f244b839f9a74ae
extract logic into separate method
spec/js/test-color-splash-playground.js
spec/js/test-color-splash-playground.js
describe('CSPlayground', function() { var $playgroundElement; var playground; beforeEach(function() { $playgroundElement = $(document.createElement('table')); }); describe('.initialize(4)', function() { // given var colors = [ 'red', 'blue', 'green' ]; var size = 4; beforeEach(function() { playgr...
JavaScript
0.999899
@@ -997,274 +997,63 @@ Cell -Color = null;%0A%0A%09%09%09var cells = $('td', $playgroundElement);%0A%09%09%09$.each(cells, function(index, element) %7B%0A%09%09%09%09var cell = $(element);%0A%09%09%09%09var xIndex = cell.attr('data-index-x' + = getCellByPosition($playgroundElement, 0, 3 );%0A -%09 %09%09%09var -yIn...
e15be8c0811a8a80808df6b3a053a748e4ed284b
add desc
Algorithms/JS/linkedList/addTwoNumbers.js
Algorithms/JS/linkedList/addTwoNumbers.js
addTwoNumbers.js
JavaScript
0.000001
@@ -1,17 +1,282 @@ -addTwoNumbers.js +// You are given two linked lists representing two non-negative numbers.%0A// The digits are stored in reverse order and each of their nodes contain a single digit.%0A// Add the two numbers and return it as a linked list.%0A%0A// Input: (2 -%3E 4 -%3E 3) + (5 -%3E 6 -%3E 4)%0A// Ou...
e7d933646c63735fb7871023c18af3facc8a2ce9
add desc
Algorithms/JS/strings/longestSubstring.js
Algorithms/JS/strings/longestSubstring.js
longestSubstring.js
JavaScript
0.000001
@@ -1,20 +1,63 @@ +// Given a string, find the length of the longest -S + s ubstring .js%0A @@ -56,8 +56,328 @@ ring -.js + without repeating characters.%0A%0A// Examples:%0A%0A// Given %22abcabcbb%22, the answer is %22abc%22, which the length is 3.%0A%0A// Given %22bbbbb%22, the answer is %22b%22, with the length...
55b7cd5be3e7485eb2d01d7b8f7e1cffe8587b42
Remove dead code
core/actions/slackPreviewRelease.js
core/actions/slackPreviewRelease.js
'use strict'; const { waterfall, mapSeries } = require('async'); const previewReleaseTemplate = require('./slack-views/slack-preview-release'); module.exports = function createPreviewRelease(getReleasePreview, slack, repos) { return (cb) => { const reposBranches = repos.map(repo => ({ repo })); waterfall([...
JavaScript
0.001497
@@ -468,1406 +468,8 @@ %7D;%0A%0A - function getPRsFromChangesForEachRepo(repos, cb) %7B%0A mapSeries(repos, (repo, nextRepo) =%3E %7B%0A pullRequestsFromChanges(%7B repo %7D, (err, prIds) =%3E %7B%0A if (err) return nextRepo(null, %7B repo, failReason: err.message %7D);%0A nextRepo(null, %7B re...
90d1711ca365c040e249c9297ede437492d4495b
fix some supid typos
src/rules/no-unsupported-elements-use-aria.js
src/rules/no-unsupported-elements-use-aria.js
import { DOM , aria } from '../util' export default [{ msg: 'This element does not support ARIA roles, states and properties.' , AX: 'AX_ARIA_12' , test (tagName, props) { const reserved = DOM[tagName].reserved || false const hasProp = hasProp(props, Object.keys(aria).concat('role')) return !reserve...
JavaScript
0.999999
@@ -15,16 +15,26 @@ %0A, aria%0A +, hasProp%0A %7D from ' @@ -243,23 +243,23 @@ const -hasProp +prop = hasP @@ -329,20 +329,17 @@ ved %7C%7C ! -hasP +p rop%0A %7D%0A @@ -649,16 +649,23 @@ ops.%0A%60%0A%0A +export const fa @@ -802,16 +802,23 @@ /%3E%0A%7D%5D%0A%0A +export const pa
1b83980e263668f31347d2f658161069bf9989d8
update function to es6/7
Challenges/DashInsert.js
Challenges/DashInsert.js
const assert = require('assert'); function DashInsert(str) { const arr = str.split(''); for (let i = 0; i < str.length - 1; i += 1) { if (arr[i] % 2 !== 0 && arr[i + 1] % 2 !== 0) { arr[i] = `${arr[i]}-`; } } // console.log('123'); console.log(str); return arr.join(''); } const in1 = '1234...
JavaScript
0
@@ -32,16 +32,13 @@ );%0A%0A -function +const Das @@ -44,21 +44,25 @@ shInsert -(str) + = str =%3E %7B%0A con @@ -295,16 +295,17 @@ n('');%0A%7D +; %0A%0Aconst
43ca8a0da41bd804329c056d6c5ac7cea931d5e4
Add TransformExample to UIExplorerList.ios.js
Examples/UIExplorer/UIExplorerList.ios.js
Examples/UIExplorer/UIExplorerList.ios.js
/** * The examples provided by Facebook are for non-commercial testing and * evaluation purposes only. * * Facebook reserves all rights not expressly granted. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ...
JavaScript
0.000006
@@ -2510,32 +2510,65 @@ TimerExample'),%0A + require('./TransformExample'),%0A require('./Vib
80da99bcd53d3f94eca7c5b96a152c8348a76d11
Set constant height for free-form textbox
src/modules/WriteViewContainer.js
src/modules/WriteViewContainer.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Map } from 'immutable'; import { NavigationActions } from 'react-navigation'; import { Image, TextInput, Alert, View, ScrollView, StyleSheet, } from 'react-native'; import LoadingSpi...
JavaScript
0
@@ -770,29 +770,16 @@ al: 32,%0A - flex: 1,%0A flex @@ -2189,28 +2189,27 @@ height: -null +250 ,%0A wi
9a9957df4ec7a5dca7d2bfa21c9e2013db99d691
make sure parseError is receiving an Error
src/modules/support/parseError.js
src/modules/support/parseError.js
function parseStack(e) { var concatStack = e.stack.replace(/\n +/g, '|'); if (e.stack.includes(e.message)) { return concatStack; } return e.message + '|' + concatStack; } export default function parseError(e) { if (e.stack) {return parseStack(e);} if (e.message) {return e.message;} return String(e); ...
JavaScript
0.000067
@@ -181,23 +181,8 @@ %0A%7D%0A%0A -export default func @@ -186,21 +186,18 @@ unction -parse +is Error(e) @@ -293,12 +293,122 @@ tring(e);%0A%7D%0A +%0Aexport default function parseError(e) %7B%0A if (e instanceof Error) %7Breturn isError(e);%7D%0A return String(e);%0A%7D%0A
d28f7b13bdc449a8b2ab39e8aa41a5be0c63a692
Set currentPath in init lifecycle hook.
addon/components/search-help-modal/component.js
addon/components/search-help-modal/component.js
import Ember from 'ember'; import layout from './template'; /** * Modal that provides examples and explanation of Lucene Search syntax * * ```handlebars * {{search-help-modal * isOpen=isOpen * }} * ``` * @class search-help-modal */ export default Ember.Component.extend({ layout, isOpen: false, ...
JavaScript
0
@@ -319,64 +319,87 @@ -currentPath: Ember.computed(function() %7B%0A return +init() %7B%0A this._super(...arguments);%0A this.set('currentPath', %60$%7B wind @@ -420,11 +420,11 @@ igin - + +%7D$%7B wind @@ -447,16 +447,18 @@ name +%7D%60) ;%0A %7D -) ,%0A
dd6e67fa527d013d88d9b8fbc29c7b5d023fae7d
fix done callback invocations
test/helpers.js
test/helpers.js
"use strict"; const expect = require("expect.js"); exports.successResponseCallback = function (cb, close) { return function (res) { res.setEncoding("utf8"); expect(res.statusCode).to.be(200); expect(res.headers["content-type"]).to.be("text/javascript; charset=utf-8"); expect(res.headers["cache-control"]).to....
JavaScript
0.000003
@@ -437,39 +437,16 @@ %0A%09%09%7D);%0A%0A -%09%09res.on(%22close%22, cb);%0A %09%09res.on @@ -477,37 +477,30 @@ lose) close( -cb );%0A%09%09%09 -else cb();%0A%09%09%7D);%0A @@ -776,31 +776,8 @@ );%0A%0A -%09%09res.on(%22close%22, cb);%0A %09%09re @@ -820,21 +820,14 @@ ose( -cb );%0A%09%09%09 -else cb()
9c666da48463b6b7745ad8882d85a40921976d7c
fix practice server crash
practiceserver.js
practiceserver.js
var port = 1340; // Downgrade from root if (process.getuid() === 0) require('fs').stat(__filename, function(err, stats) { if (err) return console.log(err); process.setuid(stats.uid); }); console.log("Started practice server"); var io = require('socket.io').listen(port...
JavaScript
0
@@ -1163,43 +1163,25 @@ +if( g.c0 -.emit('disconnect');%0A%09%09 g.c1 +)%7B%0A%09%09%09g.c0 .emi @@ -1195,28 +1195,25 @@ onnect');%0A%09%09 - +%09 delete gameB @@ -1230,32 +1230,81 @@ g.c0.id%5D;%0A%09%09 +%7D%0A%09%09 if(g.c1)%7B%0A%09%09%09g.c1.emit('disconnect');%0A%09%09%09 delete gameBySo...
5451e403cd6b7cce3351746531fdc945b418ee45
Update tests!
test/helpers.js
test/helpers.js
var expect = require("expect.js"); var mocha = require("mocha"); var assets = require(".."); describe("helper functions", function () { it("do not pollute global scope if helperContext is passed", function () { var ctx = {}; var instance = assets({ helperContext: ctx }); expect(ctx.css).to.be.a("functio...
JavaScript
0
@@ -2643,17 +2643,14 @@ , %7B +' data -: %7B ' +- turb @@ -2668,18 +2668,16 @@ k': true - %7D %7D);%0A
0909ff1f46f7020731bc87167e289676be065d66
Make print links open in new windows
app/assets/javascripts/core.js
app/assets/javascripts/core.js
//Reusable functions var Alphagov = { daysInMsec: function(d) { return d * 24 * 60 * 60 * 1000; }, cookie_domain: function() { var host_parts = document.location.host.split(':')[0].split('.').slice(-3); return '.' + host_parts.join('.'); }, read_cookie: function(name) { var cookieValue = null;...
JavaScript
0
@@ -1631,16 +1631,63 @@ bled%22);%0A + $('.print-link a').attr('target', '_blank');%0A %0A if(
9780236c224dea63d8dc90bd9b34666e10f63d52
fix assets precompile problem
app/assets/javascripts/grid.js
app/assets/javascripts/grid.js
var jobsworth = jobsworth || {} jobsworth.Grid = (function($){ var columns = [ {id: 'read', name: "<span class='unread_icon'/>", field: 'read', resizable: false, sortable: true, formatter: UnreadMarkFormatter, width:16}, {id: 'id', name: 'id', field: 'id', sortable: true}, {id: 'summary', name: 'summary...
JavaScript
0.000001
@@ -937,17 +937,16 @@ rmatter%7D -, %0A %5D;%0A%0A
1ef8cac00a044ead6075ff3c7d271a881ee0b092
Add js
app/assets/javascripts/trip.js
app/assets/javascripts/trip.js
$(document).ready(function(){ $('#expense_form').hide(); $('#trip_form').on('click', 'input[type=submit]', function(event){ $('#trip_form').hide(); $('#expense_form').show(); }); $('input#expense_location_id').geocomplete(); $('form').on('click','.add_fields', function(event){ event.preventDefau...
JavaScript
0.000022
@@ -184,24 +184,27 @@ w();%0A %7D);%0A + // $('input#ex @@ -624,16 +624,19 @@ on(e)%7B%0A + // $(this) @@ -694,32 +694,33 @@ ,'#add-expense', + function(e)%7B%0A c @@ -716,16 +716,38 @@ ion(e)%7B%0A + e.preventDefault();%0A consol
c537305921b6c17e71a236243d0f703d6cd9f4da
Fix typo
test/library.js
test/library.js
var expect = require('expect.js') , ffi = require('../') , Library = ffi.Library describe('Library', function () { afterEach(gc) it('should be a function', function () { expect(Library).to.be.a('function') }) it('should work with the `new` operator', function () { var l = new Library() expe...
JavaScript
0.999999
@@ -1821,16 +1821,17 @@ cess.pla +t form ==
bd80c06be4ead6d9185acebe778c24a9fa695f26
remove commented code
app/components/Editor/state.js
app/components/Editor/state.js
import uniqueId from 'lodash/uniqueId' import is from 'utils/is' import assignProps from 'utils/assignProps' import { observable, computed, action, autorun, extendObservable } from 'mobx' import CodeMirror from 'codemirror' import FileStore from 'commons/File/store' import TabStore from 'components/Tab/store' import ov...
JavaScript
0
@@ -2459,185 +2459,8 @@ %5B0%5D%0A - // if (is.string(lineColExp) && lineColExp.startsWith(':')) %7B%0A // const %5Bline = 0, ch = 0%5D = lineColExp.slice(1).split(':')%0A // args = %5Bline - 1, ch - 1%5D%0A // %7D%0A
2a7c652fa82909616f20ff198458cea7c60f8f45
split ascending/descending copy tests
test/methods.js
test/methods.js
var B = require('../').Buffer var test = require('tape') if (process.env.OBJECT_IMPL) B.TYPED_ARRAY_SUPPORT = false test('buffer.toJSON', function (t) { var data = [1, 2, 3, 4] t.deepEqual( new B(data).toJSON(), { type: 'Buffer', data: [ 1, 2, 3, 4 ] } ) t.end() }) test('buffer.copy', function (t) { ...
JavaScript
0.000005
@@ -2327,20 +2327,16 @@ %0A var b -%0A b = new B @@ -2430,16 +2430,75 @@ hij')%0A +t.end()%0A%7D)%0A%0Atest('copy() descending', function (t) %7B%0A var b = new
6a3bc5559ed2ba290ec34c8c690bf67847836be3
Add pageCount to instance via usePagination hook
src/hooks/usePagination.js
src/hooks/usePagination.js
import { useMemo, useLayoutEffect } from 'react' import PropTypes from 'prop-types' // import { addActions, actions } from '../actions' import { defaultState } from './useTableState' defaultState.pageSize = 10 defaultState.pageIndex = 0 addActions({ pageChange: '__pageChange__', }) const propTypes = { // Genera...
JavaScript
0
@@ -2696,24 +2696,39 @@ ageOptions,%0A + pageCount,%0A page,%0A
65fc3b2ffc6440db110ed097e827918538a50b61
debug fetcher
src/node_modules/fetcher/index.js
src/node_modules/fetcher/index.js
var collections = require('collections'); module.exports = function fetcher (route, callback) { var collection = collections[route.collection]; var Model = collection.Model; var model = new Model({ '@id': route.id }); if (callback) { model.fetch({ success: function (model, response, options)...
JavaScript
0.000001
@@ -34,16 +34,69 @@ tions'); +%0Avar debug = require('debug')(%22craftodex:ui:fetcher%22) %0A%0Amodule @@ -193,17 +193,16 @@ ction%5D;%0A -%0A var Mo @@ -224,16 +224,34 @@ n.Model; +%0A %0A debug(Model) %0A%0A var
e6fcab08e699baa8fd2d9480c66e4ea85bd33447
fix remove of global matchq;
functions/match/match.js
functions/match/match.js
var events = require("events"); var async = require("async"); var _ = require("lodash"); var shlog = require(global.gBaseDir + "/src/shlog.js"); var sh = require(global.gBaseDir + "/src/shutil.js"); var ShGame = require(global.gBaseDir + "/src/shgame.js"); var match = exports; match.desc = "match players to the desi...
JavaScript
0
@@ -884,25 +884,26 @@ %7D;%0A//%7D%0A%0Avar -m +gM atchq = %7B%7D;%0A @@ -902,17 +902,18 @@ q = %7B%7D;%0A -m +gM atchq.ti @@ -930,17 +930,18 @@ %7B%7D;%0Avar -i +gI nfo = %7B%7D @@ -942,17 +942,18 @@ o = %7B%7D;%0A -i +gI nfo.tict @@ -1104,39 +1104,33 @@ (_.isUndefined(g -lobal.m +M atchq%5Bname%5D)) %7B%0...
adb336ce92bed67f1aae6047974fb1632bdb11c0
Display notifications when creating a new database
app/modules/databases/views.js
app/modules/databases/views.js
define([ "app", "api" ], function(app, FauxtonAPI) { var Views = {}; Views.Item = FauxtonAPI.View.extend({ template: "templates/databases/item", tagName: "tr", serialize: function() { return { database: this.model }; } }); Views.List = FauxtonAPI.View.extend({ db...
JavaScript
0.996626
@@ -2581,154 +2581,668 @@ -db.save().done(function() %7B%0A var route = %22#/database/%22 + name + %22/_all_docs?limit=100%22;%0A app.router.navigate(route, %7B trigger: true +var notification = FauxtonAPI.addNotification(%7Bmsg: %22Creating database.%22%7D);%0A db.save().done(function() %7B%0...
17ed9829d5042340f67eeca7b8231a08fa35f941
Modify reducer for function purity
app/reducers/editEventModal.js
app/reducers/editEventModal.js
'use strict'; import { TOGGLE_EVENT_MODAL } from '../actions/index'; export default function eventEditingModal(state = false, action) { switch (action.type) { case TOGGLE_EVENT_MODAL: console.log(`Action ${action.type} executed with empty payload!`); state = !state; default: return state; ...
JavaScript
0.000014
@@ -105,16 +105,21 @@ ingModal +State (state =
552857d00f5101824709575a812b159b0798eb60
remove left over code
phobos/source/package.js
phobos/source/package.js
enyo.depends( "Phobos.js", "AutoComplete.js", "FindPopup.js", "ProjectCtrl.js", "EditorSettings.js", "AceScroller.js", "AceWrapper.js" );
JavaScript
0.000001
@@ -86,31 +86,8 @@ %22,%0D%0A -%09%22EditorSettings.js%22,%0D%0A %09%22Ac
34dc80d91cdc2c996654aaf721a56d40d5e6422d
Add logging
app/serviceworkers/sw-cache.js
app/serviceworkers/sw-cache.js
var CURRENT_VERSION = 'v2'; var CACHE_URLS = { 'https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch': 1, 'https://api.cosmicjs.com/v1/blog-cb/objects': 1, 'https://api.cosmicjs.com/v1/blog-cb/objects?bustcache=true': 2 }; function cacheOpen (event, response) { return function (cache) { cache .p...
JavaScript
0.000002
@@ -417,16 +417,45 @@ cached' +, event.request.url, response );%0A @@ -664,16 +664,35 @@ success' +, event.request.url );%0A r
16330940dfeec1a4a8c0d82f1a5b5f32d26dfd30
fix indentation
preview/source/Preview.js
preview/source/Preview.js
enyo.kind( { name: "PreviewDevicePicker", kind: "onyx.Picker", components: [ {content: "default", value: { height: 800, width: 600, ppi: 163, dpr: 1 }, active: true}, {content: "iPhone\u2122", value: { height: 480, width: 320, ppi: 163, dpr: 1 }}, {content: "iPhone\u2122 4", value:...
JavaScript
0.000963
@@ -1615,17 +1615,16 @@ %7B%0A%09%09%09%09%09%09 - kind: 'o
791fbfa58a6f7bf30c4231a0a1a2fc6f5d5d94c9
remove redundant semicolon in modal.js
src/scripts/modal.js
src/scripts/modal.js
// modal.js // ================================================== +function($) { 'use strict' var Modal = function(element, options) { this.$element = $(element) this.$target = $(this.$element.data('target') || this.$element.attr('href')) this.$doc =$(document.body) this.options = options this...
JavaScript
0.999619
@@ -1352,33 +1352,32 @@ rigger(e)%0A %7D) -; %0A %7D%0A%0A Modal.pr @@ -1956,17 +1956,16 @@ t.hide() -; %0A thi @@ -3025,38 +3025,40 @@ sition && this.$ -target +backdrop .hasClass('fade'
b5ad9544ae5f5f94e6441793d37e68d64988eb1a
add new task from modal
pinch/static/js/pinch.js
pinch/static/js/pinch.js
// Project specific Javascript goes here. function setup_highlighting(text_selector, button_selector, field_name, options_callback) { var target = $(text_selector)[0]; if (target) { console.log("Setting up highlighting for " + text_selector); var editor = CodeMirror.fromTextArea(target, { lineWrapping: true,...
JavaScript
0.000029
@@ -2886,27 +2886,324 @@ on%0A%09 -var $new_task = $(' +// Select the list that follows the button clicked%0A%09var $current_list;%0A%09$(%22.add%22).click(function() %7B%0A%09%09$current_list = $(this).parent().next();%0A%09%7D);%0A%09// Take the text from the input from the modal%0A%09$(%22.save%22).click(function()...
6414a91b594e04474ad4074425ff1e9a03ad8ddf
add uses in misc
public/js/Data.js
public/js/Data.js
var data = angular.module('data',[]); data.factory("HopForm",function() { return { query: function() { return [ { name:'Pellet', utilization: 1 },{ name:'Whole Leaf', utilization: 0....
JavaScript
0
@@ -2264,32 +2264,92 @@ 'Mash',%0A + 'Licor',%0A 'Primary',%0A
27a20e43cd9ce9dc3e32e44535ea79ecea83fde4
remove validation errors on detached
src/select/select.js
src/select/select.js
import {bindable, customAttribute} from 'aurelia-templating'; import {BindingEngine} from 'aurelia-binding'; import {inject} from 'aurelia-dependency-injection'; import {TaskQueue} from 'aurelia-task-queue'; import {getLogger} from 'aurelia-logging'; import {fireEvent} from '../common/events'; import {getBooleanFromAtt...
JavaScript
0
@@ -2119,16 +2119,88 @@ = null;%0A + $(this.element).parent().children(%22.md-input-validation%22).remove();%0A $(th
7b78a9d1173b96bcc0e9bf7acb97ef077509cf2f
Switch from false property to eql for IE 8 & lower
polyfills/Array/prototype/fill/tests.js
polyfills/Array/prototype/fill/tests.js
it('exists', function () { expect(Array.prototype).to.have.property('fill'); }); it('has correct instance', function () { expect(Array.prototype.fill).to.be.a(Function); }); it('has correct name', function () { function nameOf(fn) { return Function.prototype.toString.call(fn).match(/function\s*([^\s]*)\(/)[1]; ...
JavaScript
0
@@ -572,16 +572,18 @@ .to. -be. +eql( false +) ;%0A%7D)
a9641a03a7c0c11ab48d174ace527aa58a177ed9
support language tables
scraper.js
scraper.js
var request = require('request'), cheerio = require('cheerio'), dateFormat = require('dateformat'); var Menu = { date: dateFormat(new Date(), 'yyyy-mm-dd, hh:MM:ss TT'), diningHalls: { atwater: { breakfast: null, lunch: null }, proctor: { brea...
JavaScript
0
@@ -182,25 +182,26 @@ ,%0A dining -H +_h alls: %7B%0A @@ -475,32 +475,94 @@ dinner: null%0A + %7D,%0A language_tables: %7B%0A lunch: null%0A %7D%0A %7D%0A @@ -943,24 +943,58 @@ ross: null%0A + language_tables: null%0A %7D,%0A @@ -1650,32 +1650,151...
6378f2926622488449c839ce9de38916b4fbfb8d
Add LICENSE in the javascript source
src/pre.js
src/pre.js
(function() { dig = {};
JavaScript
0.000001
@@ -1,8 +1,1071 @@ +/*%0ACopyright (c) 2012 Chris Pettitt%0A%0APermission is hereby granted, free of charge, to any person obtaining a copy%0Aof this software and associated documentation files (the %22Software%22), to deal%0Ain the Software without restriction, including without limitation the rights%0Ato use, copy, m...
c9311a54bcb12cc88096681fb5eaff60223c6b22
Fix incorrect merge introduced in a9fa4fc. (Validations weren't running in Responses#new)
Resources/ui/common/responses/ResponsesNewView.js
Resources/ui/common/responses/ResponsesNewView.js
//All the questoin in a survey function ResponsesNewView(surveyID) { var _ = require('lib/underscore')._; var Question = require('models/question'); var Survey = require('models/survey'); var Response = require('models/response'); var QuestionView = require('ui/common/questions/QuestionView'); var ResponseViewHel...
JavaScript
0
@@ -1527,20 +1527,32 @@ onViews( -self +allQuestionViews );%0A%09%09var
0bf9e7a1b9c86fd7b1a9da434cca2e49b93870ed
Fix bug where error message isn't shown for invalid room name
public/js/main.js
public/js/main.js
/* Atlassian M.E.A.T. * Authors: Adam Ahmed, Martin Jopson, Stephen Russell, Robert Smart * (c) 2011 Atlassian Pty Ltd. * Atlassian M.E.A.T. may be freely distributed under the MIT Expat license. */ (function() { var roomName = ParameterParser.parse().room; function runAtMidnight(func) { var oneDay = 1000 ...
JavaScript
0.000001
@@ -1934,13 +1934,67 @@ %09%09%09. -show( +removeClass('hidden');%0A%09%09%09$('#container').addClass('hidden' );%0A%09
142c7d5144b2ef2fc230ddb9b1d4cae29048d1e5
output ultrasonic reading to ros
examples/sensor-to-ros/index.js
examples/sensor-to-ros/index.js
const Board = require('firmata'); const Sonar = require('./lib/sonar'); const Motor = require('./lib/motor'); const pwait = require('./lib/util').pwait; const PIN_SONAR = 8; const PIN_SERVO = 3; let STEP = 20; const MIN = 0, MAX = 180; let servoPos = MIN; const sonarBoard = new Board('/dev/ttyACM0', err => { if (e...
JavaScript
0.999999
@@ -145,16 +145,105 @@ ).pwait; +%0Aconst rosnodejs = require('rosnodejs');%0A%0Aconst std_msgs = rosnodejs.require('std_msgs'); %0A%0Aconst @@ -341,16 +341,195 @@ = MIN;%0A%0A +rosnodejs.initNode('sensor_to_ros', %7Bmessages: %5B'std_msgs/Float32'%5D%7D)%0A.then( (nodeHandle) =%3E %7B%0A distance_publisher = no...
87374dd5e6e48b3a4a96bac9e845664ce0c330c7
Add saga for generating me data
app/containers/App/sagas.js
app/containers/App/sagas.js
import { takeLatest } from 'redux-saga/effects'; import { ME_FROM_TOKEN, } from './constants'; function* getMeFromToken() { } function* meData() { yield takeLatest(ME_FROM_TOKEN, getMeFromToken); } export default [ meData, ];
JavaScript
0.000238
@@ -1,16 +1,27 @@ import %7B + call, put, takeLat @@ -107,37 +107,339 @@ ';%0A%0A -function* getMeFromToken() %7B%0A +import %7B%0A meRequestFailed,%0A meRequestSuccess,%0A%7D from './actions';%0A%0Afunction* getMeFromToken(action) %7B%0A // TODO: placeholder for request%0A const request = %7B%7D;%0A try %7B%0...
e1a9435e474981151bf53668835da220d795a9ef
Add a cache layer to avoid hitting the HDD as often
plugins/repcastnas.js
plugins/repcastnas.js
const LifeforcePlugin = require("../utils/LifeforcePlugin.js"); const exampleRepcast = require("../static/example_repcast.json"); const restify = require("restify"); const fs = require("fs"); const querystring = require("querystring"); const mimetype = require("mime-types"); const path = require("path"); let pathfix =...
JavaScript
0
@@ -360,16 +360,46 @@ null;%0A%0A +let ResultCache = new Map();%0A%0A class Re @@ -2574,16 +2574,120 @@ tpath;%0A%0A + // Check if we have the result of this already in cache...%0A if (ResultCache.has(filepath)) %7B%0A this @@ -2745,31 +2745,321 @@ path + + %22, getting from cache%22 );%0A + ...
bd4aa5aab6fc6fee7ea8126ca6c0faa610dceb65
Remove reference to initialize from comments
src/row.js
src/row.js
/* backgrid http://github.com/wyuenho/backgrid Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors Licensed under the MIT license. */ /** Row is a simple container view that takes a model instance and a list of column metadata describing how each of the model's attribute is to be rendered, and app...
JavaScript
0
@@ -1869,27 +1869,36 @@ Used by -#initialize +the constructor%0A interna @@ -1910,21 +1910,16 @@ Override -%0A this to @@ -1961,16 +1961,21 @@ ce for a +%0A custom @@ -2098,19 +2098,23 @@ to -#initialize +the constructor .%0A%0A
405b4d741a5b02d8166b6b5af605a59bfcde040a
Add support for workspaceFolder variables (#20)
extension.js
extension.js
const vscode = require('vscode'); const fs = require('fs'); const path = require('path'); const childProcess = require('child_process'); const diffMatchPatch = require('diff-match-patch'); class AstyleFormatter { constructor() { this.statusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.L...
JavaScript
0.000001
@@ -1245,32 +1245,33 @@ = item.replace(/ +( %5C$%7BworkspaceRoot @@ -1263,32 +1263,55 @@ $%7BworkspaceRoot%7D +)%7C(%5C$%7BworkspaceFolder%7D) /g, vscode.works @@ -1394,16 +1394,17 @@ eplace(/ +( %5C$%7Bworks @@ -1412,16 +1412,39 @@ aceRoot%7D +)%7C(%5C$%7BworkspaceFolder%7D) /g, vsco