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
f65421c8a40121e5a06cc0165c611ee1003dd10e
Fix gallery comment mutation
app/utils/getEntityType.js
app/utils/getEntityType.js
// @flow const entityTypeMappings = { 'events.event': 'events', 'articles.article': 'articles', 'quotes.quote': 'quotes', 'companies.company': 'companies' }; type ServerName = $Enum<typeof entityTypeMappings>; export default function getEntityType(serverName: ServerName) { return entityTypeMappings[serverN...
JavaScript
0
@@ -156,16 +156,56 @@ mpanies' +,%0A 'gallery.gallerypicture': 'pictures' %0A%7D;%0A%0Atyp
8dd294e9a47dd9d76558b447646f6706a749ec54
Add decorator interface and add docs
cc-event.js
cc-event.js
/** * cc-event v1.0.1 * author: Yoshiya Hinosawa ( @kt3k ) */ (function ($) { 'use strict'; Function.prototype.event = function (event, selector) { this.__events__ = this.__events__ || []; this.__events__.push({event: event, selector: selector}); return this; }; $.cc.in...
JavaScript
0
@@ -102,77 +102,1046 @@ -Function.prototype.event = function (event, selector) %7B%0A%0A this +/**%0A * The %60event%60 postfix style annotation.%0A *%0A * @example%0A * prototype.startMusic = function () %7B%0A * // blah%0A * %7D.event('click', '.play-btn');%0A ...
47ad588ecdeb0200de47c89843194b77ef5bc5bc
add check to see if token exists in api config
server/api/configure.js
server/api/configure.js
// var postgres = requires('')... connect to postgres // var makeRequest = require('./makeRequest.js'); var platforms = require('./platforms'); var actions = require('./actions'); var serviceCreds = require('../db/collections/service-creds.js'); var configureRequest = function(req, res, next) { console.log('Request ...
JavaScript
0
@@ -1438,16 +1438,94 @@ tokens%0A +%0A if (req.token) %7B%0A platform.authorize(req);%0A next();%0A return;%0A %7D%0A%0A servic
e675e96a73c89710724058bf5a2c2fbe2bfaa424
replace hash without scrolling
server/assets/js/orl.js
server/assets/js/orl.js
(function() { var HEADER_HEIGHT = 64; function load(path, selection) { var offset = 0; var req = new XMLHttpRequest(); req.onreadystatechange = handleStateChange; req.open('GET', path); req.send(); function handleStateChange() { var text = req.responseText; var length = text.le...
JavaScript
0.000009
@@ -1558,17 +1558,12 @@ -location. +var hash @@ -1586,16 +1586,22 @@ t ? '' : + '#' + Math.mi @@ -1646,16 +1646,95 @@ right);%0A + history.replaceState('', document.title, window.location.pathname + hash);%0A %7D%0A%0A f
60e7704b5b25aa33332074e2ddea43df72b6c055
Normalise path to configuration file when specified on the command line
server/configuration.js
server/configuration.js
var fs = require('fs'), events = require('events'), util = require('util'); var config_filename = 'config.js', config_dirs = ['/etc/kiwiirc/', __dirname + '/../'], environment = 'production', loaded_config = Object.create(null); var Config = function () { events.EventEmitter.call(this...
JavaScript
0
@@ -84,16 +84,47 @@ ('util') +,%0A path = require('path') ;%0A%0Avar c @@ -519,16 +519,17 @@ %0A if +( (manual_ @@ -537,25 +537,162 @@ onfig_file) -%7B +%7C%7C (this.manual_config_file)) %7B%0A manual_config_file = path.resolve(path.normalize(manual_config_file %7C%7C this.manual_config_file)); ...
236daf96e10e822638f464de4da00d7df2673359
Delete only the relevant session, not all sessions
server/logonHandling.js
server/logonHandling.js
const uuid = require('uuid'); const request = require('request'); module.exports = function initialize(params) { const { communicationsKey, knex, sebacon, restrictToGroup, testLogin, util } = params; function login(req, res, next) { const ssoId = req.body.ssoid; const validationReq = { id: uuid.v4(...
JavaScript
0.000065
@@ -4631,25 +4631,58 @@ -if (req.session.i +const sessionId = req.session.id;%0A if (sessionI d) %7B @@ -4748,52 +4748,8 @@ %3E %7B%0A - const sessionId = req.session.id;%0A @@ -4969,16 +4969,41 @@ sions'). +where(%7B id: sessionId %7D). del(); %7D
3a7aa0f3cfd6b4752701d54863287c9bc698ddb0
change line to profile and not user https://app.asana.com/0/161555263951762/170520114054348
public_html/angular/controllers/signin-controller.js
public_html/angular/controllers/signin-controller.js
app.controller('SigninController', ["$scope", "$window","SigninService", function($scope, $window, SigninService) { $scope.alerts = []; /** * Method that uses the sign up service to activate an account * * @param signinData will contain email and password * @param validated true if form is valid, false if no...
JavaScript
0
@@ -718,12 +718,15 @@ = %22 -user +profile /%22%0A%09
4a97259d412c48ee41995b8ce993034847b8f00c
fix project removal
lib/app/portal/admin/projects/index.js
lib/app/portal/admin/projects/index.js
angular.module('gandhi') .config(function($stateProvider, RestangularProvider) { $stateProvider .state('portal.admin.projects', { url: '/projects', abstract: true, template: '<div ui-view></div>', controller: function($scope, Restangular){ $scope.projects = null; $scope.table = { query: { ...
JavaScript
0
@@ -6015,30 +6015,84 @@ %09%09%09%09 -$scope.project.remove( +Restangular.all('projects').customDELETE($scope.project.id, null, null, null ).th
276d46ab54fff81863b945a5e8b2c4793ab02359
Remove return
public/js/app.js
public/js/app.js
$(function () { var $btn = $('#convert'), $tmpl = $('#template'), $url = $('#url'), $links = $('.links'), $ul = $('.links ul'), $tag = $('#tag'), $result = $('#result'), links = 0; var options = { taglineChange: 5, submit: '/', del...
JavaScript
0.000664
@@ -1672,29 +1672,8 @@ );%0A%0A - return;%0A%0A
e45452b79c6049daebd4f0b28635c9cb589859bd
Use Service to get JSON data. Use these data in app
public/js/app.js
public/js/app.js
"use strict"; (function() { var app = angular.module("gemStore", ["storeProducts"]); app.controller("StoreController", function () { this.product = gems; }); app.controller("ReviewController", function () { this.review = {}; this.addReview = function(product) { this.review.createdOn = Date...
JavaScript
0.000001
@@ -109,32 +109,42 @@ toreController%22, + %5B%22$http%22, function () %7B%0A @@ -134,32 +134,37 @@ , function ( +$http ) %7B%0A this.product @@ -155,32 +155,159 @@ -this.product = gems +var store = this;%0A%0A store.product = %5B%5D;%0A%0A $http.get(%22/js/store-products.json%22).success(functio...
39848a3b19d041919b248bdfe6b7ef956caf77d7
Document the purpose of tanura.js better.
public/tanura.js
public/tanura.js
'use strict'; /* * Bootstrap Tanura. * * This script will bootstrap Tanura into an application. */ /** * Globally available information about Tanura. * * This object contains information about Tanura, that is available to the * hosting website. */ var tanura = { erizo: null, eventHandler: { ...
JavaScript
0
@@ -88,24 +88,450 @@ application. + It is added directly %0A * to the website that wants to make use of Tanura and contains a definition of %0A * Tanura's public API.%0A *%0A * Only the minimal amount of functionality required to successfully load %0A * everything else is included here. This includes event-handling ...
cd2c136836b125e3a7508a058c3e8212b3a6653b
Remove tanura.eventHandler.events.room_connecting[].
public/tanura.js
public/tanura.js
'use strict'; /* * Bootstrap Tanura. * * This script will bootstrap Tanura into an application. */ /** * Globally available information about Tanura. * * This object contains information about Tanura, that is available to the * hosting website. */ var tanura = { erizo: null, eventHandler: { ...
JavaScript
0
@@ -744,41 +744,8 @@ %5B%5D,%0A - room_connecting: %5B%5D,%0A
9e603c7170864403014d0298e5e5fd48d06d6d92
modify log level
service/EmailService.js
service/EmailService.js
/* global global, GLOBAL, module */ /** * Created by kaelyang on 2015/5/19. */ var http = require('http'); var log4js = require('log4js'); var logger = log4js.getLogger(); var _ = require('underscore'); var UserService = require('./UserService'); var StatisticsService = require('./StatisticsService'); var send_emai...
JavaScript
0.000001
@@ -6187,13 +6187,12 @@ ger. -debug +info ('Em
6584855361fdb21d35e2f8ad79ab800f42f621c7
Call panel.destroy if the panel is no longer used
lib/interactive-configuration-panel.js
lib/interactive-configuration-panel.js
'use babel'; let Promise = null; let loophole = null; let allowUnsafeEval = null; let allowUnsafeNewFunction = null; let pug = null; let PromptView = null; let pugDirectory = null; let panelHtml = null; let initialized = false; function initialize() { if (initialized) return ; Promise = require('bluebird'); l...
JavaScript
0
@@ -1307,16 +1307,44 @@ troy() %7B +%0A this.panel.destroy();%0A %7D%0A%0A ad
afa59636e7449fa82282fa94b58e7b10e3ad6c95
Manage view of pieces does not crash if `updatedAt` is missing from a piece. Importers that use our model layer properly won't ever have this issue, but admittedly it's an easy property to forget if you're writing your own mongo code. We would not view a missing title or slug property anywhere near as sympathetically.
lib/modules/apostrophe-pieces/index.js
lib/modules/apostrophe-pieces/index.js
// `apostrophe-pieces` provides a "base class" you can extend to create new content // types for your project. Just use the `addFields` option to create a schema and // you'll get a user interface for managing your content for free. Add in the // `apostrophe-pieces-pages` module to display an index page and permalink p...
JavaScript
0
@@ -1564,32 +1564,186 @@ nction(value) %7B%0A + if (!value) %7B%0A // Don't crash if updatedAt is missing, for instance due to a dodgy import process%0A return '';%0A %7D%0A return
56f3c81553cb446fe5d3668a89f9c162ebfb4daf
Add warning when subscribe is not difined
lib/server/createGraphQLPublication.js
lib/server/createGraphQLPublication.js
import { Meteor } from 'meteor/meteor'; import { subscribe } from 'graphql'; import forAwaitEach from '../common/forAwaitEach'; import { DEFAULT_PUBLICATION, } from '../common/defaults'; export function createGraphQLPublication({ schema, publication = DEFAULT_PUBLICATION, } = {}) { Meteor.publish(publication, ...
JavaScript
0.000001
@@ -283,16 +283,142 @@ = %7B%7D) %7B%0A + if (!subscribe) %7B%0A console.warn('DDP-Apollo: You need graphl@0.11 or higher for subscription support');%0A return;%0A %7D%0A%0A Meteor
01d6317de28f8b866afe771085babec4a6574ec0
Fix path in ecosystem file
ecosystem.config.js
ecosystem.config.js
module.exports = { apps : [ { name : "auction_app", script : "/usr/local/bin/npm", cwd : "/home/vagrant/apps/AuctionApp", args : "run start:prod" }, ], deploy : { production : { user : "vagrant", host : "192.168.33.10", ref : "origin/maste...
JavaScript
0.000015
@@ -140,26 +140,23 @@ nt/apps/ -AuctionApp +current %22,%0A
dc5d760d7818cd3901c7e58c4c2ed617c4151480
Obliterate some lets
skelet2bot.js
skelet2bot.js
"use strict"; const Telegraf = require("telegraf"); const { json } = require("req"); const cowsay = require("cowsay"); // const cron = require("node-cron"); // const rants = require("./rants.json"); const args = text => text.split(" ").slice(1); const bot = new Telegraf(process.argv[2]); const feature = "This featur...
JavaScript
0.999997
@@ -1493,18 +1493,20 @@ =%3E %7B%0A%09%09%09 -le +cons t balls @@ -1875,18 +1875,20 @@ text);%0A%09 -le +cons t link =
545eaa9f847c20e9879f76f74e1147b0faf50cdf
set limit to queries
squebi/js/writer/squebi.browse.js
squebi/js/writer/squebi.browse.js
/** * Browsable */ squebi.run( function($extension,SQUEBI) { var config = { showFlags : true } if(SQUEBI.browse) jQuery.extend(config, SQUEBI.browse); //var query_for_resource = "PREFIX ###NAME###: <###NSP###>\n\nSELECT DISTINCT ?property ?hasValue ?isValueOf WHERE {\n { ###URI### ?propert...
JavaScript
0.000002
@@ -913,33 +913,34 @@ y ###URI### %7D%5Cn%7D - +%5Cn ORDER BY ?proper @@ -958,24 +958,36 @@ e ?isValueOf +%5CnLIMIT 1000 %22;%0A var q @@ -1072,33 +1072,34 @@ URI### ?value%5Cn%7D - +%5Cn ORDER BY ?resour @@ -1103,24 +1103,36 @@ ource ?value +%5CnLIMIT 1000 %22;%0A var q @@ -1202,33 +1202,34 @@ e a ###...
5e0bf04abc328eee5b63da4d4701a008075b4d73
Print sql statement
ui/routes/index.js
ui/routes/index.js
var express = require('express'); var router = express.Router(); var sqlite3 = require('sqlite3').verbose(); var db = new sqlite3.Database('/home/pi/homeauto/backend/temp.db'); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: 'Temperature', page: 'home' }); }); router.ge...
JavaScript
0.999999
@@ -924,16 +924,36 @@ time%22;%0A + console.log(stmt)%0A db.all
18f4aae4d34f6a75104d3faa677afb5120c8ab82
fix the wording so the labels make more sense
bin/createUserSummary.js
bin/createUserSummary.js
//Threshold Values var BIG_TWEETS = 500; var BIG_NAME_CHANGES = 100; var pkg = require('../package.json'); //Application Settings var db; var collection; //Twitter Collection var screenNames = null; //Array of screen names var summaryLength = 3; var screenNamePos = 0; var summaryPos = 0; var summary = {}; //Tweets by ...
JavaScript
0.999999
@@ -1402,13 +1402,18 @@ x+' -chang +screen nam es';
e23aeec1674a3c200fc8763d83b8321d2a5bbf96
fix linting
lyric_engine_js/modules/utaten.test.js
lyric_engine_js/modules/utaten.test.js
/* global expect test */ const { Lyric } = require('./utaten'); jest.setTimeout(20_000); // 20 second timeout async function testLyric(object) { const { url, title, artist, lyricist, composer, arranger, length } = object; const inst = new Lyric(url); await inst.get(); expect(inst.title).toBe(title); expect...
JavaScript
0.000003
@@ -10,16 +10,21 @@ expect +jest test */%0A
054b552ba40a26012290e4ac59ef87a8845facf8
Support CSS 2 & 3 pseudo selectors in generate-icon script (#601)
lib/generate-icon-set-from-css.js
lib/generate-icon-set-from-css.js
const _ = require('lodash'); const fs = require('fs'); function extractGlyphMapFromCss(files, selectorPattern) { const styleRulePattern = '(\\.[A-Za-z0-9_.:, \\n\\t-]+)\\{[^}]*content: ?["\\\'](?:\\\\([A-Fa-f0-9]+)|([^"\\\']+))["\\\'][^}]*\\}'; const allStyleRules = new RegExp(styleRulePattern, 'g'); const s...
JavaScript
0
@@ -1946,16 +1946,18 @@ -9_-%5D+): +:? before%60%0A
50ac40453e85cc4315d28859962977573e2c1294
Use brock argument for simple access
lib/generators/templates/model.js
lib/generators/templates/model.js
<%= application_name.camelize %>.<%= class_name %> = DS.Model.extend({ <% attributes.each_index do |idx| -%> <%= attributes[idx][:name].camelize(:lower) %>: <%= if %w(references belongs_to).member?(attributes[idx][:type]) "DS.belongsTo('%s.%s')" % [application_name.camelize, attributes[idx][:name].camelize] e...
JavaScript
0
@@ -83,16 +83,21 @@ es.each_ +with_ index do @@ -98,16 +98,27 @@ dex do %7C +attribute, idx%7C -%25%3E @@ -125,38 +125,32 @@ %0A %3C%25= attribute -s%5Bidx%5D %5B:name%5D.camelize @@ -210,30 +210,24 @@ r?(attribute -s%5Bidx%5D %5B:type%5D)%0A @@ -290,22 +290,16 @@ ttribute -s%5Bidx%5D %5B:name%5D. @@ -35...
bb670d4c6578e957e6af8febc27ca94fc03dd917
fix new file name having an additional '|'
web/app/controllers/folder.js
web/app/controllers/folder.js
import Ember from 'ember'; export default Ember.Controller.extend({ addingNewFile: false, newFileName: '', actions: { startStopAddingNewFile: function () { this.toggleProperty('addingNewFile'); }, addNewFile: function () { var filename = this.get('newFileName') + '.md'; var folder...
JavaScript
0.00164
@@ -414,14 +414,8 @@ id + - '%7C' + fil
c1f035bceba85a1d15fd12da3ebb62702d0a9c13
clean up
lib/initializers/ServerCluster.js
lib/initializers/ServerCluster.js
var Initializer = require('./Initializer'); var Server = require('../server/Server'); var _ = require('lodash'); var _super = Initializer.prototype; var cluster = require('cluster'); var count = require('os').cpus().length; function numberWithCommas (x) { return (x || 0).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ...
JavaScript
0.000001
@@ -1559,247 +1559,8 @@ ge); -%0A%0A // self.options.pages.on('change:rendered', function (page) %7B%0A // var attributes = page.attributes;%0A // worker.send(%7B%0A // 'title': attributes.title%0A // %7D);%0A // %7D);%0A // console.log(!!);%0A // worker.send() %0A
df6598a05a443b9fb136ff924f619ddd06d3b2ab
clean up arrow fx complaints. Part of STCOM-21.
IfInterface.js
IfInterface.js
import _ from 'lodash'; import PropTypes from 'prop-types'; const IfInterface = (props, context) => { return (context.stripes.hasInterface(props.name, props.version) ? props.children : null); }; IfInterface.contextTypes = { stripes: PropTypes.shape({ hasInterface: PropTypes.func.isRequired, }).isRequired, }...
JavaScript
0
@@ -98,20 +98,12 @@ =%3E -%7B +( %0A -return ( cont @@ -181,12 +181,10 @@ null +%0A ) -;%0A%7D ;%0A%0AI
3cb149cf7442b176de9119fb63b6b79efb3ac1e2
fix markdown-it API usage
lib/parser/plugins/attachments.js
lib/parser/plugins/attachments.js
// Attachments parser plugin // - add attachments as `<attach>` tag to AST // - collect attach refs // - remove attach refs from tail // - render `<attach>` tag to link with image or to link // 'use strict'; var _ = require('lodash'); var $ = require('../cheequery'); module.exports = function (N, mTypes) { return ...
JavaScript
0.000016
@@ -601,24 +601,93 @@ nv, self) %7B%0A + var src = tokens%5Bidx%5D.attrs%5Btokens%5Bidx%5D.attrIndex('src')%5D%5B1%5D;%0A%0A var ma @@ -717,28 +717,16 @@ atchAll( -tokens%5Bidx%5D. src), fu @@ -1037,28 +1037,16 @@ rc=%22' + -tokens%5Bidx%5D. src + '%22
e424b28ac89823370a78858dafc9c40ce54003c1
Fix #1919
lib/preprocessors/style-plugin.js
lib/preprocessors/style-plugin.js
'use strict'; var path = require('path'); var Plugin = require('./plugin'); var requireLocal = require('../utilities/require-local'); var merge = require('lodash-node/modern/objects/merge'); var SilentError = require('../errors/silent'); function StylePlugin () { this.type = 'css'; this._sup...
JavaScript
0.000001
@@ -903,16 +903,24 @@ = this. +options. app.opti
35d432264fb0c5b7c87f10c5a654d1e5d9dd4e12
Print timestamp with logger
util/logger.js
util/logger.js
const winston = require('winston'); const config = require('../config'); class Logger { static info(text) { winston.level = config.logLevel; winston.info(text); } static error(text) { winston.level = config.logLevel; winston.error(text); } } module.exports = Logger;
JavaScript
0.000099
@@ -91,27 +91,143 @@ -static info(text) %7B +constructor() %7B%0A winston.remove(winston.transports.Console);%0A winston.add(winston.transports.Console, %7Btimestamp: true%7D); %0A @@ -256,32 +256,56 @@ onfig.logLevel;%0A + %7D%0A%0A info(text) %7B%0A winston. @@ -331,15 +331,8 @...
24581060905b982184a76fba871a59a2a4ca8cad
Handle default icon svg
utils/IconStore.js
utils/IconStore.js
/* global window, document */ // TODO: Add default/missing icon path var _DEFAULT_ICON_PATH = 'M0 0Z'; var _paths = {}; var IconStore = { getPaths: function(iconName) { if (_paths[iconName]) { return _paths[iconName]; } if (typeof window === 'undefined') { return _DEFAULT_ICON_PATH; } ...
JavaScript
0.000001
@@ -92,15 +92,17 @@ H = +%5B 'M0 0Z' +%5D ;%0Ava @@ -329,25 +329,24 @@ try %7B%0A -%0A %09var pat @@ -341,47 +341,25 @@ -%09var path = Array.prototype.slice.call( + var _nodes = docu @@ -398,17 +398,131 @@ ildNodes -) +;%0A%0A %09var path = Array.prototype.slice%0A ...
ab2d8d0c9f7c89642e7e0dfacbc2b8e6d5993964
Move axios to imageUtils
utils/utils.js
utils/utils.js
const options = require("./../options/options.json"), playing = require('./../lists/playing.json'), //List of playing status's for the bot to use axios = require('axios'), winston = require('winston'), //Used for logging to file fileLog = new(winston.Logger)({ //Creates log transport to log to error.log...
JavaScript
0.000001
@@ -147,38 +147,8 @@ use%0A - axios = require('axios'),%0A
8b25e8deb467d85e7f684c9d0a608e33ba3a8f09
use log
utils/neo4batch.js
utils/neo4batch.js
var argv = require('minimist')(process.argv.slice(2)); var log = argv.stfu ? function(){} : console.log.bind(console); var http = require('http'); var opts = { hostname: 'localhost', port: 7474, method: 'POST', path: '/db/data/transaction/commit', headers: { "Accept": 'application/json; charset=UTF-8', "Cont...
JavaScript
0.000002
@@ -1,16 +1,15 @@ var -argv +log = requi @@ -16,104 +16,14 @@ re(' -minimist')(process.argv.slice(2));%0Avar log = argv.stfu ? function()%7B%7D : console.log.bind(console +./log' );%0A%0A
ff0ced602f9108d8c4ca9fe603e6c8d86d00269f
fix naming
modules/@amperka/power-control.js
modules/@amperka/power-control.js
var Power = function(pin) { this._pin = pin; this._on = false; this._brightness = 1.0; this._blinkTimeoutID = null; this._blinkOnTime = 0; this._blinkOffTime = 0; this._pin.mode('output'); }; Power.prototype.toggle = function() { if (arguments.length === 0) { return this.toggle(!this._on); } ...
JavaScript
0.782388
@@ -68,26 +68,20 @@ this._ -brightness +duty = 1.0;%0A @@ -1673,34 +1673,28 @@ eturn this._ -brightness +duty ;%0A %7D%0A%0A val @@ -1743,26 +1743,20 @@ this._ -brightness +duty = value @@ -1854,18 +1854,12 @@ is._ -brightness +duty ;%0A
12ab6868093d7f623340234ad3f419d5b8bb1463
support prior checksum
v2/checksum.js
v2/checksum.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.000001
@@ -2567,31 +2567,8 @@ );%0A%0A -// TODO: needs a prior%0A Chec @@ -2617,36 +2617,89 @@ arg1, arg2, arg3 +, prior ) %7B%0A + if (typeof prior !== 'number') prior = 0;%0A var self = t @@ -2718,17 +2718,21 @@ csum = -0 +prior ;%0A sw @@ -2830,33 +2830,36 @@ m = crc32(arg1, -0 +csum );%0A ...
c65f2b3798cf4746c360a6dddb39e2c209008009
remove unused var
Vpc/Form/Component.js
Vpc/Form/Component.js
Vps.onContentReady(function() { var clicked = []; var btns = Ext.query('form button.submit', document); Ext.each(btns, function(btn) { btn = Ext.get(btn); btn.on('click', function(e) { var formDiv = Ext.get(this.findParent('.vpcForm')); var config = formDiv.parent()....
JavaScript
0.000002
@@ -29,30 +29,8 @@ ) %7B%0A - var clicked = %5B%5D;%0A
7949d0ccf17f083b95ac0cc4e51be333c5c0e9e3
Fix string extensions
src/Client/Runtime/Base/String.js
src/Client/Runtime/Base/String.js
// String utilities var _formatPlaceHolder = /(\{[^\}^\{]+\})/g; function stringFromChar(ch, count) { return count ? new Array(count + 1).join(ch) : ch; } extend(String, { fromChar: stringFromChar, concat: function() { return Array.prototype.join.call(arguments, ''); }, compare: function(s1, s2, ignore...
JavaScript
0.02637
@@ -2138,24 +2138,34 @@ this : this +.valueOf() ;%0A %7D,%0A pad @@ -2299,24 +2299,34 @@ ngth) : this +.valueOf() ;%0A %7D,%0A tri @@ -2520,24 +2520,34 @@ return this +.valueOf() ;%0A %7D%0A
7b6116f370368085c6f9edcb8fff579492fc1ccd
rewrite args
soundslice.js
soundslice.js
angular.module( 'soundslice', []). directive( 'score', function() { return { link: function( scope, element, attrs ) { /* notation options: show_tab = 0 show_staff = 0 show_chords = 0 show_track_names = 0 zoom=X (default = 0, between -25 and 2...
JavaScript
0.001576
@@ -557,45 +557,716 @@ -attrs.$observe( 'id', function( v ) %7B +function rewriteAttr( name ) %7B%0A var newname = '';%0A%0A name.split('').forEach( function( ch ) %7B%0A var lowercase_ch = ch.toLowerCase();%0A if( lowercase_ch != ch ) %7B%0A newname += '_';%0A...
60589a3d67051bcbf545cc1fa7c3deb9495386cb
Fix access to wrong variable
src/L.Control.Locate.js
src/L.Control.Locate.js
L.Control.Locate = L.Control.extend({ options: { position: 'topleft', drawCircle: true, follow: false, // follow with zoom and pan the user's location // range circle circleStyle: { color: '#136AEC', fillColor: '#136AEC', fillO...
JavaScript
0.000027
@@ -5016,32 +5016,25 @@ ==3 && this. -options. +_ locateOption
7ed18796003ff29af7c9b3db1ca360971f89592a
add comment to a reducer
redux/reducer.js
redux/reducer.js
import { combineReducers } from 'redux' import {paragraphs} from './paragraphsReducer' export const reducer = combineReducers({ paragraphs })
JavaScript
0
@@ -137,8 +137,29 @@ aphs%0A%7D)%09 +%0A%0A//this is a reducer
02c70a47db69a8025902e674c63643bc99401ee7
fix format filter in Youtube plugin (#560)
packages/app/app/plugins/stream/YoutubePlugin.js
packages/app/app/plugins/stream/YoutubePlugin.js
import logger from 'electron-timber'; import _ from 'lodash'; import ytdl from 'ytdl-core'; import StreamProviderPlugin from '../streamProvider'; import * as Youtube from '../../rest/Youtube'; class YoutubePlugin extends StreamProviderPlugin { constructor() { super(); this.name = 'Youtube Plugin'; this....
JavaScript
0
@@ -1014,33 +1014,32 @@ e.itag === -' 140 -' ));%0A +%0A retu @@ -1946,13 +1946,11 @@ === -' 140 -' ));%0A
288df663a89979e9df524ee7d0127a537074efac
Clean up code and add comments
app/assets/javascripts/components/ClearInput.js
app/assets/javascripts/components/ClearInput.js
define(['jquery', 'DoughBaseComponent'], function($, DoughBaseComponent) { 'use strict'; var ClearInput, uiEvents = { 'keydown [data-dough-clear-input]' : 'updateResetButton', 'click [data-dough-clear-input-button]' : 'resetForm' }; ClearInput = function($el, config) { var _this = t...
JavaScript
0
@@ -300,30 +300,8 @@ ) %7B%0A - var _this = this;%0A @@ -916,17 +916,16 @@ ar fn = -( this.$re @@ -945,12 +945,12 @@ ) == += '' -) ? ' @@ -1014,32 +1014,223 @@ active');%0A %7D;%0A%0A +// We are progressively enhancing the form with JS. The CSS button, type 'reset'%0A// resets the form faster than t...
bac8c7c9aa32eba48c85ad6bcb2d613a2967ed6f
Remove trailing comma from JS
app/assets/javascripts/report-a-problem-form.js
app/assets/javascripts/report-a-problem-form.js
(function() { "use strict"; window.GOVUK = window.GOVUK || {}; var ReportAProblemForm = function($form) { this.$form = $form; $form.on('submit', this.submit.bind(this)); this.appendHiddenContextInformation(); } ReportAProblemForm.prototype.appendHiddenContextInformation = function() { // f...
JavaScript
0
@@ -1881,25 +1881,24 @@ r.bind(this) -, %0A %7D%0A
2518ce4554e1d20353c5d1d177c6cb7ee295cca5
Use async/await for ajax request
app/assets/javascripts/views/export_csv_view.js
app/assets/javascripts/views/export_csv_view.js
// Handles getting info about bulk media thresholds ELMO.Views.ExportCsvView = class ExportCsvView extends ELMO.Views.ApplicationView { get events() { return { 'click #response_csv_export_options_download_media': 'calculateMediaSize' }; } initialize(params) { $(".calculating-info").hide(); ...
JavaScript
0
@@ -374,16 +374,22 @@ %0A %7D%0A%0A +async calculat @@ -404,24 +404,24 @@ ze(event) %7B%0A - if (($(e @@ -512,16 +512,22 @@ ;%0A +await this.spa @@ -710,16 +710,22 @@ %0A %7D%0A%0A +async spaceLef @@ -766,20 +766,27 @@ how();%0A%0A - +return $.ajax(%7B
9afdbd6c9a18b368f55ef307d8eab8a0bce17aa7
fix linter
packages/fela/src/__tests__/combineRules-test.js
packages/fela/src/__tests__/combineRules-test.js
import combineRules from '../combineRules' describe('Combining rules', () => { it('should create a combined rule', () => { const rule = props => ({ color: 'red', fontSize: props.fontSize, lineHeight: props.lineHeight, padding: 10, }) const anotherRule = props => ({ backgrou...
JavaScript
0.000002
@@ -1546,37 +1546,34 @@ const rule = -props +() =%3E (%7B%0A _cl
32970628521d006a0bba825bf15a00a3215e1d18
Disable p2p Currently P2P won't succeed on FF because it's not supported by sdp-interop.
modules/browser/BrowserCapabilities.js
modules/browser/BrowserCapabilities.js
import { getLogger } from 'jitsi-meet-logger'; import { BrowserDetection } from 'js-utils'; const logger = getLogger(__filename); // TODO: Move this code to js-utils. // NOTE: Now we are extending BrowserDetection in order to preserve // RTCBrowserType interface but maybe it worth exporting BrowserCapabilities // an...
JavaScript
0
@@ -1425,32 +1425,53 @@ n !this.isEdge() + && !this.isFirefox() ;%0A %7D%0A%0A /**
40d6e151be19eeb99c11e484940b3cd23c19fc21
Set new filters after page change
client/pagination.js
client/pagination.js
Z.wrap('github/ionicabizau/list/v0.0.1/client/pagination.js', function (require, module, exports) { module.exports = function (self) { var config = self._conf; var pagination = this; pagination._cache = { skip: 0, limit: config.options.options.limit, act...
JavaScript
0
@@ -8318,16 +8318,17 @@ n.size;%0A +%0A @@ -8340,85 +8340,302 @@ elf. -filters.set(null, %7B%0A options: %7B skip: pagination._cache.skip %7D +emit(%7B%0A to: self._conf.filters,%0A event: %22setFilters%22%0A %7D, ev, %7B%0A query: data....
995eb0ea72706eed6ee30fe5e8342ad6d17449f1
rename button-face to watch-face as it was broken. Should actually be named button-face but it's a large refactor
client/src/js/app.js
client/src/js/app.js
'use strict'; var $ = require('jquery'), Backbone = require('backbone'); Backbone.$ = $; var Router = require('./router'), WatchFace = require('./framework/watchFace'); var App = { navigate: function (route) { App.router.navigate(route, true); }, start: function() { // App.navigate = navigate;...
JavaScript
0.000019
@@ -903,22 +903,21 @@ $('# -button +watch -face').
36f9dd7f0f85289d17e4786fcd7fc7e4431ec6a6
remove console.log from __test__
__tests__/Style-10.js
__tests__/Style-10.js
import React from 'react'; import { findDOMNode, render } from 'react-dom'; import TestUtils from 'react-addons-test-utils'; const removeNewlines = (string) => (string.replace(/(\r\n|\n|\r)/gm, '')) import Style from '../src/index.js'; describe('Style-10', () => { it('does not scope keyframe "from" and "to" syntax...
JavaScript
0.000001
@@ -976,40 +976,8 @@ %60);%0A - console.log(document.head);%0A
ed2860839bc5e5d70e07e058b8fda294a1114a01
Clear label state when navigating away from it.
src/admin/redux/modules/labels.js
src/admin/redux/modules/labels.js
/* @flow */ import { createAction } from 'redux-actions' const { objOf, map } = require('ramda') import { compose } from 'sanctuary' import { get_body } from 'app/http' import type { Action, Reducer } from 'redux' type State = typeof initialState const initialState = { addresses: [] } const reducer: Reducer<State...
JavaScript
0
@@ -126,17 +126,16 @@ ctuary'%0A -%0A import %7B @@ -163,16 +163,86 @@ /http'%0A%0A +import %7B PATH_UPDATE %7D from '../../../shared/redux/modules/route.js'%0A%0A import t @@ -569,16 +569,68 @@ esults)%0A + case PATH_UPDATE:%0A return initialState%0A de
aa6eab156774c2d4bc18df8051d5ee632c167888
fix forget
HTML/js/forgotJavaScript.js
HTML/js/forgotJavaScript.js
function myaction() { document.getElementById('ForgotForm').style.display='block'; document.getElementById('LoginForm').style.display='none'; }
JavaScript
0.000002
@@ -1,14 +1,9 @@ %0A -%0A function @@ -16,24 +16,19 @@ ion() %7B%0A - +%09%0A%09 document @@ -84,16 +84,9 @@ k';%0A - +%09 docu @@ -145,12 +145,8 @@ ';%0A%0A - %7D%0A%0A%0A
1d1f49783873110d9cb810ec5bb2d0ce778ed6a9
Remove chat icon from trigger profile
src/app/Trigger/TriggerProfile.js
src/app/Trigger/TriggerProfile.js
import React from 'react'; import { Link } from 'react-router'; import classNames from 'classnames'; import Icon from '../../widgets/Icon'; const TriggerProfile = React.createClass({ render() { const { isFollowing, followingIsFetching, onClickFollow, hasFollow } = this.props; re...
JavaScript
0
@@ -618,152 +618,8 @@ a%3E%7D%0A - %3CLink to=%7B%60/messages/@$%7Bthis.props.username%7D%60%7D className=%22trigger%22%3E%0A %3CIcon name=%22chat_bubble_outline%22 /%3E%0A %3C/Link%3E%0A
1f2f9b560d413d04e2e945aa18ace3124a1e17c1
use redux in PhotoSlider
src/app/containers/PhotoSlider.js
src/app/containers/PhotoSlider.js
import React from 'react'; import {Component} from 'react'; import MiniPhoto from "./MiniPhoto"; export default class PhotoSlider extends Component { render() { return ( <ul className='pagination photoSlider' style={{height: '10%',display:'inline'}}> <li><a href="#">«</a></li> <li><a href="...
JavaScript
0
@@ -94,24 +94,46 @@ o%22;%0A -%0Aex +im port -default +%7Bconnect%7D from 'react-redux';%0A%0A clas @@ -179,16 +179,68 @@ der() %7B%0A + console.log('PINGWIN: this.props', this.props);%0A retu @@ -1438,8 +1438,187 @@ )%0A %7D%0A%7D%0A +%0Aconst mapStateToProps = (state) =%3E %7B%0A return %7B%0A mar...
1c3ba39862885cf4013a7a69b395882a67c8d830
remove _.padStart from getCourses
modules/gob-web/helpers/get-courses.js
modules/gob-web/helpers/get-courses.js
// @flow import {db} from './db' import omit from 'lodash/omit' import padStart from 'lodash/padStart' import {status, json} from '@gob/lib' const baseUrl = 'https://stodevx.github.io/course-data' const networkCache = Object.create(null) export function getCourseFromNetwork(clbid: number) { if (clbid in networkCache)...
JavaScript
0.000001
@@ -61,47 +61,8 @@ it'%0A -import padStart from 'lodash/padStart'%0A impo @@ -326,17 +326,8 @@ d = -padStart( clbi @@ -338,18 +338,26 @@ String() -, +.padStart( 10, '0')
5a767a119e5767a13a9d69f8b74d725f33cc950d
make code look a bit more consistent
client/Tile.js
client/Tile.js
Tile.prototype.init = function() { this.makeSprites(); }; Tile.prototype.makeSprites = function() { switch(this.type){ case 'wall': this.sprite = new Sprite(5, this.position); var frame = [[],[],[],[],[]]; for(var x = 0; x < 5; x++){ for(var y = 0; y < 5; y++){ var rcolors =...
JavaScript
0.000001
@@ -1261,24 +1261,25 @@ ion() %7B%0A if + (this.isExpl @@ -1322,16 +1322,17 @@ ; %7D%0A if + (this.ty @@ -1832,30 +1832,27 @@ %22+( -Utils.randBetween(0,5) +Math.random() + 0.4 )+%22)
ce9cee31fa161630b1b197b5e41d6d95c9820182
add the ability to locate a tile from a point in the map
mapper/map.js
mapper/map.js
var Map = (function () { "use strict"; /** * [Map description] * @param {[type]} context [description] */ var Map = function (width, height, tile_side) { this.tile_side = tile_side; this.context = document.createElement('canvas').getContext('2d'); this.context.canvas.height = height * tile_side; thi...
JavaScript
0
@@ -414,16 +414,18 @@ / dev%0A%09%09 +// this.con @@ -470,16 +470,18 @@ red%22;%0A%09%09 +// document @@ -2555,16 +2555,428 @@ );%0A%09%7D;%0A%0A +%09/**%0A%09 * %5B description%5D%0A%09 * @param %7B%5Btype%5D%7D x %5Bdescription%5D%0A%09 * @param %7B%5Btype%5D%7D y %5Bdescription%5D%0A%09 * @return %7B%5Btype%5...
11b8b93ab95373a4bfd3383092ce041e7e9753f2
Handle game destruction on client, it's now possible to start a new game without errors. This closes #16.
client/main.js
client/main.js
GamesDb = new Meteor.Collection('game'); Players = new Meteor.Collection('players'); // Client receives games where he is a player Deps.autorun(function(){ Meteor.subscribe('game', GamePlayers.playerId()); }); var phaserConfig = { width: 700, height: 500, renderer: Phaser.AUTO, parent: 'gameContai...
JavaScript
0
@@ -593,12 +593,20 @@ f (! -this +GameInstance .gam @@ -921,16 +921,173 @@ %7D%0A%7D;%0A +GameInstance.destroyGame = function () %7B%0A if (GameInstance.game) %7B%0A GameInstance.game.phaser.destroy();%0A GameInstance.game = null;%0A %7D%0A%7D;%0A GameInst @@ -1507,32 +1507,158 @@ ;%0A ...
4ff7d626b6c704e8d0d37ab037abb87a11767eec
Update controller.js
mopidy_party/static/controller.js
mopidy_party/static/controller.js
'use strict'; // TODO : add a mopidy service designed for angular, to avoid ugly $scope.$apply()... angular.module('partyApp', []) .controller('MainController', function($scope) { // Scope variables $scope.message = []; $scope.tracks = []; $scope.tltracks = ["Aucune musique dans la playlist"]; $scope.tim...
JavaScript
0.000001
@@ -6323,16 +6323,69 @@ 1000);%0A + %0A%09$(%22#myCarousel%22).carousel(%7Binterval: 30000%7D);%0A%0A %09%0A$scope
3a1754bec901df319b3b3ffcd1d2e3fda4f4287d
Fix #35: Base indentation of .npm-upgrade.json on package.json
src/Config.js
src/Config.js
import {resolve} from 'path'; import {writeFileSync} from 'fs'; import del from 'del'; import _ from 'lodash'; const PROJECT_CONFIG_FILENAME = '.npm-upgrade.json'; const path = Symbol('path'); const storedData = Symbol('storedData'); const read = Symbol('read'); const getData = Symbol('getData'); export default cla...
JavaScript
0.000235
@@ -80,17 +80,16 @@ 'del';%0A -%0A import _ @@ -103,16 +103,106 @@ lodash'; +%0Aimport detectIndent from 'detect-indent';%0Aimport %7BloadPackageJson%7D from './packageUtils'; %0A%0Aconst @@ -842,16 +842,130 @@ else %7B%0A + const %7Bsource: packageSource%7D = loadPackageJson();%0A const %7Bindent...
f6fd0b24fee6bdf77ecf71748bc9963ff3dc864e
clean up imports
src/InkVar.js
src/InkVar.js
import { LitElement, html } from 'lit-element'; const Format = require('d3-format'); const Drag = require('d3-drag'); const Selection = require('d3-selection'); let HORIZONTAL_SCROLL_CLASS = 'ink-drag-horz'; import { BaseGetProps, propDef, getProp, setProp, getPropFunction, dispatchUpdates, getIFrameFunction } from '...
JavaScript
0.000001
@@ -81,132 +81,8 @@ t'); -%0Aconst Drag = require('d3-drag');%0Aconst Selection = require('d3-selection');%0A%0Alet HORIZONTAL_SCROLL_CLASS = 'ink-drag-horz'; %0A%0Aim
e0ad48c8e783903e0d80539634a79fe0d999a639
order alphabetically
src/Parser.js
src/Parser.js
import { checksumValidator } from "./checksumParser"; import countyParser, { countyValidator } from './countyParser'; import dateParser from './dateParser'; import { serialValidator } from "./serialParser"; import sexParser, { sexValidator } from './sexParser'; export default class Parser { constructor(CNP) { ...
JavaScript
0.999969
@@ -1708,21 +1708,33 @@ -sex: this.sex +birthdate: this.birthdate ,%0A @@ -1748,21 +1748,23 @@ c -ounty +hecksum : this.c ount @@ -1759,21 +1759,23 @@ : this.c -ounty +hecksum ,%0A @@ -1784,33 +1784,27 @@ -birthdate: this.birthdate +county: this.county ,%0A @@ -1846,39 +1846,29 @@ ...
1eea6be081d6d07fd222a063c691c8221cdb27bf
Fix error when saving a player's equipment data
src/Player.js
src/Player.js
'use strict'; const Attributes = require('./Attributes'); const Character = require('./Character'); const CommandQueue = require('./CommandQueue'); const Config = require('./Config'); const Data = require('./Data'); const QuestTracker = require('./QuestTracker'); const Room = require('./Room'); const Logger = require(...
JavaScript
0.000006
@@ -7062,32 +7062,47 @@ (this.equipment + instanceof Map ) %7B%0A let eq
591e3262f4f0dd1fb3fdf55e46f94086d253a7e0
Update kick.js
commands/Mod/kick.js
commands/Mod/kick.js
exports.run = async (client, message, [User, reason]) => { let user = client.funcs.userSearch(client, message, User); if (user.username === null || user.username === undefined) { return; } let guild = message.guild; let checked = message.channel.permissionsFor(message.author.id).has("KICK_MEMBERS"); ...
JavaScript
0.000001
@@ -149,39 +149,8 @@ null - %7C%7C user.username === undefined ) %7B
c4dc80a85cf4533b7938f5013bb93b30afae3850
converted to 1.0
src/Radios.js
src/Radios.js
import React from 'react'; import ComposedComponent from './ComposedComponent'; import Radio from '@material-ui/core/Radio'; import RadioGroup from '@material-ui/core/RadioGroup'; class Radios extends React.Component { render() { let items = this.props.form.titleMap.map(function(item, index) { ...
JavaScript
0.999998
@@ -31,51 +31,175 @@ ort -ComposedComponent from './ComposedComponent +FormControl from '@material-ui/core/FormControl';%0Aimport FormControlLabel from '@material-ui/core/FormControlLabel';%0Aimport FormLabel from '@material-ui/core/FormLabel ';%0Ai @@ -209,16 +209,21 @@ rt Radio +Group from '@ @@ -244,16 +244,21...
0ae1ed51e61da288c77ac6933ca5c7bc46dbd70d
Fix eslint
src/Router.js
src/Router.js
/** * Copyright (c) 2015-present, Pavel Aksonov * 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. * */ import React, { Component, PropTypes, } from 'react'; import { BackAndroid } from 'react-native'; imp...
JavaScript
0.999541
@@ -911,16 +911,81 @@ ponent %7B +%0A static childContextTypes = %7B%0A routes: PropTypes.object,%0A %7D %0A%0A cons @@ -1273,24 +1273,94 @@ cer %7D;%0A %7D%0A%0A + getChildContext() %7B%0A return %7B%0A routes: Actions,%0A %7D;%0A %7D%0A%0A componentD @@ -1593,32 +1593,32 @@ WillUnmount() %7...
cfac286908f00718068421893fea971890133cef
Add catch to server promise
src/Server.js
src/Server.js
import yaml from 'js-yaml'; import yamlinc from 'yaml-include'; import fs from 'fs'; import Database from './database/Database'; import ServerRepository from './servers/ServerRepository'; class Server { /* * config Path to config json */ constructor( args ) { // Parse and show banner const pack = JS...
JavaScript
0
@@ -1917,16 +1917,131 @@ res() )%0A + .catch(e =%3E %7B%0A console.error('Promise failure', e);%0A process.exit(1);%0A %7D)%0A );
e5d8ed5d93a8cf75d081ac963fecb9b428977fe7
update Td
src/_Td/Td.js
src/_Td/Td.js
/** * @file Td component * @author liangxiaojun(liangxiaojun@derbysoft.com) */ import React, {Component} from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; class Td extends Component { constructor(props, ...restArgs) { super(props, ...restArgs); } stringCon...
JavaScript
0.000001
@@ -1771,30 +1771,30 @@ : PropTypes. -number +string ,%0A style: @@ -1950,17 +1950,17 @@ %5D),%0A -R +r enderer:
968899e8ac4ce1bd3eca1fbd79493e7cd6529f3d
Remove commented code
src/components/controls/styles.js
src/components/controls/styles.js
import styled from 'styled-components'; import ReactTooltip from 'react-tooltip'; /* All of these styled components are for the controls, which is part of the sidebar. * The sidebar is is wrapped by a <ThemeProvider> so you can access * props.theme.x */ export const ControlsContainer = styled.div` display: flex...
JavaScript
0
@@ -1976,691 +1976,8 @@ %60;%0A%0A -/* React Select is a lot of work to style%0A * I can't yet get it working with styled components%0A * We import the theme here, rather than accessing it via the %3CThemeProvider%3E%0A */%0A// const customReactSelectStyles = %7B%0A// container: (provided, state) =%3E %7B%0A// c...
e3ae847378bf3956d7f94ad6e06d90be2c51adba
Remove gradient micro offset
src/components/observable/defs.js
src/components/observable/defs.js
import React from 'react' import { leftGradientColor, rightGradientColor } from './constants' const Defs = ({ id, x = 1 }) => ( <defs> <linearGradient id={`bg-${id}`}> <stop offset="0%" stopColor={leftGradientColor}/> <stop offset={`${x * 100}%`} stopColor={rightGradientColor}/> {(x && x ...
JavaScript
0.000001
@@ -359,15 +359,8 @@ 100 - + 0.01 %7D%25%60%7D
b90ed35cb1df4d26b44e12da22433c0238404692
undo transpose
src/components/shelves/shelves.js
src/components/shelves/shelves.js
'use strict'; angular.module('polestar') .directive('shelves', function() { return { templateUrl: 'components/shelves/shelves.html', restrict: 'E', scope: {}, replace: true, controller: function($scope, vl, Spec, Config, Dataset, Logger, Pills) { $scope.Spec = Spec; ...
JavaScript
0.000011
@@ -565,20 +565,24 @@ vl. -spec +Encoding .transpo
579e1ff9df1d454f85fac386d098b7bf1a42c4f2
remove trailing comma in function signature (#10845)
src/core/vdom/create-component.js
src/core/vdom/create-component.js
/* @flow */ import VNode from './vnode' import { resolveConstructorOptions } from 'core/instance/init' import { queueActivatedComponent } from 'core/observer/scheduler' import { createFunctionalComponent } from './create-functional-component' import { warn, isDef, isUndef, isTrue, isObject } from '../util/i...
JavaScript
0.000008
@@ -6012,25 +6012,24 @@ parent: any -, // activeIn
1bfba6793bfe940da6468cda283fbaf970414c0d
add support for aspect always, names, and bug fix for processing sample aspect
src/aspect.js
src/aspect.js
import _ from 'lodash/fp' import {defaultsOn} from './conversion' import {throws} from './index' // Core export let aspect = ({ init = _.noop, after = _.noop, before = _.noop, onError = throws // ?: interceptParams, interceptResult, wrap }) => f => { let {state = {}} = f init(state) let result = (...ar...
JavaScript
0
@@ -37,16 +37,23 @@ faultsOn +, setOn %7D from ' @@ -129,16 +129,35 @@ ct = (%7B%0A + name = 'aspect',%0A init = @@ -202,16 +202,35 @@ _.noop,%0A + always = _.noop,%0A onErro @@ -343,20 +343,83 @@ )%0A -let result = +// Trick to set function.name of anonymous function%0A let x = %7B%0A %5Bname%5D: ...
33263296f3e968a8e7d53654ae4c80f842396320
Revert "add support for Hidden element (#4906)" (#4916)
src/foam/u2/detail/SectionView.js
src/foam/u2/detail/SectionView.js
/** * @license * Copyright 2019 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ foam.CLASS({ package: 'foam.u2.detail', name: 'SectionView', extends: 'foam.u2.View', requires: [ 'foam.core.ArraySlot', 'foam.core.ConstantSlot', 'foam.core.ProxySlot', '...
JavaScript
0
@@ -2468,16 +2468,17 @@ lected ) + %0A @@ -4182,16 +4182,30 @@ .Grid);%0A + %0A @@ -4372,101 +4372,8 @@ %5D;%0A%0A - if ( p.visibility != %22HIDDEN%22 && p.createVisibility.name != %22HIDDEN%22 ) %7B%0A @@ -4394,34 +4394,32 @@ if ( config ) %7B%0A - ...
9694770928a09575b8914c62556cae5468cc0eec
add isThisMonth property to the calendar
addon/components/mb-calendar.js
addon/components/mb-calendar.js
/* global moment */ import Ember from 'ember'; const Day = Ember.Object.extend({ date: null, calendar: null, isToday: Ember.computed({ get() { return this.get("date").isSame(moment.utc(), "day"); } }), isSelected: Ember.computed("calendar.selected", { get() { const selected = t...
JavaScript
0.000012
@@ -2130,16 +2130,158 @@ %0A %7D),%0A%0A + isThisMonth: Ember.computed(%22currentMonth%22, %7B%0A get() %7B%0A return this.get(%22currentMonth%22).isSame(moment.utc(), %22month%22);%0A %7D%0A %7D),%0A%0A defaul
9d526ebf5dc7b8d6f2cae53b3e8c208608d8fa9e
Switch from schedule to scheduleOnce
addon/components/ui-dropdown.js
addon/components/ui-dropdown.js
import Ember from 'ember'; import Base from '../mixins/base'; import DataAttributes from '../mixins/data-attributes'; import Item from './ui-dropdown-item'; export default Ember.Select.extend(Base, DataAttributes, { classNames: ['ui', 'dropdown'], module: 'dropdown', tagName: 'div', defaultTemplate: null, o...
JavaScript
0
@@ -1480,16 +1480,20 @@ schedule +Once ('afterR
01504383b66fb36f069ccf938d66f91d3a0c68b7
clear the predicates of inner views before removing them
js/foam/ui/search/SearchMgr.js
js/foam/ui/search/SearchMgr.js
/** * @license * Copyright 2015 Google Inc. All Rights Reserved. * * 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 requir...
JavaScript
0.000002
@@ -2967,16 +2967,36 @@ eturn;%0A%0A + view.clear();%0A vi @@ -3197,24 +3197,44 @@ moveAll() %7B%0A + this.clear();%0A Object
3188ec752e8c47eef51d8317da50327cefad7af6
remove trailing whitespace
js/rendererjs/loadingScreen.js
js/rendererjs/loadingScreen.js
'use strict'; // loadingScreen.js: display a loading screen and launch the Siad API // if an available daemon is not running on the host, // launch an instance of siad using config.js. const remote = require('electron').remote; const Siad = require('sia.js'); const Path = require('path'); var config = remote.require(...
JavaScript
0.999996
@@ -606,16 +606,17 @@ ia...';%0A +%0A const sh @@ -1304,17 +1304,16 @@ lback);%0A -%0A %09%09%7D%0A%09%7D);
54a2e4a35dca2b1cac0ae75cf39ff053bccdbdea
fix searchbar headings
js/searchbar/searchbarUtils.js
js/searchbar/searchbarUtils.js
var urlParser = require('util/urlParser.js') var searchbar = require('searchbar/searchbar.js') var lastItemDeletion = Date.now() // TODO get rid of this // creates a result item /* data: title: string - the title of the item metadata: array - a list of strings to include (separated by hyphens) in front of the seco...
JavaScript
0.000003
@@ -4829,17 +4829,17 @@ ement('h -2 +4 ')%0A hea
8063329ddc104bd23e12b13c2288503c1cf012e4
fix for non element
src/interactablePreventDefault.js
src/interactablePreventDefault.js
const Interactable = require('./Interactable'); const Interaction = require('./Interaction'); const scope = require('./scope'); const is = require('./utils/is'); const { nodeContains, matchesSelector } = require('./utils/domUtils'); /*\ * Interactable.preventDefault [ method ] * * Returns or set...
JavaScript
0
@@ -1456,16 +1456,50 @@ s%0A if ( +is.element(event.target)%0A && matchesS
9147b9979c9dd2fb57a3a9a472fc17bc5f9e8e18
Add some optimisation plugins
src/bundle.js
src/bundle.js
import path from 'path' import webpack from 'webpack' import WebpackDevServer from 'webpack-dev-server' import configPassthrough from './config/passthrough' import babelConfig from './config/babel' import standardConfig from './config/standard' import log from './log' import { isString, isEmpty } from 'lodash' exp...
JavaScript
0.000001
@@ -1990,16 +1990,111 @@ %7D) +,%0A new webpack.optimize.OccurrenceOrderPlugin(),%0A new webpack.optimize.DedupePlugin() %0A %5D%0A
0273b18cd7897f61beef67f543b14465b1da1a70
add more simple examples of closures with notes
closures.js
closures.js
//--------------------------- // Simple Closure Example //--------------------------- function foo(){ var bar = "bar"; function baz(){ console.log(bar); } bam(baz); // here we pass baz, functions 1st class objects // can be passed around } function bam(baz){ baz(); // “bar" ...
JavaScript
0
@@ -1081,8 +1081,665 @@ %0A%0Abar(); +%0A%0A//---------------------------%0A// Simple Closure Example # 3%0A//---------------------------%0A%0A//setTimeout or any type of Callback%0A%0Afunction foo()%7B%0A%0A var bar = %22bar%22%0A%0A setTimeout(function()%7B%0A consol.log(bar);%0A %7D,1000);%0A%0A%7D%0A%0Afoo(...
07d69276b997b436093f430c1967548d4b42efb2
fix indet
frontend/src/data/applications-api.js
frontend/src/data/applications-api.js
import { throwIfNotSuccess, headers } from './helper'; const URI = '/api/client/applications'; function fetchAll () { return fetch(URI, { headers }) .then(throwIfNotSuccess) .then(response => response.json()); } function fetchApplication (appName) { return fetch(`${URI}/${appName}`, { headers...
JavaScript
0.000005
@@ -756,20 +756,16 @@ - method: @@ -780,20 +780,16 @@ - headers, @@ -797,20 +797,16 @@ - - body: JS @@ -833,20 +833,16 @@ - credenti @@ -857,20 +857,16 @@ clude',%0A - %7D).t
b4beb4820d8f814387051739cc0d04b394789443
use isolate scope in infinite scroll directive
app/views/directives/infinite-scroll-directive.js
app/views/directives/infinite-scroll-directive.js
define(['app'], function(app) { app.directive('infiniteScroll', [ '$rootScope', '$window', '$timeout', function($rootScope, $window, $timeout) { return { restrict: 'EAC', link: function($scope, elem, attrs) { var checkWhenEnabled, hand...
JavaScript
0
@@ -212,16 +212,102 @@ 'EAC',%0A + scope : %7B%0A infiniteScroll : '&'%0A %7D,%0A @@ -1942,37 +1942,38 @@ rn $scope.$eval( -attrs +$scope .infiniteScroll) @@ -1963,32 +1963,34 @@ e.infiniteScroll +() );%0A @@ -2066,21 +2066,22 @@ .$apply( -a...
8b17fcabf40aac2d2828edf74d042d4fb92cc4ab
Add Canvas::zoomCenter
src/canvas.js
src/canvas.js
var h = require('html') var svg = require('svg') var commands = require('commands') var convertWheelUnits = require('convert-wheel-units') var ZOOM_FACTOR = 1.5 function Canvas() { this.el = h('.canvas', [ this.svg = svg('svg', [ svg('circle', {cx: 50, cy: 50, r: 30, style: { fill: 'red', ...
JavaScript
0
@@ -154,16 +154,43 @@ OR = 1.5 +%0Avar ZOOM_CENTER_SPACE = .7 %0A%0Afuncti @@ -1813,24 +1813,367 @@ ale - 1)%0A%7D%0A%0A +Canvas.prototype.zoomCenter = function() %7B%0A var viewport = this.el.getBoundingClientRect()%0A var bb = this.svg.getBBox()%0A this.centerX = bb.x + bb.width / 2%0A this.centerY = bb.y + bb...
1a3b89e83ebd25643620f1fd122f3b09d39816a1
update masker
frontend/web/js/widgets/MessageBox.js
frontend/web/js/widgets/MessageBox.js
/** * API * * MessageBox.alert({type:"message",txt:"该卡暂时不支持,请用其他卡"}); * MessageBox.alert({type:"common",txt:"请输入正确的身份证号"}); * */ var MessageBox = MessageBox || (function($, undefined){ var $el = $("#container"), $masker = $el.find("#masker"), $common_masker = $el.find("#common_masker"), $messa...
JavaScript
0
@@ -885,29 +885,13 @@ ker. -trigger(%22masker: show -%22 +( );%0D%0A
ac768e9f5d0374f941d1813b11c61b74e098c405
Add Flow to Layout comp
components/Layout.js
components/Layout.js
import Head from 'next/head'; export default ({ children, title = 'Flatris' }) => ( <div> <Head> <title>{title}</title> <meta charSet="utf-8" /> <meta name="viewport" content="initial-scale=1.0, width=device-width" /> <style>{` html, body { margin: 0; p...
JavaScript
0
@@ -1,32 +1,159 @@ -import Head from 'next/head' +// @flow%0A%0Aimport React from 'react';%0Aimport Head from 'next/head';%0A%0Aimport type %7B Node %7D from 'react';%0A%0Atype Props = %7B%0A children: Node,%0A title?: string%0A%7D ;%0A%0Ae @@ -166,16 +166,24 @@ default +function (%7B child @@ -210,15 +210,32 @@ ...
3443f934f3796026ef38c20f7908a76775429864
Add full page reload during client-side navigation errors (#874)
src/client.js
src/client.js
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import 'babel-polyfill'; import React from 'react'; import...
JavaScript
0
@@ -529,16 +529,64 @@ story';%0A +import %7B createPath %7D from 'history/PathUtils';%0A import A @@ -3846,48 +3846,28 @@ w', -%60$%7Blocation.pathname%7D$%7Blocation.search%7D%60 +createPath(location) );%0A @@ -5150,24 +5150,106 @@ w err;%0A %7D +%0A%0A // Avoid broken navigation in production mode by a f...
6eb359048960566bc369fa1944137e6ef94bd178
Refactor countGranted
app/views/teacher/modules/hall_pass_module.js
app/views/teacher/modules/hall_pass_module.js
function RetrieveHallPassRequests() { socket.emit('Request_RetrieveHallPassRequests', {cids: getSelectedClassIds()}); } function resolvePass(hrid) { socket.emit('Request_TeacherResolveHallPassRequest', {hrid: hrid}); } function grantPass(hrid) { socket.emit('Request_TeacherGrantHallPassRequest', {hrid: hrid}); } ...
JavaScript
0.000001
@@ -668,44 +668,39 @@ )%7B%0A%09 -let numOut = 0;%0A%0A%09requests.forEach(( +return requests.reduce((total, requ @@ -711,14 +711,16 @@ =%3E -%7B%0A%09%09if +total + (req @@ -735,42 +735,21 @@ nted -)%0A%09%09%09numOut++;%0A%09%7D);%0A%09return numOut + ? 1 : 0), 0) ;%0A%7D%0A
d89cfcae60be3c6547bd867812530bb5011a1c7d
better test description
src/Radio/Radio.spec.js
src/Radio/Radio.spec.js
// @flow weak /* eslint-env mocha */ import React from 'react'; import { assert } from 'chai'; import { createShallowWithContext } from 'test/utils'; import Radio, { styleSheet } from './Radio'; describe('<Radio />', () => { let shallow; let classes; before(() => { shallow = createShallowWithContext(); ...
JavaScript
0.983307
@@ -1475,26 +1475,20 @@ on the -switchBase +root node',
d05fcd02d0d8a4bf1c8bbc1dd1162a269d28acf4
update doc
source/Control/Color.js
source/Control/Color.js
/** * UI Control Color Class * @class UI.Control.Color * @extends {UI.Control} */ /** * @class UI.Control.Button * @extends {UI.Control} * @type {Class} */ define([ "UI/Control/Field" ], function( Field ) { var exports = new Class({ Extends: Field, options: { name: 'choice' }, _initElement...
JavaScript
0
@@ -295,24 +295,104 @@ oice'%0A%09%09%7D,%0A%0A +%09%09/**%0A%09%09 * %5B_initElement description%5D%0A%09%09 * @return %7B%5Btype%5D%7D %5Bdescription%5D%0A%09%09 */%0A %09%09_initEleme @@ -479,16 +479,139 @@ ;%0A%09%09%7D,%0A%0A +%09%09/**%0A%09%09 * %5B_initItem description%5D%0A%09%09 * @param %7B%5Btype%5D%7D ...
ef022e577f7b9be787b50902b7b9b2202947d75c
Check for shim existence before scheduling timeout
src/client.js
src/client.js
// The Client is the entry point to interacting with the Airbrake JS library. // It stores configuration information and handles exceptions provided to it. // // It generates a Processor and a Reporter for each exception and uses them // to transform an exception into data, and then to transport that data. // // window...
JavaScript
0
@@ -2896,16 +2896,32 @@ ;%0A %7D;%0A%0A + if (shim) %7B%0A // Cli @@ -2976,16 +2976,18 @@ errors.%0A + setTim @@ -3008,16 +3008,18 @@ ) %7B%0A + // Attem @@ -3092,24 +3092,8 @@ ect%0A - if (shim) %7B%0A @@ -3194,14 +3194,14 @@ %7D +); %0A %7D -); %0A%7D%0A%0A
431cd236179d3cdbd450022297d26fed82b75342
fix keep watching sort
src/js/components/KeepWatching.js
src/js/components/KeepWatching.js
import React from 'react' import ShowPicker from "./ShowPicker" function lastWatchedSort(a, b) { return (a.lastUpdated || 0) - (b.lastUpdated || 0); } class KeepWatching extends React.Component { constructor(props) { super(props); this.state = {root: "", videos: []}; props.showProgressProvide...
JavaScript
0
@@ -104,17 +104,17 @@ return ( -a +b .lastUpd @@ -127,17 +127,17 @@ %7C 0) - ( -b +a .lastUpd
5017a8a1443fdb4d3a0b68524e2a83beadc9119d
Throw error for invalid element. Closes #106
src/client.js
src/client.js
import { render } from 'react-dom' import Freezer from 'freezer-js' import Api from './api' import App from './app' export default class Client { constructor(options = {}) { this.state = new Freezer({ current: null, error: null, drafts: {}, requests: {}, resources: {}, }) t...
JavaScript
0.000001
@@ -446,82 +446,40 @@ -if (typeof element === 'string') %7B%0A element = document.get +element = findAndValidate Element -ById (ele @@ -483,22 +483,16 @@ element) -%0A %7D %0A%0A re @@ -817,27 +817,25 @@ ta.current%5D%0A - %0A + if (prop @@ -929,19 +929,17 @@ e%0A %7D%0A - %0A + ...
0fc5c69b3f95ed6d0e9d6e794ffb8a2a9194f38b
Add metaKey and altKey handling in keyboard handler
src/js/plugin/handler/keyboard.js
src/js/plugin/handler/keyboard.js
'use strict'; var _ = require('../../lib/helper'); var dom = require('../../lib/dom'); var instances = require('../instances'); var updateGeometry = require('../update-geometry'); var updateScroll = require('../update-scroll'); function bindKeyboardHandler(element, i) { var hovered = false; i.event.bind(element, ...
JavaScript
0
@@ -2070,16 +2070,155 @@ // left%0A + if (e.metaKey) %7B%0A deltaX = -i.contentWidth;%0A %7D else if (e.altKey) %7B%0A deltaX = -i.containerWidth;%0A %7D else %7B%0A de @@ -2221,32 +2221,40 @@ deltaX = -30;%0A + %7D%0A break;%0A @@ -2265,24 +2265,163 @@ e 38: //...
0a12bd6ac3958efc808b5ad9b5938a95de5341a9
fix mismatched markup
src/client.js
src/client.js
import config from './shared/configs'; import React from 'react'; import ReactDOM from 'react-dom'; import useScroll from 'scroll-behavior/lib/useStandardScroll'; import { match, Router, browserHistory, useRouterHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import getRoute...
JavaScript
0.000315
@@ -1160,36 +1160,50 @@ %7B -%0A (() =%3E %7B%0A + Root %7D%0A %3C/Provider%3E%0A , dest);%0A%7D);%0A%0A if ( @@ -1226,26 +1226,16 @@ tion) %7B%0A - const @@ -1301,33 +1301,111 @@ ;%0A - return (%0A +match(%7B routes, location %7D, () =%3E %7B%0A ReactDOM....
1a6cfc594dd1f2205a67ae4da8de02785d888c2b
Allow to use 'readOnly' as configuration value for container properties.
src/kit/ui/CollectionComponent.js
src/kit/ui/CollectionComponent.js
import { Component } from 'substance' import ContainerEditor from './_ContainerEditor' import ValueComponent from './ValueComponent' import renderNode from './_renderNode' /** * A component that renders a CHILDREN value. * * Note: I decided to use the name Collection here as from the application point of view a CHI...
JavaScript
0
@@ -1511,15 +1511,92 @@ surface'%0A %7D +%0A%0A isDisabled () %7B%0A return this.props.disabled %7C%7C this.props.readOnly%0A %7D %0A%7D%0A
b2226bedadac028c3dd47ffbc86c54ef8095ca15
Fix what we resume/pause
inputs/mysql.js
inputs/mysql.js
var Readable = require('barrage').Readable; module.exports = function (connection, str, args) { var query, fields; var paused = true; var stream = new Readable({objectMode: true}); stream._read = function () { if (!query) { query = connection.query(str, args); query.on('error', function (err) ...
JavaScript
0.000229
@@ -705,37 +705,42 @@ ed) %7B%0A -query +connection .pause();%0A @@ -1010,21 +1010,26 @@ -query +connection .pause() @@ -1151,21 +1151,26 @@ %7B%0A -query +connection .resume(
6c2ff4d10588e9631f1bbb01c40d9722738f2e0d
optimize toJSON
src/lib/schedule/ScheduledTask.js
src/lib/schedule/ScheduledTask.js
const Cron = require('../util/Cron'); /** * The structure for future tasks to be run */ class ScheduledTask { /** * @typedef {Object} ScheduledTaskOptions * @property {string} [id] * @property {*} [data] * @memberof ScheduledTask */ /** * @typedef {Object} ScheduledTaskUpdateOptions * @property {...
JavaScript
0.999999
@@ -3583,18 +3583,17 @@ his.task -.n +N ame, tim
377092b60593605e7d7b6dfd38d9d9d521a6c500
Use Object.create to get rid of __proto__ usage in Storable.
modules/helma/storage/storable.js
modules/helma/storage/storable.js
include('helma/functional'); require('core/string'); export('Storable', 'setStore'); importPackage(org.mozilla.javascript); var typeRegistry = {}; var __shared__ = true; // must be set to a store implementation using Storable.setStoreImplementation() var store; function Storable(type, arg) { if (!store) { ...
JavaScript
0
@@ -261,16 +261,84 @@ store;%0A%0A +// TODO make store a Storable argument instead of a module variable%0A function @@ -912,29 +912,33 @@ rototype -.__proto__ = + = Object.create( Storable @@ -947,16 +947,17 @@ rototype +) ;%0A @@ -3520,32 +3520,128 @@ able.NOT_FOUND;%0A + %7D,%0A%0A getProt...
136aa552c680165d0e0b926f6bc122e63ee87d19
Fix config resolution with process envs
src/config.js
src/config.js
const fs = require('fs') const path = require('path') const config = require('./config.json') const checkConfig = require('./util/checkConfig.js') const COLORS = { RESET: '\x1b[0m', RED: '\x1b[31m', GREEN: '\x1b[32m', CYAN: '\x1b[36m' } const ENV_PREFIX = 'DRSS_' const SKIP_TYPE_CHECKS = ['_vip', '_vipRefreshRa...
JavaScript
0.000001
@@ -1653,32 +1653,41 @@ return + value %7C%7C configValue%0A