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
65d5b0ef50b1568f314d658811c576af6a0a8659
Rename define to defineComponent
lib/component.js
lib/component.js
/* Copyright 2013 Twitter, Inc. Licensed under The MIT License. http://opensource.org/licenses/MIT */ define( [ './advice', './utils', './compose', './base', './registry', './logger', './debug' ], function(advice, utils, compose, withBase, registry, withLogging, debug) { 'use st...
JavaScript
0
@@ -2445,16 +2445,25 @@ : define +Component (timelin @@ -2528,16 +2528,25 @@ n define +Component (/*mixin @@ -3242,16 +3242,25 @@ = define +Component (); //TO @@ -4099,16 +4099,25 @@ define +Component .teardow @@ -4265,24 +4265,24 @@ ();%0A %7D;%0A%0A - return d @@ -4286,16 +4286,25 @@ n define +Com...
ef5ecfcf3e8c6154060257a35eb853042a489951
Fix build
lib/composite.js
lib/composite.js
'use strict'; module.exports = function (style) { var styleIDs = [], sourceIDs = []; for (var id in style.sources) { var source = style.sources[id]; if (source.type !== "vector") continue; var match = /^mapbox:\/\/(.*)/.exec(source.url); if (!match) ...
JavaScript
0.000001
@@ -664,18 +664,27 @@ x://%22 + -id +compositeID %0A %7D;%0A
a277c9551c3e9edec5e9929f24f8215e1c15ea09
Remove date from logs
server/log.js
server/log.js
/** * Add a message to the logs * @param {string} type * @param {any} infos */ function log(type, infos) { var msg = new Date().toISOString() + "\t" + type; if (infos) msg += "\t" + JSON.stringify(infos); console.log(msg); } module.exports.log = log;
JavaScript
0
@@ -119,42 +119,8 @@ sg = - new Date().toISOString() + %22%5Ct%22 + typ
7ec574a11532d8f81397ed0715cb4bb13fc00609
fix check on cdn record on db
src/belt.js
src/belt.js
const request = require('request'); const config = require('./config'); const db = require('./db'); const { promisify } = require('util'); const reqAsync = promisify(request); const path = require('path'); const debug = require('./debug'); const REGEX_RAW_GIST_URL = /^https?:\/\/gist\.githubusercontent\.com\/(.+?\/[0-9...
JavaScript
0
@@ -3537,16 +3537,17 @@ omDb && +( fromDb.c @@ -3570,16 +3570,55 @@ git.com' + %7C%7C fromDb.cdn.includes('githack.com')) )) %7B%0A
d50fed59d0a2b9069676d67d6635412e60b8c2de
update jshint config reference
task.js
task.js
'use strict'; /* ============================================================ *\ SCRIPTS JS / lint, concat and minify scripts \* ============================================================ */ // Gulp dependencies var concat = require('gulp-concat'); var gulpif = require('gulp-if') var path = require('path'); va...
JavaScript
0
@@ -1424,20 +1424,25 @@ int( +taskConfig. jshint -Config )))
7b758cacebcbcb16e223826b404b7195a9110146
Use var = function syntax
src/component.js
src/component.js
import { select, local } from "d3-selection"; var myLocal = local(), noop = function (){}; export default function (tagName, className){ var create = noop, render = noop, destroy = noop, selector = className ? "." + className : tagName; function myCreate(){ var my = myLocal.set(this, { ...
JavaScript
0.005055
@@ -39,17 +39,16 @@ ction%22;%0A -%0A var myLo @@ -209,60 +209,18 @@ -selector = className ? %22.%22 + className : tagName;%0A%0A +myCreate = fun @@ -229,24 +229,16 @@ ion -myCreate ()%7B%0A var @@ -229,24 +229,28 @@ ion ()%7B%0A + var my = myL @@ -272,16 +272,20 @@ %7B%0A + se...
17c0501bfb8a702df832a034c257934c74befd0f
remove console log
src/directory.js
src/directory.js
var Log = require('./log.js') var config = require('../configs/config.json') var fs = require('fs') var Path = require('path') function Directory () { var self = this this.dir = {} this.fileInfo = {} this.loadFileInfo() setInterval(function () { self.updateDownloads() }, 30000) } Directory.prototype....
JavaScript
0.000003
@@ -4876,41 +4876,8 @@ %7D%0A - console.log(self.fileInfo)%0A
245dd2202da868fc97ed8f49db1cf4015b6e61a8
Fix windows checker...
web/isWindows.js
web/isWindows.js
const os = require('os'); var isWindows = ( os.platform() == 'win32' // true evenon 64 bit archs || os.release().substr('Microsoft') > -1 // bash on Windows 10 scenario ); module.exports = isWindows;
JavaScript
0
@@ -119,14 +119,15 @@ e(). -substr +indexOf ('Mi
1c8c5832527263aaf3cfbe3cfda3696574a76e4c
remove autoscale: true
lib/generator.js
lib/generator.js
/** * Created by azu on 2014/09/28. * LICENSE : MIT */ "use strict"; var fs = require("fs"); var path = require("path"); var execSync = require("child_process").execSync; var dateFormat = require("dateformat"); var mustache = require("mustache"); const { createMarkdown } = require("safe-marked"); const convertMarkdo...
JavaScript
0.999999
@@ -470,17 +470,21 @@ replace( -%22 +/%5E%5Cs* autoscal @@ -489,14 +489,16 @@ ale: - +%5Cs* true -%22 +/ , %22%22
1cdc5ece396a564836af1b7cfd39ed5e6cbc1217
mongify a complex object
test.js
test.js
var Mongify = require('./'); var Mongodb = require('mongodb'); var Lab = require('lab'); var Chai = require('chai'); Chai.should(); var it = Lab.test; Lab.experiment('mongify', function(){ it('should convert an ObjectID string to the Mongodb.ObjectID', function(done){ Mongify('523396be6a51026f63000001').should.eql...
JavaScript
0.999999
@@ -227,14 +227,27 @@ ing -to the +(24hex string) to a Mon @@ -766,18 +766,15 @@ th a -n ISO date + 24-hex str @@ -787,24 +787,16 @@ an -o +O bject - with Date +ID ', f @@ -845,33 +845,27 @@ nt: %7B %7D,%0A%09%09%09 -createdAt +_id : '523396be6 @@ -938,25 +938,19 @@ %7B %7D,%0A%09%09%09 -createdAt +_id ...
d2ef1b3bdfc3cc24298c9634181e012274094e8b
fix lint warnings in lib/glob_test.js
lib/glob_test.js
lib/glob_test.js
// Apply glob function to path specified on command line. var glob = require('./glob'), fs = require('fs'); if (process.argv.length != 3) { console.log("Bad usage"); process.exit(1); } glob.glob(process.argv[2], fs, function(err, files) { if (err) { console.log(err); } else { files.forEach(func...
JavaScript
0.000001
@@ -84,13 +84,13 @@ ob') -,%0A +;%0Avar fs @@ -133,16 +133,17 @@ ength != += 3) %7B%0A @@ -154,17 +154,17 @@ ole.log( -%22 +' Bad usag @@ -168,9 +168,9 @@ sage -%22 +' );%0A
ed54b295d3a7746b453cc3f6edba369ff5175678
Use knex.destroy promise in test
test.js
test.js
'use strict'; var Promise = require('bluebird'); Promise.longStackTraces(); var test = require('tape'); var session = require('express-session'); var KnexStore = require('./index.js')(session); var knexPg = require('knex')({ client: 'pg', connection: { host: '127.0.0.1', user: 'postgres', password: '', data...
JavaScript
0
@@ -3034,142 +3034,29 @@ oy() -;%0A%09%09t.end();%0A%09%09oneDbDone();%0A%09%7D)%09%0A%7D)%0A%0Avar done = 0;%0Afunction oneDbDone() %7B%0A%09done++;%0A%09if (done == stores.length) %7B%0A%09%09process.exit();%0A%09%7D%0A%7D +.then(t.end);%0A%09%7D)%09%0A%7D)%0A %0A%0A%0A
9adac659db4be46095a13c49bf1fbf9210df29b0
fix type in test decription
test.js
test.js
'use strict'; var assert = require('assert'); var gutil = require('gulp-util'); var wpRev = require('./'); it('should ', function (cb) { var stream = wpRev(); stream.on('data', function (file) { assert.strictEqual(file.contents.toString(), 'unicorns'); }); stream.on('end', cb); stream.write(new gutil.File({ ...
JavaScript
0.000001
@@ -112,16 +112,30 @@ 'should +write unicorns ', funct
7c6fea993784c47a500cf9119d52a24090c3cdef
test if `.test` is attached before first `flip-tape` call
test.js
test.js
const tape = require('tape') const wrappedMethods = require('./methods') var tapeMock = (arg0, arg1, cb) => { cb = cb || arg1 || arg0 // `arg0` and `arg1` are optional in `tape` let res = cb(testObjectMock) return [arg0, arg1, res] } var testObjectMock = { end: function () {} } wrappedMethods.forEach(elem => { ...
JavaScript
0.000001
@@ -67,19 +67,19 @@ hods')%0A%0A -var +let tapeMoc @@ -234,19 +234,19 @@ res%5D%0A%7D%0A -var +let testObj @@ -404,20 +404,18 @@ eMock %7D%0A -cons +le t flippe @@ -440,248 +440,8 @@ ')%0A%0A -var arityToMethod = %7B%0A 1: %5B'fail', 'pass', 'skip'%5D,%0A 2: %5B'ok', 'notOk', 'error'%5D,%0A 3: %5B'equal', ...
85ebb5de9e70ff90ace1d8df54b4a10ab683311c
Add test should clear listeners for bidirectional data binding
test.js
test.js
var expect = require("chai").expect var ChiasmLinks = require("./index"); var ChiasmComponent = require("chiasm-component"); var Chiasm = require("chiasm"); function SimpleComponent(){ return new ChiasmComponent({ x: 5 }); } function initChiasm(){ var chiasm = new Chiasm(); chiasm.plugins.simpleComponent ...
JavaScript
0.000001
@@ -3525,13 +3525,1692 @@ );%0A %7D); +%0A%0A it(%22should clear listeners for bidirectional data binding%22, function (done) %7B%0A var chiasm = initChiasm();%0A chiasm.setConfig(%7B%0A a: %7B%0A plugin: %22simpleComponent%22,%0A state: %7B%0A x: 100%0A %7D%0A %7D,%0A ...
54793c88b722f8e1769c53200cec7198dd041a64
Fix test for unclosed tag
test.js
test.js
'use strict'; var assert = require('assert'); var gutil = require('gulp-util'); var jsxcs = require('./'); describe('gulp-jsxcs test suite:', function() { this.timeout(5000); it('check JS files', function (cb) { var stream = jsxcs(); var success = false; stream.on('data', function() ...
JavaScript
0.000001
@@ -7772,11 +7772,17 @@ ing +( XJS +%7CJSX) clo
d1937262e6806c5ab7e98588977601c4f33625e8
add messages to log
test.js
test.js
const fs = require('fs'); code = fs.readFileSync('contract.sol','utf8'); var solc = require('solc'); var output = solc.compile(code, 1); if (output.errors) { console.log(output.errors); return 1; } else { console.log(output); return 0; }
JavaScript
0.000001
@@ -181,16 +181,50 @@ rrors);%0A + console.log(%22Build succeeded.%22)%0A return @@ -259,16 +259,47 @@ utput);%0A + console.log(%22Build failed.%22)%0A return
2ce8124332fe827aa0b496355d9785850f28a3d4
Fix test
test.js
test.js
import test from 'ava'; import requireUncached from 'require-uncached'; import Brakes from 'brakes'; import register from 'prom-client/lib/register'; const origNow = Date.now; test.beforeEach(t => { t.context.module = requireUncached('./brakes-events'); Date.now = () => 1494222986972; register.clear(); })...
JavaScript
0.000004
@@ -1625,16 +1625,17 @@ ionSum %3E += 0.250 &
7ac5a1313aa17439e8d9cb2be82bbc14a1f22873
improve tests
test.js
test.js
"use strict"; var assert = require('assert'); var lib = require('./vcgencmd'); /* measureClock(clock) */ assert.throws(function() { lib.measureClock(); }, /incorrect/); assert.throws(function() { lib.measureClock('Core'); }, /incorrect/); assert(lib.measureClock('core') > 0); /* measureVolts(id) */ assert....
JavaScript
0.000016
@@ -231,39 +231,48 @@ , /incorrect/);%0A -assert( +var coreClock = lib.measureClock @@ -271,32 +271,92 @@ ureClock('core') +;%0Aassert.equal(typeof coreClock, 'number');%0Aassert(coreClock %3E 0);%0A%0A/*%0A m @@ -445,23 +445,32 @@ rect/);%0A -assert( +var coreVolts = lib.meas @@ -478,17 +478,83 @@ reVolts...
706d6414fc85c82dd5b2c7b443fd6253cccd00bf
Add better logging from Tenon on errors.
test.js
test.js
var unirest = require('unirest'); var config = require('./config.json'); var jira = require('jira-api'); var Request = unirest.post(config.tenon.tenonInstanceDomain + '/api/index.php') .send({ key: config.tenon.apiKey, projectID: config.tenon.projectID, url: 'http://www.google.com' // In the real world y...
JavaScript
0
@@ -395,25 +395,72 @@ response) %7B%0A + %0A + if (response.body.status === 200) %7B%0A%0A console. @@ -471,24 +471,26 @@ 'Status:');%0A + console. @@ -512,25 +512,33 @@ dy.status);%0A -%0A + %0A console. @@ -554,24 +554,26 @@ onse ID:');%0A + console. @@ -608,24 +608,26 @@ ...
bf4aa8125721fe717ceb6432a77d2db98258cab4
add failing test
test.js
test.js
'use strict'; var gp = require('./'); var assert = require('assert'); describe('glob-parent', function() { it('should strip glob magic to return parent path', function() { assert.equal(gp('path/to/*.js'), 'path/to'); assert.equal(gp('/root/path/to/*.js'), '/root/path/to'); assert.equal(gp('/*.js'), '/')...
JavaScript
0.998687
@@ -724,16 +724,70 @@ path');%0A + assert.equal(gp('path/**/subdir/foo.*'), 'path');%0A %7D);%0A%7D)
1880c5d165932f142337a511ecf3e15b47a08cc5
Clean up tests
test.js
test.js
'use strict' var test = require('tape') var AWS = require('aws-sdk') var SimpleSqs = require('./') test('EventEmitter', function (t) { var queue = SimpleSqs()() t.ok(queue instanceof require('events').EventEmitter) t.end() }) test('init with default options', function (t) { var queue = SimpleSqs()() t.deep...
JavaScript
0.000001
@@ -68,24 +68,18 @@ ')%0Avar S -impleSqs +QS = requi @@ -135,32 +135,26 @@ ar queue = S -impleSqs +QS ()()%0A t.ok( @@ -280,24 +280,18 @@ ueue = S -impleSqs +QS ()()%0A t @@ -442,24 +442,18 @@ ueue = S -impleSqs +QS (%7B foo: @@ -854,32 +854,26 @@ ar queue = S -impleSqs +QS ()('foo', fu @@ -1506,24 +1506,...
be32ee5ba877070be14c7a4973acc349cb6cf4cc
Use _.isObject to test for objects in core.
src/core.js
src/core.js
var _ = require('underscore') ; var log = console.log; var Core = exports.Core = function (channel, attrs) { this.channel = channel; this._attrs = attrs || {}; this._redis = Core._redis; }; Core._redis = require(__dirname + '/redisClient').create(); _.each(['exists', 'erase'], function (funcName) { ...
JavaScript
0
@@ -620,31 +620,24 @@ if ( -typeof key !== 'object' +!_.isObject(key) ) %7B%0A
fcd581a70e66e2c48610f6904e475fcbdbe78f11
clean up index file (#107)
src/core.js
src/core.js
#!/usr/bin/env node /** @flow * @briskhome * └core <core.js> */ import os from 'os'; import path from 'path'; import * as briskhome from '../package.json'; import Architect, { resolveConfig } from './utilities/architect'; import { enabledPlugins } from './utilities/plugins'; import { briskhomeAsciiLogo } from './u...
JavaScript
0
@@ -335,16 +335,69 @@ ants';%0A%0A +process.on('unhandledRejection', err =%3E dump(err));%0A%0A (async ( @@ -597,24 +597,26 @@ catch (e +rr ) %7B%0A process. @@ -611,363 +611,24 @@ -process.stdout.write(%60%7B%0A %22name%22:%22briskhome%22,%0A %22hostname%22:%22$%7Bos.hostname()%7D%22,%0A ...
c6559969b8f66f5cf596319baf2952e8f35762fe
update test name to reflect actual test case
test.js
test.js
/* eslint import/no-extraneous-dependencies: [error, { devDependencies: true }] */ 'use strict'; const request = require('supertest'); const simpleApp = request(require('./examples/simple')); describe('examples', () => { describe('simple', () => { it('returns cors headers for valid cors origin', done => { ...
JavaScript
0
@@ -265,42 +265,29 @@ rns -cors headers for valid cors origin +package X-App headers ', d
b472da6ea92f0311f6bc749d511705684d824feb
Fix test for invalid messages.
test.js
test.js
import test from 'ava'; import {LMLayer} from './'; const TYPE_D = { insert: 'D', deleteLeft: 0, deleteRight: 0 }; const EMPTY_CONTEXT = { left: '' }; test('It provide context to LMLayer', async t => { t.plan(2); const lm = new LMLayer; // Wait for the language model to initialize and declare its configurati...
JavaScript
0
@@ -1269,32 +1269,101 @@ = new LMLayer;%0A + let configuration = await lm.initialize(%7B model: 'en-x-derek' %7D);%0A%0A try %7B%0A awai @@ -1533,22 +1533,8 @@ i);%0A - t.pass();%0A %7D%0A
04272545a95f09f9f329c48afa1042b654e2af9d
Add test for compression option
test.js
test.js
var assert = require('chai').assert; var expect = require('chai').expect; var sinon = require('sinon'); var driver = require('./index'); var config = { "driver": "cassandra", "host": ["localhost"], "database": "dbmigration" }; var internals = {}; internals.mod = {}; intern...
JavaScript
0.000001
@@ -1863,32 +1863,796 @@ %0A %7D); +%0A%0A it('A simple table with compression', function() %7B%0A db.createTable('users', %7B%0A 'name': 'varchar'%0A %7D, %7B%0A 'primary_key': 'name',%0A 'compression': %22%7B...
e62a5cc411b963b815a669cf3b6b979276226e71
modify script
lib/kato-test.js
lib/kato-test.js
'use babel'; import { CompositeDisposable } from 'atom'; export default { activate(state) { this.subscriptions = new CompositeDisposable(); this.subscriptions.add(atom.commands.add('atom-text-editor', {'kato-test:countline':() => this.countline()})); }, deactivate() { }, countline() { editor...
JavaScript
0.000001
@@ -353,16 +353,17 @@ Editor() +; %0A ale @@ -404,16 +404,362 @@ Count()) +;%0A%0A %0A # JavaPath%60FbN%0A javapath = %22packages/kato-test/vendor/%22 + process.platform + %22/jre/bin%22;%0A userconfpath = atom.config.getUserConfigPath();%0A pathlen = useconfpath.length;%0A userconfpath = userco...
463bd3992be33f4b2e16017c7ea4b8f743839894
Include links to license files in CSV file
lib/licensure.js
lib/licensure.js
'use strict'; var fs = require('fs'); var path = require('path'); var dir = require('node-dir'); var mkdirp = require('mkdirp'); var q = require('q'); var cli = require('commander'); var getLicenseType = function (info) { if (info.licenses) { if (typeof info.licenses[0] === 'object') { return ...
JavaScript
0
@@ -4179,19 +4179,34 @@ ,License +,%22License File%22 ';%0A - %0A lic @@ -4384,24 +4384,112 @@ se_file));%0A%0A + destination = destination.replace(path.extname(destination), '') + '.txt';%0A%0A @@ -4574,32 +4574,32 @@ n));%0A %7D%0A%0A - csv.push @@ -4667,16 +4667,50 @@...
34c7a6fc5684880bff50addca6feabe5ad5d11c0
Clean default data
src/data.js
src/data.js
var fen = require('./fen'); var configure = require('./configure'); module.exports = function(cfg) { var defaults = { pieces: fen.read(fen.initial), orientation: 'white', // board orientation. white | black turnColor: 'white', // turn to play. white | black check: null, // square currently in check "...
JavaScript
0.000001
@@ -3301,68 +3301,8 @@ up)%0A - showGhost: true, // show ghost of piece being dragged%0A @@ -4235,274 +4235,8 @@ ted%0A - %7D,%0A colors: %7B%0A selected: 'rgba(216, 85, 0, 0.3)',%0A moveDest: 'rgba(20,85,30,0.4)',%0A lastMove: 'rgba(155, 199, 0, 0.3)',%0A premove: 'rgba(20, 30, 8...
e4dbf9b243b465fb8b13ec3fc6f8ca67fdd5c378
fix indentation in cach test
test/spelly_tests.js
test/spelly_tests.js
"use strict"; import fs from "fs"; import path from "path"; import del from "del"; import exists from "exists-sync"; import { expect } from "chai"; import { configstore, dictionary, doubleItemFixture, fileStore } from "./fixtures"; import Spelly from "../"; function readFile(filePath) { return JSON.parse...
JavaScript
0.00001
@@ -1875,27 +1875,16 @@ ierd%22: %5B -%0A %7B word: @@ -1906,18 +1906,16 @@ 1 %7D +%5D %0A - %5D %7D);%0A
44ece730b73c370d7dff4e30248886d31c71b904
Remove usage of unused package in npmalerets.js
lib/npmalerts.js
lib/npmalerts.js
'use strict'; var github = require('./github'); var npm = require('./npm'); var db = require('./db'); var email = require('./email'); var semver = require('semver'); var _ = require('underscore'); var cache = {}; var yesterday = new Date(); yesterday.setDate(yesterday.getDate() - 1); npm.getLatestPackages(yesterd...
JavaScript
0
@@ -133,40 +133,8 @@ );%0A%0A -var semver = require('semver');%0A var
ee29011f5b9c1540a46f57f44a0afee5e0d4999b
Allow ":" as the pre-formatted text
lib/org/lexer.js
lib/org/lexer.js
// ------------------------------------------------------------ // Syntax // ------------------------------------------------------------ var Syntax = { rules: {}, define: function (name, syntax) { this.rules[name] = syntax; var methodName = "is" + name.substring(0, 1).toUpperCase() + name.substring(1); ...
JavaScript
0.999999
@@ -529,14 +529,20 @@ s*): +(?: (.*)$ +%7C$) /);
a15f93db2fc8f30f35c04fbbc7e655bce0dd780c
Switch up how labels and most legible display
colorcube.js
colorcube.js
const WHITE = tinycolor("#ffffff"); const BLACK = tinycolor("#000000"); const AANORMALRATIO = 4.5; const AALARGERATIO = 3.0; var colorArray = []; // Decimal Rounding: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round (function() { /** * Decimal adjustment of a number. ...
JavaScript
0.000063
@@ -2741,21 +2741,20 @@ over $%7B -color +base %7D%3C/div%3E%0A @@ -2802,29 +2802,28 @@ e=%22color: $%7B -color +base %7D; border-co @@ -2829,21 +2829,20 @@ olor: $%7B -color +base %7D; backg @@ -2856,20 +2856,21 @@ olor: $%7B -base +color %7D;%22%3EAa%3C/
504f2f619f99e4ebfa9a310e35f106e4a23ac615
build different sources for autocomplete
tx_highered/static/tx_highered/js/autocomplete.js
tx_highered/static/tx_highered/js/autocomplete.js
(function($, Trie, exports){ "use strict"; var $elem = $(".q"); var autocomplete_trie = new Trie(); // jQuery UI autocomplete var autocomplete_institutions = function(data) { // Map intitution names to URIs var urisByName = {}; $.map(data, function(o) { urisByName[o.name] = o.uri; }); // Insert inst...
JavaScript
0
@@ -1,8 +1,42 @@ +// TODO cache using localStorage?%0A (functio @@ -68,24 +68,41 @@ strict%22;%0A%0A%0A +// configuration%0A var $elem = @@ -110,16 +110,49 @@ (%22.q%22);%0A +var $ctl = $('#view-map a.btn');%0A %0A%0Avar au @@ -180,16 +180,320 @@ Trie(); +%0Avar _data = %5B%5B%5D, %5B%5D, %5B%5D%5D;%0Avar acti...
72f840a801d9dbfed956155ffe5726e32a2ffabb
Remove unused method.
src/file.js
src/file.js
'use strict'; var nodeFs = require('fs'); var cache = {}; function File ($matcher, $transformer, file) { if (cache[file]) { return cache[file]; } cache[file] = this; this._matcher = $matcher; this._transformer = $transformer; this._file = file; } File.prototype = { get code () { return this._c...
JavaScript
0
@@ -846,67 +846,8 @@ %7D,%0A%0A - cached: function () %7B%0A return cache%5Bthis.path%5D;%0A %7D,%0A%0A ex
73f6f286cc448115c7aab36c78eb7bcb51b3cc5e
Fix spacing on input with no status
ui/src/data_explorer/components/RawQueryEditor.js
ui/src/data_explorer/components/RawQueryEditor.js
import React, {PropTypes} from 'react' import classNames from 'classnames' const ENTER = 13 const ESCAPE = 27 const RawQueryEditor = React.createClass({ propTypes: { query: PropTypes.shape({ rawText: PropTypes.string.isRequired, id: PropTypes.string.isRequired, }).isRequired, onUpdate: PropTy...
JavaScript
0.000005
@@ -1615,12 +1615,66 @@ urn -null +(%0A %3Cdiv className=%22raw-text--status%22%3E%3C/div%3E%0A ) %0A
3eaab99699d029a74a8f58ee50d11fd83c495910
修改moedls/ post.js 代码格式
models/post.js
models/post.js
/** * models/post.js */ var mongoose = require('mongoose'); var PostSchema = new mongoose.Schema({ // 链接 link: String, // 标题 title: { type: String, unique: true}, // 图片 titlePic: String, // 内容 content: String, // 描述 description: String, // 发布内容 pubDate: { type: Date, default: Date.no...
JavaScript
0
@@ -138,16 +138,20 @@ title: %7B +%0A type: S @@ -156,16 +156,20 @@ String, +%0A unique: @@ -173,16 +173,19 @@ ue: true +%0A %7D,%0A //
ddfbb46654fb8108f6fba93bbb6eb8c4300049e4
update min values
default/main.js
default/main.js
//Load Roles var consts = require('consts'); var helper = require('helper'); var roleHarvester = require('role.harvester'); var roleBuilder = require('role.builder'); var roleUpgrader = require('role.upgrader'); var roleRepair = require('role.repair'); // How to activate safeMode: Game.spawns['Spawn1'].room.controller...
JavaScript
0.000001
@@ -954,25 +954,25 @@ _upgrader = -2 +1 ;%0Avar min_re @@ -974,25 +974,25 @@ in_repair = -2 +1 ;%0A%0A// Creeps
cf2ea7593a5e928099b3fc560734c7ad1de35b4e
Add auth
asciipic/web/js/term.js
asciipic/web/js/term.js
var TOKEN = null, RETRY_COUNT = 25, RETRY_DELAY = 60; function setSize() { let height = $("#term-row").height() - $("footer").height() - 100; $("#term").css("height", height); } function send_login(command, terminal){ // Send the login credentials var params = command.split(" "); request = $.a...
JavaScript
0.000007
@@ -3513,16 +3513,540 @@ %7D);%0A%7D%0A%0A +function send_auth(command, terminal)%0A%7B%0A var params = command.split(%22 %22);%0A%0A request = $.ajax(%7B%0A async: false,%0A url: %22/api/user/account%22,%0A method: %22POST%22,%0A data: %7B%0A %22username%22: params%5B1%5D...
1c7394ee0176b30fef84b25d441629375f51441d
add 'open in editor' option
app/src/tray-popup/components/projects/project.js
app/src/tray-popup/components/projects/project.js
import { remote, shell, clipboard } from 'electron'; import styled, { css } from 'styled-components'; import Button from '~/common/components/button'; const { Menu, MenuItem } = remote; const userHomePath = remote.app.getPath('home'); const cropOverflowedText = css` white-space: nowrap; text-overflow: ellipsis; ...
JavaScript
0.000016
@@ -1,12 +1,37 @@ +import path from 'path';%0A import %7B rem @@ -1275,61 +1275,315 @@ nst -showOptions = project =%3E %7B%0A Menu.buildFromTemplate(%5B +fetchScripts = project =%3E %7B%0A // tbd%0A%7D;%0A%0Aconst showProjectMenu = project =%3E %7B%0A Menu.buildFromTemplate(%5B%0A %7B%0A label: 'Scripts',...
2041deac2d475f1f8104ad0520abf4b1f7ab1405
Fix localization issue, now get dictionary into l10n component
activities/EbookReader.activity/js/l10n.js
activities/EbookReader.activity/js/l10n.js
// Localization component var Localization = { template: '<div/>', data: function() { return { l10n: null, eventReceived: false } }, mounted: function() { var vm = this; if (vm.l10n == null) { require(["sugar-web/env", "webL10n"], function (env, webL10n) { env.getEnvironment(function(err, env...
JavaScript
0
@@ -109,16 +109,37 @@ : null,%0A +%09%09%09dictionary: null,%0A %09%09%09event @@ -721,24 +721,67 @@ Received) %7B%0A +%09%09%09%09%09%09%09vm.dictionary = vm.l10n.dictionary;%0A %09%09%09%09%09%09%09vm.$e @@ -798,16 +798,16 @@ ized%22);%0A - %09%09%09%09%09%09%09v @@ -912,33 +912,173 @@ %0A%09%09%09 -return thi...
fcd2564ad060874c4f1a53122a15db8b796b0d72
Modify test cases
jasmine/spec/inverted-index-test.js
jasmine/spec/inverted-index-test.js
describe ("Check if class exists", function () { it ("checks that class is defined", function () { expect (InvertedIndex).toBeDefined(); } ); }); describe ("Read book data", function () { var index = new InvertedIndex(); it ("readFile method should not return empty JSON", function () { var jsonFile =...
JavaScript
0.000187
@@ -1163,32 +1163,61 @@ ual(%5B%5B0%5D,%5B0%5D%5D);%0A + console.log(index.data);%0A expect (inde @@ -1308,19 +1308,11 @@ ex(%22 -imagination +the %22)). @@ -1316,25 +1316,25 @@ )).toEqual(%5B -0 +1 %5D);%0A %7D);%0A @@ -1574,35 +1574,34 @@ a%22)).toEqual(%5B%5B0 -%5D,%5B +, 1%5D%5D);%0A expect @@...
b65fab8458dd6e7de6996279ae493d69ee46e249
add more test
jasmine/spec/inverted-index-test.js
jasmine/spec/inverted-index-test.js
/* eslint-disable no-unused-vars*/ /* eslint-disable no-undef*/ /* eslint-disable no-dupe-keys*/ /* eslint-disable no-multi-assign*/ const invertedIndex = new InvertedIndex(); const books = require('../books.json'); const empty = require('../emptyBook.json'); const invalid = require('../invalidBook.json'); const little...
JavaScript
0.000002
@@ -5634,16 +5634,23 @@ , 'this' +, 'ali' ))%0A @@ -5749,32 +5749,53 @@ this: %5B2%5D,%0A + ali: %5B1%5D%0A %7D,%0A
95ca82c22f2587afaf6c75759bd841c09554815b
Fix sizing of instruction row on project overview page
website/static/js/pages/project-dashboard-page.js
website/static/js/pages/project-dashboard-page.js
/** Initialization code for the project dashboard. */ var $ = require('jquery'); require('jquery-tagsinput'); var m = require('mithril'); var Fangorn = require('fangorn'); var LogFeed = require('../logFeed.js'); var pointers = require('../pointers.js'); var Comment = require('../comment.js'); var Raven = require('...
JavaScript
0.000001
@@ -1473,94 +1473,151 @@ -filterStyle : %7B 'float' : 'left', width : '100%25'%7D,%0A placement: 'dashboard', +placement: 'dashboard',%0A title : undefined,%0A filterFullWidth : true, // Make the filter span the entire row for this view %0A
e190634f526339ee97dcd62e8bc3ffa8417986c0
Fix typo in urlForFindBelongsTo adapter method
addon/-private/adapters/build-url-mixin.js
addon/-private/adapters/build-url-mixin.js
import Ember from 'ember'; var get = Ember.get; /** WARNING: This interface is likely to change in order to accomodate https://github.com/emberjs/rfcs/pull/4 ## Using BuildURLMixin To use url building, include the mixin when extending an adapter, and call `buildURL` where needed. The default behaviour is d...
JavaScript
0.000008
@@ -4490,16 +4490,17 @@ ndBelong +s To%0A *
da936872de9beaf485814732c3ee1757103fef4a
Replace deep equality with regular in Cache
web/src/js/core/cache.js
web/src/js/core/cache.js
import equal from 'deep-equal'; export default class Cache { constructor(size) { this.size = size; this.cache = []; } put(key, value) { const existing = this.cache.findIndex(item => equal(item.key, key)); if (existing >= 0) { this.cache.splice(existing, 1); } this.cache.push({key...
JavaScript
0
@@ -1,38 +1,4 @@ -import equal from 'deep-equal';%0A%0A%0A expo @@ -158,38 +158,32 @@ dex(item =%3E -equal( item.key , key));%0A @@ -166,31 +166,32 @@ =%3E item.key -, + == key) -) ;%0A if (ex @@ -531,22 +531,16 @@ =%3E -equal( item.key , ke @@ -539,15 +539,16 @@ .key -, + == key) -) ;%0A
219ab75b089a2601fbfabd02dcfb2409c312c9f3
Rename user in require
src/game.js
src/game.js
import {EventEmitter2 as EventEmitter } from "eventemitter2" const User = require(`${__dirname}/game/model/user.js`); const Status = require(`${__dirname}/game/model/Status.js`); const Equipment = require(`${__dirname}/game/model/Equipment.js`); const Weapon = require(`${__dirname}/game/model/Weapon.js`); co...
JavaScript
0.000001
@@ -105,17 +105,17 @@ e/model/ -u +U ser.js%60)
2a196515cb032b0a0f21014270850c422798c87a
Update game dependencies
src/game.js
src/game.js
import {Loop, AssetLoader} from 'gamebox'; import Base from 'flockn/base'; import Graphics from 'flockn/graphics'; import Scene from 'flockn/scene'; import Color from 'flockn/types/color'; import Viewport from 'flockn/viewport'; import {addable, renderable, updateable, serializable} from 'flockn/mixins'; var root = ...
JavaScript
0
@@ -55,22 +55,17 @@ e from ' -flockn +. /base';%0A @@ -86,22 +86,17 @@ s from ' -flockn +. /graphic @@ -118,22 +118,17 @@ e from ' -flockn +. /scene'; @@ -147,22 +147,17 @@ r from ' -flockn +. /types/c @@ -185,22 +185,17 @@ t from ' -flockn +. /viewpor @@ -260,22 +260,17 @@ %7D from ' -flockn +. /mixins'
294542782eea95dfeb74d7a2b24b72edfe5b5b44
Fix logout not removing session from RP
src/webid-oidc.js
src/webid-oidc.js
// @flow /* global RequestInfo, Response */ import * as authorization from 'auth-header' import RelyingParty from '@solid/oidc-rp' import PoPToken from '@solid/oidc-rp/lib/PoPToken' import type { loginOptions } from './solid-auth-client' import { currentUrl, navigateTo, toUrlString } from './url-util' import type { we...
JavaScript
0.003176
@@ -33,16 +33,23 @@ Response +, fetch */%0Aimpo @@ -1670,19 +1670,273 @@ -rp.logout() +// First log out from the IDP%0A await rp.logout()%0A // Then, log out from the RP%0A try %7B%0A await fetch('/.well-known/solid/logout', %7B credentials: 'include' %7D)%0A %7D catch (e) %7B%0A ...
ee19311e25db20258aba68ff6e5fd2eb1277ae44
Add periodic table array constant
constants.js
constants.js
var BLOCK_FONT = "10px Verdana"; var DROP_DELAY = 600; var FAST_DROP = 100; var INPUT_DELAY = 200; var GRID_HEIGHT = 20; var GRID_WIDTH = 10; var BLOCK_WIDTH, BLOCK_HEIGHT; var BLOCK_SPACING_WIDTH, BLOCK_SPACING_HEIGHT; var TETRINIMO_TEMPLATES = { jBlock: ['xx', 'x ', 'x '], lBlock: ['xx', ...
JavaScript
0.006812
@@ -1288,8 +1288,732 @@ pace'%0A%7D%0A +%0Avar PERIODIC_TABLE = %5B%0A %5B1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2%5D,%0A %5B3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 8, 9, 10%5D,%0A %5B11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, 17, 18%5D,%0A %5...
11e8bd1627b6b7668399b01943ace92abffa4380
Delete typo
src/wef.logger.js
src/wef.logger.js
/*! * Wef logger * Copyright (c) 2011 Pablo Escalada * MIT Licensed */ /** * The wef plugins module. */ (function () { var textFormatter = function() { return this; }; textFormatter.prototype.format = function (messages, level, type) { var tmp = [], levelMarks = " ...
JavaScript
0.000099
@@ -71,44 +71,8 @@ %0A */ -%0A%0A/**%0A * The wef plugins module.%0A */ %0A(fu
c3424de982fc23f973b080724845bd2bf4d7576d
Update client example.
example/client.js
example/client.js
/* * client sample */ // import Client class. var Client = require('hello-work').Client; // create client instance. var client = new Client(); // connect to server, with port and host parameter. clinet.connect(/* { host: 'localhost', port: 20000, }, */function (err) { // on('connect', function (err) { ... }) ...
JavaScript
0
@@ -403,23 +403,8 @@ e.%0A - var add_task = cli @@ -599,28 +599,45 @@ ,%0A %7D,%0A %7D -);%0A%0A +, function (job) %7B%0A // complet @@ -651,16 +651,13 @@ .%0A -add_task + job .on( @@ -677,32 +677,34 @@ unction (res) %7B%0A + console.log( @@ -721,32 +721,40 @@ ete : ' + res);%0A + %7D);%0...
01adbf595447260c37a45d0360a21277dfaa2750
Use card for image view
src/components/common/GifAddModal.js
src/components/common/GifAddModal.js
import React, { PropTypes } from 'react'; import * as _ from 'lodash'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import RaisedButton from 'material-ui/RaisedButton'; import TextField from 'material-ui/TextField'; class GifAddModal extends React.Component { constr...
JavaScript
0
@@ -257,16 +257,66 @@ tField'; +%0Aimport %7BCard, CardMedia%7D from 'material-ui/Card'; %0A%0Aclass @@ -2903,93 +2903,174 @@ %3C -img src=%7Bthis.state.url%7D className=%22img-thumbnail center-block%22 role=%22presentation%22 / +Card%3E%0A %3CCardMedia%3E%0A %3Cimg src=...
a3fcd613c4ca424068d94488b5287eb3cde91212
mejora ajax modal
webroot/js/ajax_modal.js
webroot/js/ajax_modal.js
function mostrarModal( event ){ event.preventDefault(); console.info(event); console.info(event.target.href); $( "#ajaxModal .modal-body" ).load( event.target.href ); $( "#ajaxModal").modal("show"); return false; } $(function(){ $(document).on('click', '.ajax-modal', most...
JavaScript
0.000001
@@ -61,70 +61,8 @@ ();%0A - %09%09%09console.info(event);%0A %09%09%09console.info(event.target.href);%0A %09%09%09 @@ -104,17 +104,24 @@ event. -t +currentT arget.hr @@ -734,59 +734,8 @@ ()%7B%0A -%09%09%09%09%09console.info(%22incrementado loader %25o%22, load);%0A %09%09%09%09
40d9941c8ee273bb331e9d093261e9bb08491b79
Implement getServerSnapshot
src/hook.js
src/hook.js
import { assoc, F, forEach, forEachObjIndexed, keys, identity, map, mergeRight, pathOr, reduce, } from 'ramda' import { combineTemplate, noMore } from 'baconjs' import { useContext, useCallback, useMemo, useEffect, useSyncExternalStore } from 'react' import Common from './utils/common-util' import B...
JavaScript
0.000001
@@ -3261,24 +3261,42 @@ snapshots.%0A + getSnapshots,%0A getSnaps
86fe7b492871773c83e718ff1486e7dc10ac1f75
add domain alias
modules/tld.js
modules/tld.js
var request = require( 'request' ); module.exports = { commands: { tld: { usage: [ 'tld' ], help: 'Checks whether a string is a top level domain', command: function ( bot, msg ) { request.get( 'https://data.iana.org/TLD/tlds-alpha-by-domain.txt', function ( e, r, b ) { var data = b.split( '\n' ); ...
JavaScript
0.000001
@@ -91,16 +91,42 @@ tld' %5D,%0A +%09%09%09aliases: %5B 'domain' %5D,%0A %09%09%09help:
12c34ef9c9ec840d4c0847b12fbf82235b04a5f9
update set link
src/components/header/views/index.js
src/components/header/views/index.js
define(['lazoView'], function (LazoView) { 'use strict'; return LazoView.extend({ events: { 'click .navbar-nav a': 'navigate' }, afterRender: function () { var self = this; this.setActiveLink(); }, navigate: function (e) { ...
JavaScript
0
@@ -339,68 +339,8 @@ s;%0A%0A - this.$('.navbar-nav li').removeClass('active');%0A @@ -603,24 +603,84 @@ ion ($el) %7B%0A + this.$('.navbar-nav li').removeClass('active');%0A
02a4439589d53e95457b24dd712941fda9d724f5
Remove junk
website/static/js/app.js
website/static/js/app.js
/** * app.js * Knockout models, ViewModels, and custom binders. */ //////////// // Models // //////////// /** * The project model. */ var Project = function(params) { var self = this; self._id = params._id; self.apiUrl = params.apiUrl; self.watchedCount = ko.observable(params.watchCount); se...
JavaScript
0.00005
@@ -1098,938 +1098,8 @@ ams%0A - self._actionTemplates = %7B%0A project_created: %22created %22 + self.nodeCategory +%0A %22%3Ca href='%22 + self.nodeUrl + %22'%3E%22 +%0A self.nodeTitle +%0A %22%3C/a%3E%22,%0A ...
5098510f96bbaf30074cf77efdee007c743c3e93
Update PushwooshAndroid.js
www/js/PushwooshAndroid.js
www/js/PushwooshAndroid.js
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
JavaScript
0.000001
@@ -1600,17 +1600,16 @@ 48053044 - %22, appid
cd458965b088c32f540fd89a64f9e810cdd052fa
remove obsolete call to clearUndo
webui/task-management.js
webui/task-management.js
var task_desc; // A string describing the current task sessions.custom = {tasks: []}; var tasks_saved = {}; var tasks_solved = {}; var custom_rules = {}; var funnyUnicodeCharacters="☃⚛⚾♛♬☏⚒☸☀☮☘☭"; function saveTask() { if (task_desc) { tasks_saved[task_desc] = _.omit(graph.toJSON(), 'loading'); tasks_solve...
JavaScript
0.000001
@@ -1406,23 +1406,8 @@ %7D%0A%0A - clearUndo();%0A //
44c5013ebe47c3d1e40b19e8c0d2c72fe4325494
Create database reference and add static methods to model.
examples/level.js
examples/level.js
'use strict'; const levelco = require('level-co'); const memdown = require('memdown'); const model = require('../'); var attributes = { username: 'me', email: 'me@gmail.com', password: 'mepass' }; const properties = Object.keys(attributes); const User = model.createMolde('User', properties);
JavaScript
0
@@ -110,16 +110,124 @@ ('../'); +%0Aconst db = levelco.deferred(%0A 'db',%0A %7B%0A db: function (l) %7B%0A return new (memdown)(l);%0A %7D%0A %7D%0A); %0A%0Avar at @@ -381,11 +381,11 @@ teMo -l de +l ('Us @@ -402,9 +402,138 @@ rties);%0A +const access = %7B%0A get: function *() %7B yield null; %7D...
6caba56f5e4f083cc2e884e79159c8c792507740
Update youtube.js
res/js/front/youtube.js
res/js/front/youtube.js
function startVideoProgress() { if (!videoPaused) { actionTimers.clear(); videoProgress(); } else { actionTimers.clear(); videoProgress(); actionTimers.pause(); } } var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.get...
JavaScript
0
@@ -1,16 +1,593 @@ +/**%0A Copyright 2018 LNFWebsite%0A Licensed under the Apache License, Version 2.0 (the %22License%22);%0A you may not use this file except in compliance with the License.%0A You may obtain a copy of the License at%0A http://www.apache.org/licenses/LICENSE-2.0%0A Unless required by applica...
55ef1b604466e68bf395ca2ca4ef943269348c5a
fix some scope issues in js command
commands/js.js
commands/js.js
var config = require("../config.js"); var post = require("../flowdock.js").post; var dbConnect = require("../utility.js").dbConnect; var when = require("../when.js"); var commands = require("../commands.js"); var sandbox = new (require("sandbox"))(); var shortcircuit = false; module.exports = { description: "js {nam...
JavaScript
0.000001
@@ -718,24 +718,343 @@ on(error) %7B%0A +%09%09%09%09%0A%09%09%09%09function deleteFunction(name, callback) %7B%0A%09%09%09%09%09db.run(%22UPDATE js SET deleted = 1 WHERE deleted = 0 AND name = ?%22, name, function(error) %7B%0A%09%09%09%09%09%09if (error) %7B%0A%09%09%09%09%09%09%09console.error(%22Error deleting js ...
d40ae617025d0ff95ee3c326a6f9c5c36faa298f
Remove Back link
src/components/player/VideoPlayer.js
src/components/player/VideoPlayer.js
import React from 'react'; import { findDOMNode } from 'react-dom'; import {Link} from 'react-router'; import ReactPlayer from 'react-player'; import Duration from './Duration' import screenfull from 'screenfull'; class VideoPlayer extends React.Component { constructor(props, context){ super(props, cont...
JavaScript
0
@@ -2712,16 +2712,19 @@ +%7B/* %3Cp%3E%3CLink @@ -2747,16 +2747,19 @@ ink%3E%3C/p%3E +*/%7D %0A
90b6dae2776a69c3623b6e11cc61601bac60857d
Fix being not able to use contextmenu after reload
src/init.js
src/init.js
// Entry point of the application var parser = require('./parser'); var Renderer = require('./renderer'); var Interpreter = require('./interpreter'); var Predictor = require('./predictor'); var Monitor = require('./monitor'); var ToolBox = require('./toolbox'); var Viewport = require('./viewport'); var ContextMenu = r...
JavaScript
0
@@ -1504,32 +1504,69 @@ rer = renderer;%0A + contextmenu.renderer = renderer;%0A playback.ren
03f9075fe5b526a59c874c8cd76f4f9dea8429f3
Fix scroll being at an awkward position when switching back from print-friendly
static/js/main.js
static/js/main.js
const renderer = new marked.Renderer(); const katexOpts = { throwOnError: false, errorColor: '#F44336', }; renderer.code = function(code) { try { const r = katex.renderToString(code, { displayMode: true, ...katexOpts, }); return `<blockquote class="katex-block">${r}</blockquote>`; } catc...
JavaScript
0
@@ -1235,24 +1235,51 @@ rintable');%0A + window.scrollTo(0, 0);%0A event.pr
885738a710579a8f556473e14828368307fee21e
fix templating bug
corehq/apps/accounting/static/accounting/js/pricing_table.js
corehq/apps/accounting/static/accounting/js/pricing_table.js
hqDefine('accounting/js/pricing_table', function () { var pricingTableModel = function (editions, current_edition, isRenewal) { 'use strict'; var self = {}; self.currentEdition = current_edition; self.isRenewal = isRenewal; self.editions = ko.observableArray(_.map(editions, ...
JavaScript
0.000001
@@ -3491,20 +3491,20 @@ return -this +self ;%0A %7D;
530c9d8ebfdf9124227ccd550d3665378385905d
Fix QTable bottom (#1593)
src/components/table/table-bottom.js
src/components/table/table-bottom.js
import { QSelect } from '../select' import { QBtn } from '../btn' import { QIcon } from '../icon' export default { methods: { getBottom (h) { if (this.hideBottom) { return } if (this.nothingToDisplay) { const message = this.filter ? this.noResultsLabel || this.$q.i18n...
JavaScript
0
@@ -1143,16 +1143,21 @@ ss: 'col +-auto ' %7D, %5B%0A @@ -1379,16 +1379,25 @@ Class: ' +col-auto flex ite @@ -1401,24 +1401,32 @@ items-center + no-wrap ' %7D, %5B%0A
96981e2ddd394d8c671c621f9ce594e3a3752c48
add forgotten googledrive
src/init.js
src/init.js
require('./i18n'); require('./syncedgetputdelete'); require('./eventhandling'); require('./util'); require('./wireclient'); require('./sync'); require('./modules'); require('./baseclient'); require('./caching'); require('./cachinglayer'); require('./dropbox'); require('./indexeddb'); require('./inmemorystorage'); requi...
JavaScript
0.000001
@@ -1,20 +1,65 @@ +module.exports = require('./remotestorage');%0A require('./i18n');%0Ar @@ -295,24 +295,50 @@ /dropbox');%0A +require('./googledrive');%0A require('./i @@ -556,24 +556,24 @@ discover');%0A + require('./a @@ -588,49 +588,4 @@ ');%0A -module.exports = require('./remotestorage');%0A
35c083122ef678d4db4b71ced4985c73ac072abe
Add function to automatically add/rm the coarse class
static/js/main.js
static/js/main.js
window.onload = function() { var container = document.querySelector('#toc'); if (container != null) { var toc = initTOC({ selector: 'h2, h3', scope: '.post', overwrite: false, prefix: 'toc' }); var heading = document.createElement("H2"); var heading_text = document....
JavaScript
0
@@ -458,14 +458,472 @@ d(toc);%0A - %7D +%0A resize_toc(container);%0A %7D%0A%7D%0A%0Afunction resize_toc(container) %7B%0A var containerHeight = container.clientHeight;%0A%0A var resize = function() %7B%0A if (containerHeight %3E document.documentElement.clientHeight - 100) %7B%0A container.classList.a...
96cf1b7952f1d64d5f2ba5d466b36681d6cb2953
Return polling
static/js/vole.js
static/js/vole.js
(function ($, Ember) { var cl = console.log.bind(console); var App = Ember.Application.create({ LOG_TRANSITIONS: true, rootElement: '#ember-container' }); window.App = App; //------------------------- // Store //------------------------- App.Store = DS.Store.extend({ revision: 12, ada...
JavaScript
0.000003
@@ -3812,18 +3812,16 @@ -// setTimeo
27122296fd14e3017045bf1981bdb7be92c0803c
Update tool.js
common/tool.js
common/tool.js
var bcrypt = require('bcrypt'); var moment = require('moment'); moment.locale('zh-cn'); // 使用中文 // 格式化时间 exports.formatDate = function (date, friendly) { date = moment(date); if (friendly) { return date.fromNow(); } else { return date.format('YYYY-MM-DD HH:mm'); } }; exports.validateAccount = funct...
JavaScript
0.000001
@@ -413,24 +413,26 @@ llback) %7B%0A +// bcrypt.hash( @@ -509,16 +509,18 @@ ck) %7B%0A +// bcrypt.c
1f24f4303e453c1b19558ec47da86b2f833bc0c8
remove unused code
statusbar_test.js
statusbar_test.js
/*global describe it before after apf bar = */ "use client"; require(["lib/architect/architect", "lib/chai/chai"], function (architect, chai) { var expect = chai.expect; expect.setupArchitectTest([ { packagePath: "plugins/c9.core/c9", workspaceId: "ubuntu/ip-10-35-77-180",...
JavaScript
0.000017
@@ -2326,149 +2326,8 @@ ) %7B%0A - apf.config.setProperty(%22allow-select%22, false);%0A apf.config.setProperty(%22allow-blur%22, false);%0A %0A
f903478696e2fb186cb343283f99d35e150ed1a5
fix build
cli/commands/build.js
cli/commands/build.js
'use strict'; const path = require('path'); const spawnSync = require('child_process').spawnSync; const rollup = require('rollup'); const babel = require('rollup-plugin-babel'); const nodeResolve = require('rollup-plugin-node-resolve'); const commonjs = require('rollup-plugin-commonjs'); const ...
JavaScript
0.000001
@@ -41,24 +41,59 @@ re('path');%0A +const fs = require('fs');%0A const spawnS @@ -1274,16 +1274,132 @@ rget) %7B%0A + let packageJson = path.join(target, 'package.json');%0A global.log.debug(%7B packageJson %7D, 'writing package.json');%0A fs.wri @@ -1409,22 +1409,27 @@ ileSync( -target +packageJson ...
08bdbf915156ccd3c25678300c1b1fe199075f21
disable socket.io debug and fix keycode/data messup
multiplayer.js
multiplayer.js
#!/usr/bin/env node var io = require('socket.io').listen(1338); var sys = require('sys'); var exec = require('child_process').exec; // how many seconds before RNG kicks in /* var rngTimerSeconds = 10; // wait until rngTimerSeconds from last player input var rngTimer; // repeats RNG keypresses var rngInterval; */ /* 1...
JavaScript
0
@@ -55,16 +55,32 @@ ten(1338 +, %7B log: false %7D );%0Avar s @@ -826,16 +826,17 @@ turn '11 +1 ';%0A%09%09cas @@ -1069,39 +1069,36 @@ ress = function( -keycode +data ) %7B%0A%09console.log @@ -1102,29 +1102,12 @@ log( -%22keyPress %22 + keycode +data );%0A%09 @@ -1131,39 +1131,36 @@ s -k %22 + getKey( -keycod...
fa0e6f3348d4caf6f42a7ad1be1041345f32eba5
Fix nested function comma bug; closes #494
src/rules/function-comma-space-after/index.js
src/rules/function-comma-space-after/index.js
import valueParser from "postcss-value-parser" import { declarationValueIndexOffset, report, ruleMessages, styleSearch, validateOptions, whitespaceChecker, } from "../../utils" export const ruleName = "function-comma-space-after" export const messages = ruleMessages(ruleName, { expectedAfter: () => `Exp...
JavaScript
0.000024
@@ -1256,88 +1256,162 @@ -const functionOffset = declarationValueIndexOffset(decl)%0A%0A const cssFunctions +valueParser(decl.value).walk(valueNode =%3E %7B%0A if (valueNode.type !== %22function%22) %7B return %7D%0A%0A let functionArguments = (() =%3E %7B%0A let result = v @@ -1424,27 +1424...
9df1c737ff249293d1c3e6b1b00745940d748ec4
Remove trailing zero from number
lib/elements/number-range.js
lib/elements/number-range.js
'use babel' import {CompositeDisposable, Emitter, Disposable} from 'atom' import {debounce, disposableEvent} from '../helpers' export default class NumberRange { constructor(match, textEditor) { this.subscriptions = null this.active = false this.element = NumberRange.getElement(match) this.element....
JavaScript
0.000007
@@ -736,18 +736,105 @@ ce(- -3 +2 ) === ' -. 0 +0') %7B%0A newValue = newValue.slice(0, -3)%0A %7D else if (newValue.slice(-1) === ' 0') @@ -865,33 +865,33 @@ Value.slice(0, - -3 +1 )%0A %7D%0A
67cb93a4b582684144d5f2bd298653e471ebb6d2
Fix select control prop types
app/pages/search/controls/SelectControl.js
app/pages/search/controls/SelectControl.js
import React, { PropTypes } from 'react'; import ControlLabel from 'react-bootstrap/lib/ControlLabel'; import FormGroup from 'react-bootstrap/lib/FormGroup'; import Select from 'react-select'; import isArray from 'lodash/isArray'; import { injectT } from 'i18n'; const getValue = (value, options) => { if (value) { ...
JavaScript
0.000001
@@ -1788,16 +1788,17 @@ eOfType( +%5B PropType @@ -1826,28 +1826,9 @@ rray -Of(PropTypes.string) +%5D ),%0A%7D
439e5609c18041ba4b42fb32d3dc26a6d1af8e74
Remove apikey parameter in submitApiData()
assets/js/_functions.js
assets/js/_functions.js
/* Function to check API key */ var checkApiKey = function(input, callback) { var apiKey = input; $.ajaxSetup({ beforeSend: function(xhr) { xhr.setRequestHeader('X-AUTH', apiKey); } }); // Send request to check API key and also store the Xuid on success $.get('https:/...
JavaScript
0
@@ -4009,16 +4009,8 @@ on ( -apikey, endp
54e9ed76a16b9bbfa7f787af0995d1f035d850ec
fix safari bug
public/app/services/ivleService.js
public/app/services/ivleService.js
"use strict"; angular.module("schoolines").factory("IVLEService", function($q, $http, $location, $cookies, $httpParamSerializer, $localStorage, Session) { var ivleService = {}; const ivle_api_key = "UY5RaT4yK3lgWflM47CJo"; /* Login Function */ ivleService.getLoginUrl = function() { var loginLi...
JavaScript
0.000001
@@ -183,13 +183,11 @@ -const +var ivl
8e178c57ffa420e5b0af794f4c688bfe04d46494
Support the insertion of 0
assets/js/btree-node.js
assets/js/btree-node.js
// constructor // don't call this directly, call BTree::createNode instead var BTreeNode = function(tree, keys, children, parent){ var newNode = Object.create(BTreeNode.prototype); newNode.tree = tree; newNode.keys = keys || []; newNode.children = children || []; // apparently fixed arrays are bad in JS newNo...
JavaScript
0.000003
@@ -1036,22 +1036,18 @@ lue) - %7C%7C 0 ; +%0A %0A if ( int @@ -1046,16 +1046,33 @@ f ( -int %3C= 0 +typeof value !== %22number%22 %7C%7C
020085a6d5e107548da3884e77524df02bf235d6
Handle undefined options in hide().
util/jquery-animate.js
util/jquery-animate.js
/* Animate views */ var transitionend = 'transitionend oTransitionEnd webkitTransitionEnd'; $(document).on(transitionend, '.animate', function() { $(this).dequeue(); }); function transition($el) { // check if transition duration > 0, otherwise finish animation parseFloat($el.css('transition-duration')) || $el.deq...
JavaScript
0
@@ -2051,32 +2051,43 @@ ) %7B%0A%09%09if(options + && options .animateHeight)
b1dcf4848b130c041354b4ad1171ccaec0734a8b
Disable screen filter on blind mode
MapService/WebContent/js/screen_filter.js
MapService/WebContent/js/screen_filter.js
/******************************************************************************* * Copyright (c) 2014, 2017 IBM Corporation, Carnegie Mellon University and * others * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software...
JavaScript
0.000001
@@ -1469,24 +1469,122 @@ tion(crd) %7B%0A +%09%09if ($hulop.mobile && $hulop.mobile.getPreference('user_mode') == 'user_blind') %7B%0A%09%09%09return;%0A%09%09%7D%0A %09%09var start_
e727ef67f0fac305e73d6f529cb1fe9f9b6fe214
add maxAge parameter for token checking
lib/externalGradingSocket.js
lib/externalGradingSocket.js
const ERR = require('async-stacktrace'); const _ = require('lodash'); const config = require('./config'); const csrf = require('./csrf'); const question = require('./question'); const logger = require('./logger'); const socketServer = require('./socket-server'); const sqldb = require('./sqldb'); const sqlLoader = requ...
JavaScript
0
@@ -3644,20 +3644,45 @@ retKey, -null +%7BmaxAge: 24 * 60 * 60 * 1000%7D );%0A i
d7f069d4cdb7fe551bd9d407a08d57d344a0a43a
Add rollbackSettings to effect dependencies list.
assets/js/components/settings/SettingsRenderer.js
assets/js/components/settings/SettingsRenderer.js
/** * Settings Renderer component. * * Site Kit by Google, Copyright 2020 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-2...
JavaScript
0
@@ -1824,16 +1824,34 @@ %09%7D%0A%09%7D, %5B + rollbackSettings, haveSet
4e919dab110091f7ae7871a83462506be300e2f3
Add public option to webpack-dev-server
packages/client/webpack.config.js
packages/client/webpack.config.js
/* eslint-disable import/no-extraneous-dependencies */ const webpack = require('webpack'); const path = require('path'); const waitOn = require('wait-on'); const HardSourceWebpackPlugin = require('hard-source-webpack-plugin'); const MiniCSSExtractPlugin = require('mini-css-extract-plugin'); const ManifestPlugin = requ...
JavaScript
0.000001
@@ -5775,24 +5775,64 @@ hot: true,%0A + public: %60localhost:$%7BwebpackPort%7D%60,%0A publicPa
cd3fa8076260111b22803a7c4c05b645f8eb1dc6
Fix bug where word-wrapping would not properly activate until window is resized
public/assets/default/js/thread.js
public/assets/default/js/thread.js
var posteditor; /** * Update the width of post-content elements. * A limit must be applied with Javascript so word-wrapping works. */ function updatePostWidth() { // Stop allowing wrapping in the middle of words $(".post .post-content").css("word-break", "inherit"); $(".post .post-content").css("width...
JavaScript
0
@@ -266,15 +266,14 @@ %22, %22 -inherit +normal %22);%0A @@ -2305,12 +2305,64 @@ Width);%0A + updatePostWidth(); // initial post width update%0A %7D);%0A
00350d505a3dfc5ffdff1c81074f325387c0f1bf
cax ellipse position
packages/cax/cax/svg/ellipse.js
packages/cax/cax/svg/ellipse.js
import Ellipse from '../render/display/shape/ellipse' import { parseStyle } from './parse-style' import { transform } from './parse-transform' import { parseEvent } from './parse-event' export function ellipse(props, scope) { const options = Object.assign( { rx: 0, ry: 0, cx: 0, cy: 0 ...
JavaScript
0.998976
@@ -563,34 +563,76 @@ ions.cx) -, Number(options.c + - Number(options.rx), Number(options.cy) - Number(options.r y))%0A pa
a08b36e0e1ffcb1b3ddc72c1b4888de93beb180c
Remove debugg statements
exporter/index.js
exporter/index.js
const express = require('express'); const puppeteer = require('puppeteer'); // eslint-disable-line const validate = require('express-validation'); const Joi = require('joi'); const bodyParser = require('body-parser'); const cors = require('cors'); const httpCommon = require('_http_common'); const _ = require('lodash');...
JavaScript
0.000001
@@ -676,176 +676,8 @@ l;%0A%0A -console.log(process.env.SENTRY_DSN);%0Aconsole.log(process.env.SENTRY_RELEASE);%0Aconsole.log(process.env.SENTRY_ENVIRONMENT);%0Aconsole.log(process.env.SENTRY_SERVER_NAME);%0A if ( @@ -1129,16 +1129,51 @@ ient();%0A + console.log('Sentry initiated');%0A %7D%0A%0Aconst
f884d9bcf5a181210078326521770a7de0ed2e40
Change REST API呼び出し部分をmongooseに変更した
app/api/article/article.controller.js
app/api/article/article.controller.js
'use strict'; exports.findAll = function(req, res, next) { req.collections.articles.find({}, { sort: { _id: -1 } }).toArray((err, articles) => { if(err) return next(err); res.json({ articles: articles }); }); } exports.update = function(req, res, next) { req.collections.article...
JavaScript
0
@@ -8,16 +8,64 @@ rict';%0A%0A +var Article = require('../../models/article');%0A%0A exports. @@ -107,40 +107,23 @@ %7B%0A -req.collections.a +A rticle -s .find(%7B%7D , %7B%0A @@ -122,22 +122,20 @@ d(%7B%7D -, %7B +) %0A +. sort -: +( %7B%0A @@ -155,73 +155,50 @@ %7D +) %0A -%7D).toArray((err...
ce79ade7301f01f386e2a7bee530e471039a73ee
Use function.bind() where appropriate.
initialize.js
initialize.js
// This script should be run when the user logs in. // E.g. Trigger on "Welcome to Genesis". var Tasks = function () { var list = []; this.resume = function () { var fn = list.pop(); if (!fn) return false; fn.apply(null, arguments); return true; }; this.clear = function () { list = []; ...
JavaScript
0
@@ -576,20 +576,20 @@ %7B%0A var -send +conn = gwc.c @@ -601,21 +601,16 @@ tion -.send ;%0A var exec @@ -609,74 +609,24 @@ var -exec = function (cmd) %7B%0A return function () %7B send(cmd); %7D;%0A %7D +send = conn.send ;%0A%0A @@ -653,21 +653,32 @@ north = -exec( +send.bind(conn, 'north') @@ -69...
5e4a8756f307d2db10cfdea1ea1d5aa70d2ce460
Add constuctor params to FileUploadResult related to CB-2421
www/FileUploadResult.js
www/FileUploadResult.js
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); y...
JavaScript
0
@@ -855,48 +855,75 @@ */%0A -var FileUploadResult = function() %7B%0A +module.exports = function FileUploadResult(size, code, content) %7B%0A%09 this @@ -939,15 +939,15 @@ t = -0;%0A +size;%0A%09 this @@ -966,18 +966,15 @@ e = -null;%0A +code;%0A%09 this @@ -989,49 +989,16 @@ e = -null;%0A%7D;%0A...
fddcaded3753be0b1d35c5c5276b00c5dd7f7eab
Fix missing function name
lib/frontend/rest-adaptor.js
lib/frontend/rest-adaptor.js
var defaultCommands = require('./default-commands/rest'); function createHandler(params) { params = params || {}; var connection = params.connection; var command = params.command; var requestBuilder = params.requestBuilder; if (!requestBuilder) throw new Error('no request builder for ' + command); re...
JavaScript
0.999999
@@ -1264,20 +1264,19 @@ exports. -find +get Register @@ -1293,12 +1293,11 @@ d = -find +get Regi
0f0db4089dd9aadd22e3bfe5c5a9f2daa5f3fd34
Update wallpaper.js
www/wallpaper.js
www/wallpaper.js
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); y...
JavaScript
0
@@ -903,18 +903,16 @@ aper() %7B -%0A%0A %7D%0A%0Awallp @@ -960,17 +960,17 @@ base64) - +%0A %7B%0A%09var s @@ -1101,24 +1101,26 @@ erties.push( +%0A%09 %7B%0A%09%09image%0A%09%7D @@ -1120,41 +1120,9 @@ mage -%0A%09%7D);%0A%09dependentProperties.push(%7B +, %0A%09%09b @@ -1204,17 +1204,18 @@ (image) - +%0A...
d173d46e9b5d7aeece8af6ecc0782a454ca23c51
Add logic to show and hid module based on voice command.
modules/trafficincidents/trafficincidents.js
modules/trafficincidents/trafficincidents.js
Module.register("trafficincidents", { defaults: { baseUrl: "http://www.mapquestapi.com/traffic/v2/incidents?key=", CK: "0MfvxPkvBhP7qwk0n7uNKAxVZzlSBXkQ", TL: "40.71", TR: "-73.999", BL: "40.69", BR: "-74.02" }, getHeader: function(){ return this.data.header //This is gonna be added ...
JavaScript
0
@@ -190,18 +190,17 @@ : %22-73.9 -99 +7 %22,%0A B @@ -207,17 +207,17 @@ L: %2240.6 -9 +7 %22,%0A B @@ -1216,16 +1216,66 @@ efaults) +;%0A this.show();%0A %7Delse%7B%0A this.hide(); %0A %7D%0A @@ -1586,16 +1586,42 @@ Dom(0);%0A + this.incidents = %5B%5D%0A %7D%0A
35d7a3d13cbc5c60277609cf681e2d169c572c31
Add localStorage support for saving schema/data during reload
draft5/app/controllers/ValidatorController.js
draft5/app/controllers/ValidatorController.js
'use strict'; var app = angular.module('app', false); app.controller('validatorController', function ($scope, $http, $window) { var ajv = $window['ajv']; var validator = ajv({v5: true, verbose:true, allErrors:true}); var YAML = $window['YAML']; var self = this; this.reset = function() { self.document...
JavaScript
0
@@ -251,27 +251,215 @@ '%5D;%0A -%0A var self = this; + var ls = $window%5B'localStorage'%5D;%0A%0A var self = this;%0A %0A if (ls.getItem('data')) %7B%0A self.document = ls.getItem('data');%0A %7D%0A %0A if (ls.getItem('schema')) %7B%0A self.schema = ls.getItem('schema');%0A %7D %0A%0A @@ -530,16 +5...
3de6b5344c59c188822530a8ffee3ee6d9a01f3d
make link's href available
src/link.js
src/link.js
var utils = require('./utils'); var _ = require('lodash'); function Link(desc) { "use strict"; function has(key) { return key in desc; } function validate(key, type) { return _['is' + type].call(undefined, desc[key]); } if (!utils.isObjectLiteral(desc)) { throw new TypeError('Invalid paramet...
JavaScript
0.000001
@@ -499,21 +499,17 @@ = true;%0A - %0A +%0A %0A if (h @@ -855,16 +855,24 @@ 'title', + 'href', 'hrefla
c946d5178e88fdecffd0a72c12b11a342c75694f
allow encoding sortable values with identifiers hidden behind a null character - this comes at a 16% performance hit
naturalSort.js
naturalSort.js
/* * Natural Sort algorithm for Javascript * Version 0.3 * Author: Jim Palmer (based on chunking idea from Dave Koelle) * optimizations and safari fix by Mike Grier (mgrier.com) * Released under MIT license. */ function naturalSort(a, b){ // setup temp-scope variables for comparison evauluation var r...
JavaScript
0
@@ -335,16 +335,48 @@ %5D+)/g,%0D%0A +%09%09nC = String.fromCharCode(0),%0D%0A %09%09x = a. @@ -391,32 +391,45 @@ ().toLowerCase() +.split(nC)%5B0%5D %7C%7C '',%0D%0A%09%09y = b @@ -457,46 +457,27 @@ se() - %7C%7C '',%0D%0A%09%09nC = String.fromCharCode(0) +.split(nC)%5B0%5D %7C%7C '' ,%0D%0A%09
b288d0157362750fef6da577c3d45919e8f6cddc
fix nav global on mobile
assets/js/global-nav.js
assets/js/global-nav.js
/* ========================================================== * global-nav.js * Global Navigation syripts * * Author: Toni Fisler, toni@antistatique.net * Date: 2014-05-27 16:36:15 * * Copyright 2014 Federal Chancellery of Switzerland * Licensed under MIT =====================================================...
JavaScript
0
@@ -401,39 +401,11 @@ p = -$('.nav-mobile').offset().top;%0A +36; %0A%0A @@ -505,105 +505,307 @@ -$('.nav-mobile').addClass('fixed');%0A %7D%0A else %7B%0A $('.nav-mobile').removeClass('fixed'); +if (!$('.nav-mobile').hasClass('fixed')) %7B%0A $('.nav-mobile').addClass('fixed').after('%3Cdi...