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 |
|---|---|---|---|---|---|---|---|
6ea74efad399a781f377f52b7a9cc189a48e2bce | add acronym to json payload | frontend/src/components/registration/basicInformation.js | frontend/src/components/registration/basicInformation.js | import React from 'react';
import { formValueSelector } from 'redux-form';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import Grid from 'material-ui/Grid';
import { selectNormalizedCountries } from '../../store';
import TextFieldForm from '../forms/textFieldForm';
import PolarRadio from... | JavaScript | 0.999873 | @@ -1438,16 +1438,37 @@
ldName=%22
+json.partner_profile.
acronym%22
|
fad57e796a64eb0d53213131fec7dba68a68ad68 | fix queue of next check by checkLazyElements->triggerEvent | src/jquery.lazyloadxt.js | src/jquery.lazyloadxt.js | /*jslint browser:true, plusplus:true, vars:true */
/*jshint browser:true, jquery:true */
/*jshint -W040:false */ /* to don't alert on "this" in triggerLoad and triggerError */
(function ($, window) {
'use strict';
// options
var options = {
autoInit: true,
selector: 'img',
... | JavaScript | 0 | @@ -5272,24 +5272,53 @@
Mode %3E 1) %7B%0A
+ waitingMode = 1;%0A
@@ -5405,37 +5405,8 @@
e);%0A
- waitingMode = 1;%0A
|
40192b460ea0a23a71d832ea808a942165024d7f | Add integration test via docker | project/build/project.js | project/build/project.js | 'use strict';
/*jslint nomen: true, stupid: true*/
module.exports = function (grunt) {
grunt.registerTask('integration-test', 'Run integration tests', [
'docker-integration-test'
]);
grunt.registerMultiTask('docker-integration-test', function runTask() {
/*eslint-disable no-invalid-this*/... | JavaScript | 0 | @@ -595,24 +595,60 @@
ire('path');
+%0A var fs = require('fs');
%0A%0A
@@ -862,24 +862,63 @@
script.');%0A
+ fs.fchmodSync(file, 1411);%0A
|
cc94d6179c5d7ad8fadbd43c86ea3866a47a374d | Remove dead code: messages.flags.send_force_expand. | static/js/message_flags.js | static/js/message_flags.js | var message_flags = (function () {
var exports = {};
var batched_updaters = {};
function batched_updater(flag, op, immediate) {
var queue = [];
var on_success;
var start;
function server_request() {
// Wait for server IDs before sending flags
var real_msgs = _.filter(queue, function (... | JavaScript | 0.000079 | @@ -2565,134 +2565,8 @@
%7D;%0A%0A
-exports.send_force_expand = function send_force_expand(messages, value) %7B%0A send_flag(messages, %22force_expand%22, value);%0A%7D;%0A%0A
expo
|
f90b597cac3e33e127d00627cdd5114b313d8d23 | integrate superagent | static/src/pages/Detail.js | static/src/pages/Detail.js | import React from 'react';
import ajax from 'superagent';
class Detail extends React.Component {
constructor(props) {
super(props);
this.state = { commits: [] };
}
componentWillMount() {
ajax.get('https://api.github.com/repos/facebook/react/commits')
.end((error, response) => {
if(!error && respons... | JavaScript | 0.000305 | @@ -458,16 +458,17 @@
%09%7D%0A%09%09%09%7D)
+;
%0A%09%7D%0A%0A%09re
|
90ceb05b6bf9d0fde5e9386bf86a2feb3a39af06 | Apply recaptcha verification for API User#Create | src/server/routes/api.js | src/server/routes/api.js | import configs from '../../../configs/project/server';
import Roles from '../../common/constants/Roles';
import bodyParser from '../middlewares/bodyParser';
import authRequired from '../middlewares/authRequired';
import roleRequired from '../middlewares/roleRequired';
import fileUpload from '../middlewares/fileUpload';... | JavaScript | 0 | @@ -146,24 +146,86 @@
odyParser';%0A
+import verifyRecaptcha from '../middlewares/verifyRecaptcha';%0A
import authR
@@ -769,16 +769,20 @@
/users',
+%0A
bodyPar
@@ -782,32 +782,57 @@
bodyParser.json,
+%0A verifyRecaptcha,%0A
userController.
@@ -829,32 +829,35 @@
ontroller.create
+%0A
);%0A app.post... |
868a67e850b8d38e3345438fcfcd99ca3ba56618 | Update index.js | src/services/me/index.js | src/services/me/index.js | const { Forbidden, GeneralError } = require('@feathersjs/errors');
const logger = require('../../logger');
const hooks = require('./hooks');
const { externallyManaged } = require('../helpers/utils');
class Service {
constructor(options) {
this.options = options || {};
this.docs = {};
}
/**
* request heade... | JavaScript | 0.000002 | @@ -566,47 +566,8 @@
%7B%7D;%0A
-%09%09user.accountId = params.account._id;%0A
%09%09tr
@@ -742,32 +742,71 @@
t valid.');%0A%09%09%7D%0A
+%09%09user.accountId = params.account._id;%0A
%09%09try %7B%0A%09%09%09user.
|
25b46cc7ba6a066a860f5c86c1ff39e021b5e8ec | write sortNotes function that refactors old code | widget.js | widget.js | // Global Namespace
var PinPoint = PinPoint || {};
// Widget Class called in main
PinPoint.Widget = function(video){
this.video = video;
this.videoParent = document.querySelector("video").parentNode;
this.videoParent.addEventListener('mouseenter', function(event){
this.drawSideBar();
}.bind(this));
this.videoPa... | JavaScript | 0.000002 | @@ -3575,72 +3575,35 @@
rray
+;
%0A%09
-note
+thi
s.sort
-(function(a,b) %7B return a.seconds - b.seconds %7D
+Notes(notes
);%0A%09
@@ -3855,24 +3855,164 @@
his));%0A%09%7D,%0A%0A
+%09sortNotes: function(notesArray)%7B%0A%09%09var notes = notesArray%0A%09 notes.sort(function(a,b) %7B %0A%09 %09return a.... |
7ac75843bb06aa4208bd8aae2728ec6dfecb27d8 | set state's data property instead of state directly | src/store/modules/app.js | src/store/modules/app.js | import store from '../store'
const initialState = {
appMode: 'full',
navigationMode: 'forward',
isRouterEnabled: false,
router: {},
history: [],
backwardNavigation: false,
componentList: {},
goBackView: '',
diameters: {},
usePercentSizes: false,
percentSizes: {
xxl: 30,
xl: 20,
l: 16,... | JavaScript | 0.000001 | @@ -809,16 +809,21 @@
re.state
+.data
= initi
|
c48994e981afb95893b010eadcc0cc4e91551fac | Fix broken reference | src/stores/FlairStore.js | src/stores/FlairStore.js | /*
Copyright 2017 New Vector Ltd
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
... | JavaScript | 0.000001 | @@ -3296,19 +3296,8 @@
r',
-this.props.
user
|
1da273dbc6ab2e7367ff25c01b5830233892cf2f | fix style configureStore.development.js | app/bce/store/configureStore.development.js | app/bce/store/configureStore.development.js | /**
* Store - dev Store
*
* @file configureStore.development.js
* @author mudio(job.mudio@gmail.com)
*/
import thunk from 'redux-thunk';
import createLogger from 'redux-logger'; // eslint-disable-line import/no-extraneous-dependencies
import {hashHistory} from 'react-router';
import {routerMiddleware} from 'react... | JavaScript | 0.000001 | @@ -180,65 +180,8 @@
er';
- // eslint-disable-line import/no-extraneous-dependencies
%0Aimp
@@ -577,17 +577,16 @@
ed: true
-,
%0A%7D);%0A%0Aco
|
c3cd298946d680f9c157f1e5b4c5036328d5a599 | Add heading links to documentation | next.config.js | next.config.js | const webpack = require('webpack')
const marked = require('marked')
const renderer = new marked.Renderer()
const USE_PREFETCH = process.env.NODE_ENV !== 'test'
module.exports = {
webpack: config => {
// Add in prefetch conditionally so we don't break jest snapshot testing
config.plugins.push(
new webp... | JavaScript | 0 | @@ -155,16 +155,217 @@
'test'%0A%0A
+renderer.heading = (text, level) =%3E %7B%0A const escapedText = text.toLowerCase().replace(/%5B%5E%5Cw%5D+/g, '-')%0A%0A return %60%3Ch$%7Blevel%7D%3E%3Ca name=%22$%7BescapedText%7D%22 href=%22#$%7BescapedText%7D%22%3E$%7Btext%7D%3C/a%3E%3C/h$%7Blevel%7D%3E%60%0A%7D%0A%0A
modul... |
168d2a920404b74b6064a0dcb83378509feca56a | Update the env reducer to use gon with snake case | app/javascript/components/redactions/env.js | app/javascript/components/redactions/env.js | const initialState = { user: {} };
export const SET_ENV_VARS = '@env/SET_VARS';
export function setEnvVars() {
const { global } = window.gon;
return {
type: SET_ENV_VARS,
payload: {
apiUrl: global.apiUrl,
apiEnv: global.apiEnv,
apiApplications: global.apiApplications,
controlTower... | JavaScript | 0 | @@ -214,17 +214,18 @@
obal.api
-U
+_u
rl,%0A
@@ -244,17 +244,18 @@
obal.api
-E
+_e
nv,%0A
@@ -283,17 +283,18 @@
obal.api
-A
+_a
pplicati
@@ -335,22 +335,24 @@
.control
-T
+_t
ower
-U
+_u
rl,%0A
|
8c99d956c7e8d3a5931309491f54e0e4dd1481c1 | clear the new section form code a little | app/javascripts/taskar/sections/new_form.js | app/javascripts/taskar/sections/new_form.js | Taskar.Sections.NewForm = function(sectionsBar){
sectionsBar.on('click', '.add_section', show);
sectionsBar.on('click', 'input[type=button]', hide);
sectionsBar.on('key:esc', 'form', hide);
sectionsBar.on('submit', 'form', Taskar.Sections.validateForm);
var fo... | JavaScript | 0.000001 | @@ -32,34 +32,30 @@
ion(
-sectionsBar)%7B%0A sectionsBa
+container)%7B%0A containe
r.on
@@ -95,34 +95,32 @@
show);%0A
-sectionsBa
+containe
r.on('click'
@@ -152,34 +152,32 @@
', hide);%0A
-sectionsBa
+containe
r.on('key:es
@@ -213,26 +213,24 @@
ide);%0A
-sectionsBa
+containe
r.on('su
@@ -326,17 +326,... |
06efe6bc18ad1e6c47a90e8dfa2385efdf87228a | Fix toBottom when not main application | app/js/arethusa.core/directives/toBottom.js | app/js/arethusa.core/directives/toBottom.js | "use strict";
angular.module('arethusa.core').directive('toBottom', [
'$window',
'$timeout',
function($window, $timeout) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
var canvas = angular.element(document.getElementById('canvas'));
var win = angular.element($w... | JavaScript | 0 | @@ -215,16 +215,85 @@
var
+canvas, win;%0A if (aU.isArethusaMainApplication()) %7B%0A
canvas =
@@ -353,19 +353,17 @@
-var
+
win =
@@ -388,16 +388,119 @@
indow);%0A
+ %7D else %7B%0A canvas = win = element.parents('%5Bng-controller=%22ArethusaCtrl%22%5D');%0A ... |
916fb4d08e1ad481b8e3863dffc7658c6b0b9a23 | Fix x-axis labels for time series | app/scripts/directives/time-series-chart.js | app/scripts/directives/time-series-chart.js | 'use strict';
import _ from 'lodash-es'
import './styles/time-series-chart.css'
/**
* @ngdoc directive
* @name midjaApp.directive:dataDownloadLink
* @description
*/
angular.module('midjaApp')
.directive('timeSeriesChart', function(
dataService, formattingService, $compile, $timeout) {
function attribut... | JavaScript | 0.000117 | @@ -1605,28 +1605,28 @@
st first
-Char
+Word
= v =%3E
v.slice(
@@ -1621,20 +1621,25 @@
=%3E
-v.slice(0, 1
+_.head(_.words(v)
)%0A
@@ -1662,20 +1662,20 @@
nst tail
-Char
+Word
s = v =%3E
@@ -1679,17 +1679,35 @@
=%3E
-v.slice(1
+_.tail(_.words(v)).join(%22 %22
)%0A
@@ -1734,20 +1734,20 @@
last
-Char
+... |
9828005b29b081be955772beb76a920df610676f | set homedir | node/server.js | node/server.js | #!/usr/bin/node
var pty = require("pty.js");
var WebSocketServer = require('ws').Server;
var express = require("express");
var app = express();
var http = require("http");
var https = require("https");
var querystring = require("querystring");
var uuid = require("uuid/v4");
var terminals = {};
app.set("port", (proc... | JavaScript | 0.000001 | @@ -2948,16 +2948,78 @@
_homedir
+,%0A env: %7B HOME: auth.site_homedir %7D
%0A
|
160acbce89bbea2e979c2969c2678cf3566c3336 | Fix issue with network targeting | node_helper.js | node_helper.js | /* global require, module */
/* Magic Mirror
* Node Helper: MMM-NetworkScanner
*
* By Ian Perrin http://ianperrin.com
* MIT Licensed.
*/
const NodeHelper = require("node_helper");
const ping = require("ping");
const sudo = require("sudo");
module.exports = NodeHelper.create({
start: function function_na... | JavaScript | 0 | @@ -957,16 +957,86 @@
-if( self
+// Target hosts/network supplied in config or entire localnet%0A if (this
.con
@@ -1050,17 +1050,10 @@
work
-.length
)
+
%7B%0A
@@ -1096,20 +1096,20 @@
, '-q',
-self
+this
.config.
@@ -4540,22 +4540,22 @@
fig is m
-essage
+issing
or in d
|
062cb7c2b5dcd204b98779a8c52d9fdc28f8bbc2 | Update fetch.js | HTML5/Blob/fetch/fetch.js | HTML5/Blob/fetch/fetch.js |
async function recover (link, blob) {
// 还原 blob
const text = await (new Response(blob)).text();
console.log('text =', text);
link.innerText = text;
// auto click
link.click();
URL.revokeObjectURL(link.href);
//
try {
const json = await (new Response(blob)).json();
console.log('json =', json)... | JavaScript | 0.000001 | @@ -92,24 +92,27 @@
)).text();%0A
+ //
console.log
@@ -130,16 +130,19 @@
text);%0A
+ //
link.in
@@ -157,16 +157,72 @@
= text;%0A
+ pre.innerText = text;%0A // console.log('pre =', pre);%0A
// aut
@@ -340,24 +340,24 @@
b)).json();%0A
-
console.
@@ -377,16 +377,101 @@
json);%0A
+ pre.innerText = ... |
934586f45de70d709be6b0cb61312b91209ba99d | add query support | lib/request.js | lib/request.js | function Request(action) {
this.action = action;
this.req = {};
this.res = {};
}
Request.prototype.params = function(params) {
this.req.params = params;
return this;
};
Request.prototype.body = function (body) {
this.req.body = body;
return this;
};
Request.prototype.headers = function (headers) {
th... | JavaScript | 0.000001 | @@ -166,32 +166,122 @@
eturn this;%0A%7D;%0A%0A
+Request.prototype.query = function(params) %7B%0A this.req.query = query;%0A return this;%0A%7D;%0A%0A
Request.prototyp
|
2884425c6b821b10f615c0c17809bbd3d994e283 | Parse description | lib/scraper.js | lib/scraper.js | #!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var funkit = require('funkit');
var Zombie = require('zombie');
var urlPrefix = 'http://www.jyvaskylanseutu.fi/tapahtumat/';
main();
function main() {
var url = urlPrefix + 'main.php';
scrape(url, funkit.partial(writeJSON, 'data'));
}
... | JavaScript | 0.999248 | @@ -3033,19 +3033,373 @@
//
-str
+XXX: might be nice to fix this in funkit%0A function ltrim(c, str) %7Breturn funkit.ltrim(str, c);%7D%0A function rtrim(c, str) %7Breturn funkit.rtrim(str, c);%7D%0A%0A return separate(d, '%3Cb%3EOsoite:%3C/b%3E', '%3Cb%3EHinnat ja liput:%3C/b%3E').split('%3... |
d3b58a14179adf5c739cc4e8696c79f504c3d8b8 | Fix misspelled property name (fix #4735) | src/components/scene/device-orientation-permission-ui.js | src/components/scene/device-orientation-permission-ui.js | /* global DeviceOrientationEvent, location */
var registerComponent = require('../../core/component').registerComponent;
var utils = require('../../utils/');
var bind = utils.bind;
var constants = require('../../constants/');
var MODAL_CLASS = 'a-modal';
var DIALOG_CLASS = 'a-dialog';
var DIALOG_TEXT_CLASS = 'a-dial... | JavaScript | 0 | @@ -963,34 +963,34 @@
%7D,%0A mobileDes
-t
k
+t
opMessage: %7B%0A
@@ -3241,10 +3241,10 @@
eDes
-t
k
+t
opMe
|
b1838e32be9ae0801ba13ffb6e1016aa92936e66 | Replace deprecated function in tests | src/container/__tests__/RelayContainer_Component-test.js | src/container/__tests__/RelayContainer_Component-test.js | /**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @emails o... | JavaScript | 0.000382 | @@ -2141,35 +2141,32 @@
ld()%0A .toBe
-DOM
ComponentWithTag
@@ -2158,23 +2158,22 @@
omponent
-WithTag
+OfType
('div');
@@ -3073,11 +3073,8 @@
toBe
-DOM
Comp
@@ -3082,15 +3082,14 @@
nent
-WithTag
+OfType
('sp
|
be7821e9aaa3ca051debbb6dc07ce6957d54f58d | Clean up adapter lookup in session | lib/session.js | lib/session.js | var Session = Ember.Object.extend({
isOpening: false,
// This should become an injection
torii: function(){
return this.container.lookup('torii:main');
}.property(),
// This should become an injection
adapter: function(){
return this.container.lookup('torii-adapter:main');
}.property(),
open:... | JavaScript | 0 | @@ -1,12 +1,242 @@
+function lookupAdapter(container, authenticationType)%7B%0A var adapter = container.lookup('torii-adapter:'+authenticationType);%0A if (!adapter) %7B%0A adapter = container.lookup('torii-adapter:application');%0A %7D%0A return adapter;%0A%7D%0A%0A
var Session
@@ -827,165 +827,77 @@
r =
-c... |
31221aa42f82f7ca41c9189b0055eef3fd6fea6e | Add common signal number lookup to signals. | lib/signals.js | lib/signals.js | var prefix = 'SIG';
var names = [
"HUP",
"INT",
"QUIT",
"ILL",
"TRAP",
"ABRT",
"EMT",
"FPE",
"KILL",
"BUS",
"SEGV",
"SYS",
"PIPE",
"ALRM",
"TERM",
"URG",
"STOP",
"TSTP",
"CONT",
"CHLD",
"TTIN",
"TTOU",
"IO",
"XCPU",
"XFSZ",
"VTALRM",
"PROF",
"WINCH",
"INFO",
"... | JavaScript | 0 | @@ -333,16 +333,355 @@
R2%22%0A%5D;%0A%0A
+var map = %7B%7D;%0Anames.forEach(function each(name) %7B%0A map%5Bname.toLowerCase()%5D = name;%0A%7D)%0A%0A// map some common signal numbers to names%0A// man 2 kill (Darwin 10.8)%0Avar numbers = %7B%7D;%0Anumbers%5B1%5D = map.hup;%0Anumbers%5B2%5D = map.int;%0Anumbers%5B3... |
0504e399a2c499b07e404c91cd8f5dc2afb8f9a6 | handle 204 response code | lib/stathat.js | lib/stathat.js | const request = require('request');
const logger = require('bole')('stathat');
const config = require('./config');
const key = config('stathat').key;
if (!key) {
logger.warn('StatHat disabled because of missing key');
}
function count(stat, count = 1, callback) {
if (!key) {
return;
}
let options = {
tim... | JavaScript | 0.000001 | @@ -509,21 +509,20 @@
%09logger.
-error
+warn
('StatHa
@@ -582,16 +582,41 @@
e != 200
+ && res.statusCode != 204
) %7B%0A%09%09%09l
@@ -621,21 +621,20 @@
%09logger.
-error
+warn
(%7B body
@@ -659,17 +659,16 @@
se code:
-
', res.s
|
2c2add44b2a5fafd2cbc1ab55342738c152fe065 | fix include context | lib/av.js | lib/av.js | /*!
* AVOSCloud JavaScript SDK
* Version: 0.4.7
* Built: Mon Jun 03 2013 13:45:00
* https://leancloud.cn
*
* Copyright 2015 LeanCloud.cn, Inc.
* The AVOS Cloud JavaScript SDK is freely distributable under the MIT license.
*
* Includes: Underscore.js
* Copyright 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
*... | JavaScript | 0.00005 | @@ -459,16 +459,97 @@
Context(
+%7B%0A console: console,%0A exports: exports,%0A module: module,%0A require: require,%0A%7D
);%0A%0Avar
|
9fa71db41e5d48108221c353bfb34ad3b49e93ca | Remove function to check if admin exists in login page. | public/app/scripts/controllers/login.js | public/app/scripts/controllers/login.js | 'use strict';
angular.module('publicApp')
.controller('LoginCtrl', ['$scope', '$http', '$location', 'UserService', function ($scope, $http, $location, $user) {
function checkAdminExists() {
$http.get("/api/v1/settings").success(function(resp){
if (resp.success) {
$scope.adminExists = resp... | JavaScript | 0 | @@ -160,359 +160,8 @@
) %7B%0A
- function checkAdminExists() %7B%0A $http.get(%22/api/v1/settings%22).success(function(resp)%7B%0A if (resp.success) %7B%0A $scope.adminExists = resp.settings.adminExists%0A %7D%0A $scope.loading = false%0A %7D)%0A %7D%0A%0A checkAdminExi... |
69557b90cbf73dca647e1e7e47880424ef457091 | Fix indendation in RateLimiter constructor | rate_limiter.js | rate_limiter.js | // Copyright (c) 2015 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | JavaScript | 0.000003 | @@ -3041,36 +3041,32 @@
unter(%7B%0A
-
numOfBuckets: se
@@ -3082,36 +3082,32 @@
uckets,%0A
-
rpsLimit: self.t
@@ -3115,28 +3115,24 @@
talRpsLimit%0A
-
%7D);%0A%0A
|
e85988a1eed92bb19bb97194f5383ff83baae019 | check chrome version for intent support | lib/web2app.js | lib/web2app.js | /* global daumtools, jshint devel: true */
(function (exports) {
"use strict";
exports.web2app = (function () {
var TIMEOUT_IOS_SHORT = 1 * 1000,
TIMEOUT_IOS_LONG = 2 * 1000,
TIMEOUT_ANDROID = 3 * 100,
INTERVAL = 100,
ua = daumtools.userAgent(),
... | JavaScript | 0 | @@ -1092,35 +1092,32 @@
if (isIntent
-Not
SupportedBrowser
@@ -1123,12 +1123,32 @@
r()
-%7C%7C !
+&& context.intentURI &&
!con
@@ -1184,24 +1184,87 @@
+web2appViaIntentURI(context.intentURI);%0A %7D else
if (context.
@@ -1267,36 +1267,32 @@
ext.storeURL) %7B%0A
-
... |
20e5204a1343425d1145344141f6b1d5ba137f0e | Fix breakage when multiple default routes are declared (#62) | lib/tc.js | lib/tc.js | 'use strict';
const shell = require('./shell');
const sudo = require('./sudo');
async function getDefaultInterface() {
const result = await shell(
"sudo route | grep '^default' | grep -o '[^ ]*$' | tr -d '\n'",
{ shell: true }
);
if (result.stdout.length === 0 && result.stderr.length > 0) {
throw ne... | JavaScript | 0 | @@ -166,16 +166,21 @@
%7C grep
+-m 1
'%5Edefaul
|
0ec717d04e93976bba79400dd7db806e514e5201 | Add google site verification | client/pages/_document.js | client/pages/_document.js | import React from 'react'
import PropTypes from 'prop-types'
import Document, { Head, Main, NextScript } from 'next/document'
import flush from 'styled-jsx/server'
class MyDocument extends Document {
render() {
const { pageContext } = this.props
return (
<html lang="en" dir="ltr">
<Head>
... | JavaScript | 0 | @@ -678,24 +678,129 @@
ry.main%7D /%3E%0A
+ %3Cmeta name=%22google-site-verification%22 content=%22Hxg_i311K6d-q0_vSMeQoH63c_kzbTmHaI9iUgw93MY%22 /%3E%0A
%7B/
|
43de09f0e6ebe99158564f3c28fb870b7002ba1f | Trim nested function and extra log statement | lib/ws.js | lib/ws.js | const WebSocket = require('ws');
const Beautifier = require('./beautifier.js');
const _ = require('underscore');
class BinanceWS {
constructor(beautify = true) {
this._baseUrl = 'wss://stream.binance.com:9443/ws/';
this._combinedBaseUrl = 'wss://stream.binance.com:9443/stream?streams=';
th... | JavaScript | 0 | @@ -942,111 +942,88 @@
//
-when
+Reference to
the
-u
se
-r data stream is active, this will store a reference to the timer sending refresh requests.
+tInterval timer for sending keep alive requests in onUserData
%0A
@@ -2570,32 +2570,651 @@
= false;%0A %7D%0A%0A
+ _sendUserDataKeepAlive(binanceRest, r... |
27fd14498c0e1ecceba6f11e0dd32cf68e64f614 | Correct getFileSync to use readFileSyn() instead of readFile() | webcam.js | webcam.js | /**
* Autor: John P. Masseria (john@masseria.org)
*/
// Limit concurrent camera access
var sem = require('semaphore')(1);
var uuid = require('uuid');
var port = 8080;
var
app = require('http').createServer(handler).listen(port, "0.0.0.0"),
path = require('path'),
fs = require('fs'),
sys = require('u... | JavaScript | 0.000001 | @@ -2438,20 +2438,46 @@
the file
-%0A
+ using synchronous I/O%0A var
content
@@ -2483,32 +2483,36 @@
ts = fs.readFile
+Sync
(filePath);%0A
|
cf5ffe179fa445d56c4011469f5b64a0d2587b7d | Add images to the set of paths to be cached. | worker.js | worker.js | // Debugging tips:
// - Bump the self.debug version line to sanity check the script in Inspector.
// - Use polyfillCaches.delete('stuff') to trash the cache.
self.debug = {version: 8};
// FIXME: Make this order-insensitive by using ES6 modules when they
// are available.
importScripts(
'bower_components/cache-pol... | JavaScript | 0 | @@ -179,9 +179,9 @@
on:
-8
+9
%7D;%0A%0A
@@ -628,16 +628,28 @@
ements%5C/
+%7C%5E%5C/images%5C/
/;%0A%0Aself
|
deaa177464d4c85f959d82f68cec8f29b4088cb1 | replace custom prepare function with "npm install" string - cuts out a bunch of code | worker.js | worker.js | var fs = require('fs')
var path = require('path')
var request = require('request')
// # of tries for application-under-test webserver to start up on specified port
// We test once per second
var RETRIES = 10
// Port on which the application-under-test webserver should bind to on localhost.
// Sauce Connector will tun... | JavaScript | 0 | @@ -382,332 +382,8 @@
31%0A%0A
-// Custom prepare function - runs %60npm install%60%0Afunction prepare(ctx, cb) %7B%0A console.log(%22SAUCE prepare%22)%0A var tsh = ctx.shellWrap(%22npm install%22)%0A ctx.forkProc(ctx.workingDir, tsh.cmd, tsh.args, function(exitCode) %7B%0A if (exitCode === 0) %7B%0A ctx.st... |
0d042e92a43c33fc19023b1c042bdf198ea9dcff | Update drawgame.js | scripts/drawgame.js | scripts/drawgame.js | var w = 600;
var h = 400;
void setup() {
size(w, h);
}
void draw() {
//fill(255,0,0);
//ellipse(200,200,10,10);
//rect(200,205,10,10);
//fill(255,255,255);
//text('e',200,210);
// face
fill(player.skin[0],player.skin[1],player.skin[2]);
ellipse(player.x,player.y-10,12+player.face*4,20);
// ... | JavaScript | 0 | @@ -591,34 +591,32 @@
rect(player.x-
-6-
player.face,play
@@ -602,33 +602,36 @@
er.x-player.face
-,
+-6,
player.y-25,12+p
@@ -626,19 +626,17 @@
er.y-25,
-12+
+
player.f
@@ -640,17 +640,21 @@
r.face*2
-,
++12,
5);%0A re
@@ -669,10 +669,8 @@
r.x-
-6-
play
@@ -677,18 +677,19 @@
er.face-
-3,
+9,
player.y... |
5969fd03fe8be8d418957018168292e234f1c422 | Clean code | client/src/utils/index.js | client/src/utils/index.js | export function diffObjects(prev, cur) {
let newValues = Object.assign({}, prev, cur);
let diff = {};
for (const [key, value] of Object.entries(newValues)) {
if (prev[key] !== value) {
diff[key] = value;
}
}
return diff;
}
export function cloneObject(obj) {
return Object.assign({}, obj);
}
... | JavaScript | 0 | @@ -1265,16 +1265,21 @@
s).then(
+%0A
(values)
@@ -1280,24 +1280,26 @@
alues) =%3E %7B%0A
+
let newS
@@ -1314,16 +1314,18 @@
%7D;%0A%0A
+
+
for (con
@@ -1342,24 +1342,26 @@
f values) %7B%0A
+
Object
@@ -1390,19 +1390,23 @@
e);%0A
+
+
%7D%0A%0A
+
retu
@@ -1424,25 +1424,23 @... |
5109ee61483b46acf7a76be51da7d032afea5b33 | Fix Rxjs import in browser | client/systemjs.config.js | client/systemjs.config.js | ;(function (global) {
var map = {
'app': 'app/angular',
'angular-pipes': 'app/node_modules/angular-pipes',
'angular-rxjs.bundle': 'app/bundles/angular-rxjs.bundle.js'
}
var packages = {
'app': { main: 'main.js', defaultExtension: 'js' },
'rxjs': { defaultExtension: 'js' }
}
var packageNam... | JavaScript | 0.000004 | @@ -776,16 +776,22 @@
'rxjs
+/Rx.js
',%0A
|
279e1df7331fe7e6872dc689d4353d98ba41ee54 | fix direct redirect for external lessons in playlist | scripts/playlist.js | scripts/playlist.js | /**
* Client side logic for playlists.
*
* - Show/hide playlists.
* - Keep track of position in playlist.
*/
import i18n from './i18n.js';
let t;
i18n.on('initialized', () => {
t = i18n.getFixedT();
/**
* If in lesson of playlist
*/
var playlist = JSON.parse(localStorage.getItem('playlist'));
if (... | JavaScript | 0 | @@ -854,16 +854,17 @@
n(event)
+
%7B%0A even
@@ -879,24 +879,132 @@
tDefault();%0A
+ var url = $(this).attr('href');%0A if (url.search(/%5Ehttp/) === 0) %7B%0A // external lesson%0A return;%0A %7D%0A
var playli
|
ade890c1861235116c41a57c8b80ce59a641cc63 | Update snow.min.js | scripts/snow.min.js | scripts/snow.min.js | var canvas = document.getElementById('snow'),
ctx = canvas.getContext('2d'),
width = ctx.canvas.width = canvas.offsetWidth,
height = ctx.canvas.height = canvas.offsetHeight,
animFrame = window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkit... | JavaScript | 0.000001 | @@ -35,16 +35,17 @@
Id('snow
+s
'),%0D%0A
|
4688cfb24148dd0c6e90fea3d58d7888f80627cf | Remove required validation from password field | src/validators/server.js | src/validators/server.js | import Valida from 'valida';
const VALID_CLIETNS = [ 'mysql', 'postgresql' ];
function serverAddressValidator(ctx) {
const { host, port, socketPath } = ctx.obj;
if ((!host && !port && !socketPath) || ((host || port) && socketPath)) {
return {
validator: 'serverAddressValidator',
msg: 'You must u... | JavaScript | 0.000001 | @@ -2686,54 +2686,8 @@
%7D,%0A
- %7B validator: Valida.Validator.required %7D,%0A
|
c6c948e090273eae4a30756d32c7d8f497957bbb | refactor code | public/angularjs/file.js | public/angularjs/file.js | const app = angular.module('myApp', []);
app.directive('fileChange', ['$window', ($window) => {
return {
// both Element(E) names and Attribute(A) names can invoke the directive
restrict: 'EA',
require: 'ngModel',
link: (scope, element, attr, control) => {
// FileReader is used to read the contents of a ... | JavaScript | 0.023493 | @@ -434,17 +434,16 @@
change',
-
(fc) =%3E
@@ -444,20 +444,16 @@
fc) =%3E %7B
-
%0A
@@ -1197,30 +1197,71 @@
t),%0A
+ type: type,%0A size: size,%0A
%7D);
-%0A
%0A
@@ -3019,16 +3019,19 @@
(fName,
+...
txtSearc
|
6c659654ac6b98028c7445f9e8e1b639d451632e | Fix routes | public/app/app.routes.js | public/app/app.routes.js | (function () {
'use strict';
angular
.module('PLMApp')
.config(config);
function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home', {
url: '/',
templateUrl: 'assets/app/home/home.html',
controller: 'Home',
controllerAs: 'home... | JavaScript | 0.000376 | @@ -85,16 +85,24 @@
function
+ config
($stateP
|
a3b7278d4a93ff1f42621206b66326b69235c352 | Update NSFW description | react/components/ManageChannel/index.js | react/components/ManageChannel/index.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { compose, graphql } from 'react-apollo';
import { propType } from 'graphql-anywhere';
import { some } from 'underscore';
import styled from 'styled-components';
import mapErrors from 'react/util/mapErrors';
import compactObject from ... | JavaScript | 0 | @@ -5437,35 +5437,44 @@
-Channels marked NSFW will b
+Not Safe For Work (NSFW) channels ar
e hi
@@ -5487,68 +5487,107 @@
rom
-e
+E
xplore
- and profile%0A views for users who have
+%0A and are only visible on your profile to people who have the%0A
&qu
@@ -5599,17... |
cc94238dd8643bd4659e3faf110f4b5154961b31 | Update rule | tasks/pingHonestbeeProd.js | tasks/pingHonestbeeProd.js | const https = require('https')
const THRESHOLD = 3000
let pastTimes = []
const pingHonestbeeProd = () => {
const start = Date.now()
return new Promise((resolve, reject) => {
https.get(`https://honestbee.tw`, (res) => {
const end = Date.now()
resolve(end - start)
}).on('error', (e) => {
co... | JavaScript | 0.000001 | @@ -584,16 +584,36 @@
if (
+time %3E THRESHOLD &&
count %3E=
|
2128c842126a8a57210aaf171b3b1625bdd741d5 | Add utility function to combine 2 sets of styles | react/features/base/styles/functions.js | react/features/base/styles/functions.js | /* @flow */
import { Platform } from '../react';
import { ColorPalette } from './components';
declare type StyleSheet = Object;
/**
* The list of the well-known style properties which may not be numbers on Web
* but must be numbers on React Native.
*
* @private
*/
const _WELL_KNOWN_NUMBER_PROPERTIES = [ 'heigh... | JavaScript | 0 | @@ -123,16 +123,72 @@
Object;
+%0Aexport type StyleType = StyleSheet %7C Array%3CStyleSheet%3E;
%0A%0A/**%0A *
@@ -391,59 +391,627 @@
%0A%0A/*
- eslint-disable flowtype/space-before-type-colon */
+*%0A * Combines the given 2 styles into a single one.%0A *%0A * @param %7BStyleType%7D a - An object or array of styles... |
11d3326520e11e14de9afcbedb85c20c8aa713a3 | Update customActivity.js | public/customActivity.js | public/customActivity.js | 'use strict';
define(function (require) {
var Postmonger = require('postmonger');
var connection = new Postmonger.Session();
var payload = {};
var steps = [
{'key': 'eventdefinitionkey', 'label': 'Event Definition Key'}
];
var currentStep = steps[0].key;
$(window).ready(function () {
connection.trigger('re... | JavaScript | 0.000001 | @@ -1311,19 +1311,8 @@
p__c
-_Salesforce
:VR_
|
14626a8d9df8d43a725ea736f0f0c55e81ee845b | Add jquery to js file | public/js/application.js | public/js/application.js | $(document).ready(function() {
// ajax for vote on question
$("#up-vote").on('submit', function(event){
event.preventDefault();
var $target = $(event.target);
var $votes = $target.parents('aside').find('.vote-count');
var request = $.ajax({
url: $target.attr('action'),
method: 'post',
... | JavaScript | 0.000001 | @@ -2073,13 +2073,440 @@
);%0A %7D);
+%0A%0A $(%22.answer_box%22).on('submit', function(event)%7B%0A event.preventDefault();%0A%0A var $target = $(event.target)%0A var $url = $target.attr('action')%0A var $type = $target.attr('method')%0A%0A requestOptions = %7B%0A type: $type,%0A url: $url,... |
a6b078f545dc72acbb614739c2696a8ed7313299 | Allow custom versions in Android shell apps. | src/project/ExpSchema.js | src/project/ExpSchema.js | const joi = require('joi');
const colorField = joi.string().regex(/^#|(#)\d{6}$/).
meta({regexHuman: "6 character long hex color string, eg: ``'#000000'``"});
const reverseDnsField = joi.string().regex(/^[a-zA-Z][a-zA-Z0-9\_\.]+$/).
meta({regexHuman: "Reverse DNS notation unique name for your app. For example... | JavaScript | 0.000015 | @@ -5600,24 +5600,219 @@
%60_.%22%0A ),%0A
+ versionCode: joi.number().description(%0A %22Version number required by Google Play. Increment by one for each release. https://developer.android.com/studio/publish/versioning.html.%22%0A ),%0A
config:
|
a151056425a81643e2ed04cb8b9f19404124cc9d | remove checkboxes option | public/js/application.js | public/js/application.js | $(document).ready(function() {
// add a question to Make Survey form when user clicks on "add question"
$('#add-question-field').on('click', function(event) {
event.preventDefault();
var questionNode = "<p><label>Question</label></p><p><input type='text' name='question'></p><p><label>Answer Type</label></p>... | JavaScript | 0.00001 | @@ -284,178 +284,8 @@
%3C/p%3E
-%3Cp%3E%3Clabel%3EAnswer Type%3C/label%3E%3C/p%3E%3Cp%3E%3Cselect class='select-answer-type'%3E%3Coption value='radio'%3EChoose One%3C/option%3E%3Coption value='checkbox'%3EChoose Many%3C/option%3E%3C/select%3E%3C/p%3E
%22;%0A
|
2f668d456dd7c661ff9d93d4cc7ebb6fc076a4f0 | add ajax for login | public/js/application.js | public/js/application.js | $(document).ready(function() {
var match = new Match()
match.popGames()
$('.choice').click(function() {
userChoice = $(this).attr('id')
//refactor into one wrapper method
match.playGame(userChoice)
match.checkGameWinner()
match.checkMatchWinner()
match.popGames()
})
$... | JavaScript | 0 | @@ -962,11 +962,576 @@
%7D)%0A%0A%0A
+ $('#login_button').on('click', function (event) %7B%0A event.preventDefault()%0A var $target = $(event.target)%0A $.ajax(%7B%0A url: '/login',%0A type: 'GET',%0A %7D).done(function (response) %7B%0A $target.closest('button').replaceWith(response)%0A... |
3102ce074e0c381bc2ddfc70431c9c110e85ec1a | Update application.js | public/js/application.js | public/js/application.js | // $(document).ready(function() {
// $("#choices").submit(function(e){
// e.preventDefault();
// data = $(this).serialize()
// $.ajax({
// url: ,
// data: data,
// type: 'post'
// })
// $('input[name=choice]').val();
});
});
// $(document).ready(function() {
... | JavaScript | 0.000001 | @@ -275,12 +275,19 @@
%7D);
+ //
%0A%7D);
+ //
%0A%0A%0A/
|
04a4cb7a097ac749a7c167891a21aef4e939d285 | Add delete items function. | public/js/controllers.js | public/js/controllers.js | 'use strict';
var app = angular.module('golangApp.controllers', []);
app.run(function ($rootScope, $templateCache) {
$rootScope.$on('$viewContentLoaded', function () {
$templateCache.removeAll();
})
})
app.controller('ItemsCtrl', function( $scope, ItemsFactory ) {
ItemsFactory.query({}, function... | JavaScript | 0 | @@ -276,14 +276,27 @@
tory
+, ItemFactory
) %7B%0A
-
@@ -384,18 +384,219 @@
s;%0A %7D
-
)
+;%0A%0A $scope.deleteItem = function (itemId) %7B%0A ItemFactory.delete(%7Bid: itemId%7D);%0A ItemsFactory.query(%7B%7D, function (responce) %7B%0A $scope.items = responce.Items;%0A ... |
d9f9c171c83fcac67e425b03d77b1f84d661aea2 | fix commit status indicator and remove unused functions | public/js/views/index.js | public/js/views/index.js | define(['jquery', 'appearanceUtils'], function($, utils) {
return {
// where
selector: function(pull) {
return pull.state == 'open';
},
// order by
sort: function(pull) {
return pull.created_at;
},
// Allows custom modifications of each pull's display
... | JavaScript | 0 | @@ -1214,26 +1214,29 @@
-node.text(
+var status =
pull.sta
@@ -1249,23 +1249,23 @@
mmit
-S
+_s
tatus
-)
;%0A
%7D
@@ -1264,177 +1264,78 @@
-
- %7D,%0A
- user_icon: function user_icon(pull, node) %7B%0A if (pull.is_mine()) %7B%0A node.append('%3Cspan cla... |
f074f73cb79af4f71285c9822cfb34bb45312ff7 | Reformat response calls to conform to each other. | server/api/users.js | server/api/users.js | 'use strict';
var Promise = require('bluebird'),
mongo = require('../db/mongo'),
userValidationRules = {
username: {
minimumLength: 4,
maximumLength: 40,
validUsernameRegex: /^\w{4,40}$/
},
password: {
minimumLength: 6,
maximum... | JavaScript | 0 | @@ -3907,32 +3907,53 @@
res
+%0A
.status(400)%0A
@@ -4030,16 +4030,37 @@
res
+%0A
.status(
|
7bbb9fb259e1257bfdcb3cd7f6b42426a9551176 | Exclude handlebars on test | package-audit.js | package-audit.js | const exec = require('child_process').exec;
//tar package is not applicable to web and waiting for other packages to update
const AUDIT_EXCEPTIONS = ['tar', 'js-yaml'];
const execute = (command, callback) => {
exec(
command,
{
maxBuffer: 2000 * 1024
},
(error, stdout, stderr) => {
callba... | JavaScript | 0.000002 | @@ -160,16 +160,30 @@
js-yaml'
+, 'handlebars'
%5D;%0A%0Acons
|
a1c42af6ecafc9158403703adc1e6f5d3b35eab1 | add Netlify Banner | pages/impress.js | pages/impress.js | import React, { Component } from 'react'
import Page from 'components/Page'
import site from './_site.json'
import GoogleMap from 'google-map-react'
import { letters, Path, Svg } from 'components/AnimatedTitle'
import { media } from 'styles';
import styled from 'styled-components'
class Impress extends Component{
con... | JavaScript | 0 | @@ -2453,16 +2453,236 @@
%09%3C/div%3E%0A
+%09%09 %09%09%3Cfooter style=%7B%7Bwidth:'100%25',textAlign:'center'%7D%7D%3E%0A%09%09 %09%09%09%3Ca href=%22https://www.netlify.com%22%3E%0A%09%09%09%09%09%09 %09%3Cimg src=%22https://www.netlify.com/img/global/badges/netlify-light.svg%22/%3E%0A%09%09%09%09%09%09%... |
55f28c51392529b39bddc3f142739cd78a3c7f2c | Implement #450 | pages/options.js | pages/options.js | var Settings = {
initialLoad: true
};
Settings.loadrc = function(config) {
this.rcEl.value = config.RC;
this.rcEl.style.height = this.rcEl.scrollHeight + 'px';
if (this.cssEl) {
this.cssEl.setValue(config.COMMANDBARCSS);
}
this.gistUrl.value = config.GISTURL;
};
Settings.resetSettings = function() {
... | JavaScript | 0.000001 | @@ -304,32 +304,120 @@
= function() %7B%0A
+ if (confirm('Reset all configuration and CSS settings to their default values?')) %7B%0A
RUNTIME('getDe
@@ -442,32 +442,34 @@
defaults) %7B%0A
+
this.rcEl.value
@@ -483,24 +483,26 @@
lts.RC;%0A
+
+
this.cssEl.s
@@ -534,24 +534,26 @@
ARCSS);%0A
+... |
83570b7ad93b714928cfe1b881f77e6c63010a84 | Add example for OrbitControl() with alt-text | src/webgl/interaction.js | src/webgl/interaction.js | 'use strict';
var p5 = require('../core/core');
/**
* @method orbitControl
* @for p5
* @chainable
*/
//@TODO: implement full orbit controls including
//pan, zoom, quaternion rotation, etc.
p5.prototype.orbitControl = function() {
if (this.mouseIsPressed) {
this.rotateY((this.mouseX - this.width / 2) / (this... | JavaScript | 0.000001 | @@ -96,16 +96,369 @@
ainable%0A
+ *%0A * @example%0A * %3Cdiv%3E%0A * %3Ccode%3E%0A * function setup() %7B%0A * createCanvas(100, 100, WEBGL);%0A * %7D%0A *%0A * function draw() %7B%0A * background(50);%0A * // Orbit control allows the camera to orbit around a target.%0A * orbitControl();%0A * box(30, 50);%0... |
494129bb091a22cabea60e462237ccc12f551450 | Make font bolder on hover | src/inspectors/github.js | src/inspectors/github.js | import parsersByExtension from '../parsers';
import { goToUrl, debug } from '../utils';
export default class GithubInspector {
static isAtDomain(url) {
return /^https?:\/\/(www.)?github.com/.test(url);
}
constructor() {
this.addAnnotations = this.addAnnotations.bind(this);
this.startWatching = this.... | JavaScript | 0.000006 | @@ -1474,16 +1474,270 @@
inter';%0A
+ child.addEventListener('mouseenter', (%7B target %7D) =%3E %7B%0A target.style.fontWeight = 'bolder';%0A %7D);%0A child.addEventListener('mouseleave', (%7B target %7D) =%3E %7B%0A target.style.fontWeight = 'normal';%0A %7D)... |
aacdde00f67e8ef914341ba6af5777e855cd19f8 | Add a new line at the end of file. | locale/core.js | locale/core.js | app.translator.plural = function(count) {
return count == 1 ? 'one' : 'other';
};
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
'm': ['eine Minute', 'einer Minute'],
'h': ['eine Stunde', 'einer Stunde'],
'd': ['ein Tag', 'einem Tag'],
'dd': [number + ' Tage', n... | JavaScript | 0 | @@ -1982,8 +1982,9 @@
%0A %7D%0A%7D);
+%0A
|
f6efaf4e890662efa8526f301e15e258c50bd1b7 | Update copy to remove text referring to voter ID information | src/javascript/config.js | src/javascript/config.js | module.exports = {
"logo" : "//s3.amazonaws.com/vip-voter-information-tool/images/voting-information-project.png",
"smallLogo" : "//s3.amazonaws.com/vip-voter-information-tool/images/vip-logo.png",
"colors" : {
"textColor" : "#4b4b4b",
"headerColor" : "#1c7ca5",
"selectedHeaderColor" : "#26a8df",
... | JavaScript | 0 | @@ -504,45 +504,8 @@
lot,
- what you need to bring to the polls,
and
@@ -2885,31 +2885,8 @@
ines
-, Voter ID information,
and
|
e306990348b6c0e34a55cbd4ef24f133d23fc288 | Update context reference | src/javascripts/index.js | src/javascripts/index.js | import TicketSidebarApp from './ticket_sidebar';
import ZAFClient from 'zendesk_app_framework_sdk';
var client = ZAFClient.init();
client.on('app.registered', function(context) {
if (context.location === 'ticket_sidebar') {
new TicketSidebarApp(client, context);
}
});
| JavaScript | 0 | @@ -163,23 +163,20 @@
unction(
-context
+data
) %7B%0A if
@@ -177,16 +177,21 @@
%7B%0A if (
+data.
context.
@@ -256,16 +256,21 @@
client,
+data.
context)
|
86d38e008a0dd81dadc20017516d2298e9130e1a | Remove unnecessary code | src/js/content/inline.js | src/js/content/inline.js | /**
*
* Inline Style (JS)
*
* @author Takuto Yanagida @ Space-Time Inc.
* @version 2019-10-28
*
*/
window.ST = window['ST'] || {};
(function (NS) {
const SEL_TARGET = '.stile';
NS.addInit(1, () => {
const spans = document.querySelectorAll(SEL_TARGET + ' span');
modifySpanStyle(spans);
const fs = d... | JavaScript | 0.001341 | @@ -94,9 +94,9 @@
10-2
-8
+9
%0A *%0A
@@ -1075,27 +1075,8 @@
-%0A%0A%0A
-%09const ifws = %5B%5D;%0A%0A
%09fun
@@ -1642,538 +1642,67 @@
f);%0A
-%0A
%09%09%09
-const a = f.getAttribute('allow');%0A%09%09%09const as = a ? a.split(';').map((e) =%3E e.trim()) : %5B%5D;%0A%09%09%09if (as.indexOf('fullscreen') !== -1 %7... |
7ddcd962cb7d875c41bff1fb57b89f3e886b954f | remove dontMockStore util | src/js/utils/JestUtil.js | src/js/utils/JestUtil.js | import TestUtils from "react-addons-test-utils";
import React from "react";
import ReactDOM from "react-dom";
import { routerShape } from "react-router";
const stores = {
CosmosPackagesStore: "../stores/CosmosPackagesStore",
MesosStateStore: "../stores/MesosStateStore",
MesosSummaryStore: "../stores/MesosSummary... | JavaScript | 0 | @@ -1131,133 +1131,8 @@
%7D,%0A%0A
- dontMockStore(storeID) %7B%0A if (storeID in stores) %7B%0A jest.dontMock(stores%5BstoreID%5D);%0A%0A return true;%0A %7D%0A %7D,%0A
/*
|
a4d6573f425ca2240f3b057f5cc8731f982100ff | use consistent formatting of getLinks for all brands | phet/js/Brand.js | phet/js/Brand.js | // Copyright 2002-2014, University of Colorado Boulder
// Returns branding information for the simulations, see https://github.com/phetsims/brand/issues/1
define( function( require ) {
'use strict';
// modules
var brand = require( 'BRAND/../../js/brand' );
// strings
var termsPrivacyAndLicensingString = re... | JavaScript | 0 | @@ -985,19 +985,29 @@
return %5B
+%0A
%7B%0A
+
@@ -1036,32 +1036,34 @@
icensingString,%0A
+
url: 'ht
@@ -1106,26 +1106,36 @@
html'%0A
-%7D,
+ %7D,%0A
%7B%0A t
@@ -1129,24 +1129,26 @@
%7B%0A
+
+
text: transl
@@ -1163,32 +1163,34 @@
ditsLinkString,%... |
b739ff3a9d86ccd2bf2beb70e5db78196219e000 | Remove superfluous console log | src/js/widget/monitor.js | src/js/widget/monitor.js | /**
* @author Oscar Fonts <oscar.fonts@geomati.co>
*/
define(['i18n', 'sos-data-access', 'widget-common', 'moment'], function(i18n, data_access, common, moment) {
"use strict";
moment.locale(i18n.getLang());
var template = [
'<div class="monitor widget">',
'<div class="table-responsi... | JavaScript | 0.000078 | @@ -1094,44 +1094,8 @@
) %7B%0A
- console.log(data);%0A%0A
|
152f6209a0abfd3a0bef7551b07107ee90164237 | update test | public/tests/app/rate.js | public/tests/app/rate.js | 'use strict';
describe('Rate tests', function() {
it('List rate', function() {
browser.get('#/rate');
var rates = element.all(by.repeater('rate in rates'));
expect(rates.count()).toEqual(2);
expect(rates.get(0).getText()).toMatch('Default-Anonymous');
expect(rates.get(1).getText()).toMatch('Def... | JavaScript | 0.000001 | @@ -197,17 +197,17 @@
toEqual(
-2
+3
);%0A e
@@ -241,24 +241,78 @@
)).toMatch('
+silver');%0A expect(rates.get(1).getText()).toMatch('
Default-Anon
@@ -333,33 +333,33 @@
xpect(rates.get(
-1
+2
).getText()).toM
@@ -1899,23 +1899,16 @@
oEqual('
-number:
1024');%0A
@@ -1986,23 +1986,16 @@
oEqual('
-number:
... |
f58337aaf2e11d4ff31cace83c04fafc5d28a15f | fix - Render template filename on error and remove comma | tasks/component_inventory.js | tasks/component_inventory.js | /*
* grunt-component-inventory
* https://github.com/tilmanjusten/grunt-component-inventory
*
* Copyright (c) 2015 Tilman Justen
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (grunt) {
// Please see the Grunt documentation for more information regarding task
// creation: h... | JavaScript | 0 | @@ -2493,38 +2493,39 @@
ile ' + options.
-storag
+templat
e + ' does not e
@@ -7119,17 +7119,16 @@
category
-,
%0A
|
80b936ed04a78c00b03f55f61cc2833b7cc3b242 | Extract common code into `beforeEach` | tdd/sample/test/util_test.js | tdd/sample/test/util_test.js | // Load the 'chai' module.
//
// Use the `expect` property of that module to verify assertions.
//
var expect = require('chai').expect;
var Util = require('../src/util');
// The `describe` function defines a test suite. The first argument defines the name of the suite (used by mere mortals to
// identify the suite).... | JavaScript | 0.999999 | @@ -28,77 +28,8 @@
%0A//%0A
-// Use the %60expect%60 property of that module to verify assertions.%0A//%0A
var
@@ -358,16 +358,156 @@
on() %7B %0A
+%09var util;%0A%0A%09// The %60beforeEach%60 function is executed before each and every test.%0A%09beforeEach(function() %7B%0A util = new Util();%0A%09%7D);%0A%... |
b4334051f9440db2711ddbfba8a69051cc7e0199 | update object/mergeValue -- use object/get | src/object/mergeValue.js | src/object/mergeValue.js | // adopted from: <https://github.com/jonschlinkert/merge-value>
// Copyright (c) 2015, Jon Schlinkert. (MIT)
var isUndef = require('../lang/isUndefined')
var isObj = require('../lang/isObject')
var isStr = require('../lang/isString')
var kindOf = require('../lang/kindOf')
var yoda = require('../lang/yoda')
var... | JavaScript | 0 | @@ -347,20 +347,20 @@
e')%0Avar
-look
+get
= re
@@ -368,20 +368,19 @@
uire('./
-look
+get
')%0Avar s
@@ -763,12 +763,11 @@
r =
-look
+get
(obj
|
0fef0c4b7c3f83cf50341e5da4fa82dbf1045504 | Add positionChanged signal to MouseArea | src/objects/MouseArea.js | src/objects/MouseArea.js | // TODO: Complete implementation / Document
// QML MouseArea
// http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-mousearea.html
QObjects.MouseArea = {
init: function() {
this._.kNode = new Kinetic.Rect();
var self = this;
this._.accepted = false; // Is this event handled already?
this._.lastDow... | JavaScript | 0 | @@ -1831,24 +1831,323 @@
%7D%0A %7D);%0A%0A
+ this._.kNode.on('mousemove.signal', function(kEvent) %7B%0A var mouse = self.getMouseEvent(kEvent);%0A // TODO: Support for coordinates outside MouseArea on click and drag%0A if(self.enabled && (self.hoverEnabled %7C%7C mouse.buttons)) %7B%0A s... |
3dde49faaf91b65871164d613583c4904d0cc64a | use random guid | server/set_video.js | server/set_video.js | var fs = require('fs');
var path = require('path');
var c = require('../config.js');
var videoFolder = './web/video/';
var feedFolder = './web/feeds/';
var videoFeedTemplate = fs.readFileSync('./data/feed_video.template', 'utf8');
var monitore = [
{ name:'monitor1', id:1 },
{ name:'monitor2', id:2 },
{ name:'moni... | JavaScript | 0.000006 | @@ -1017,32 +1017,62 @@
sh': return
-filename
+(Math.random()*10000000000).toFixed(0)
;%0A%09%09%09case 'f
|
2849574d746017ac02dd1d692a4bb3d87836e64b | fix labels for ready and result | src/processors/labels.js | src/processors/labels.js | import _ from 'underscore';
const _labels = {
added : (message) => {
return _.isArray(message) ?
`${message.length} items added to ${message[0].collection} collection` :
`item added to ${message.collection} collection`;
},
removed : (message) => {
return _.isArray(message) ?
`${messag... | JavaScript | 0 | @@ -752,16 +752,19 @@
dated',%0A
+ %0A
result
@@ -771,21 +771,264 @@
: (
-) =%3E 'result'
+message, traces) =%3E %7B%0A let method = _.find(traces, (t) =%3E %7B%0A return t.operation === 'method' &&%0A message.id === t.message.id;%0A %7D);%0A let methodName = method && method.message.method;... |
408ae94373aaa8693b23b5b402bbeb4320c9e210 | Use typeof window.process !== 'undefined' | browser.js | browser.js | /**
* This is the web browser implementation of `debug()`.
*
* Expose `debug()` as the module.
*/
exports = module.exports = require('./debug');
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.storage = 'undefined' != typeof windo... | JavaScript | 0.001268 | @@ -1095,27 +1095,45 @@
&&
-'process' in window
+typeof window.process !== 'undefined'
&&
|
60dc625b3ac70b9e3c3304042437ce0d1899dc8b | fix method chaining | src/providers/binder.es6 | src/providers/binder.es6 | angular.module('PropertyBinder')
.provider('PropertyBinder.providers.binder', function() {
this.$get = function() {
class Binder {
constructor(properties = []) {
this._properties = properties instanceof Array ? properties : [properties];
this._binded = false;
this._sealed = false;
this._... | JavaScript | 0.000003 | @@ -1077,16 +1077,34 @@
eEvent;%0A
+%09%09%09%09%09return this;%0A
%09%09%09%09%7D%0A%0A%09
|
826da7f0ceec7918b74d856c7bd01605a474e549 | fix passing animation prop to label series (#578) | src/radar-chart/index.js | src/radar-chart/index.js | // Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... | JavaScript | 0 | @@ -4537,17 +4537,16 @@
n't exis
-i
t%0A
@@ -5889,16 +5889,28 @@
nimation
+=%7Banimation%7D
%0A
|
181aba35cb2d6a522585133f8fce9de0f3e33013 | add portfinder | src/recording-service.js | src/recording-service.js | /**
* Created by khejing on 2015/6/30.
*/
var mqtt = require('mqtt');
var headless = require('headless');
var electronPath = require('electron-prebuilt');
var childProcess = require('child_process');
var recordingTopic = "recording";
var mqttClientInstance = mqtt.connect("mqtt://localhost:1883", {clientId: recordin... | JavaScript | 0.000001 | @@ -195,16 +195,56 @@
ocess');
+%0Avar portFinder = require('portfinder');
%0A%0Avar re
@@ -1407,16 +1407,115 @@
%7D);%0A
+ portFinder.getPort(function (err, port) %7B%0A console.log(%22got free port: %22+port);%0A %7D);%0A
%7D);%0A/* w
|
a44bd0237f5bf8274b24d869c0cd2c9286d75964 | modify login page style | src/route/Login/index.js | src/route/Login/index.js | /**
* Created by yangyang on 2017/9/4.
*/
import React from 'react'
import {connect} from 'react-redux'
import {Redirect} from 'react-router-dom'
import {Button, Row, Form, Input, message} from 'antd'
import {action as authAction} from '../../util/auth/'
import * as errno from '../../errno'
import style from './style... | JavaScript | 0.000001 | @@ -2240,35 +2240,24 @@
%3CFormItem
-hasFeedback
%3E%0A
@@ -2625,19 +2625,8 @@
tem
-hasFeedback
%3E%0A
|
ff419c9934f4fc81fb2cdf0173b6eaad97ce7f1e | Disable REPL by default | src/server/run-server.js | src/server/run-server.js | // Copyright © 2011 Aapo Laitinen <aapo.laitinen@iki.fi> unless otherwise noted
// Configuration for a simple test server
var sys = require('sys');
var net = require('net');
var repl = require('repl');
var Server = require('./Server');
var options = {
// The TCP port this server will listen to for HTTP and WebSocke... | JavaScript | 0.000001 | @@ -699,12 +699,9 @@
rt:
-8001
+0
,%0A%09/
|
0fc79a4a0dc8746e763822b31bb4aa9dd617ccd1 | Remove delay used in testing | src/stores/FlairStore.js | src/stores/FlairStore.js | /*
Copyright 2017 New Vector Ltd
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
... | JavaScript | 0 | @@ -6407,20 +6407,8 @@
pId)
-.delay(5000)
;%0A%0A
|
652a8f72ce8969d5dd271cf77ec6f229d39a2ebc | Edit scope bundings. Added controller and bindToController properties | SPAWithAngularJS/module3/directives/controllersInsideDirective/js/app.shoppingListDirective.js | SPAWithAngularJS/module3/directives/controllersInsideDirective/js/app.shoppingListDirective.js | // app.shoppingListDirective.js
(function() {
"use strict";
angular.module("ShoppingListDirectiveApp")
.directive("shoppingList", ShoppingList);
function ShoppingList() {
const templateUrl = "../templates/shoppingList.view.html";
const ddo = {
restrict: "E",
templateUrl,
scope: {
... | JavaScript | 0 | @@ -328,17 +328,17 @@
list: %22
-=
+%3C
%22,%0A
@@ -358,16 +358,104 @@
%0A %7D
+,%0A controller: %22ShoppingListDirectiveController as l%22,%0A bindToController: true
%0A %7D;%0A
|
ab3d71e08e765b54bffcf97ff585d59e9291a5c9 | Correct pathing. | legacy.js | legacy.js | 'use strict';
var util = require('util'),
TransportStream = require('./transport-stream')
var LegacyTransportStream = module.exports = function LegacyTransportStream(opts) {
opts = opts || {};
opts.objectMode = true;
TransportStream.call(this, opts);
var self = this;
this.transport = opts.transport;
... | JavaScript | 0 | @@ -73,26 +73,11 @@
('./
-transport-stream
')
+;
%0A%0Ava
|
e5d492b30eea65836f890b0006e7780cd94f9382 | replace tabs with spaces. | lib/28.js | lib/28.js | 'use strict';
var syncLib = require('./sync');
var Options = syncLib.Options;
var Client = syncLib.Client;
var $28 = (function(){
function $28(apiEndpoint){
this.api = require('28.io-nodejs').$28(apiEndpoint);
this.Options = Options;
}
$28.prototype.sync = function(type, projectName, proj... | JavaScript | 0 | @@ -2917,11 +2917,13 @@
%7D;%0A
-%09%0A%09
+%0A
$28.
@@ -3132,11 +3132,20 @@
ry,%0A
-%09%09%09
+
data
|
144476b8c798c44fb637754fc32eca03a322adf5 | Fix function broken in 6cb3ca1fd42df583706a5a996bc9e5495fa21cba | lib/UA.js | lib/UA.js | /**
* Create mappings between the names parsed from useragent to caniuse
* name equivalents.
*
* Multiple names may map to the same canonical caniuse name
*/
var useragent = require('useragent');
var baseLineVersions = {
"ie": ">=6",
"ie_mob": ">=8",
"chrome": "*",
"safari": ">=3",
"ios_saf": ">=3",
"firefo... | JavaScript | 0.999677 | @@ -3704,61 +3704,356 @@
Name
-) %7B%0A%09return agentlist%5BuaName.toLowerCase()%5D %7C%7C false;
+, version) %7B%0A%09var semver;%0A%09var name = aliases%5BuaName.toLowerCase()%5D %7C%7C uaName.toLowerCase();%0A%09if (typeof name == 'string') return name;%0A%09if (Array.isArray(name)) return name%5B0%5D;%0A%09if (ty... |
e0af16b3094aad15b45ee2a0fb05273c6c42edd1 | remove commented-out code | lib/bn.js | lib/bn.js | var _BN = require('bn.js');
var BN = function BN(n, base) {
if (!(this instanceof BN)) {
return new BN(n, base);
}
_BN.apply(this, arguments);
};
BN.prototype = _BN.prototype;
var reversebuf = function(buf) {
var buf2 = new Buffer(buf.length);
for (var i = 0; i < buf.length; i++) {
buf2[i] = buf[bu... | JavaScript | 0 | @@ -1529,30 +1529,8 @@
e);%0A
- //rbuf.fill(0);%0A
|
a81e1bb04da9fff2f3cc9cebcf4dbf313df22aa7 | Fix potential security hole. | lib/db.js | lib/db.js | var _ = require('underscore'),
connectionPooler = require('generic-pool'),
mysql = require('mysql'),
Q = require('q'),
config = require('./config');
var DEFAULT_NAME = 'mysql';
var pools = {};
var createPool = function(name, options) {
return conn... | JavaScript | 0.000014 | @@ -618,71 +618,8 @@
');%0A
- if (!(host && database && user && password)) %7B%0A
@@ -716,24 +716,25 @@
rd: ' +
+(
password
%0A
@@ -717,32 +717,113 @@
d: ' + (password
+ ? '***' : undefined);%0A if (!(host && database && user && password)) %7B
%0A
|
25915bee6d968f6eec1dc1328c238ea8aca36f87 | fix drop table again ... | lib/db.js | lib/db.js | var util = require('util');
var async = require('async');
var Knex = require('knex');
var schema_parser = require('./schema_parser');
var Db = function(options){
};
Db.prototype.init = function(options){
Knex.knex = Knex.initialize({
client : 'postgresql',
connection : {
host : options.host,
use... | JavaScript | 0 | @@ -806,16 +806,146 @@
-knex.raw
+//Potential injection point, how can we do a prepared statement?!?!%0A //quoted table name does not work%0A knex.raw(util.format
('DR
@@ -963,17 +963,18 @@
EXISTS
-?
+%25s
CASCADE
@@ -978,32 +978,33 @@
ADE', tableName)
+)
.exec(cb);%0A
|
32ce58f8577bf3723450d18dc5c03ab2f2c00884 | Fix DB syntax error | lib/db.js | lib/db.js | var config = require('config');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// Currently it only supports MongoDB; But I decided to put some abstraction.
mongoose.connect(config.database);
var urlSchema = new Schema({
shorten: String,
original: String
});
var URLModel = new mongoose.model(... | JavaScript | 0.000172 | @@ -15,16 +15,18 @@
equire('
+./
config')
@@ -295,20 +295,16 @@
LModel =
- new
mongoos
@@ -534,16 +534,18 @@
try;%0A %7D
+);
%0A%7D%0A%0Amodu
|
dfa9818146fe94c164d5f7ae52edb5ebd5dee843 | fix null undefined delete db | lib/db.js | lib/db.js | var JsonDB = require('node-json-db'),
jdb = new JsonDB(__botdir + '/db.json', true, true);
function DB(){
var _this = this;
//CLEAN DB
this.get_db_data('/', function(db_root){
var filter_empty = function(data){
for(var key in data){
if(typeof(data[key]) === 'o... | JavaScript | 0.000005 | @@ -244,32 +244,34 @@
ata)%7B%0A
+
for(var key in d
@@ -268,32 +268,36 @@
r key in data)%7B%0A
+
if(t
@@ -325,19 +325,74 @@
'object'
-)%7B%0A
+ && data%5Bkey%5D !== null && data%5Bkey%5D !== undefined)%7B%0A
@@ -492,32 +492,40 @@
+
delete data%... |
23d9443da273c70c2cbddd0e4bbe04de93e35b4e | update in | lib/in.js | lib/in.js | /*
* in
* https://github.com/goliatone/in
*
* Copyright (c) 2015 goliatone
* Licensed under the MIT license.
*/
'use strict';
const extend = require('gextend');
const join = require('path').join;
const readdir = require('fs').readdir;
const resolve = require('path').resolve;
const exists = require('fs').exists... | JavaScript | 0 | @@ -1504,32 +1504,114 @@
ns);%0A %7D%0A%0A
+ normalizePath(path)%7B%0A return resolve(join(this.basepath, path));%0A %7D%0A
/**%0A
* Publ
@@ -1590,32 +1590,32 @@
;%0A %7D%0A /**%0A
-
* Public:
@@ -1845,29 +1845,43 @@
arget =
-resolve(join(
+this.normalizePath(target,
this... |
fdc075141a748a433504b07d93199069fb57846e | Fix conditional | lib/iq.js | lib/iq.js | /* global require, Buffer, Promise, module, console, process, setTimeout */
/* jshint -W097 */
/* jshint esnext: true */
'use strict';
const os = require('os');
const net = require('net');
const util = require('util');
const Writable = require('stream').Writable;
const output = require('stream').Readable({objectMode: t... | JavaScript | 0.166375 | @@ -4466,13 +4466,8 @@
dk ?
- '' :
'.'
@@ -4481,16 +4481,21 @@
ons.iidk
+ : ''
;%0A%0A s
|
4f6b940e3e37fcc47c703b730cdd22d1b94c2b06 | fix function | lib/pr.js | lib/pr.js | require('colors')
const str = require('./strings')
const config = require('../bbpr.config')
const hg = require('./hg')
const open = require('open')
const shell = require('shelljs')
function sendPullRequest (postRequest) {
console.log('\nSending pull request to BitBucket remote repository...'.bold)
shell.exec(postR... | JavaScript | 0.00004 | @@ -971,19 +971,16 @@
tBucket)
- =%3E
%7B%0A con
|
118e42f152abb62ac733d87ba83c4ca6ae56ef81 | Remove an unused variable | lib/v1.js | lib/v1.js | /**
* Gittip widget main initialization.
*
* Initializes widgets and pulls in the Widgets API if it isn't already loaded
*/
(function(Gittip, $) {
'use strict';
var username, gttp, i, elements, length,
api = window.gttpAPI || '//gttp.co/v1/';
// Use the Gittip widget API if loaded, otherwise load it
if (... | JavaScript | 0.000071 | @@ -168,18 +168,8 @@
%09var
- username,
gtt
|
f72c935d1b7efb19385cd57a6595d78b96ec2db3 | update message according to Rtales suggestion | pages/services.js | pages/services.js | import React from 'react';
import PropTypes from 'prop-types';
import withErrors from '../components/hoc/with-errors';
import { getAllServices } from '../utils/api';
import Page from '../layouts/page';
import { HEADER_PAGE, ServiceCard } from '../components';
const Services = ({ services }) => {
return (
<Pag... | JavaScript | 0 | @@ -451,18 +451,24 @@
, nous a
-id
+ccompagn
ons les
@@ -485,23 +485,42 @@
blic
- %C3%A0 r%C3%A9aliser
+s dans la r%C3%A9alisation%0A
de
-s
ser
@@ -524,26 +524,16 @@
services
-%0A
num%C3%A9riq
@@ -558,9 +558,9 @@
fran
-%C3%A7
+c
ais%0A
|
0944a25b6c18e4a9bd7cccff95111efdc5fff442 | Fix linting issues in webDemo.js | parser/webDemo.js | parser/webDemo.js | 'use strict';
var Stream = require('parser').stream;
var programParser = require('./program.js');
window.addEventListener('load', function() {
document.body.style.margin = '0';
var ta = document.createElement('textarea');
ta.style.width = '100vw';
ta.style.height = '100vh';
ta.style.padding = '10px';
ta... | JavaScript | 0.000002 | @@ -501,104 +501,8 @@
';%0A%0A
- var button = document.createElement('button');%0A var result = document.createElement('div');%0A%0A
do
@@ -542,16 +542,17 @@
.focus()
+;
%0A%0A ta.v
@@ -1109,18 +1109,16 @@
e;%0A %7D;%0A
-
%0A ta.ad
|
978c26474524f18f1fc1c42c5bfb4f4a95665205 | Normalize incoming root path parameter | config/settings.js | config/settings.js | module.exports = function (app, express, passport, logger, root) {
var nconf = require('nconf'),
cachify = require('connect-cachify'),
winston = require('winston'),
requestLogger = require('winston-request-logger');
if (!root) {
root = __dirname;
}
nconf.file({ file: root... | JavaScript | 0.000001 | @@ -175,24 +175,56 @@
'winston'),%0A
+ path = require('path'),%0A
requ
@@ -301,25 +301,49 @@
root =
-__dirname
+path.normalize(__dirname + '/..')
;%0A %7D%0A
@@ -374,19 +374,16 @@
oot + '/
-../
gebo.jso
@@ -1947,33 +1947,25 @@
root:
-__dirname
+path
+ '/
-../
public',
@@ -2135,33 +2135,... |
7bb3667ab5257d223c90e0935fff377e483758e3 | Resolve Express/Connect bodyParser deprecation warnings | config/settings.js | config/settings.js | //module.exports = function (app, express, passport, logger, root) {
module.exports = function (app, express, passport, logger) {
var nconf = require('nconf'),
// cachify = require('connect-cachify'),
winston = require('winston'),
path = require('path'),
requestLogger = require('wins... | JavaScript | 0 | @@ -699,134 +699,8 @@
);%0A%0A
-// if (!root) %7B%0A// root = path.normalize(__dirname + '/..');%0A// %7D%0A// nconf.file(%7B file: root + '/gebo.json' %7D);%0A
@@ -2465,49 +2465,8 @@
n);%0A
- //app.set('views', root + '/views');%0A
@@ -2625,25 +2625,86 @@
e(bodyParser
-(
+.json());%0A ... |
6aca97dbd788b6f2059dbccb9610c5ade6a6568c | correct bad sort in react plugins raray | react/index.js | react/index.js | module.exports = {
plugins: ["a11y", "prettier", "react", "react-hooks", "import-jsx"],
settings: {
react: {
version: "detect",
},
},
extends: [
"plugin:import/react",
"plugin:jsx-a11y/strict",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:prettier/reco... | JavaScript | 0.000002 | @@ -25,16 +25,30 @@
gins: %5B%22
+import%22, %22jsx-
a11y%22, %22
@@ -84,22 +84,8 @@
oks%22
-, %22import-jsx%22
%5D,%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.