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
44961c2780748726db65c43b176255be3a0de333
use less resources to update timestamps
lib/timeAgo.js
lib/timeAgo.js
const Value = require('mutant/value') const computed = require('mutant/computed') const nest = require('depnest') const human = require('human-time') exports.gives = nest('lib.obs.timeAgo') exports.create = function (api) { return nest('lib.obs.timeAgo', timeAgo) function timeAgo (timestamp) { var timer ...
JavaScript
0
@@ -454,9 +454,10 @@ sh, -5 +30 e3)%0A @@ -546,16 +546,42 @@ %7D%0A + %7D, %7B%0A idle: true%0A %7D)%0A%0A
631e133f449220b943bffbcdbf9f247e2c35c4c3
support for using websocket to connect plugin ui server
lib/upgrade.js
lib/upgrade.js
var handleWebsocket = require('./https').handleWebsocket; var hparser = require('hparser'); var Buffer = require('safe-buffer').Buffer; var pluginMgr = require('./plugins'); var util = require('./util'); var config = require('./config'); var formatHeaders = hparser.formatHeaders; var getRawHeaderNames = hparser.getRaw...
JavaScript
0
@@ -1330,17 +1330,23 @@ nByName( -n +pluginN ame) : p @@ -1364,17 +1364,23 @@ tPlugin( -n +pluginN ame + ':
ad2fe720cdc0d5e140489c5f986506e44ec1ef64
add salmon links to rss feed
server/api/social_butterfly/feed.js
server/api/social_butterfly/feed.js
import constants from '../../../shared/constants'; import { buildUrl, contentUrl, profileUrl } from '../../../shared/util/url_factory'; import crypto from 'crypto'; import endpointWithApollo from '../../util/endpoint_with_apollo'; import gql from 'graphql-tag'; import { graphql } from 'react-apollo'; import { NotFoundE...
JavaScript
0
@@ -1506,59 +1506,215 @@ nst -feedUrl = buildUrl(%7B req, pathname: req.originalUrl +acct = %60acct:$%7Busername%7D@$%7Breq.get('host')%7D%60;%0A const feedUrl = buildUrl(%7B req, pathname: req.originalUrl %7D);%0A const salmonUrl = buildUrl(%7B req, pathname: '/api/social/salmon', searchParams: %7B q: acct %7D...
e7a0e86518c74ce07f4c453dc928c52752abfe85
Make the login form more robust to failed logins
clients/web/src/views/layout/LoginView.js
clients/web/src/views/layout/LoginView.js
import $ from 'jquery'; import _ from 'underscore'; import View from 'girder/views/View'; import events from 'girder/events'; import { handleClose, handleOpen } from 'girder/dialog'; import { login } from 'girder/auth'; import UserModel from 'girder/models/UserModel'; import LoginDialogTemplate from 'girder/templates...
JavaScript
0
@@ -623,39 +623,201 @@ -login(this.$('#g-login').val(), +this.$('#g-login-button').girderEnable(false);%0A this.$('.g-validation-failed-message').text('');%0A%0A const loginName = this.$('#g-login').val();%0A const password = thi @@ -840,19 +840,17 @@ ').val() -);%0A +; %0A ...
593caa2518c20ccf9e51b3e6ae07b089d779ee42
Update ga-controller.js
server/controllers/ga-controller.js
server/controllers/ga-controller.js
var { google } = require("googleapis"); var ga = google.analytics("v3"); var moment = require("moment"); module.exports = function (app) { var gaQuery = function (req, res, options) { var jwt = new google.auth.JWT( options.serviceEmail, options.pemFilename, null, ["...
JavaScript
0.000001
@@ -1,18 +1,14 @@ var - %7B google - %7D = r @@ -1603,17 +1603,16 @@ RNsight%22 -, %0A @@ -1916,17 +1916,16 @@ %22GRNmap%22 -, %0A
bef06668457e342028d0ba8555a85b11001367bc
add routes
bob/routes.js
bob/routes.js
/* Here comes the API. */ app.get('/api/getBasemaps', function (req, res) { // Hier müsste man die Basemaps holen res.send('Hello World!'); }); app.get('/api/getEinsatz/:EinsatzID/', function(req, res){ // Beispiel wie das mit den Parametern läuft ;-) var einsatzid = req.params.EinsatzID; });
JavaScript
0.000006
@@ -17,19 +17,17 @@ the API. -%09%0A%09 +%0A %0A*/%0A%0A%0Aap @@ -112,17 +112,16 @@ ps holen -%09 %0A%0A res. @@ -208,18 +208,17 @@ , res)%7B%0A -%09 %0A + %09// Beis @@ -259,18 +259,17 @@ uft ;-)%0A -%09 %0A + %09var ein @@ -304,11 +304,1010 @@ D;%0A%0A -%09%0A%09 +%0A%0A%7D);%0A%0A/* liefert liste mit den...
dd82c529b15e32994496ec13d27b94fd88ed8e95
remove unused cookie
app/js/controllers/parameterButtonCtrl.js
app/js/controllers/parameterButtonCtrl.js
/** * Created by stefas on 19/05/15. */ angular.module('myApp.controllers') .controller('ParameterButtonCtrl', ['$sce', '$scope', '$http', 'defaults', '$controller', 'Session', function ($sce, $scope, $http, defaults, $controller, Session) { $controller('CommonCtrl', { ...
JavaScript
0.000002
@@ -590,242 +590,8 @@ e(), -%0A exp = new Date(now.getFullYear(), now.getMonth() + 1, now.getDate());%0A%0A Cookies.set(%22use.default.video.path%22, $scope.model.useDefaultVideoPath, %7B%0A expires: exp%0A %7D); %0A%0A
4d2895cc0c529e374ae8bc25eb3ff0873c5a04a2
Clean code (api)
api/data.js
api/data.js
const fs = require('fs'); const got = require('got'); const unzipper = require('unzipper'); const chalk = require('chalk'); const debug = require('./utils/debug.js'); const db = require('./db.js'); // Update GTFS data. async function update(cb) { debug.info(`Starting data update`); debug.time('update'); debug.t...
JavaScript
0.000001
@@ -257,17 +257,17 @@ ug.info( -%60 +' Starting @@ -278,17 +278,17 @@ a update -%60 +' );%0A%09debu @@ -563,18 +563,24 @@ e into t +e mp +orary folder. @@ -836,21 +836,16 @@ - 1) %7B%0A -%09%09%09%09%0A %09%09%09%09debu @@ -890,21 +890,16 @@ eted');%0A -%09%09%09%09%0A %09%09%09%09retu @@ -926,21 +926,16 @...
174c4ee167d398acefa4d21631a696b62ff7e4ee
fix email finding script
app/scripts/controllers/subscriberInfo.js
app/scripts/controllers/subscriberInfo.js
/************** Copyright 2016 Open Effect Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, so...
JavaScript
0.000992
@@ -2266,16 +2266,19 @@ REGEX;%0A + // $transl @@ -2283,21 +2283,22 @@ slate('s -tatus +ubject .emailFi @@ -2369,35 +2369,23 @@ Exp( -%22/%22 + emailField + %22 +/email /i -%22 );%0A + // %7D); @@ -2627,16 +2627,30 @@ title'%5D. +toLowerCase(). match(em @@ -2726,24 +2726,51 @@ %5D%5B'value'%5D;%0A + ...
96b9f6c3debecafcc2926243c1fa3d62ebff2d46
Save staled authentication replay flag for later verification
src/RequestSender.js
src/RequestSender.js
/** * @fileoverview Request Sender */ /** * @augments JsSIP * @class Class creating a request sender. * @param {Object} applicant * @param {JsSIP.UA} ua */ JsSIP.RequestSender = function(applicant, ua) { this.ua = ua; this.applicant = applicant; this.method = applicant.request.method; this.request = a...
JavaScript
0
@@ -2893,16 +2893,27 @@ ge.stale + === 'true' ) ) %7B%0A @@ -3102,32 +3102,116 @@ se);%0A %7D%0A%0A + if (challenge.stale === 'true') %7B%0A this.staled = true;%0A %7D%0A%0A%0A if (resp
6c185106ac782e1f39dadfa9c69fe478cb47e728
Update app.js
desio/asilo_nido/app.js
desio/asilo_nido/app.js
// Code goes here var myApp = angular.module('myApp', ['angularUtils.directives.dirPagination']); function MyController($scope, $http,NgMap) { NgMap.getMap().then(function(map) { $scope.map = map; }); $scope.currentPage = 1; $scope.pageSize = 20; $scope.items = []; $http.get("entities.json") .then...
JavaScript
0.000002
@@ -143,72 +143,8 @@ %7B%0A%0A -NgMap.getMap().then(function(map) %7B%0A $scope.map = map;%0A %7D);%0A %0A $
0a95d06c2a4c2c2f5bffd9e31d0d279cbe5b900b
add autocomplete script by default
form.js
form.js
var j_forms = require('j-forms') ,fields = j_forms.fields ,widgets = j_forms.widgets ,mongoose = require('mongoose') ,_ = require('underscore') ,jest = require('jest'); var api_loaded = false; var api_path; var AdminForm = exports.AdminForm = j_forms.forms.MongooseForm.extend({ init: functio...
JavaScript
0
@@ -465,24 +465,90 @@ m.min.js');%0A + this.static%5B'js'%5D.push('/node-forms/js/autocomplete.js');%0A this
5d03539ad1fb34c246b3d7f729256c4370f1ad6d
Replace all tabs with spaces.
javascript/mailblock.js
javascript/mailblock.js
(function($) { $(document).ready(function(){ showHideButton(); $('.cms-tabset-nav-primary li').on('click', showHideButton); function showHideButton() { if ($('#Root_Mailblock_set').is(':visible')) { $('#Form_EditForm_action_mailblockTestEmail').show(); } else { $('#Form_EditForm_action_mailb...
JavaScript
0.000001
@@ -8,17 +8,20 @@ on($) %7B%0A -%09 + $(docume @@ -42,19 +42,24 @@ tion()%7B%0A -%0A%09%09 + showHide @@ -68,18 +68,24 @@ tton();%0A -%09%09 + $('.cms- @@ -141,13 +141,25 @@ n);%0A -%09%09%0A%09%09 + %0A func @@ -182,19 +182,28 @@ ton() %7B%0A -%09%09%09 + if ($(...
fed9ff29a9a2390146666ec19119836fa91cd96a
Add 3 movies in example, looks better
examples/starters/list/js/controllers.js
examples/starters/list/js/controllers.js
angular.module('listExample.controllers', []) // Controller that fetches a list of data .controller('MovieIndexCtrl', function($scope, MovieService) { // "MovieService" is a service returning mock data (services.js) // the returned data from the service is placed into this // controller's scope so the templ...
JavaScript
0.000001
@@ -138,24 +138,33 @@ MovieService +,$timeout ) %7B%0A %0A // @@ -443,16 +443,1320 @@ Movies%22; +%0A%0A // Method called on infinite scroll%0A // Receives a %22done%22 callback to inform the infinite scroll that we are done%0A $scope.loadMore = function(done) %7B%0A $timeout(function() %7B%0A $scope.m...
cde8bf8579a086bd952b3927c02241eef8c43375
Use state
src/TestComponent.js
src/TestComponent.js
import React, { Component } from 'react'; class Greeter extends Component { render() { return ( <h1>Hello, {this.props.name}!</h1> ); } } export class TestComponent extends Component { render() { return ( <div> <Greeter name="Ben222" /> </div> ); } }
JavaScript
0.000003
@@ -33,17 +33,16 @@ 'react' -; %0A%0Aclass @@ -145,63 +145,306 @@ ) -;%0A %7D%0A%7D%0A%0Aexport class TestComponent extends Component %7B +%0A %7D%0A%7D%0A%0Aclass ChatList extends Component %7B%0A render() %7B%0A var chats = this.props.data.map(%0A chat =%3E %3Cli%3E%7Bchat%7D%3C/li%3E%0A )%0A ...
af892e2365daa6b213c89b3bacdfaf4da777d1d6
Update the enemy bounds in the enemy class
src/js/Enemy.js
src/js/Enemy.js
'use strict'; /** * @description Enemy class => objects the player should avoid * @constructor * @param {number} x position of the enemy on the 'x' axis * @param {number} y position of the enemy on the 'y' axis * @param {number} speed speed factor of the enemy */ var Enemy = function (x,...
JavaScript
0.000001
@@ -922,16 +922,21 @@ s.right +- 10 && this @@ -952,16 +952,21 @@ ds.left ++ 10 ? this.s
ac7f76e29a2bd531da6598aef6e3a84b55fb1b85
Fix fusebox config
fuse.js
fuse.js
// const { // FuseBox, // SVGPlugin, // CSSPlugin, // BabelPlugin, // QuantumPlugin, // WebIndexPlugin, // EnvPlugin, // Sparky, // } = require('fuse-box') // let fuse, app, vendor, isProduction // Sparky.task('config', () => { // fuse = new FuseBox({ // homeDir: 'app/', // sourceMaps: !isPr...
JavaScript
0.000001
@@ -1,1442 +1,4 @@ -// const %7B%0A// FuseBox,%0A// SVGPlugin,%0A// CSSPlugin,%0A// BabelPlugin,%0A// QuantumPlugin,%0A// WebIndexPlugin,%0A// EnvPlugin,%0A// Sparky,%0A// %7D = require('fuse-box')%0A%0A// let fuse, app, vendor, isProduction%0A%0A// Sparky.task('config', () =%3E %7B%0A// fuse = new Fu...
b6da535e2061e73f76c1028330ed9aa3411280d7
fix copy and paste issue in Chrome and Safari
src/ace/TextInput.js
src/ace/TextInput.js
/** * Ajax.org Code Editor (ACE) * * @copyright 2010, Ajax.org Services B.V. * @license LGPLv3 <http://www.gnu.org/licenses/lgpl-3.0.txt> * @author Fabian Jakobs <fabian AT ajax DOT org> */ require.def("ace/TextInput", ["ace/lib/event"], function(event) { var TextInput = function(parentNode, host) { var tex...
JavaScript
0
@@ -1915,24 +1915,57 @@ ied = true;%0A + setTimeout(sendText, 0);%0A %7D;%0A%0A @@ -2094,24 +2094,57 @@ t.select();%0A + setTimeout(sendText, 0);%0A %7D;%0A%0A
6fe2e2c20ed2b6e3531df6de7f72a79b0b1e3228
fix timezone bug
tests/unit/components/bootstrap-datepicker-test.js
tests/unit/components/bootstrap-datepicker-test.js
import { run } from '@ember/runloop'; import { test, moduleForComponent } from 'ember-qunit'; import startApp from '../../helpers/start-app'; var App; moduleForComponent('bootstrap-datepicker', 'BootstrapDatepickerComponent', { unit: true, beforeEach: function() { App = startApp(); }, afterEach: function...
JavaScript
0.000001
@@ -2807,32 +2807,35 @@ .o.startDate.get +UTC Month(), startDa @@ -2832,32 +2832,35 @@ ), startDate.get +UTC Month(), 'sets i @@ -2974,32 +2974,35 @@ .o.startDate.get +UTC Month(), newStar @@ -3010,16 +3010,19 @@ Date.get +UTC Month(),
8b01cba77dc10ccb2810ddd085d7f4ce63a32ad2
refresh token on init
apis/nsw.js
apis/nsw.js
/** * @file apis/nsw.js * * @author fewieden * @license MIT * * @see https://github.com/fewieden/MMM-Fuel */ /** * @external node-fetch * @see https://www.npmjs.com/package/node-fetch */ const fetch = require('node-fetch'); /** * @external moment * @see https://www.npmjs.com/package/moment */ const mome...
JavaScript
0.000001
@@ -2110,24 +2110,50 @@ %7D%0A %7D%0A%0A + await refreshToken();%0A setInter
d5cedc87452e82c3bf54a4b14fc112dc3c4f5189
put paddle particle clean up in more obvious place.
polyball/shared/model/powerups/KingMidas.js
polyball/shared/model/powerups/KingMidas.js
/** * Created by ryan on 01/04/16. */ var inherits = require('inherits'); var Powerup = require('polyball/shared/model/powerups/Powerup'); var StyleCommons = require('polyball/shared/StyleCommons'); var _ = require('lodash'); var Events = require('polyball/shared/model/behaviors/Events'); /** * This powerup makes b...
JavaScript
0
@@ -4093,32 +4093,291 @@ %7D);%0A%0A + var foundEmitters = emitters.filter(function (emitter) %7B%0A return emitter.owner === self.owner;%0A %7D);%0A%0A foundEmitters.forEach(function(emitter) %7B%0A renderer.removeEmitter(emitter);%0A ...
dc5d42f40d2e71a49cf78539be57041d434679ec
Add completed JS exercise for printTriangle
solutions/printTriangle.js
solutions/printTriangle.js
/* Function name: printTriangle(count); Input: A number n Returns: Nothing Prints: A right triangle consisting of "*" characters that is "n" characters tall For example, printTriangle(4); should print * ** *** **** The printLine(); function is here to he...
JavaScript
0
@@ -641,52 +641,64 @@ %7B%0A -// You have to fill in the details here! =%5D +for (var i = 0; i %3C height; i++) %7B%0A printLine(i);%0A %7D %0A%7D%0A%0A @@ -806,17 +806,17 @@ riangle( -1 +2 ));%0A%0Acon @@ -921,33 +921,33 @@ g(printTriangle( -2 +3 ));%0A%0Aconsole.log @@ -1044,33 +1044,33 @@ g(printTriang...
fd6304bfd73ae6d1f7559a22186ac313978b64c7
add input autofocus
js/components/Header.js
js/components/Header.js
import React from 'react'; import classNames from 'classnames'; import emitter from '../emitter'; class Header extends React.Component { constructor(props) { super(props); this.state = { showLoading: false }; this._search = this._search.bind(this); } componentDidMount () { emitter.on(...
JavaScript
0.000066
@@ -1020,16 +1020,26 @@ arch...%22 + autoFocus /%3E%0A
4a05d5b3ccc2c5ab382438d92f1d31a4cedb07d2
Revert "Revert "using HTTPS""
src/actions/index.js
src/actions/index.js
import axios from 'axios'; const OPEN_WEATHER_API_KEY = '9b1e26b7dac3c0f0fec461c2d3d01883'; const ROOT_URL = `http://api.openweathermap.org/data/2.5/forecast?appid=${OPEN_WEATHER_API_KEY}`; export const FETCH_WEATHER = 'FETCH_WEATHER'; export function fetchWeather(city) { const url = `${ROOT_URL}&q=${city},es`; ...
JavaScript
0
@@ -108,16 +108,17 @@ = %60http +s ://api.o
730371571ea1395eda9d46593aa7ac055dee3345
Provide consistent way to see if user logged in
troposphere/static/js/context.js
troposphere/static/js/context.js
define([], function () { return { profile: null } });
JavaScript
0.999999
@@ -29,16 +29,104 @@ eturn %7B%0A + hasLoggedInUser: function() %7B%0A return !!this.profile.get('username');%0A %7D,%0A prof
2688315e38c2904f2e10248d013dd34763aa5f3e
add input callback to callback stack
DialogAndroid.js
DialogAndroid.js
/** * @providesModule DialogAndroid */ 'use strict'; var { NativeModules } = require('react-native'); var callbackNames = [ 'onPositive', 'onNegative', 'onNeutral', 'onAny', 'itemsCallback', 'itemsCallbackSingleChoice', 'itemsCallbackMultiChoice', 'showListener', 'cancelListener', 'dismissListe...
JavaScript
0
@@ -1086,24 +1086,66 @@ ack = true;%0A + callbacks%5B'input'%5D = inputCallback;%0A %7D%0A%0A /
d7991bc3af6d3bce7ae1fec107e8497c4b1e25f1
Add click listener to play buttotn.
js/components/player.js
js/components/player.js
import React from 'react'; module.exports = React.createClass({ getInitialState: function getInitialState() { return { isPlayingStream: typeof window.orientation === 'undefined', // Should return true if not mobile nowPlayingLabel: 'Offline', }; }, setPlayerState: function setPlayerState() {...
JavaScript
0
@@ -268,16 +268,135 @@ ;%0A %7D,%0A%0A + onPlayClicked: function onPlayClicked() %7B%0A this.setState(%7B isPlayingStream: !this.state.isPlayingStream %7D);%0A %7D,%0A%0A setPla @@ -872,12 +872,13 @@ on-p -lay3 +ause2 ' : @@ -884,21 +884,20 @@ 'icon-p -ause2 +lay3 ';%0A r @@ -1094,16 +1094,47 @@ _bu...
be9b0592d18af822971c2a61b97fde28ec2dea13
Remove unused imports
app/Card.js
app/Card.js
import React, { Component, PropTypes } from 'react'; import { Button, ButtonToolbar, Collapse, Panel, Glyphicon } from 'react-bootstrap'; import Content from './Content'; import Interactions from './Interactions'; import Metadata from './Metadata'; const propTypes = { // Required props activity_comments: PropType...
JavaScript
0.000001
@@ -58,31 +58,8 @@ rt %7B - Button, ButtonToolbar, Col @@ -74,19 +74,8 @@ anel -, Glyphicon %7D f
a95aea19da39b6bee28a4539188b00fcd9d4732a
Remove logging
tasks/md.js
tasks/md.js
var async = require('async'); var mm = require('marky-mark'); var fs = require('fs-extra'); var _ = require('lodash'); var chalk = require('chalk'); var path = require('path'); module.exports = function(grunt) { grunt.registerMultiTask('md', 'Compile markdown files with yml view context into html', function() { ...
JavaScript
0.000001
@@ -1012,36 +1012,8 @@ i%5D;%0A - console.log(obj);%0A
59c79ef434fabaf0377239488d6a302dd3f3ebe5
Remove a duplicate todo
cli/main.js
cli/main.js
#!/usr/bin/env node 'use strict' require('debug').enable('UCompiler:*') const UCompiler = require('..') const knownCommands = ['go', 'watch'] const parameters = process.argv.slice(2) if (!parameters.length || knownCommands.indexOf(parameters[0]) === -1) { console.log('Usage: ucompiler go|watch [path]') process.ex...
JavaScript
0.000005
@@ -356,67 +356,8 @@ ) %7B%0A - // TODO: Compile only those by default that are in rules%0A UC
c962ec925be82cb28d089be75d464bd477074d9c
Fix incorrect postgres update syntax in password migration
api/controllers/auth.js
api/controllers/auth.js
'use strict' let passport = require('passport') let BasicStrategy = require('passport-http').BasicStrategy let BearerStrategy = require('passport-http-bearer').Strategy let crypto = require('crypto') let LocalStrategy = require('passport-local').Strategy let User = require('../db').User let Token = require('../db').Tok...
JavaScript
0.000009
@@ -1196,16 +1196,59 @@ t: null%0A + %7D, %7B%0A id: user.id%0A
f6b46ce86fbe2aed6c1022ee3383d92fc6dc8203
Copy css.map as well
build/copy.js
build/copy.js
module.exports = { all: { files: [ { expand: true, src: [ 'index.html', '404.html', 'sitemap.xml', 'robots.txt' ], dest: global.dist }, ...
JavaScript
0
@@ -1233,24 +1233,26 @@ iq.min.js'%5D, + dest: globa @@ -1373,16 +1373,17 @@ arts.css +* '%5D, dest
c15c4f9ea2843271c9cd827007f70bcfd274c4b3
Resolve about asserts
topics/about_asserts.js
topics/about_asserts.js
module("About Asserts (topics/about_asserts.js)"); test("ok", function() { ok(__ === true, 'what will satisfy the ok assertion?'); }); test("not ok", function() { ok(__ === false, 'what is a false value?'); }); test("equal", function() { equal(__, 1 + 1, 'what will satisfy the equal assertion?'); });
JavaScript
0.000546
@@ -73,26 +73,28 @@ () %7B%0A ok( -__ +true === true, ' @@ -172,18 +172,21 @@ %0A ok( -__ +false === fal @@ -262,10 +262,9 @@ ual( -__ +2 , 1 @@ -298,25 +298,24 @@ equal assertion?');%0A%7D); -%0A
612a72c8551df75f8329a31020cd4a76d49ad63a
Set texture on updateTexture event from voxel-stitch
aoshader.js
aoshader.js
var fs = require("fs") var createShader = require("gl-shader") var mat4 = require('gl-matrix').mat4 module.exports = function(game, opts) { return new ShaderPlugin(game, opts); }; module.exports.pluginInfo = { clientOnly: true, loadAfter: ['voxel-stitch'], }; function ShaderPlugin(game, opts) { this.shell = ...
JavaScript
0
@@ -491,13 +491,31 @@ orm -below +and updateTexture event %0A%0A @@ -908,16 +908,107 @@ this));%0A + this.stitcher.on('updateTexture', this.onUpdateTexture = this.updateTexture.bind(this));%0A %7D;%0A%0AShad @@ -1235,18 +1235,204 @@ esize);%0A + this.stitcher.removeListener('updateTexture', this.onUpdateTextu...
f7219351462b59f8694b96f89eca43aba2bba6ed
Disable loading if the plugin is already loaded
js/components/plugin.js
js/components/plugin.js
define( ['react', 'stores/plugin_store', 'actions/plugin_action_creators', 'require'], function(React, PluginStore, Actions, require) { var getStateFromStore = function(plugin) { return { loaded: PluginStore.loaded(plugin) }; }; return React.createClass({ displayName: 'Plugi...
JavaScript
0.000001
@@ -1107,32 +1107,68 @@ t: function() %7B%0A + if (!this.state.loaded) %7B%0A Actions. @@ -1190,32 +1190,42 @@ .props.plugin);%0A + %7D%0A %7D,%0A%0A
c64828b97f6005ad586c4e9c0c1d1cf731428471
add toast to boots and css dependancies
app/boot.js
app/boot.js
require.config({ waitSeconds: 120, baseUrl : 'app/', IESelectorLimit: true, paths: { 'angular' : 'libs/angular-flex/angular-flex', 'angular-animate' : 'libs/angular-animate/angular-animate.min', 'angular-loading-bar' : 'libs/angular-loading-bar/src/...
JavaScript
0
@@ -2289,24 +2289,200 @@ im',%0A + 'toastr' : 'libs/angular-toastr/dist/angular-toastr.tpls.min',%0A 'toastr-css' : 'libs/angular-toastr/dist/angular-toastr.min',%0A // 'teather' @@ -3435,18 +3435,8 @@ ery' -,'teather' %5D%7D,%0A @@ -3533,32 +3533,91 @@ ...
de7a7d390f0981e5e44305560759e793ab827606
fix condition
components/ui/map/map-thumbnail/helper.js
components/ui/map/map-thumbnail/helper.js
import 'isomorphic-fetch'; const BASEMAP_QUERY = 'SELECT the_geom_webmercator FROM gadm28_countries'; const BASEMAP_CARTOCSS = '#gadm28_countries { polygon-fill: #bbbbbb; polygon-opacity: 1; line-color: #FFFFFF; line-width: 0.5; line-opacity: 0.5; }'; export const getImageFromCarto = ({ width, height, zoom, lat, ln...
JavaScript
0.000001
@@ -3945,20 +3945,20 @@ fig.url -&& ! +%7C%7C ( layerCon @@ -3991,16 +3991,17 @@ ody.url) +) %7B%0A r
79c24cc4ea87eabf72a0a3f684090ccbc95eeb64
tweak colouring and function name
game.js
game.js
/*global ROT */ var Game = { display: null, player: null, engine: null, map: {}, init: function() { this.display = new ROT.Display({spacing:1.1}); document.body.appendChild(this.display.getContainer()); this._generateMap(); var scheduler = new ROT.Schedul...
JavaScript
0
@@ -1282,16 +1282,17 @@ reatePla +y er(freeC @@ -1872,25 +1872,25 @@ p%5Bkey%5D, %22#ff -0 +f %22);%0A @@ -2514,16 +2514,21 @@ E%5D = 7;%0A + %0A keyM
973aad5c96e5731ad6891f0d507b630d76c63c1b
Fix doesPadExist check
node/db/PadManager.js
node/db/PadManager.js
/** * The Pad Manager is a Factory for pad Objects */ /* * 2011 Peter 'Pita' Martischka (Primary Technology Ltd) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www....
JavaScript
0.000001
@@ -3072,16 +3072,31 @@ != null + && value.atext ); %0A %7D
3c2cdaf31c5e205a91dd34d7e9c8940821ae002d
remove commented-out lines
api/models/Community.js
api/models/Community.js
module.exports = bookshelf.Model.extend({ tableName: 'community', creator: function () { return this.belongsTo(User, 'created_by_id') }, inactiveUsers: function () { return this.belongsToMany(User, 'users_community', 'community_id', 'user_id') .query({where: {'users_community.active': false}}) ...
JavaScript
0
@@ -970,170 +970,8 @@ e')%0A - // return this.belongsToMany(User, 'users_community', 'community_id', 'user_id')%0A // .query(%7Bwhere: %7B'users_community.active': true%7D%7D).withPivot('role')%0A %7D,
fc511ba796ac4b7710aeae4704df568c0408a89f
Clear Timeout before leaving implement route
app/assets/javascripts/editor/submissions.js
app/assets/javascripts/editor/submissions.js
CodeOceanEditorSubmissions = { FILENAME_URL_PLACEHOLDER: '{filename}', AUTOSAVE_INTERVAL: 15 * 1000, autosaveTimer: null, autosaveLabel: "#autosave-label span", /** * Submission-Creation */ createSubmission: function (initiator, filter, callback) { this.showSpinner(initiator); var url = $(in...
JavaScript
0
@@ -6835,24 +6835,66 @@ earCache();%0A + clearTimeout(this.autosaveTimer);%0A Turb
43c01fcab8c3bfdd9255cf238590be1ae3249586
make js simpler so that string is standard
javascript/api.js
javascript/api.js
$(document).ready(function () { $('button').click(function() { var url = 'https://api.target.com/items/v3/055-02-3741'; var data = { id_type : 'dpci', store_id : '530', fields : 'ids,descriptions,locations,pricing,images', // fields : ['ids','descriptions','locations','pricing','images...
JavaScript
0.998948
@@ -54,24 +54,59 @@ nction() %7B%0A%0A + var product_id = %22055-02-3741%22%0A var url @@ -144,25 +144,161 @@ /v3/ -055-02-3741 +' + product_id + '?id_type=dpci&store_id=530&fields=ids,descriptions,locations,pricing,images&mode=online&key=1Kfdqvy6wHmvJ4LDyAVOl7saCBoKHcSb ';%0A +%0A%0A + // var @@ -31...
e3b51aca1c64e30ca8990bc1fd171505adbb83ac
diff overlay didn't always show the proper content diff
trac/htdocs/js/blame.js
trac/htdocs/js/blame.js
(function($){ window.enableBlame = function(url, reponame, original_path) { var message = null; var message_rev = null; /* for each blame cell... */ var path = null; $("table.code th.blame").each(function() { // determine path from the changeset link var a = $(this).find("a"); ...
JavaScript
0.999987
@@ -544,108 +544,173 @@ -if (reponame)%0A href = href.substr(reponame.length);%0A var sep = href.indexOf(%22/%22 +var sep = href.indexOf(%22/%22);%0A if ( sep %3E 0 ) %7B%0A path = href.slice(sep+1);%0A if (reponame)%0A path = path.substr(reponame.length );%0...
768f4bf499d00c6a801b018b6a1c656c5800076c
Print out uncaught exceptions. Node stops doing this when you add an uncaught exception handler.
nodejs/lib/hoptoad.js
nodejs/lib/hoptoad.js
var Hoptoad = require('hoptoad-notifier').Hoptoad , env = require('../environment') , shouldReport = env.hoptoad && env.hoptoad.reportErrors; if(shouldReport) Hoptoad.key = env.hoptoad.apiKey; process.addListener('uncaughtException', function(err) { if(shouldReport) Hoptoad.notify(err, function(){}); }); ...
JavaScript
0
@@ -309,16 +309,87 @@ n()%7B%7D);%0A +%09console.error(%22~~~ Error ~~~ %22 + Date())%0A%09console.error(err.stack);%0A %7D);%0A%0AHop
5b1b46a73abc95f9ec8fd10fda2ab9b6c418bd07
Delete unnecessary lines in the code
src/js/index.js
src/js/index.js
import lightgallery from 'lightgallery.js'; import lgThumbnail from 'lg-thumbnail.js'; import lgAutoplay from 'lg-autoplay.js'; import lgVideo from 'lg-video.js'; import lgFullscreen from 'lg-fullscreen.js'; import lgPager from 'lg-pager.js'; import lgZoom from 'lg-zoom.js'; import lgHash from 'lg-hash.js'; import hljs...
JavaScript
0.000108
@@ -3724,99 +3724,8 @@ ();%0A - /*jQuery('pre code').each(function(i, block) %7B%0A hljs.highlightBlock(block);%0A %7D);*/%0A %7D%0A%0Af
62515fc2b87a05647f97e6e0e28f2f1864b4678c
fix add-on incompatiblity hiding (bug 673979)
media/js/impala/addon_details.js
media/js/impala/addon_details.js
$(function () { if ($('body').hasClass('listing')) { $('.performance-note .popup').each(function(i,p) { var $p = $(this), $a = $p.siblings('a').first(); $p.popup($a, {width: 300, pointTo: $a}); }); $('.item.addon').each(function(i,p){ var $...
JavaScript
0
@@ -372,24 +372,56 @@ led').length + == $this.find('.button').length ) %7B%0A
e0860e4491a2519493426cb1cfdbcca8071467e9
Reimplement early exit for JSON parse errors.
validators/json/load.js
validators/json/load.js
const utils = require('../../utils') const load = (files, jsonFiles, jsonContentsDict, annexed, dir) => { let issues = [] // Read JSON file contents and parse for issues const readJsonFile = (file, annexed, dir) => utils.files .readFile(file, annexed, dir) .then(contents => utils.json.parse(file...
JavaScript
0
@@ -31,16 +31,137 @@ tils')%0A%0A +class JSONParseError extends Error %7B%0A constructor(message) %7B%0A super(message)%0A this.name = 'JSONParseError'%0A %7D%0A%7D%0A%0A const lo @@ -713,9 +713,8 @@ -! pars @@ -773,24 +773,98 @@ ) %7B%0A + throw new JSONParseError('Aborted due to parse...
c0907163a93af468d79ab63100dd3ec2e2a28655
Make sure the ''Close'' button on the changeset panel in the annotate view works for some versions of Safari and Chrome.
trac/htdocs/js/blame.js
trac/htdocs/js/blame.js
(function($){ window.enableBlame = function(url, original_path) { var message = null; var message_rev = null; /* for each blame cell containing a changeset link... */ var rev_paths = {}; $("table.code th.blame a").each(function() { href = $(this).attr("href"); $(this).removeAttr("...
JavaScript
0.000027
@@ -2947,16 +2947,36 @@ .mozilla + %7C%7C $.browser.safari )%0A
b70fbed215915ace425ad0d45964cf3a881e3050
use mkdirp create folder
raml-store.js
raml-store.js
var express = require('express'); var debug = require('debug')('raml-store'); var path = require('path'); var config = require('config'); var cors = require('cors'); // creates dist-override/editor.html var fs = require('fs'); var editorFile = fs.readFileSync(path.join(__dirname, 'node_modules/api-designer/dist/index...
JavaScript
0
@@ -159,16 +159,79 @@ 'cors'); +%0Avar mkdirp = require('mkdirp');%0A%0Amkdirp.sync(config.ramlPath); %0A%0A// cre
694a4fbe7371470ef23b590d2880dd666e335ad7
Fix typo
source/gulp/tasks/build.js
source/gulp/tasks/build.js
const gulp = require("gulp"); const source = require("vinyl-source-stream"); // Used to stream bundle for further handling const buffer = require("vinyl-buffer"); const babelify = require("babelify"); const browserify = require("browserify"); const watchify = require("watchify"); const gutil = require("gulp-util"); con...
JavaScript
0.999999
@@ -710,33 +710,32 @@ form(babelify, %7B - %0A sourceM @@ -743,17 +743,16 @@ ps: true - %0A %7D @@ -903,16 +903,19 @@ p.task(%22 +js- dist%22, ( @@ -1053,33 +1053,32 @@ form(babelify, %7B - %0A sourceM @@ -1079,33 +1079,32 @@ ourceMaps: false - %0A %7D)%0A @@ -2236,17 +2236,1...
44837bf9f9323cd1823b1b9ff87f1dbd92dedf6e
Update fileManager.js
lib/FileManager/fileManager.js
lib/FileManager/fileManager.js
/** * fileManager.js * Andrea Tino - 2015 */ /** * Handles files. * We create a shadow file in order to store escaped source Javascript * so that we can call the parser on that file. */ module.exports = function(fpath) { var fs = require('fs'); var path = require('path'); var text = require('../text.js...
JavaScript
0.000001
@@ -1837,24 +1837,36 @@ %22));';%0A + var bytes = fs.writeSyn @@ -1934,16 +1934,112 @@ nc(fd);%0A + %0A if (bytes %3C= 0) %7B%0A throw 'Error: Error while writing shadow file!';%0A %7D%0A %7D,%0A
fb58c75a9f07e97094bb414a0e6f818896cf5424
modify schema
api/schemas/articles.js
api/schemas/articles.js
var Schema, article, mongoose; mongoose = require('mongoose'); mongoose.Promise = require('bluebird'); Schema = mongoose.Schema; article = new Schema({ name: { type: String }, description: { type: String }, price: { type: String } }); module.exports = mongoose.model('articles', article);
JavaScript
0.000001
@@ -227,24 +227,126 @@ %0A price: %7B%0A + type: Number%0A %7D,%0A stars: %7B%0A type: Number%0A %7D,%0A quantity: %7B%0A type: Number%0A %7D,%0A image: %7B%0A type: St
d550600b0142f1db593645eaef16926d0358e064
ADD a loglevel option for dev mode in CLI
lib/core/src/server/cli/dev.js
lib/core/src/server/cli/dev.js
import program from 'commander'; import chalk from 'chalk'; import { logger } from '@storybook/node-logger'; import { parseList, getEnvConfig } from './utils'; async function getCLI(packageJson) { process.env.NODE_ENV = process.env.NODE_ENV || 'development'; program .version(packageJson.version) .option('...
JavaScript
0
@@ -1254,16 +1254,91 @@ wser)%22)%0A + .option('--loglevel %5Blevel%5D', 'Control level of logging during build')%0A .opt
93c6ff42245145c3a6cdbcadefb52f6d9561c448
Modify the value when the menu disappears
src/js/index.js
src/js/index.js
/*! * Harrix HTML Template (https://github.com/Harrix/Harrix-HTML-Template) * Copyright 2018 Sergienko Anton * Licensed under MIT (https://github.com/Harrix/Harrix-HTML-Template/blob/master/LICENSE) */ import fontawesome from '@fortawesome/fontawesome' import fontawesomeFreeSolid from '@fortawesome/fontawesome-fre...
JavaScript
0.000002
@@ -1734,17 +1734,17 @@ rentY %3E -2 +3 00) %7B%0A
0f3b131cf0e06eac89885aabd84252d6f9dfe141
make use of new caching module in help
source/redux/parts/help.js
source/redux/parts/help.js
// @flow import {type ReduxState} from '../index' import {type ToolOptions} from '../../views/help/types' import {fetchHelpTools} from '../../lib/cache' type Dispatch<A: Action> = (action: A | Promise<A> | ThunkAction<A>) => any type GetState = () => ReduxState type ThunkAction<A: Action> = (dispatch: Dispatch<A>, ge...
JavaScript
0
@@ -117,41 +117,380 @@ etch -HelpTools%7D from '../../lib/cache' +AndCacheItem, type CacheResult%7D from '../../lib/cache'%0Aimport %7BAPI%7D from '@frogpond/api'%0A%0Afunction fetchHelpTools(): CacheResult%3C?Array%3CToolOptions%3E%3E %7B%0A%09return fetchAndCacheItem(%7B%0A%09%09key: 'help:tools',%0A%09%09url: API('...
b9cef3cf119985c474f33bd01eff2a9d3076133d
Update index.js
lib/ember/addon/utils/index.js
lib/ember/addon/utils/index.js
import Ember from 'ember'; export const isArray = Ember.isArray; export const isBlank = Ember.isBlank; export const isEmpty = Ember.isEmpty; export const isNone = Ember.isNone; export const isPresent = Ember.isPresent; export const tryInvoke = Ember.tryInvoke; export const typeOf = Ember.typeOf;
JavaScript
0.000002
@@ -134,16 +134,54 @@ sEmpty;%0A +export const isEqual = Ember.isEqual;%0A export c
8623fa65d54b8664cd1d9c7a74d77606ca24d2e5
Make the encrypted regex a bit better
notable/static/app.js
notable/static/app.js
/** * Encapsulate and namespace */ (function() { if ( typeof(NOTABLE) === "undefined") { NOTABLE = {}; }; // Constants var ENCRYPTED = '<ENCRYPTED>'; var RE_ENCRYPTED = new RegExp(/[^ ]{32,}$/); var RE_DECRYPTED = new RegExp(/^[\000-\177]*$/); /** * Main application */ NOTABLE.Applicatio...
JavaScript
0.002444
@@ -193,16 +193,17 @@ RegExp(/ +%5E %5B%5E %5D%7B32,
22e57ed1fbb7af030184c3926e536e6f87f98e13
Fix broken navigation shortcuts
app/main.js
app/main.js
'use strict' // Handle the Squirrel.Windows install madnesss /* eslint global-require: "off" */ if (require('electron-squirrel-startup')) return const { app, BrowserWindow, globalShortcut, Menu } = require('electron') const autoUpdater = require('./auto-updater') const contextMenu = require('./context-menu') const ...
JavaScript
0.000038
@@ -4042,32 +4042,155 @@ usTrack()%0A %7D)%0A%0A + // The shortcuts *not* handled by SoundCloud itself%0A // don't need the isNotFocused() check to avoid double triggering%0A%0A menu.events.on @@ -4209,36 +4209,16 @@ =%3E %7B%0A - if (isNotFocused()) soundcl @@ -4272,36 +4272,16 @@ =%3E %7B%0A - if (is...
de9776c72302d0a01bc02b8bc36ef375f0d11c5c
Fix typo
lib/functions/getScripts.js
lib/functions/getScripts.js
const { google, } = require('googleapis'); const constants = require('../constants.js'); const triageGoogleError = require('./triageGoogleError.js'); /** * Lists the names and IDs of script files. * * @param {google.auth.OAuth2} auth - An authorized OAuth2 client. * @param {String} nameFilter - String to filte...
JavaScript
0.999999
@@ -1364,17 +1364,17 @@ tScriptF -I +i les').th
fe8270eb5b8a15aa1cc4daec881cbf4ecb9301d3
Remove garbage
src/js/index.js
src/js/index.js
// TODO 同じタイトルのとき上書きする前に聞くためのチェックボックスがoptionにほしい // TODO bluebird入れる // TODO 全体的なスタイル当てなど(haml, css) // TODO esaで開くボタン欲しい getConfig = function(defaultConfig) { return new Promise(function(resolve, reject) { var defaultConfig = {teamName: "", token: ""}; chrome.storage.sync.get(defaultConfig, functi...
JavaScript
0.000186
@@ -2638,37 +2638,8 @@ ) %7B%0A - console.log(%22load%22);%0A
754bd76e3f18246b4b3cf161755fb9919571cc19
Change en_US code from "en" to "en-us" for consistency
app/util.js
app/util.js
function randomFrom(array) { return array[Math.floor(Math.random()*array.length)] } function filter_available(item) { return !item.unreleased } var language_map = { "en_US": "en", "fr_FR": "fr", "ja_JP": "ja", "fr_CA": "fr-ca", "es_ES": "es", "es_MX": "es-mx" } String.prototype.format = function(scop...
JavaScript
0.000691
@@ -178,16 +178,19 @@ US%22: %22en +-us %22,%0A %22fr
3168d77df96ba6326557e9b296dae22121bb5c7a
Remove needless await
src/js/popup.js
src/js/popup.js
'use strict'; import Promise from 'bluebird'; import Ui from './ui'; import Post from './post'; import Esa from './esa'; export default class Popup { constructor() { this.ui = new Ui(); this.post = new Post(); this.esa = undefined; } setPreviousPost() { Post.load((loadedPost) => { this.p...
JavaScript
0.000227
@@ -2686,30 +2686,24 @@ se);%0A%0A -await this.notifyS
d6d1a25b992360031a14c7c14f92bed2fad79069
Add search WS
app/guildProgress/guildProgressController.js
app/guildProgress/guildProgressController.js
"use strict"; //Load dependencies var applicationStorage = process.require("core/applicationStorage.js"); var guildProgressModel = process.require("guildProgress/guildProgressModel.js"); var guildModel = process.require("guilds/guildModel.js"); module.exports.getProgress = function (req, res, next) { var logger...
JavaScript
0.000001
@@ -239,16 +239,47 @@ l.js%22);%0A +var async = require(%22async%22);%0A%0A %0A%0Amodule
9275f77e77d4371cc88705d00749dd0807dab844
Add timeout, success, and error from options
gist.js
gist.js
(function (factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(['jquery'], factory) } else if (typeof exports === 'object') { module.exports = factory(require('jquery')) } else { factory(jQuery) } }(function ($) { 'use strict'; var Gist = function (element, opti...
JavaScript
0.000001
@@ -837,248 +837,107 @@ -success: function (data, textStatus, jqXHR) %7B%0A self.onAjaxSuccess(self, data, textStatus, jqXHR)%0A %7D,%0A error: function (jqXHR, textStatus, errorThrown) %7B%0A self.onAjaxError(self, jqXHR, textStatus, errorThrown)%0A %7D +timeout: gist.options.timeout...
1b29ca8608753636ba1638f094eaff85e1f8b949
Test for warning on bad command usage.
test/cli.js
test/cli.js
var path = require('path'); var should = require('chai').should(); var expect = require('chai').expect; var avisynth = require('../main'); var system = require('../code/system'); var my = require('../package.json'); // Since testing a command line script is a bunch of boilerplate, I'll abstract it. fun...
JavaScript
0
@@ -2206,26 +2206,436 @@ %5D)) -console.log(text), +ok = false;%0A return ok;%0A %7D, '');%0A %7D);%0A%0A it('should print help with warnings when a bad command is used', function(done) %7B%0A testCli(done, %5B'feminism'%5D, null, 1, function(text) %7B%0A ...
5071d72ef81131bf203da1424b7e7aee8bd1275c
Disable login panel correctly for chromoting client plugin
remoting/client/extension/chromoting_tab.js
remoting/client/extension/chromoting_tab.js
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Message id so that we can identify (and ignore) message fade operations for // old messages. This starts at 1 and is incremented for each new mess...
JavaScript
0.000003
@@ -963,32 +963,29 @@ l%22). -className = %22login_pa +style.display = %22no ne -l %22;%0A
c9261681fbf590e6914513d7ea4a27f3eed6123c
Add more map tests.
test/map.js
test/map.js
"use strict"; var map = require("../map") var into = require("../into") exports["test map sequence"] = function(assert) { var called = 0 var source = [ 1, 2, 3 ] var actual = map(source, function(item) { called = called + 1 return item + 10 }) assert.equal(called, 0, "map does not invokes until res...
JavaScript
0
@@ -8,16 +8,184 @@ rict%22;%0A%0A +var test = require(%22./util/test%22)%0Avar delay = require(%22../delay%22)%0Avar error = require(%22../error%22)%0Avar concat = require(%22../concat%22)%0Avar capture = require(%22../capture%22)%0A var map @@ -981,23 +981,986 @@ %0A%7D%0A%0A -%0Aif (module == +exports%5B%22test ...
89cf31f3dcaba7d3a318209d78857fd05144ea67
Add refactoring suggestion comments on block reducers file #275
app/modules/mobilizations/blocks/reducers.js
app/modules/mobilizations/blocks/reducers.js
import c from '../../mobilizations/blocks/constants' export const initialState = { loaded: false, data: [], error: undefined, uploadingBackgroundImage: false, uploadedBackgroundImage: undefined, } export default function BlockReducers(state = initialState, action) { let data switch (action.type) { ...
JavaScript
0
@@ -202,16 +202,165 @@ ned,%0A%7D%0A%0A +//%0A// TODO: Maybe split these reducers into separated files%0A// to turns more explicit what is its responsibility and let%0A// the code more cleaner%0A//%0A export d @@ -485,32 +485,138 @@ Actions%0A //%0A + // @suggestion: Maybe this block of code turns%0A // in...
d26daa7a7ecebe9dd796a60e3b61fc8d4857c9d8
refactor plugin
js/jquery.newsticker.js
js/jquery.newsticker.js
(function($) { $.fn.newsticker = function(opts) { var config = $.extend({}, { height: 30, speed: 800, interval: 3000, move: null }, opts); function init(obj) { var $newsticker = obj, $frame = $newsticker.find('.ui-newsticker-list'), $item = $frame...
JavaScript
0.000001
@@ -419,105 +419,217 @@ -function init()%7B%0A var customizedHeight = parseInt($item.eq(0).css('height').split('px')%5B0%5D +//init settings%0A function init(ticker, height) %7B%0A var $ticker = $(ticker),%0A $frame = $ticker.find('.ui-newsticker-list'),%0A $firstItem = $f...
978e2d4c732f195c1fe74d24f6b81666e249b12e
update js snippet with oo style
js/jquery.newsticker.js
js/jquery.newsticker.js
(function($) { $.fn.newsticker = function(opts) { // default configuration var config = $.extend({}, { height: 30, speed: 800, start: 8, interval: 3000 }, opts); // main function function init(obj) { var dNewsticker ...
JavaScript
0
@@ -301,18 +301,18 @@ var -dN +$n ewsticke @@ -340,19 +340,19 @@ -dF +$f rame = -dN +$n ewst @@ -403,18 +403,18 @@ -dI +$i tem = -dF +$f rame @@ -456,18 +456,18 @@ -dN +$n ext,%0A @@ -510,42 +510,461 @@ -dItem.eq(0).addClass('current');%0A%0A +$newsticker.init = function()%7...
1d6a42ab8ca3cf859fa7f13e750dc4d67907ebc5
add mocks module to family specs
app/scripts/superdesk-archive/family_spec.js
app/scripts/superdesk-archive/family_spec.js
'use strict'; describe('familyService', function() { var items = [ {_id: 'z', family_id: 'family1', task: {desk: 'desk1'}}, {_id: 'x', family_id: 'family1', task: {desk: 'desk2'}}, {_id: 'c', family_id: 'family2', task: {desk: 'desk3'}} ]; var deskList = { desk1: {title: 'de...
JavaScript
0.000001
@@ -360,16 +360,59 @@ %7D;%0A%0A + beforeEach(module('superdesk.mocks'));%0A befo @@ -598,32 +598,140 @@ return %7B%0A + find: function() %7B%0A return $q.reject(%7B%7D);%0A %7D,%0A
fa778d8c4c0ec30fad3ed4adeb12434bd2c43aff
Revert "tmp: debug estDocCount"
lib/analytics/stats-queryer.js
lib/analytics/stats-queryer.js
var async = require('async'); var Report = require('../../models/report'); var Incident = require('../../models/incident'); var _ = require('underscore'); var ONE_MINUTE = 60 * 1000; var StatsQueryer = function() { this.handlers = { all: this._countAll, incidents: this._countAllIncidents, reports: this._...
JavaScript
0
@@ -846,103 +846,16 @@ %7B%7D, -(err, count) =%3E %7B%0A console.log(%60AAAAHHHHHHHHH: $%7Bcount%7D%60)%0A callback(err, count)%0A %7D +callback );%0A
a076b27e970b3cbcffd6df7d088618b3d12f9077
Fix Bowser8 remapping
js/randomizer.bowser.js
js/randomizer.bowser.js
var bowserentrances = [ {"name": "frontdoor", "world": 10, "exits": -1, "castle": 0, "palace": 0, "ghost": 0, "water": 0, "id": 0x10D}, {"name": "backdoor", "world": 10, "exits": -1, "castle": 0, "palace": 0, "ghost": 0, "water": 0, "id": 0x10E}, ]; var BOWSER_DARKROOM_ID = 0x1BD; function randomizeBowserEntranc...
JavaScript
0
@@ -1179,16 +1179,20 @@ ooms%5Bi%5D. +out. target & @@ -1310,16 +1310,20 @@ ooms%5B0%5D. +out. target &
1bb82fcce9b880555695c17a999c283b3ec36df8
Use local appPath since sails.config.appPath doesnt exist yet
lib/app/configuration/index.js
lib/app/configuration/index.js
/** * Module dependencies. */ var _ = require('lodash'); var path = require('path'); var fs = require('fs'); var DEFAULT_HOOKS = require('./defaultHooks'); module.exports = function(sails) { /** * Expose new instance of `Configuration` */ return new Configuration(); function Configuration() { ...
JavaScript
0
@@ -2153,29 +2153,16 @@ resolve( -sails.config. appPath,
40f62338dd7fd3e0b516db25e6b31422689c42a4
Add a function that creates a function with identical execution context as the current one.
js/shared/javascript.js
js/shared/javascript.js
exports.bind = function(context, method/*, args... */) { var args = Array.prototype.slice.call(arguments, 2) return function() { fn = (typeof method == 'string' ? context[method] : method) return fn.apply(context, args.concat(Array.prototype.slice.call(arguments, 0))) } } exports.forEach = function(items, ctx,...
JavaScript
0.999999
@@ -2672,12 +2672,135 @@ et %7C%7C 0))%0A%7D%0A +%0Aexports.recall = function(self, args, timeout) %7B%0A%09var fn = args.callee%0A%09return function()%7B return fn.apply(self, args) %7D%0A%7D
e8bd69e43372a1b6d46439585a787869e3c44595
Change name of xcuitest automation name
lib/basedriver/desired-caps.js
lib/basedriver/desired-caps.js
import log from './logger'; import validator from 'validate.js'; import B from 'bluebird'; let desiredCapabilityConstraints = { platformName: { presence: true, isString: true, inclusionCaseInsensitive: [ 'iOS', 'Android', 'FirefoxOS', 'Fake' ] }, deviceName: { presenc...
JavaScript
0.000001
@@ -515,21 +515,15 @@ ' -WebDriverAgen +XCUITes t',%0A
3b08a76c82515e1d245d1abee32c0ff62f86f343
Update presets.js
lib/core/src/server/presets.js
lib/core/src/server/presets.js
import dedent from 'ts-dedent'; import { join } from 'path'; import { logger } from '@storybook/node-logger'; import fs from 'fs' import { resolveFile } from './utils/resolve-file'; const isObject = (val) => val != null && typeof val === 'object' && Array.isArray(val) === false; const isFunction = (val) => typeof val ...
JavaScript
0.000001
@@ -122,16 +122,17 @@ rom 'fs' +; %0Aimport
4b1ca537c83d47db5346fad8c26fe468741753b3
document the login responder
lib/helpers/login-responder.js
lib/helpers/login-responder.js
'use strict'; var createSession = require('./create-session'); var createIdSiteSession = require('./create-id-site-session'); function loginResponse(req, res) { var config = req.app.get('stormpathConfig'); var accepts = req.accepts(['html', 'json']); var redirectUrl = config.web.login.nextUri; var url = req.q...
JavaScript
0
@@ -121,16 +121,274 @@ ion');%0A%0A +/**%0A * If the request has the Accept header set to json, it will respond by just ending the response.%0A * Else it will redirect to the configured url.%0A *%0A * @method%0A *%0A * @param %7BObject%7D req - The http request.%0A * @param %7BObject%7D res - The http response.%0A */%...
f868b4e836c7922e51c18826d35c1f1d3721f5df
fix constructor params
lib/me.publicize-connection.js
lib/me.publicize-connection.js
const root = '/me/publicize-connections/'; class PublicizeConnection { /** * `PublicizeConnection` constructor. * * @param {String} connectionId - application identifier * @param {WPCOM} wpcom - wpcom instance * @return {Null} null */ constructor( connectionId, wpcom ) { if ( ! ( this instanceof PublicizeCon...
JavaScript
0.000001
@@ -361,16 +361,30 @@ nection( + connectionId, wpcom )
88d3861b79a453ced3251dce8a2b31b5c79083ec
Fix dependency collection
lib/mincer/assets/processed.js
lib/mincer/assets/processed.js
/** internal * class ProcessedAsset * * `ProcessedAsset`s are internal representation of processable files. * * * ##### SUBCLASS OF * * [[Asset]] **/ 'use strict'; // 3rd-party var _ = require('underscore'); var async = require('async'); // internal var noop = require('../common').noop; va...
JavaScript
0.000002
@@ -620,28 +620,21 @@ %7B%0A -prop( this -, ' +. pathname ', @@ -629,19 +629,18 @@ pathname -', += pathnam @@ -644,153 +644,59 @@ name -) ;%0A -prop( this -, ' +. mtime -', += mtime -) ;%0A -prop( this -, ' +. digest -', += digest -);%0A prop(this, 'hash', '%3CDependnecyFile...
af3224dee1a02079e9d84d361276026d424c5e1d
delete code repetition
lib/mobile-browser-emulator.js
lib/mobile-browser-emulator.js
var Proxy = require('browsermob-proxy').Proxy; function run(url, browserWidth, browserHeight, display, cb) { var proxy = new Proxy({port: 8080}); var generate_traffic = function (proxyAddr, done) { startBrowser(url, browserWidth, browserHeight, display, cb, proxyAddr, done); }; proxy.cbHAR({na...
JavaScript
0.000005
@@ -2445,349 +2445,8 @@ );%0A%0A -// enabling metaviewport%0Avar options = new chrome.Options();%0Aoptions.addArguments(%5B%22--enable-viewport-meta%22%5D);%0Aoptions.addArguments(%5B'--user-agent=Mozilla/5.0 (Linux; Android 4.4.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/36.0.1025.133 ...
e6013666d6a3ec8fcf05320c7a5210e6b3a0c39e
set _class default parameter to deleteEdge function
lib/models/VertexCollection.js
lib/models/VertexCollection.js
'use strict'; import * as GraphManager from './GraphManager'; class VertexCollection { constructor (className, schema, connection) { this.conn = connection; this.gm = GraphManager.getInstance(this.conn); this.className = className; this.schema = schema; } /** * Updates or create a vertex o...
JavaScript
0
@@ -2837,32 +2837,82 @@ elete edge%0A *%0A + *%0A * @param _class Optional, by default is E%0A * @param from @@ -2963,16 +2963,28 @@ eteEdge( +_class='E', from, to @@ -3027,16 +3027,24 @@ e('EDGE' +, _class ).from(f
79e4e4fcf59448fc35a7cbe9ba98930996cd6c1a
Use proper base object for Options panel overlay
lib/options/options-overlay.js
lib/options/options-overlay.js
/* See license.txt for terms of usage */ "use strict"; const self = require("sdk/self"); const { Cu, Ci } = require("chrome"); const { Trace, TraceError } = require("firebug.sdk/lib/core/trace.js").get(module.id); const { loadSheet, removeSheet } = require("sdk/stylesheet/utils"); const { Class } = require("sdk/core...
JavaScript
0
@@ -50,16 +50,30 @@ rict%22;%0A%0A +// Add-on SDK%0A const se @@ -94,25 +94,24 @@ sdk/self%22);%0A -%0A const %7B Cu, @@ -140,95 +140,8 @@ %22);%0A -const %7B Trace, TraceError %7D = require(%22firebug.sdk/lib/core/trace.js%22).get(module.id);%0A cons @@ -247,24 +247,127 @@ /heritage%22); +%0A%0A// Firebug.SDK%...
940459e654b780ead489aeefb471d10afc3f4a67
remove outdated comments (#891)
lib/rules_core/replacements.js
lib/rules_core/replacements.js
// Simple typographic replacements // // (c) (C) → © // (tm) (TM) → ™ // (r) (R) → ® // +- → ± // (p) (P) -> § // ... → … (also ?.... → ?.., !.... → !..) // ???????? → ???, !!!!! → !!!, `,,` → `,` // -- → &ndash;, --- → &mdash; // 'use strict'; // TODO: // - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾ // - multiplications 2 ...
JavaScript
0.000001
@@ -92,24 +92,8 @@ %E2%86%92 %C2%B1%0A -// (p) (P) -%3E %C2%A7%0A // .
9673beee1bf8eb73ee415c23570b2fa19d999543
Break down BucketService#_process into various methods
lib/services/bucket-service.js
lib/services/bucket-service.js
import { Object, A, Map, Evented, RSVP, run, get, set } from 'ember'; var slice = Array.prototype.slice; /** @class BucketService @namespace EB */ var BucketService = Object.extend(Evented, { /** @property queues */ queues: null, /** @method addToBucket */ addToBucket: function(name, target) { v...
JavaScript
0.000237
@@ -2713,16 +2713,397 @@ rocess = + this._processFactory(bucket, fn, results);%0A var bucketItems = bucket.toArray();%0A for (var i = 0, len = bucketItems.length; i %3C len; i++) %7B%0A __process(bucketItems%5Bi%5D);%0A %7D%0A this._processResults(results);%0A %7D,%0A%0A /**%0A @private%0A @method...
33ea92f9263332d266b0664c2d8a421a925f9752
change default order to viewCount
lib/services/youtube-search.js
lib/services/youtube-search.js
'use strict'; const google = require('googleapis'); const youtube = google.youtube('v3'); const nconf = require('nconf'); nconf .argv() .env() .file({file: '../config.json'}); /** * QUOTA IMPACT: 100 * * @param params * @param callback */ exports.searchList = function(params, callback) { youtube.se...
JavaScript
0
@@ -522,14 +522,17 @@ r: ' -rating +viewCount ',%0A
edb703103e5afc2845406c5b2fb54ede4e193ce7
Update skoleskyss-add-document.js
lib/skoleskyss-add-document.js
lib/skoleskyss-add-document.js
'use strict' function generateMetadataDocument (options) { if (!options) { throw new Error('Missing required input: options') } if (!options.title) { throw new Error('Missing required input: options.title') } if (!options.offTitle) { throw new Error('Missing required input: options.title') } ...
JavaScript
0
@@ -989,76 +989,8 @@ %0A %7D -%0A var responsiblePerson = options.responsiblePerson ? '' : '214853' %0A%0A @@ -2147,25 +2147,16 @@ o': -responsiblePerson +'214853' ,%0A @@ -2440,16 +2440,109 @@ %7D%0A %7D%0A + if (options.responsiblePerson) %7B%0A delete meta.args.parameter.ResponsiblePersonRecno%0A ...
697ccbf0abb7f5ba161c0a6a940af1f3af5c8b82
Rename mkdir to mkdirTemp
lib/tasks/install-blueprint.js
lib/tasks/install-blueprint.js
'use strict'; const Blueprint = require('../models/blueprint'); const Task = require('../models/task'); const RSVP = require('rsvp'); const isGitRepo = require('is-git-url'); const temp = require('temp'); const childProcess = require('child_process'); const path = require('path'); const merge = require('ember-cli-loda...
JavaScript
0.000014
@@ -494,16 +494,20 @@ et mkdir +Temp = RSVP. @@ -1339,16 +1339,20 @@ rn mkdir +Temp ('ember-
97fba1f86707e350fef20fc9ce57bc5f8298c80f
fix sidebar topic urls
lib/topic-store/topic-store.js
lib/topic-store/topic-store.js
import Store from '../store/store'; import request from '../request/request'; import config from '../config/config'; import forumStore from '../forum-store/forum-store'; import urlBuilder from '../url-builder/url-builder'; const voteOptions = ['negative', 'positive', 'neutral']; class TopicStore extends Store { nam...
JavaScript
0.000003
@@ -367,67 +367,8 @@ ) %7B%0A - if (!config.multiForum) return Promise.resolve(topic);%0A @@ -414,22 +414,38 @@ %7B%0A -throw +return Promise.reject( new Erro @@ -481,24 +481,25 @@ forum.%60) +) ;%0A %7D%0A retu @@ -494,50 +494,122 @@ %7D%0A +%0A -return forumStore.findOne(topic.fo...
41becd17172ea0a21aaaa5f3487ac740cde92a50
Rename `program` param to `options` in file.js
bin/file.js
bin/file.js
var Transformer = require('./../lib/transformer'); var _ = require('lodash'); module.exports = function (program) { // Enable all transformers by default var transformers = { classes: true, stringTemplates: true, arrowFunctions: true, let: true, defaultArguments: true, objectMethods: true, ...
JavaScript
0
@@ -99,23 +99,23 @@ nction ( -program +options ) %7B%0A // @@ -486,18 +486,18 @@ if + (! - program +options .cla @@ -633,23 +633,23 @@ s%0A if ( -program +options .transfo @@ -727,23 +727,23 @@ );%0A%0A -program +options .transfo @@ -1003,31 +1003,31 @@ rmers%0A if ( -program +options .module === ...
a89d7168ec2552b8e0ed49a5c1384c4730bf5ef8
Fix lint issue
local_modules/sensepat/test.js
local_modules/sensepat/test.js
// Testing const pat = require('./index') const test = require('tape') const V = { time: 0, value: [ [1, 0, 1], [0, 1, 0] ], mass: [ [1, 1, 1], [1, 1, 1] ] } const ONESHALF = { time: 0, value: [ [1, 1, 1], [1, 1, 1] ], mass: [ [1, 1, 1], [0, 0, 0] ] } test('len', ...
JavaScript
0.000002
@@ -458,14 +458,18 @@ , %5B2 -/ + / 3, 1 -/ + / 3%5D)%0A
bc3f787f5c4ba75a333a1bf041a00a0225d05d11
Change how caching is controlled
html.js
html.js
const weakMap = new WeakMap() const createAssertionError = (actual, expected) => Error(`Expected ${expected}. Found ${actual}.`) export const tokenTypes = { variable: 0, tag: 1, endtag: 2, key: 3, value: 4, node: 5, text: 6, constant: 7 } const valueTrue = { type: tokenTypes.value, value: true ...
JavaScript
0.000007
@@ -3938,32 +3938,41 @@ alue%0A%0A if ( +%0A token.type === t @@ -3992,16 +3992,24 @@ iable && +%0A !colon @@ -4014,16 +4014,52 @@ n && - !atSign +%0A !atSign &&%0A !html.dev%0A ) %7B%0A @@ -6126,27 +6126,23 @@ esult = -html.cache? +weakMap .get(str @@ -6212,19 +6212,1...
24c7c7b8f9db0b881f3f6d44c3e6dd20e2f2d9e2
add cmd/git.js and cmd/lazy.js.
cmd/lazy.js
cmd/lazy.js
const path = require('path'); const { compile } = require('../config/util'); const argv = process.argv; const msg = argv[2]; (async () => { await compile( `npm run version && npm run noistanbul && npm run build && npm run hasistanbul && npm run git ${msg}`, path.resolve(__dirname, '..') ); process.exit(...
JavaScript
0
@@ -253,14 +253,16 @@ git +%22 $%7Bmsg%7D +%22 %60, %0A
c3090607ab0bf717a3cb18c19216cc8f4a5833b0
Improve Button disabled-state tests
spec/bbctrl-button.spec.js
spec/bbctrl-button.spec.js
/*global define, describe, it, expect */ define(['backbone', 'bbctrl-button'], function (Backbone, Button) { 'use strict'; // var // Helper methods to simulate user interaction with the control. These may serve as an // effective indication of all the interactions that the control supports (and the s...
JavaScript
0
@@ -1630,34 +1630,8 @@ ();%0A - button.disable();%0A @@ -1661,32 +1661,32 @@ , function () %7B%0A + isButt @@ -1720,32 +1720,58 @@ e;%0A %7D);%0A%0A + button.disable();%0A clickBut @@ -2025,38 +2025,8 @@ ();%0A - button.enable(false);%0A @@ -2115,32 +2115,...
fea368f1da1c6c3a58ad7bbcf6193d56c5592e68
Disable idleTimer on iOS for appified apps
app/Resources/appify.js
app/Resources/appify.js
/* * This is a template used when TiShadow "appifying" a titanium project. * See the README. */ var TiShadow = require("/api/TiShadow"); var Compression = require('ti.compression'); // Need to unpack the bundle on a first load; var path_name = "{{app_name}}".replace(/ /g,"_"); var target = Ti.Filesystem.getFile(T...
JavaScript
0
@@ -93,16 +93,56 @@ E.%0A */%0A%0A +Titanium.App.idleTimerDisabled = true;%0A%0A var TiSh
f930c37b5af434562017c223f43e42090f45175e
clean up logging
kemia/model/reaction.js
kemia/model/reaction.js
goog.provide('kemia.model.Reaction'); goog.require('kemia.model.Molecule'); goog.require('goog.math.Box'); goog.require('goog.math.Rect'); /** * Creates a new Reaction. * * @constructor */ kemia.model.Reaction = function() { this.header = ""; this.reactants = []; this.products = []; this.arrows = []; this.p...
JavaScript
0
@@ -2653,127 +2653,37 @@ ;%0A%09%09 -console.log('mol_rect: ' + mol_rect);%0A%09%09if (accumulated_rect)%7B%0A%09%09%09console.log(%22accumulated_rect: %22 + accumulated_rect); +%0A%09%09if (accumulated_rect)%7B%0A%09%09%09 %0A%09%09%09 @@ -3083,32 +3083,8 @@ s);%0A -%09console.log(molecules); %0A%0A%7D; @@ -3417,4...
405289d89629e2fab3adf6c5a97c9a4a2780f27f
remove token generation from registration
app/controllers/auth.js
app/controllers/auth.js
/** * Dependencies */ import { User, Token } from '../models' /** * POST a new user */ export async function register (ctx, next) { try { var user = await User.register(ctx.request.body) } catch (err) { if (err.code === 11000) ctx.throw('Account already exists', 422) } const token = await Token....
JavaScript
0
@@ -288,51 +288,8 @@ %0A %7D -%0A const token = await Token.generate(user) %0A%0A @@ -310,24 +310,13 @@ ata: - %7B user -, token %7D %7D%0A%7D
723ae931172e12d81fe23162d02859e1f5847a2e
remove an alert
app/controllers/list.js
app/controllers/list.js
/** * @author Yang Sun */ if (Ti.Platform.osname == "iphone") { var postBtn = Ti.UI.createButton({ title : "Post", style : Titanium.UI.iPhone.SystemButtonStyle.PLAIN }); postBtn.addEventListener('click', function(e) { var postController = require('lib/post'); postController.postActivity(); }); $.listW...
JavaScript
0.000024
@@ -2845,29 +2845,8 @@ %0A%09%7D%0A -%09alert(data.length);%0A %09tab
2aae9ec50d187ba52bb96c6f79e79ab14b1357fd
Improve parallel
src/parallel.js
src/parallel.js
import pipe from './pipe'; import _ from 'lodash'; export default (stream, pipes) => { if (_.isEmpty(pipes)) { return Promise.resolve(stream); } return new Promise((resolve, reject) => { Promise.all(_.map(pipes, pipeDescriptor => pipe(stream, pipeDescriptor))) .then(resolvedStreams => { con...
JavaScript
0.000064
@@ -45,16 +45,120 @@ dash';%0A%0A +function reconcileResolvedStreams(resolvedStreams) %7B%0A return _.assign.apply(null, resolvedStreams);%0A%7D%0A%0A export d @@ -408,95 +408,40 @@ =%3E -%7B%0A const resolvedStream = _.assign.apply(null, resolvedStreams);%0A resolve +resolve(reconcileResolvedStream...
e1e854609217c2a80b3197f3b121f5ebb8c26350
revert back to sync call
lib/markdown-to-asciidoc.js
lib/markdown-to-asciidoc.js
'use babel'; //import MarkdownToAsciidocView from './markdown-to-asciidoc-view'; import { CompositeDisposable } from 'atom'; var path = require('path'); var java = require("java"); java.options.push('-Djava.awt.headless=true'); java.options.push('-Xrs'); java.options.push('-Xmx100m'); java.options.push('-Xmx100m'); c...
JavaScript
0.000001
@@ -120,16 +120,40 @@ atom';%0A%0A +//console.log(dialog);%0A%0A var path @@ -1495,17 +1495,16 @@ doc.');%0A -%0A // @@ -1523,22 +1523,31 @@ -//var result = +editor.setText(%0A jav @@ -1569,16 +1569,27 @@ hodSync( +%0A %22nl.jwor @@ -1644,32 +1644,42 @@ downToAsciiDoc%22, +%0A ...