commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
36da606092c93c31e6c6bc64eeacdfaa4198be44
.eslintrc.js
.eslintrc.js
// See http://eslint.org/docs/ module.exports = { env: {es6: true, commonjs: true}, parserOptions: { ecmaVersion: 6, ecmaFeatures: {jsx: true} }, extends: ['eslint:recommended', 'google'], plugins: ['react'], rules: { 'max-len': ['error', 100], 'require-jsdoc': 'o...
// See http://eslint.org/docs/ module.exports = { env: {es6: true, commonjs: true}, parserOptions: { ecmaVersion: 2017, ecmaFeatures: {jsx: true} }, extends: ['eslint:recommended', 'google'], plugins: ['react'], rules: { 'max-len': ['error', 100], 'require-jsdoc':...
Update the ES version supported by ESLint
Update the ES version supported by ESLint
JavaScript
mit
frosas/lag,frosas/lag,frosas/lag
--- +++ @@ -2,7 +2,7 @@ module.exports = { env: {es6: true, commonjs: true}, parserOptions: { - ecmaVersion: 6, + ecmaVersion: 2017, ecmaFeatures: {jsx: true} }, extends: ['eslint:recommended', 'google'],
57e1963cd12f14ad7ab76792ed280b829fe6e461
src/convert.js
src/convert.js
'use strict'; var opts = { prefix: '', suffix: '', suffixLastItem: true, }; function objToValue(obj, opts) { var keys = Object.keys(obj); var fields = keys.map(function(key) { var value = formatValue(obj[key]); return opts.prefix + key + ":" + value; }); var result = fields.join(opts.suffix + "...
'use strict'; var opts = { prefix: '', suffix: '', suffixLastItem: true, }; function objToValue(obj, opts) { var keys = Object.keys(obj); var fields = keys.map(function(key) { var value = formatValue(obj[key]); return opts.prefix + key + ":" + value; }); var result = fields.join(opts.suffix + "...
Add parentheses around all lists so that nested lists are supported (without them Sass throws an error).
Add parentheses around all lists so that nested lists are supported (without them Sass throws an error).
JavaScript
mit
epegzz/sass-vars-loader,epegzz/sass-vars-loader,epegzz/sass-vars-loader
--- +++ @@ -26,7 +26,7 @@ var result = value.map(function(v) { return formatValue(v); }); - return result.join(', '); + return '(' + result.join(', ') + ')'; } if (typeof value === 'object') {
a8140cbfe42ef3b7952fd4d3a4a22dc77f4ae9a3
blueprints/ember-leaflet-draw/index.js
blueprints/ember-leaflet-draw/index.js
// /*jshint node:true*/ // module.exports = { // description: 'add leaflet-draw assets, using bower', // // normalizeEntityName: function() {}, // no-op since we're just adding dependencies // // afterInstall: function() { // return this.addBowerPackageToProject('leaflet-draw', '~0.4.9'); // } // };
/*jshint node:true*/ module.exports = { description: 'add leaflet-draw assets, using npm', normalizeEntityName: function() {}, // no-op since we're just adding dependencies afterInstall: function() { return this.addPackageToProject('leaflet-draw', '~0.4.9'); } };
Update blueprint to add npm package
Update blueprint to add npm package
JavaScript
mit
StevenHeinrich/ember-leaflet-draw,StevenHeinrich/ember-leaflet-draw,StevenHeinrich/ember-leaflet-draw
--- +++ @@ -1,10 +1,10 @@ -// /*jshint node:true*/ -// module.exports = { -// description: 'add leaflet-draw assets, using bower', -// -// normalizeEntityName: function() {}, // no-op since we're just adding dependencies -// -// afterInstall: function() { -// return this.addBowerPackageToProject('leaflet-dr...
bc0211568aa9ce77b4156346cf70dc76348e923e
src/gutiBot.js
src/gutiBot.js
"use strict"; const slack = require('./utils/slackUtils'); const axios = require('axios'); function _ok(response) { return response.status(200); } function respondOk(response) { return _ok(response).end(); } function respondWith(response, message) { const payload = slack.outgoingWebhook.createResponse(message...
"use strict"; const slack = require('./utils/slackUtils'); const axios = require('axios'); function _ok(response) { return response.status(200); } function _getIncomingWebhookUrl() { return process.env.SLACK_INCOMING_WEBHOOK_URL; } function _getBotUserApiToken() { return process.env.SLACK_BOT_USER_API_TOKEN; ...
Allow Gutibot to supply incoming hook url
Allow Gutibot to supply incoming hook url
JavaScript
mit
awseward/silly-slacker,awseward/gutibot
--- +++ @@ -5,6 +5,14 @@ function _ok(response) { return response.status(200); +} + +function _getIncomingWebhookUrl() { + return process.env.SLACK_INCOMING_WEBHOOK_URL; +} + +function _getBotUserApiToken() { + return process.env.SLACK_BOT_USER_API_TOKEN; } function respondOk(response) { @@ -24,8 +32,15 @...
846949d03b2567c591fe284f7ef201de60324578
src/js/math.js
src/js/math.js
import * as THREE from 'three'; export function randomPointOnSphere( vector = new THREE.Vector3() ) { const theta = 2 * Math.PI * Math.random(); const u = 2 * Math.random() - 1; const v = Math.sqrt( 1 - u * u ); return vector.set( v * Math.cos( theta ), v * Math.sin( theta ), u ); } export func...
import * as THREE from 'three'; export function randomPointOnSphere( vector = new THREE.Vector3() ) { const theta = 2 * Math.PI * Math.random(); const u = 2 * Math.random() - 1; const v = Math.sqrt( 1 - u * u ); return vector.set( v * Math.cos( theta ), v * Math.sin( theta ), u ); } export func...
Remove custom 1D lerp() function.
Remove custom 1D lerp() function. THREE.Math.lerp() was added in three.js r82.
JavaScript
mit
razh/flying-machines,razh/flying-machines
--- +++ @@ -10,10 +10,6 @@ v * Math.sin( theta ), u ); -} - -export function lerp( a, b, t ) { - return a + t * ( b - a ); } export function inverseLerp( a, b, x ) {
415e6315f263345c3f06bcc3d33c6403fd1cfed3
src/js/main.js
src/js/main.js
let dictionary = new Dictionary(); let httpRequest = new HttpRequest(); httpRequest.get(dictionary.randomUrl, function(o) { console.log(o) });
let dictionary = new Dictionary(); let httpRequest = new HttpRequest(); //(Math.random() * (max - min) + min) let interval = (Math.random() * (10000 - 5000)) + 5000; window.setInterval(function() { let url = dictionary.randomUrl; httpRequest.get(url); }, interval);
Set random 5-10 second interval
Set random 5-10 second interval
JavaScript
mit
brat-corp/applesauce,brat-corp/applesauce
--- +++ @@ -1,6 +1,10 @@ let dictionary = new Dictionary(); let httpRequest = new HttpRequest(); +//(Math.random() * (max - min) + min) +let interval = (Math.random() * (10000 - 5000)) + 5000; -httpRequest.get(dictionary.randomUrl, function(o) { - console.log(o) -}); +window.setInterval(function() { + let u...
9ff5270aa8c75a56df883a7b734156d2f8eded99
client/src/store/rootReducer.js
client/src/store/rootReducer.js
import { reducer as formReducer } from 'redux-form'; import { combineReducers } from 'redux'; import { routerReducer } from 'react-router-redux'; import { organization, starredBoard, notification, modals, board, home } from '../app/routes/home/modules/index'; import { signUp } from '../app/routes/signUp/module...
import { reducer as formReducer } from 'redux-form'; import { combineReducers } from 'redux'; import { routerReducer } from 'react-router-redux'; import { organization, starredBoard, notification, modals, board, home } from '../app/routes/home/modules/index'; import { signUp } from '../app/routes/signUp/module...
Reset state when user logs out
Reset state when user logs out
JavaScript
mit
Madmous/madClones,Madmous/madClones,Madmous/Trello-Clone,Madmous/madClones,Madmous/Trello-Clone,Madmous/Trello-Clone,Madmous/madClones
--- +++ @@ -25,7 +25,7 @@ card } from '../app/routes/home/routes/boardView/modules/index'; -const rootReducer = combineReducers({ +const appReducer = combineReducers({ organization, starredBoard, notification, @@ -47,4 +47,12 @@ routing: routerReducer }) +const rootReducer = (state, action) => { + if...
b78fe2c8157e90cea5535189b63120f4608b75b9
src/js/AppRouter.js
src/js/AppRouter.js
define([ "backbone", "jquery", "view/HomeView", "collection/Presentation", "view/PresentationView", "model/Slide", "view/SlideView" ], function (Backbone, $, HomeView, Presentation, PresentationView, Slide, SlideView) { return Backbone.Router.extend({ routes: { "home...
define([ "backbone", "jquery", "view/HomeView", "collection/Presentation", "view/PresentationView", "model/Slide", "view/SlideView" ], function (Backbone, $, HomeView, Presentation, PresentationView, Slide, SlideView) { var presentation = new Presentation(); return Backbone.Router....
Edit slides by finding them from the collection
Edit slides by finding them from the collection
JavaScript
mit
pads/yap,pads/yap
--- +++ @@ -7,6 +7,8 @@ "model/Slide", "view/SlideView" ], function (Backbone, $, HomeView, Presentation, PresentationView, Slide, SlideView) { + + var presentation = new Presentation(); return Backbone.Router.extend({ routes: { @@ -18,7 +20,6 @@ $("#container").html(new Hom...
82a6130b3ca36cf474959ea882e3910d4135d283
src/featureExtractors.js
src/featureExtractors.js
import rms from './extractors/rms'; import energy from './extractors/energy'; import spectralSlope from './extractors/spectralSlope'; import spectralCentroid from './extractors/spectralCentroid'; import spectralRolloff from './extractors/spectralRolloff'; import spectralFlatness from './extractors/spectralFlatness'; im...
import rms from './extractors/rms'; import energy from './extractors/energy'; import spectralSlope from './extractors/spectralSlope'; import spectralCentroid from './extractors/spectralCentroid'; import spectralRolloff from './extractors/spectralRolloff'; import spectralFlatness from './extractors/spectralFlatness'; im...
Modify export to allow importing selectively
Modify export to allow importing selectively
JavaScript
mit
meyda/meyda,hughrawlinson/meyda,meyda/meyda,meyda/meyda
--- +++ @@ -15,16 +15,23 @@ import powerSpectrum from './extractors/powerSpectrum'; import spectralFlux from './extractors/spectralFlux'; -export default { - buffer: function (args) { - return args.signal; - }, +let buffer = function(args) { + return args.signal; +}; +let complexSpectrum = function (args)...
0c5192362e234bb1d024ef9bbbe39ed3c605722a
adventure/res/js/sluggifyUI.js
adventure/res/js/sluggifyUI.js
var updatableSlug = true; /* jQuery because BS brings it in; trivial to remove */ function sluggify(str) { if (!str) { return ""; } /* we could check for the existence of a slug too */ return str.toLowerCase() /* no uppercase in slug */ .replace(/[^a-z0-9-]/g, "-") /* get rid of non-alp...
var updatableSlug = true; /* jQuery because BS brings it in; trivial to remove */ function sluggify(str) { if (!str) { return ""; } /* we could check for the existence of a slug too */ return str.toLowerCase() /* no uppercase in slug */ .replace(/[^a-z0-9-]/g, "-") /* get rid of non-alp...
Fix broken comment in slug function
Fix broken comment in slug function
JavaScript
agpl-3.0
WinWorldPC/adventure,WinWorldPC/adventure
--- +++ @@ -6,8 +6,8 @@ } /* we could check for the existence of a slug too */ return str.toLowerCase() /* no uppercase in slug */ - .replace(/[^a-z0-9-]/g, "-") /* get rid of non-alphanumerics/hyphen - .replace(/--+/g, "-") /* get rid of doubled up hyphens */ + .replace(/[^a-z0-9-]/g...
4dbb60abd9df648f4a963f6584f4090b39b8caa3
lib/poet.js
lib/poet.js
var fs = require('fs'), _ = require('underscore'), createTemplates = require('./poet/templates'), createHelpers = require('./poet/helpers'), routes = require('./poet/routes'), methods = require('./poet/methods'), utils = require('./poet/utils'), method = utils.method; function Poet (app, options) { t...
var fs = require('fs'), _ = require('underscore'), createTemplates = require('./poet/templates'), createHelpers = require('./poet/helpers'), routes = require('./poet/routes'), methods = require('./poet/methods'), utils = require('./poet/utils'), method = utils.method; function Poet (app, options) { t...
Remove method that was vestigial from pre-1.0.0 release
Remove method that was vestigial from pre-1.0.0 release
JavaScript
mit
Nayar/poet,r14r/fork_nodejs_poet,jhuang314/poet,jhuang314/poet,r14r/fork_nodejs_poet,jsantell/poet,Nayar/poet,jsantell/poet
--- +++ @@ -38,7 +38,6 @@ Poet.prototype.addTemplate = method(methods.addTemplate); Poet.prototype.init = method(methods.init); -Poet.prototype.middleware = method(methods.middleware); Poet.prototype.clearCache = method(methods.clearCache); Poet.prototype.addRoute = method(routes.addRoute); Poet.prototype.watc...
d90307b810d5a6952f969935b0b6275776c1e17a
app/assets/javascripts/ping.js
app/assets/javascripts/ping.js
var Pinger = { }; // http://stackoverflow.com/a/573784 Pinger.getPing = function(target, callback) { var start; var client = Pinger.getClient(); // xmlhttprequest object client.onreadystatechange = function() { if (client.readyState >= 2) { // request received lag_ms = Pinger.pingDone(start); //handle ...
var Pinger = { seq: 0 }; // http://stackoverflow.com/a/573784 Pinger.getPing = function(target, callback) { var start; var client = Pinger.getClient(); // xmlhttprequest object client.onreadystatechange = function() { if (client.readyState >= 2) { // request received lag_ms = Pinger.pingDone(start); ...
Use sequence number instead of timestamp to avoid cache
Use sequence number instead of timestamp to avoid cache
JavaScript
mit
zunda/ping,zunda/ping,zunda/ping
--- +++ @@ -1,4 +1,5 @@ var Pinger = { + seq: 0 }; // http://stackoverflow.com/a/573784 @@ -13,8 +14,9 @@ } } + Pinger.seq += 1; start = new Date(); - client.open("HEAD", target + "?" + start.valueOf()); + client.open("HEAD", target + "?" + Pinger.seq); client.send(); }
2f1f3e808af300a633a1435c425d2f23550e5211
lib/ember-pusher/bindings.js
lib/ember-pusher/bindings.js
var global = (typeof window !== 'undefined') ? window : {}, Ember = global.Ember; var Bindings = Ember.Mixin.create({ needs: 'pusher', init: function() { var pusherController, target; this._super(); if(!this.PUSHER_SUBSCRIPTIONS) { return; } pusherController = this.get('controllers.pusher'); ...
var global = (typeof window !== 'undefined') ? window : {}, Ember = global.Ember; var Bindings = Ember.Mixin.create({ needs: 'pusher', init: function() { var pusherController, target; this._super(); if(!this.PUSHER_SUBSCRIPTIONS) { return; } pusherController = this.get('controllers.pusher'); ...
Fix improper grab of the pusher controller in unwire
Fix improper grab of the pusher controller in unwire
JavaScript
mit
jamiebikies/ember-pusher,mmun/ember-pusher,mmun/ember-pusher,jamiebikies/ember-pusher
--- +++ @@ -20,11 +20,12 @@ willDestroy: function() { var pusherController, target; if(!this.PUSHER_SUBSCRIPTIONS) { return; } - pusherController = this.controllerFor('pusher'); + pusherController = this.get('controllers.pusher'); target = this; Object.keys(target.PUSHER_SUBSCRIPTIONS).fo...
415d3ab16903f58293aaa09cc1b465686cdd5332
app/lib/process.js
app/lib/process.js
const Promise = require('bluebird') const { exec } = require('child_process') Promise.config({ cancellation: true, }) class Process { static execute (script, options = {}) { return new Promise((resolve, reject, onCancel) => { const cmd = exec(script, (error, stdout, stderr) => { if (error) { ...
const Promise = require('bluebird') const { exec } = require('child_process') Promise.config({ cancellation: true, }) class Process { static execute (script, userOptions = {}) { const options = Object.assign({}, { cwd: process.cwd(), env: process.env, }, userOptions) return new Promise((re...
Allow user scripts to execute in their directories.
Allow user scripts to execute in their directories.
JavaScript
mit
tinytacoteam/zazu,tinytacoteam/zazu
--- +++ @@ -6,9 +6,13 @@ }) class Process { - static execute (script, options = {}) { + static execute (script, userOptions = {}) { + const options = Object.assign({}, { + cwd: process.cwd(), + env: process.env, + }, userOptions) return new Promise((resolve, reject, onCancel) => { - co...
81cea94ac6192477a0750be60be5d225ab644ff2
src/tedious.js
src/tedious.js
'use strict'; module.exports.BulkLoad = require('./bulk-load'); module.exports.Connection = require('./connection'); module.exports.Request = require('./request'); module.exports.library = require('./library'); module.exports.TYPES = require('./data-type').typeByName; module.exports.ISOLATION_LEVEL = require('./trans...
'use strict'; module.exports.BulkLoad = require('./bulk-load'); module.exports.Connection = require('./connection'); module.exports.Request = require('./request'); module.exports.library = require('./library'); module.exports.ConnectionError = require('./errors').ConnectionError; module.exports.RequestError = require...
Add ConnectionError and RequestError to module.exports
Add ConnectionError and RequestError to module.exports
JavaScript
mit
tediousjs/tedious,tediousjs/tedious,pekim/tedious
--- +++ @@ -5,6 +5,9 @@ module.exports.Request = require('./request'); module.exports.library = require('./library'); +module.exports.ConnectionError = require('./errors').ConnectionError; +module.exports.RequestError = require('./errors').RequestError; + module.exports.TYPES = require('./data-type').typeByName;...
b2d5054e5810ab94b0f42eb582af05efd366e8cd
app/util/logger.js
app/util/logger.js
import { GOOGLE_ANALYTICS_ID } from '../AppSettings'; import { GoogleAnalyticsTracker } from 'react-native-google-analytics-bridge'; let tracker = new GoogleAnalyticsTracker(GOOGLE_ANALYTICS_ID); /** * A module containing logging helper functions * @module util/logger */ module.exports = { /** * Send a log mes...
import { GOOGLE_ANALYTICS_ID } from '../AppSettings'; import { GoogleAnalyticsTracker } from 'react-native-google-analytics-bridge'; let tracker = new GoogleAnalyticsTracker(GOOGLE_ANALYTICS_ID); /** * A module containing logging helper functions * @module util/logger */ module.exports = { /** * Send a log mes...
Add google event tracking capability
Add google event tracking capability
JavaScript
mit
UCSD/campus-mobile,UCSD/now-mobile,UCSD/campus-mobile,UCSD/now-mobile,UCSD/now-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile
--- +++ @@ -27,6 +27,17 @@ tracker.trackScreenView(msg); }, + + /** + * Sends a trackEvent message to Google Analytics + * @function + * @param {string} category The category of event + * @param {string} action The name of the action + */ + trackEvent(category, action) { + tracker.trackEvent(category, ac...
0c0e961f1d9ff4f44f2c593971a5235418c09390
index.js
index.js
var gulp = require('gulp'); var elixir = require('laravel-elixir'); var karma = require('karma').server; var _ = require('underscore'); var gutils = require('gulp-util'); var task = elixir.Task; function isTddOrWatchTask() { return gutils.env._.indexOf('watch') > -1 || gutils.env._.indexOf('tdd') > -1; } elixir....
var gulp = require('gulp'); var elixir = require('laravel-elixir'); var KarmaServer = require('karma').Server; var _ = require('underscore'); var gutils = require('gulp-util'); var task = elixir.Task; function isTddOrWatchTask() { return gutils.env._.indexOf('watch') > -1 || gutils.env._.indexOf('tdd') > -1; } e...
Use Karma 0.14 style programmatic calling
Use Karma 0.14 style programmatic calling Fixes https://github.com/olyckne/laravel-elixir-karma/issues/2
JavaScript
mit
olyckne/laravel-elixir-karma
--- +++ @@ -1,6 +1,6 @@ var gulp = require('gulp'); var elixir = require('laravel-elixir'); -var karma = require('karma').server; +var KarmaServer = require('karma').Server; var _ = require('underscore'); var gutils = require('gulp-util'); @@ -14,7 +14,7 @@ if (! isTddOrWatchTask()) return; var defa...
af3fa380334d52add8e937753ef4d14fab219fb4
index.js
index.js
/** * ENVIRONMENT VARIABLES * TOKEN_LIFE: Number of seconds before a token expires * APP_TOKEN: Facebook app token * APP_ID: Facebook app ID * ADMIN_ID: Client ID for admin program * ADMIN_SECRET: Client secret for admin program */ // Dependencies var https = require('https') , fs = require('fs')...
/** * ENVIRONMENT VARIABLES * TOKEN_LIFE: Number of seconds before a token expires * APP_TOKEN: Facebook app token * APP_ID: Facebook app ID * ADMIN_ID: Client ID for admin program * ADMIN_SECRET: Client secret for admin program */ // Dependencies var https = require('https') , fs = require('fs')...
Fix heroku using wrong port
Fix heroku using wrong port
JavaScript
mit
justinsacbibit/omi,justinsacbibit/omi,justinsacbibit/omi
--- +++ @@ -19,7 +19,7 @@ , path = require('path') , api = require('./api/app.js'); -var port = process.env.PORT || process.env.SSL ? 443 : 8080; +var port = process.env.PORT || (process.env.SSL ? 443 : 8080); app.use(bodyParser.urlencoded({ extended: true
48011046ae3904c2818b311e8cd0e474505a206c
index.js
index.js
'use strict'; const express = require('express'); const moment = require('moment'); const app = express(); const port = process.argv[2] || 3000; app.get('/:timestamp', (request, response) => { const timestamp = request.params.timestamp; let result = {}; if (moment.unix(timestamp).isValid()) { result = { ...
'use strict'; const express = require('express'); const moment = require('moment'); const app = express(); const port = process.argv[2] || 3000; app.get('/:timestamp', (request, response) => { const timestamp = request.params.timestamp; let result = {}; if (moment.unix(timestamp).isValid()) { result = { ...
Use express' response.json() method because it sets proper header automatically
Use express' response.json() method because it sets proper header automatically
JavaScript
mit
NicholasAsimov/timestamp-microservice
--- +++ @@ -28,7 +28,7 @@ } } - response.end(JSON.stringify(result)); + response.json(result); }); app.listen(port, () => {
6e7940cee3cfb45526a12b24901bfef982b81eb8
client/components/Nav.js
client/components/Nav.js
import React, { Component } from 'react' import { Link, IndexLink } from 'react-router' export class Nav extends Component { constructor(props) { super(props) } render() { return ( <nav className="transparent haze-background wrap navbar navbar-default" role="navigation"> <div className="co...
import React, { Component } from 'react' import { Link, IndexLink } from 'react-router' export class Nav extends Component { constructor(props) { super(props) } render() { return ( <nav className="transparent haze-background wrap navbar navbar-default" role="navigation"> <div className="co...
Update /signin link to /login
Update /signin link to /login
JavaScript
mit
scrumptiousAmpersand/journey,scrumptiousAmpersand/journey
--- +++ @@ -28,7 +28,7 @@ </ul> <ul className="nav navbar-nav navbar-right"> <li><Link activeClassName="nav-active" to="/profile">Profile</Link></li> - <li><Link activeClassName="nav-active" to="/signin">Log In</Link></li> + <li><Link activeClassName=...
16d5a32553342cdff499ca0bb96b767d9bbbcedf
index.js
index.js
'use strict'; module.exports = function (deck/*, options*/) { var options = Object(arguments[1]), root = options.root || '/' , update, activateSlide; activateSlide = function (index) { if (index === deck.slide()) return; deck.slide(index); }; update = function (e) { var id = location.pathname.slice(root...
'use strict'; module.exports = function (deck/*, options*/) { var options = arguments[1], root, update, activateSlide; if (typeof options === 'string') { root = options; } else { options = Object(options); root = options.root || '/'; } activateSlide = function (index) { if (index === deck.slide()) retur...
Support `root` as direct argument
Support `root` as direct argument
JavaScript
mit
medikoo/bespoke-history
--- +++ @@ -1,8 +1,14 @@ 'use strict'; module.exports = function (deck/*, options*/) { - var options = Object(arguments[1]), root = options.root || '/' - , update, activateSlide; + var options = arguments[1], root, update, activateSlide; + + if (typeof options === 'string') { + root = options; + } else { + op...
260424ef0d594941d700368ed40a9f749699b7c4
test/buster.js
test/buster.js
var config = module.exports; config["Node tests"] = { environment: "node", tests: ["test/*.js"] };
var config = module.exports; config["Node tests"] = { environment: "node", tests: ["./*-test.js"] };
Update configuration file for new implicit root path
Update configuration file for new implicit root path
JavaScript
bsd-3-clause
busterjs/buster-cli
--- +++ @@ -2,5 +2,5 @@ config["Node tests"] = { environment: "node", - tests: ["test/*.js"] + tests: ["./*-test.js"] };
5a24e17fc6f172526d68428c4a40b0e59bc0fea9
index.js
index.js
'use strict'; var HOSTS = process.platform === 'win32' ? 'C:/Windows/System32/drivers/etc/hosts' : '/etc/hosts' var readFileSync = require('fs').readFileSync; module.exports = function () { return readFileSync(HOSTS, { encoding: 'utf8' }) .split(/\r?\n/) .map(function(line){ // R.E from feross/hostile v...
'use strict'; var once = require('once'); var split = require('split'); var through = require('through'); var readFileSync = require('fs').readFileSync; var createReadStream = require('fs').createReadStream; var HOSTS = process.platform === 'win32' ? 'C:/Windows/System32/drivers/etc/hosts' : '/etc/hosts'; var massageI...
Return array of objs and using stream.
Return array of objs and using stream.
JavaScript
mit
hemanth/get-hosts
--- +++ @@ -1,17 +1,53 @@ 'use strict'; -var HOSTS = process.platform === 'win32' - ? 'C:/Windows/System32/drivers/etc/hosts' - : '/etc/hosts' +var once = require('once'); +var split = require('split'); +var through = require('through'); var readFileSync = require('fs').readFileSync; -module.exports = function ()...
d26945e785f8b98776ff8e0c0e0bc6ecdf5fc81d
index.js
index.js
'use strict'; var _ = require('underscore'); var config = require('./config'); var express = require('express'); var knox = require('knox'); var app = express(); // Configure knox. app.s3 = knox.createClient({ key: config.accessKeyId, secret: config.secretAccessKey, bucket: config.bucket }); // Don't waste by...
'use strict'; var _ = require('underscore'); var config = require('./config'); var express = require('express'); var knox = require('knox'); var app = express(); // Configure knox. app.s3 = knox.createClient({ key: config.accessKeyId, secret: config.secretAccessKey, bucket: config.bucket }); // Don't waste by...
Remove Connect 3 deprecation warning
Remove Connect 3 deprecation warning
JavaScript
mit
orgsync/servo
--- +++ @@ -19,7 +19,8 @@ // Helpful vendor middleware. app.use(express.compress()); -app.use(express.bodyParser()); +app.use(express.urlencoded()); +app.use(express.json()); app.use(express.methodOverride()); // Enable CORS on demand.
4c92ec1ab4ee06effe7fab8a7ae59ba4a80e9dd4
index.js
index.js
'use strict'; const runner = require('toisu-middleware-runner'); const stacks = new WeakMap(); class Toisu { constructor() { stacks.set(this, []); this.handleError = Toisu.defaultHandleError; } use(middleware) { stacks.get(this).push(middleware); return this; } get requestHandler() { r...
'use strict'; const runner = require('toisu-middleware-runner'); const stacks = new WeakMap(); class Toisu { constructor() { stacks.set(this, []); this.handleError = Toisu.defaultHandleError; } use(middleware) { stacks.get(this).push(middleware); return this; } get requestHandler() { r...
Use correct error status code.
Use correct error status code.
JavaScript
mit
qubyte/toisu
--- +++ @@ -31,7 +31,7 @@ } static defaultHandleError(req, res) { - res.statusCode = 502; + res.statusCode = 500; res.end(); } }
40a0ffde6c20f5201adac18671230c08c08b39d1
index.js
index.js
"use strict"; module.exports = { rules: { "jquery-var-name": require("./lib/rules/jquery-var-name"), "check-closure-globals": require("./lib/rules/check-closure-globals") }, rulesConfig: { "jquery-var-name": [2], "check-closure-globals": [2] } };
"use strict"; module.exports = { rules: { "jquery-var-name": require("./lib/rules/jquery-var-name"), "check-closure-globals": require("./lib/rules/check-closure-globals") }, rulesConfig: { "jquery-var-name": [1], "check-closure-globals": [1] } };
Make default level a warning
Make default level a warning
JavaScript
mit
theodoreb/eslint-plugin-drupal
--- +++ @@ -6,7 +6,7 @@ "check-closure-globals": require("./lib/rules/check-closure-globals") }, rulesConfig: { - "jquery-var-name": [2], - "check-closure-globals": [2] + "jquery-var-name": [1], + "check-closure-globals": [1] } };
9b562aed4d0d8490f9f2a36d8cf3eac64d80eb61
index.js
index.js
var VOWELS = /[aeiou]+/gi; var WHITE_SPACE = /\s+/g; var NOTHING = ''; function tokenize(str){ return str.split(WHITE_SPACE); } function replace(tokens){ return tokens.map(function(t){ return t.replace(VOWELS,NOTHING); }); } exports.parse = function parse(string, join){ if(typeof string !== 'string'){...
var VOWELS = /[aeiou]/gi; var VOWELS_AND_SPACE = /[aeiou\s]/g; exports.parse = function parse(string, join){ if(typeof string !== 'string'){ throw new TypeError('Expected a string as the first option'); } join = join || false; var replacer = VOWELS; if (join) { replacer = VOWELS_AND_SPACE; } ...
Reduce amount of transformations by ~66%
Reduce amount of transformations by ~66%
JavaScript
mit
lestoni/unvowel
--- +++ @@ -1,16 +1,5 @@ -var VOWELS = /[aeiou]+/gi; -var WHITE_SPACE = /\s+/g; -var NOTHING = ''; - -function tokenize(str){ - return str.split(WHITE_SPACE); -} - -function replace(tokens){ - return tokens.map(function(t){ - return t.replace(VOWELS,NOTHING); - }); -} +var VOWELS = /[aeiou]/gi; +var VOWELS...
3c4a2e9a777e1d18f7886df57d616f5a9d69925c
tests/index.js
tests/index.js
// let referee = require('referee') // let {assert} = referee // let {beforeEach, afterEach} = window // // // assertions counting // let expected = 0 // referee.add('expect', { // assert: (exp) => { // expected = exp // return true // } // }) // beforeEach(() => { // referee.count = 0 // }) // afterEach(...
// let referee = require('referee') // let {assert} = referee // let {beforeEach, afterEach} = window // // // assertions counting // let expected = 0 // referee.add('expect', { // assert: (exp) => { // expected = exp // return true // } // }) // beforeEach(() => { // referee.count = 0 // }) // afterEach(...
Make tests pass in all browsers (co relies on global Promise)
Make tests pass in all browsers (co relies on global Promise)
JavaScript
mit
QubitProducts/cherrytree,QubitProducts/cherrytree,nathanboktae/cherrytree,nathanboktae/cherrytree
--- +++ @@ -27,5 +27,9 @@ // expected = false // }) +// need to do this for co to work +let Promise = require('es6-promise').Promise +window.Promise = Promise + let testsContext = require.context('.', true, /Test$/) testsContext.keys().forEach(testsContext)
2b330e110da8849d5edd4258f6e65e266fd48073
index.js
index.js
var fs = require('fs'); var _ = require('lodash'); var Datastore = require('nedb'), db = new Datastore({ filename: './data/xkcd', autoload: true }); module.exports = function (words, callback) { db.find({ word: { $in: words } }, function (err, docs) { if (err) return callback(err); if (!docs.length) { ca...
var fs = require('fs'); var _ = require('lodash'); var Datastore = require('nedb'), db = new Datastore({ filename: __dirname + '/data/xkcd', autoload: true }); module.exports = function (words, callback) { db.find({ word: { $in: words } }, function (err, docs) { if (err) return callback(err); if (!docs.leng...
Use an absolute path to load the db file
Use an absolute path to load the db file This makes it so that the module can also be used in other node projects even when xkcd-cli is contained within the `node_modules` of the depending package
JavaScript
mit
necccc/xkcd-cli
--- +++ @@ -2,7 +2,7 @@ var _ = require('lodash'); var Datastore = require('nedb'), - db = new Datastore({ filename: './data/xkcd', autoload: true }); + db = new Datastore({ filename: __dirname + '/data/xkcd', autoload: true }); module.exports = function (words, callback) {
fd6144bacd22dbf4d8b9e74ebb56835726d631d8
index.js
index.js
'use strict'; module.exports = { name: 'ember-cli-stripe' };
'use strict'; module.exports = { name: 'ember-cli-stripe', contentFor: function(type) { if(type === 'body') { return '<script src="https://checkout.stripe.com/checkout.js"></script>'; } }, };
Add content-for hook to add Stripe's checkout.js
Add content-for hook to add Stripe's checkout.js
JavaScript
mit
vladucu/ember-cli-stripe,vladucu/ember-cli-stripe
--- +++ @@ -1,5 +1,11 @@ 'use strict'; module.exports = { - name: 'ember-cli-stripe' + name: 'ember-cli-stripe', + + contentFor: function(type) { + if(type === 'body') { + return '<script src="https://checkout.stripe.com/checkout.js"></script>'; + } + }, };
32c5de2ad9c490aa9ae9eb05745947f060fb1ea9
www/js/main.js
www/js/main.js
window.onload = action var action = document.pesan.action = login(); function login() { var nama = document.pesan.nama.value; var no-bpjs = document.pesan.no-bpjs.value; var name = "Andre Christoga"; var bpjs-no = ""; if ((nama == name) && (no-bpjs == bpjs-no)) { window.location.href = "rs.html"; }; else { ...
window.onload = action var action = document.pesan.action = login(); function login() { var nama = document.pesan.nama.value; var no-bpjs = document.pesan.no-bpjs.value; var name = "Andre Christoga"; var bpjs-no = ""; if ((nama == name) && (no-bpjs == bpjs-no)) { window.location.href = "rs.html"; return true...
Return true if its true
Return true if its true
JavaScript
mit
cepatsembuh/cordova,christoga/cepatsembuh,cepatsembuh/cordova,mercysmart/cepatsembuh,mercysmart/cepatsembuh,mercysmart/cepatsembuh,mercysmart/cepatsembuh,mercysmart/cepatsembuh,cepatsembuh/cordova,christoga/cepatsembuh,cepatsembuh/cordova,christoga/cepatsembuh,christoga/cepatsembuh,cepatsembuh/cordova,christoga/cepatse...
--- +++ @@ -9,6 +9,7 @@ if ((nama == name) && (no-bpjs == bpjs-no)) { window.location.href = "rs.html"; + return true; }; else { alert("Harap mendaftar terlebih dahulu")
27704f4330fd2307ce5013b34fdb8a0e7bde6b2a
config/env/production.js
config/env/production.js
'use strict'; module.exports = { db: 'mongodb://localhost/mean-prod', app: { name: 'MEAN - A Modern Stack - Production' }, facebook: { clientID: 'APP_ID', clientSecret: 'APP_SECRET', callbackURL: 'http://localhost:3000/auth/facebook/callback' }, twitter: { ...
'use strict'; module.exports = { db: process.env.MONGOHQ_URL, app: { name: 'MEAN - A Modern Stack - Production' }, facebook: { clientID: 'APP_ID', clientSecret: 'APP_SECRET', callbackURL: 'http://localhost:3000/auth/facebook/callback' }, twitter: { client...
Use config property for db.
Use config property for db.
JavaScript
mit
wombleton/hardholdr,wombleton/hardholdr
--- +++ @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - db: 'mongodb://localhost/mean-prod', + db: process.env.MONGOHQ_URL, app: { name: 'MEAN - A Modern Stack - Production' },
360f33015fb0c4f7c33099b9b24cf6216f1adcc6
src/helpers.js
src/helpers.js
import { flatten, groupBy, map, omit } from 'lodash'; import { plural } from 'pluralize'; export function populateByService(app, documents, idField, typeField, options) { let types = groupBy(documents, typeField); return Promise.all( Object.keys(types).map((type) => { let entries = types[type]; ret...
import fp from 'lodash/fp'; import { plural } from 'pluralize'; const populateList = (list, idField) => (data) => { return fp.map((doc) => { let item = data.find((item) => { return String(doc[idField]) === String(item.id); }); return item; })(list); }; const populateByService = (app, idField, ty...
Fix populateByService and make it functional
Fix populateByService and make it functional
JavaScript
mit
PlayingIO/playing-content-services
--- +++ @@ -1,24 +1,33 @@ -import { flatten, groupBy, map, omit } from 'lodash'; +import fp from 'lodash/fp'; import { plural } from 'pluralize'; -export function populateByService(app, documents, idField, typeField, options) { - let types = groupBy(documents, typeField); +const populateList = (list, idField) => ...
598bce8e87b46e4a65e70034fad397cfdb38907f
dist/angular-metrics-graphics.min.js
dist/angular-metrics-graphics.min.js
/* Compiled 2015-12-15 09:12:28 */ "use strict";angular.module("metricsgraphics",[]).directive("chart",function(){return{link:function(a,b){function c(a){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZ",c="",d=0;a>d;d++){var e=Math.floor(Math.random()*b.length);c+=b.substring(e,e+1)}return"mg-chart-"+c}var d={baselines:[],descr...
/* Compiled 2015-12-15 09:12:13 */ "use strict";angular.module("metricsgraphics",[]).directive("chart",function(){return{link:function(a,b){function c(a){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZ",c="",d=0;a>d;d++){var e=Math.floor(Math.random()*b.length);c+=b.substring(e,e+1)}return"mg-chart-"+c}var d={baselines:[],descr...
Add option to preprocess date fields for inline data.
Add option to preprocess date fields for inline data. resolve #3
JavaScript
mit
elmarquez/angular-metrics-graphics,elmarquez/angular-metrics-graphics
--- +++ @@ -1,4 +1,4 @@ -/* Compiled 2015-12-15 09:12:28 */ +/* Compiled 2015-12-15 09:12:13 */ "use strict";angular.module("metricsgraphics",[]).directive("chart",function(){return{link:function(a,b){function c(a){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZ",c="",d=0;a>d;d++){var e=Math.floor(Math.random()*b.length);c+...
50d1f0fd46066aa370aa7753d9102b2514a62caa
src/router/index.js
src/router/index.js
import Vue from 'vue' import Router from 'vue-router' import Hello from '@/components/Hello' Vue.use(Router) export default new Router({ routes: [ { path: '/', name: 'Hello', component: Hello } ] })
import Vue from 'vue' import Router from 'vue-router' import Conversations from '@/components/Conversations.vue' Vue.use(Router) export default new Router({ routes: [ { path: '/', name: 'conversations-list', component: Conversations } ] })
Update router to conversation list
Update router to conversation list
JavaScript
apache-2.0
Serubin/PulseClient,Serubin/PulseClient
--- +++ @@ -1,6 +1,6 @@ import Vue from 'vue' import Router from 'vue-router' -import Hello from '@/components/Hello' +import Conversations from '@/components/Conversations.vue' Vue.use(Router) @@ -8,8 +8,8 @@ routes: [ { path: '/', - name: 'Hello', - component:...
9ac734d489af8e44a64c535e688d4e7c8663f62b
src/hooks/use-moralis.js
src/hooks/use-moralis.js
let Moralis; export function useMoralis() { if (Moralis) return { Moralis }; // Moralis Initialization if (typeof window !== `undefined`) { Moralis = require('moralis'); Moralis.initialize('knjJS1n0Hf0vkWjluePnByHQKVgUNdujnbtPbMUD'); Moralis.serverURL = 'https://memk9nntn6p4.moralis.io:2053/server'; ...
let Moralis; export function useMoralis() { if (Moralis) return { Moralis }; // Moralis Initialization if (typeof window !== `undefined`) { Moralis = require('moralis'); Moralis.initialize(process.env.MORALIS_APPLICATION_ID); Moralis.serverURL = process.env.MORALIS_SERVER_ID; } return { Moralis };...
Switch back to env variables, troubleshoot with Fleek
Switch back to env variables, troubleshoot with Fleek
JavaScript
mit
iammatthias/.com,iammatthias/.com,iammatthias/.com
--- +++ @@ -4,8 +4,8 @@ // Moralis Initialization if (typeof window !== `undefined`) { Moralis = require('moralis'); - Moralis.initialize('knjJS1n0Hf0vkWjluePnByHQKVgUNdujnbtPbMUD'); - Moralis.serverURL = 'https://memk9nntn6p4.moralis.io:2053/server'; + Moralis.initialize(process.env.MORALIS_APPLI...
0ef21e977f51aeffa279442326785704a16347fe
src/supp_classes.js
src/supp_classes.js
export class Date{ constructor(day, hour, min){ this.day = day; this.hour = hour; this.min = min; } toString(){ return ("date: " + this.day + "-- " + this.hour + ":" + this.min); } /* if a < b : return -1 if a == b : return 0 if a > b ...
export class Date{ constructor(day, hour, min){ this.day = day; this.hour = hour; this.min = min; } toString(){ return ("date: " + this.day + "-- " + this.hour + ":" + this.min); } /* if a < b : return -1 if a == b : return 0 if a > b ...
Fix comparison for weekly limits
Fix comparison for weekly limits
JavaScript
mit
bnan/dhroraryus,bnan/dhroraryus
--- +++ @@ -15,6 +15,10 @@ if a > b : return 1 */ static compare(a, b){ + if (a.day == 6 && b.day == 0) + return -1; + if (a.day == 0 && b.day == 6) + return 1; if (a.day<b.day) return -1; if (a.day>b.day)
3620be72778c761dbd61e8549ccbbf15496ebc8f
server/static-seo-server.js
server/static-seo-server.js
"use strict"; var system = require("system"); if (system.args.length < 2) { console.log("Missing arguments."); phantom.exit(); } var server = require("webserver").create(); var url = system.args[1]; var renderHtml = function(url, cb) { var page = require("webpage").create(); var finished = false; page.settings...
"use strict"; var system = require("system"); if (system.args.length < 2) { console.log("Missing arguments."); phantom.exit(); } var url = system.args[1]; var renderHtml = function(url, cb) { var page = require("webpage").create(); var finished = false; page.settings.loadImages = false; page.settings.localToRem...
Remove dead code in phantomjs server.
Remove dead code in phantomjs server.
JavaScript
mit
zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io
--- +++ @@ -1,13 +1,10 @@ "use strict"; var system = require("system"); - if (system.args.length < 2) { console.log("Missing arguments."); phantom.exit(); } - -var server = require("webserver").create(); var url = system.args[1]; var renderHtml = function(url, cb) { @@ -42,7 +39,6 @@ }, 10000); }; ...
34f89e654a07a99216d666ea78e34916fa28df57
src/components/Navbar.js
src/components/Navbar.js
import React, { Component } from 'react' import { connect } from 'react-redux' import LoginButton from './LoginButton' import LogoutButton from './LogoutButton' import { getIsAuthenticated } from '../selectors/user' class Navbar extends Component { render() { return ( <nav className='navbar navbar-default'...
import React, { Component } from 'react' import { connect } from 'react-redux' import { Nav, NavItem } from 'react-bootstrap' import { Navbar as NavbarReactBootstrap } from 'react-bootstrap' import LoginButton from './LoginButton' import LogoutButton from './LogoutButton' import { getIsAuthenticated } from '../selector...
Add organizations link in navbar
Add organizations link in navbar
JavaScript
apache-2.0
CovenantCollege/ChoirMasterClient,CovenantCollege/ChoirMasterClient
--- +++ @@ -1,5 +1,7 @@ import React, { Component } from 'react' import { connect } from 'react-redux' +import { Nav, NavItem } from 'react-bootstrap' +import { Navbar as NavbarReactBootstrap } from 'react-bootstrap' import LoginButton from './LoginButton' import LogoutButton from './LogoutButton' import { getIs...
384d069210bfecc66dcff065847e3b2d1af7779a
src/computers/constant_infinite_computer.js
src/computers/constant_infinite_computer.js
var InfiniteComputer = require('./infinite_computer.js'); class ConstantInfiniteComputer extends InfiniteComputer { getTotalScrollableHeight(): number { return this.heightData * this.numberOfChildren; } getDisplayIndexStart(windowTop: number): number { return Math.floor(windowTop / this.heightData); }...
/* @flow */ var InfiniteComputer = require('./infinite_computer.js'); class ConstantInfiniteComputer extends InfiniteComputer { getTotalScrollableHeight()/* : number */ { return this.heightData * this.numberOfChildren; } getDisplayIndexStart(windowTop/* : number */)/* : number */ { return Math.floor(wi...
Add to one more file.
Add to one more file.
JavaScript
bsd-3-clause
NordicSemiconductor/react-infinite,ahutchings/react-infinite,cesarandreu/react-infinite,pierregoutheraud/react-infinite,herojobs/react-infinite,beni55/react-infinite,NordicSemiconductor/react-infinite,amplii/react-infinite,noitakomentaja/react-infinite
--- +++ @@ -1,15 +1,17 @@ +/* @flow */ + var InfiniteComputer = require('./infinite_computer.js'); class ConstantInfiniteComputer extends InfiniteComputer { - getTotalScrollableHeight(): number { + getTotalScrollableHeight()/* : number */ { return this.heightData * this.numberOfChildren; } - getDispl...
9b35d559517447e9ffb9f32468eb14f0b6c6b4da
src/main/webapp/js/hayabusa-shortcutkeys.js
src/main/webapp/js/hayabusa-shortcutkeys.js
//open command bar Mousetrap.bindGlobal(['shift+up', 'ctrl+shift+.'], function(e) { document.getElementById('light').style.display='block'; return false; }); //close command bar Mousetrap.bindGlobal(['shift+down', 'esc'], function(e) { document.getElementById('light').style.display='none'; return false; });
//open command bar Mousetrap.bindGlobal(['shift+up'], function(e) { document.getElementById('light').style.display='block'; return false; }); //close command bar Mousetrap.bindGlobal(['shift+down', 'esc'], function(e) { document.getElementById('light').style.display='none'; return false; }); //open command ba...
Update again to show voice engine dialog for shortcutkeys
Update again to show voice engine dialog for shortcutkeys
JavaScript
bsd-3-clause
blackboard/hayabusa,blackboard/hayabusa,blackboard/hayabusa
--- +++ @@ -1,5 +1,5 @@ //open command bar -Mousetrap.bindGlobal(['shift+up', 'ctrl+shift+.'], function(e) { +Mousetrap.bindGlobal(['shift+up'], function(e) { document.getElementById('light').style.display='block'; return false; }); @@ -10,4 +10,9 @@ return false; }); +//open command bar and trigger voi...
b6198eacf719c91614f635b189a980afb97ffed2
test/config.js
test/config.js
/*jslint sloppy: true */ module.exports = function (config) { config.set({ basePath: '../', frameworks: ['jasmine'], browsers: ['Chrome', 'PhantomJS'], autoWatch: true, files: [ {pattern: 'bower_components/**/*.js', watched: false, server: true, included: true}, 'lib/matrix.js', ...
/*jslint sloppy: true */ module.exports = function (config) { config.set({ basePath: '../', frameworks: ['jasmine'], browsers: ['Chrome', 'PhantomJS'], autoWatch: true, files: [ {pattern: 'bower_components/**/*.js', watched: false, server: true, included: true}, 'lib/matrix.js', ...
Add additional files to karma setup
Add additional files to karma setup
JavaScript
mit
yetu/pocketry
--- +++ @@ -9,6 +9,8 @@ files: [ {pattern: 'bower_components/**/*.js', watched: false, server: true, included: true}, 'lib/matrix.js', + 'lib/ui.js', + 'lib/layout.js', {pattern: 'test/**/*.spec.js'} ],
3fbe8a01d93b77b496a28229ffdf3792ebab22c1
test/helper.js
test/helper.js
var browserify = require('browserify') var cp = require('child_process') var envify = require('envify/custom') var fs = require('fs') var once = require('once') var path = require('path') var CHROME = process.env.CHROME || '/Applications/Google\\ Chrome\\ Canary.app/Contents/MacOS/Google\\ Chrome\\ Canary' var BUNDLE_...
var browserify = require('browserify') var cp = require('child_process') var envify = require('envify/custom') var fs = require('fs') var once = require('once') var path = require('path') var CHROME if (process.env.CHROME) { CHROME = process.env.CHROME } else if (process.platform === 'win32') { CHROME = '"%Program...
Add Chrome path for Windows
tests: Add Chrome path for Windows
JavaScript
mit
feross/chrome-net,feross/chrome-net
--- +++ @@ -5,7 +5,15 @@ var once = require('once') var path = require('path') -var CHROME = process.env.CHROME || '/Applications/Google\\ Chrome\\ Canary.app/Contents/MacOS/Google\\ Chrome\\ Canary' +var CHROME +if (process.env.CHROME) { + CHROME = process.env.CHROME +} else if (process.platform === 'win32') { ...
e7b58e5c5438ff630c00638714db087a691b002f
task/config.js
task/config.js
// config.js var http2 = require('http2'); var path = require('./path'); module.exports = { task: { watch: { exclude: /\.map$/ } }, plugin: { pug: { pretty: '\t', basedir: path.source.template }, htmlmin: { removeComments: true, removeCommentsFromCDATA: true, removeCDATASectionsFromCD...
// config.js var path = require('./path'); module.exports = { task: { watch: { exclude: /\.map$/ } }, plugin: { pug: { pretty: '\t', basedir: path.source.template }, htmlmin: { removeComments: true, removeCommentsFromCDATA: true, removeCDATASectionsFromCDATA: true, collapseWhitespa...
Remove http2 usage on browser-sync
Remove http2 usage on browser-sync
JavaScript
cc0-1.0
thasmo/website
--- +++ @@ -1,6 +1,5 @@ // config.js -var http2 = require('http2'); var path = require('./path'); module.exports = { @@ -37,8 +36,7 @@ }, reloadDebounce: 250, online: true, - https: true, - httpModule: http2 + https: true } } };
e4d5ed7973c7c597f55ffa86a97cc1a072a4a92a
client/src/js/account/components/API/CreateInfo.js
client/src/js/account/components/API/CreateInfo.js
import React from "react"; import styled from "styled-components"; import { connect } from "react-redux"; import { Alert, Icon } from "../../../base"; const StyledCreateAPIKeyInfo = styled(Alert)` display: flex; margin-bottom: 5px; i { line-height: 20px; } p { margin-left: 5px; ...
import React from "react"; import styled from "styled-components"; import { connect } from "react-redux"; import { Alert, Icon } from "../../../base"; const StyledCreateAPIKeyInfo = styled(Alert)` display: flex; margin-bottom: 5px; i { line-height: 20px; } p { margin-left: 5px; ...
Fix spelling error in API key creation modal
Fix spelling error in API key creation modal
JavaScript
mit
igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool
--- +++ @@ -26,7 +26,7 @@ <strong>You are an administrator and can create API keys with any permissions you want.</strong> </p> <p> - If you lose you administrator role, this API key will revert to your new limited set of + ...
a4c0dc926c6986cee7dd9f9b3156559fcad0be8d
test/eslint-test.js
test/eslint-test.js
const cp = require('child_process') describe('eslint-test', function() { it('eslint should pass', function() { cp.execSync('npm run eslint') }) })
const cp = require('child_process') describe('eslint-test', function() { it('eslint should pass', process.env.MIGSI_SKIP_ESLINT ? undefined : function() { cp.execSync('npm run eslint') }) })
Allow skipping eslint test with an environment variable
Allow skipping eslint test with an environment variable This can be helpful when developing new tests, so that you do not need to be 100% compliant at all times
JavaScript
mit
BaronaGroup/migsi,BaronaGroup/migsi
--- +++ @@ -1,7 +1,7 @@ const cp = require('child_process') describe('eslint-test', function() { - it('eslint should pass', function() { + it('eslint should pass', process.env.MIGSI_SKIP_ESLINT ? undefined : function() { cp.execSync('npm run eslint') }) })
1f3c9a469a96b8b80134a16f3843cda1a368f097
src/style_manager/view/PropertyColorView.js
src/style_manager/view/PropertyColorView.js
import PropertyIntegerView from './PropertyIntegerView'; import InputColor from 'domain_abstract/ui/InputColor'; export default PropertyIntegerView.extend({ setValue(value, opts = {}) { opts = { ...opts, silent: 1 }; this.inputInst.setValue(value, opts); }, remove() { PropertyIntegerView.prototype.r...
import PropertyIntegerView from './PropertyIntegerView'; import InputColor from 'domain_abstract/ui/InputColor'; export default PropertyIntegerView.extend({ setValue(value, opts = {}) { opts = { ...opts, silent: 1 }; this.inputInst.setValue(value, opts); }, remove() { PropertyIntegerView.prototype.r...
Check if input exists before remove
Check if input exists before remove
JavaScript
bsd-3-clause
artf/grapesjs,artf/grapesjs,artf/grapesjs
--- +++ @@ -9,7 +9,8 @@ remove() { PropertyIntegerView.prototype.remove.apply(this, arguments); - this.inputInst.remove(); + const inp = this.inputInst; + inp && inp.remove(); ['inputInst', '$color'].forEach(i => (this[i] = {})); },
739ba2e9ebfb12617d5ef1926702248274ced74b
test/runner.js
test/runner.js
var checkForDevFile = function (callback) { var cwd = process.cwd(); var fs = require("fs"); var path = require("path"); var testFile = path.join(cwd, "lib", "modernizr-dev.js"); var remoteTestFile = "http://modernizr.com/downloads/modernizr-latest.js"; var http = require("http"); var file = fs.createWriteStr...
var checkForDevFile = function (callback) { var cwd = process.cwd(); var fs = require("fs"); var path = require("path"); var testFile = path.join(cwd, "lib", "modernizr-dev.js"); var remoteTestFile = "http://modernizr.com/downloads/modernizr-latest.js"; var http = require("http"); var file = fs.createWriteStr...
Reset the Gruntfile after a test failure.
Reset the Gruntfile after a test failure.
JavaScript
mit
dailymotion/grunt-modernizr,mrawdon/grunt-modernizr,Irmiz/grunt-modernizr,Modernizr/grunt-modernizr,GrimaceOfDespair/grunt-modernizr,shadowmint/grunt-modernizr,grumpydev22/grunt-modernizr,bdaenen/grunt-modernizr,optimizely/grunt-modernizr,CastroIgnacio/grunt-modernizr,tobania/grunt-modernizr,virtualidentityag/grunt-mod...
--- +++ @@ -33,7 +33,20 @@ var runner = mocha.run(); runner.on("fail", function (test, err) { + var cp = require("child_process"); + var cwd = process.cwd(); + var path = require("path"); + + var child = cp.spawn("git", [ + "checkout", "--", path.join(cwd, "Gruntfile.js") + ], { + stdio: "inherit" + }...
1b433b5b0e73838ecaa365f3fa5d4cb2f5edbff8
aura-components/src/main/components/ui/image/imageController.js
aura-components/src/main/components/ui/image/imageController.js
/* * Copyright (C) 2013 salesforce.com, inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
/* * Copyright (C) 2013 salesforce.com, inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
Revert the ui:image cmp validity checking. @bug W-2533777@
Revert the ui:image cmp validity checking. @bug W-2533777@
JavaScript
apache-2.0
madmax983/aura,SalesforceSFDC/aura,madmax983/aura,DebalinaDey/AuraDevelopDeb,navyliu/aura,DebalinaDey/AuraDevelopDeb,TribeMedia/aura,SalesforceSFDC/aura,badlogicmanpreet/aura,navyliu/aura,badlogicmanpreet/aura,madmax983/aura,DebalinaDey/AuraDevelopDeb,lcnbala/aura,SalesforceSFDC/aura,TribeMedia/aura,DebalinaDey/AuraDev...
--- +++ @@ -15,9 +15,6 @@ */ ({ init: function (component) { - if (!component || !component.isValid()) { - return; - } var cmp = component.getConcreteComponent(); var imageType = cmp.get('v.imageType'), altText = cmp.get('v.alt') || '',
f888316ee7907e94b30f32040a98c56ef2334649
tasks/xcode.js
tasks/xcode.js
/* * grunt-xcode * https://github.com/matiassingers/grunt-xcode * * Copyright (c) 2014 Matias Singers * Licensed under the MIT license. */ 'use strict'; var Promise = require('bluebird'); var exec = Promise.promisify(require('child_process').exec); String.prototype.format = function() { var formatted = this...
/* * grunt-xcode * https://github.com/matiassingers/grunt-xcode * * Copyright (c) 2014 Matias Singers * Licensed under the MIT license. */ 'use strict'; var Promise = require('bluebird'); var exec = Promise.promisify(require('child_process').exec); String.prototype.format = function() { var formatted = this...
Create executeCommand and handleCommandError helper functions
Create executeCommand and handleCommandError helper functions
JavaScript
mit
matiassingers/grunt-xcode
--- +++ @@ -20,6 +20,17 @@ }; module.exports = function(grunt) { + function executeCommand(command){ + grunt.verbose.writeln('Running command: {0}'.format(command)); + return exec(command) + .catch(handleCommandError); + } + function handleCommandError(error){ + if (error){ + grunt.warn(erro...
9e1de3f52aaecc9532b3b3b0988a14aaf4ab713f
lib/global-admin/addon/cluster-templates/new/route.js
lib/global-admin/addon/cluster-templates/new/route.js
import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; import { hash } from 'rsvp'; export default Route.extend({ globalStore: service(), access: service(), clusterTemplates: service(), model() { return hash({ clusterTemplate: this.global...
import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; import { hash } from 'rsvp'; export default Route.extend({ globalStore: service(), access: service(), clusterTemplates: service(), model() { return hash({ clusterTemplate: this.global...
Change ct default revision name to v1
Change ct default revision name to v1 https://github.com/rancher/rancher/issues/22162
JavaScript
apache-2.0
rancher/ui,westlywright/ui,vincent99/ui,westlywright/ui,rancher/ui,vincent99/ui,rancherio/ui,rancherio/ui,rancher/ui,westlywright/ui,vincent99/ui,rancherio/ui
--- +++ @@ -11,7 +11,7 @@ return hash({ clusterTemplate: this.globalStore.createRecord({ type: 'clustertemplate', }), clusterTemplateRevision: this.globalStore.createRecord({ - name: 'first-revision', + name: 'v1', type: 'clusterTemplateRevi...
80ed34fea18a6311b4490b5998df69636a4e34a9
lib/index.js
lib/index.js
var request = require('request'); var Scholarcheck = function(apiKey) { this.apiUrl = "https://api.scholarcheck.io/api/v1/"; this.apiKey = apiKey || ''; }; Scholarcheck.prototype._apiCall = function(endpoint, callback) { var options = { url: this.apiUrl + endpoint, headers: { 'Token': this.apiKey ...
var request = require('request'); var Scholarcheck = function(apiKey) { this.apiUrl = "https://app.scholarcheck.io/api/v1/"; this.apiKey = apiKey || ''; }; Scholarcheck.prototype._apiCall = function(endpoint, callback) { var options = { url: this.apiUrl + endpoint, headers: { 'Token': this.apiKey ...
Fix typo on API URL
Fix typo on API URL
JavaScript
mit
caffeinewriter/node-scholarcheck,caffeinewriter/node-scholarcheck
--- +++ @@ -1,6 +1,6 @@ var request = require('request'); var Scholarcheck = function(apiKey) { - this.apiUrl = "https://api.scholarcheck.io/api/v1/"; + this.apiUrl = "https://app.scholarcheck.io/api/v1/"; this.apiKey = apiKey || ''; };
4f4e6454f6a498fbb1a13320c4bb66c6c9ba83ec
lib/index.js
lib/index.js
'use strict'; var hash = require('./hash'); exports.escapeDiacritic = require('./escape_diacritic'); exports.escapeHTML = require('./escape_html'); exports.escapeRegExp = require('./escape_regexp'); exports.highlight = require('./highlight'); exports.htmlTag = require('./html_tag'); exports.Pattern = require('./patte...
'use strict'; var hash = require('./hash'); exports.escapeDiacritic = require('./escape_diacritic'); exports.escapeHTML = require('./escape_html'); exports.escapeRegExp = require('./escape_regexp'); exports.highlight = require('./highlight'); exports.htmlTag = require('./html_tag'); exports.Pattern = require('./patte...
Fix camelCaseKeys is not exported
Fix camelCaseKeys is not exported
JavaScript
mit
hexojs/hexo-util,hexojs/hexo-util
--- +++ @@ -17,3 +17,4 @@ exports.hash = hash.hash; exports.HashStream = hash.HashStream; exports.CacheStream = require('./cache_stream'); +exports.camelCaseKeys = require('./camel_case_keys');
11ceffc8dc5578dc089c52f3a0a80a35d31bae8c
lib/index.js
lib/index.js
'use strict'; var configViewer = require('./configViewer'); var jQueryName = 'D2L.LP.Web.UI.Html.jQuery'; var vuiName = 'D2L.LP.Web.UI.Html.Vui'; module.exports.jquery = function( opts ) { return configViewer.readConfig( jQueryName, opts ) .then( function( value ) { return value.jqueryBaseLocation + 'jquery.j...
'use strict'; var configViewer = require('./configViewer'); var jQueryName = 'D2L.LP.Web.UI.Html.jQuery'; var vuiName = 'D2L.LP.Web.UI.Html.Vui'; module.exports.jquery = function( opts ) { return configViewer.readConfig( jQueryName, opts ) .then( function( value ) { return value.jqueryBaseLocation + 'jquery.j...
Include CSS files in VUI loaded library.
Include CSS files in VUI loaded library.
JavaScript
apache-2.0
Brightspace/web-library-loader
--- +++ @@ -35,5 +35,8 @@ }; module.exports.valenceuiSync = function( opts ) { - return configViewer.readConfigSync( vuiName, opts ).baseLocation + 'valenceui.js'; + return [ + configViewer.readConfigSync( vuiName, opts ).baseLocation + 'valenceui.css', + configViewer.readConfigSync( vuiName, opts ).baseLocatio...
241548146e98b69e90809451b0b17942da296a58
test/helper.js
test/helper.js
process.env.NODE_ENV = 'test'; require('sugar'); require('colors'); module.exports.chai = require('chai'); module.exports.chai.Assertion.includeStack = true; module.exports.chai.use(require('chai-http')); module.exports.async = require('async'); module.exports.debug = console.log; // module.exports.longjohn = requ...
process.env.NODE_ENV = 'test'; process.setMaxListeners(process.env.MAX_LISTENERS || 0); require('sugar'); require('colors'); module.exports.chai = require('chai'); module.exports.chai.Assertion.includeStack = true; module.exports.chai.use(require('chai-http')); module.exports.async = require('async'); module.expor...
Use `process.setMaxListeners(0)` for tests to avoid annoying warnings.
Use `process.setMaxListeners(0)` for tests to avoid annoying warnings.
JavaScript
mit
grimen/node-document-api
--- +++ @@ -1,4 +1,6 @@ process.env.NODE_ENV = 'test'; + +process.setMaxListeners(process.env.MAX_LISTENERS || 0); require('sugar'); require('colors');
25d859b3a2597ba00c988ed4a814452558e2c1b4
foundation-ui/utils/ReactUtil.js
foundation-ui/utils/ReactUtil.js
import React from 'react'; const ReactUil = { /** * Wrap React elements * * @param {Array.<ReactElement>|ReactElement} elements * @param {function|String} wrapper component * @param {boolean} [alwaysWrap] * * @returns {ReactElement} wrapped react elements */ wrapElements(elements, wrapper ...
import React from 'react'; const ReactUil = { /** * Wrap React elements * * If elements is an array with a single element, it will not be wrapped * unless alwaysWrap is true. * * @param {Array.<ReactElement>|ReactElement} elements * @param {function|String} wrapper component * @param {boolea...
Expand description to include single-element array behavior
Expand description to include single-element array behavior
JavaScript
apache-2.0
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
--- +++ @@ -3,6 +3,9 @@ const ReactUil = { /** * Wrap React elements + * + * If elements is an array with a single element, it will not be wrapped + * unless alwaysWrap is true. * * @param {Array.<ReactElement>|ReactElement} elements * @param {function|String} wrapper component
4878fc74206e4cb01cd8874570f50f5fc2db903a
fixtures/users.js
fixtures/users.js
module.exports = [ { "model": "User", "data": { "email": "test@abakus.no", "name": "Test Bruker", // Password: test hash: '$2a$10$Gm09SZEHzdqx4eBV06nNheenfKpw3R1rXrMzmYfjX/.9UFPHnaAn6' } }, { "model": "User", "data": { "email": "backup@abakus.no", "name": "B...
module.exports = [ { model: 'User', data: { email: 'test@abakus.no', name: 'Test Bruker', // Password: test hash: '$2a$10$Gm09SZEHzdqx4eBV06nNheenfKpw3R1rXrMzmYfjX/.9UFPHnaAn6' } }, { model: 'User', data: { e...
Fix linting errors in fixture
Fix linting errors in fixture
JavaScript
mit
abakusbackup/abacash-api,abakusbackup/abacash-api
--- +++ @@ -1,20 +1,20 @@ module.exports = [ - { - "model": "User", - "data": { - "email": "test@abakus.no", - "name": "Test Bruker", - // Password: test - hash: '$2a$10$Gm09SZEHzdqx4eBV06nNheenfKpw3R1rXrMzmYfjX/.9UFPHnaAn6' + { + model: 'User', + data: { + emai...
077ab3f2110c6c2e5984484596209383c2df3c01
flow-typed/npm/@storybook/addon-info_v3.x.x.js
flow-typed/npm/@storybook/addon-info_v3.x.x.js
import type { RenderFunction, Story } from '@storybook/react'; declare module '@storybook/addon-info' { declare type Options = { inline?: boolean, header?: boolean, source?: boolean, propTables?: ?Array<React$Element<*>>, maxPropsIntoLine?: number, maxPropObjectKeys?: number, maxPropArray...
import type { RenderFunction, Story } from '@storybook/react'; declare module '@storybook/addon-info' { declare type Renderable = React$Element<any>; declare type RenderFunction = () => Renderable; declare type Options = { text?: string | Renderable, inline?: boolean, header?: boolean, source?: ...
Update Storybook info addon Flow types
Update Storybook info addon Flow types
JavaScript
unlicense
pascalduez/react-module-boilerplate
--- +++ @@ -1,11 +1,15 @@ import type { RenderFunction, Story } from '@storybook/react'; declare module '@storybook/addon-info' { + declare type Renderable = React$Element<any>; + declare type RenderFunction = () => Renderable; + declare type Options = { + text?: string | Renderable, inline?: boolean...
53e7dd095e1ae09b64b3cdadd6f961db22403098
src/www/js/setup/seg_desktop_include.js
src/www/js/setup/seg_desktop_include.js
document.write('<script type="text/javascript" src="/janitor/admin/js/manipulator/v0_9_3-janitor/merged/seg_desktop.js"></script>'); document.write('<script type="text/javascript" src="/janitor/admin/js/manipulator/v0_9_3-janitor/src/beta-u-notifier.js"></script>'); document.write('<script type="text/javascript" src="/...
document.write('<script type="text/javascript" src="/janitor/admin/js/manipulator/v0_9_3-janitor/merged/seg_desktop.js"></script>'); document.write('<script type="text/javascript" src="/janitor/admin/js/manipulator/v0_9_3-janitor/src/beta-u-notifier.js"></script>'); document.write('<script type="text/javascript" src="/...
Update manipulator include for setup
Update manipulator include for setup
JavaScript
mit
parentnode/janitor,parentnode/janitor,parentnode/janitor
--- +++ @@ -2,11 +2,11 @@ document.write('<script type="text/javascript" src="/janitor/admin/js/manipulator/v0_9_3-janitor/src/beta-u-notifier.js"></script>'); document.write('<script type="text/javascript" src="/janitor/admin/js/manipulator/v0_9_3-janitor/src/beta-u-form-onebuttonform.js"></script>'); -document....
b621b1fadebcaec9a7c200aebad8c965cad328fc
src/client/app/app.react.js
src/client/app/app.react.js
import './app.styl'; import * as state from '../state'; import Component from '../components/component.react'; import Footer from './footer.react'; import Menu from './menu.react'; import React from 'react'; import persistState from './persiststate.react'; import {RouteHandler} from 'react-router'; // Remember to impo...
import './app.styl'; import * as state from '../state'; import Component from '../components/component.react'; import Footer from './footer.react'; import Menu from './menu.react'; import React from 'react'; import persistState from './persiststate.react'; import {RouteHandler} from 'react-router'; // Remember to impo...
Add link explaining why componentWillMount is used.
Add link explaining why componentWillMount is used.
JavaScript
mit
aindre/este-example,AugustinLF/este,XeeD/test,amrsekilly/updatedEste,skallet/este,robinpokorny/este,AlesJiranek/este,syroegkin/mikora.eu,shawn-dsz/este,XeeD/este,AlesJiranek/este,youprofit/este,AugustinLF/este,laxplaer/este,christophediprima/este,este/este,zanj2006/este,puzzfuzz/othello-redux,Brainfock/este,skaldo/este...
--- +++ @@ -29,6 +29,7 @@ }; } + // https://github.com/steida/este/issues/274 componentWillMount() { if (!process.env.IS_BROWSER) return; state.state.on('change', () => {
d9549a5a002c25e054e1b4bd1a377ff444fcb403
src/data/historyEntry.js
src/data/historyEntry.js
import partial from 'lodash-es/partial' import makeProto from '../wrap' import { parseDate } from '../util' import wrapMedia from './media' import wrapRoom from './room' import wrapUser from './user' export default function wrapHistoryEntry (mp, raw) { const entry = { id: raw.id, // wrapMedia expects a playl...
import partial from 'lodash-es/partial' import makeProto from '../wrap' import { parseDate } from '../util' import wrapMedia from './media' import wrapRoom from './room' import wrapUser from './user' export default function wrapHistoryEntry (mp, raw) { const entry = { id: raw.id, // wrapMedia expects a playl...
Fix Media prop on HistoryEntries.
Fix Media prop on HistoryEntries.
JavaScript
mit
goto-bus-stop/miniplug
--- +++ @@ -9,7 +9,7 @@ const entry = { id: raw.id, // wrapMedia expects a playlist ID, but we don't know it--pass null instead. - media: wrapMedia(mp, null, raw), + media: wrapMedia(mp, null, raw.media), room: wrapRoom(mp, raw.room), user: wrapUser(mp, raw.user), time: parseDate(raw...
76df4116aaec99c285f9ab7bee45f253ce652b8d
lib/ModalFooter/examples/ModalFooterExample.js
lib/ModalFooter/examples/ModalFooterExample.js
/** * Modal: With ModalFooter component */ /* eslint-disable */ import React from 'react'; import ModalFooter from '@folio/stripes-components/lib/ModalFooter'; import Button from '@folio/stripes-components/lib/Button'; import Modal from '@folio/stripes-components/lib/Modal'; export default () => { const footer = ...
/** * Modal: With ModalFooter component */ /* eslint-disable */ import React from 'react'; import ModalFooter from '../ModalFooter'; import Button from '../../Button'; import Modal from '../../Modal'; export default () => { const footer = ( <ModalFooter primaryButton={{ label: 'Save', on...
Fix paths for ModalFooter story CSS
Fix paths for ModalFooter story CSS
JavaScript
apache-2.0
folio-org/stripes-components,folio-org/stripes-components
--- +++ @@ -4,9 +4,9 @@ /* eslint-disable */ import React from 'react'; -import ModalFooter from '@folio/stripes-components/lib/ModalFooter'; -import Button from '@folio/stripes-components/lib/Button'; -import Modal from '@folio/stripes-components/lib/Modal'; +import ModalFooter from '../ModalFooter'; +import But...
b29eb395840f11f8a981040b2e75a9116f9def34
time/client.js
time/client.js
(function () { function adjust_all_times() { $('time').each(function () { var t = $(this); var d = t.attr('datetime').replace(/-/g, '/' ).replace('T', ' ').replace('Z', ' GMT'); t.html(readable_time(new Date(d).getTime())); }); } adjust_all_times(); })();
(function () { function adjust_all_times() { $('time').each(function () { var date = date_from_time_el(this); this.innerHTML = readable_time(date.getTime()); }); } function date_from_time_el(el) { var d = el.getAttribute('datetime').replace(/-/g, '/' ).replace('T', ' ').replace('Z', ' GMT'); return new Date...
Optimize adjust_all_times() and extract helper
Optimize adjust_all_times() and extract helper
JavaScript
mit
vampiricwulf/ex-tanoshiine,reiclone/doushio,lalcmellkmal/doushio,reiclone/doushio,theGaggle/sleepingpizza,vampiricwulf/ex-tanoshiine,lalcmellkmal/doushio,alokal/meguca,alokal/meguca,lalcmellkmal/doushio,vampiricwulf/tanoshiine,theGaggle/sleepingpizza,vampiricwulf/tanoshiine,lalcmellkmal/doushio,alokal/meguca,reiclone/d...
--- +++ @@ -2,11 +2,15 @@ function adjust_all_times() { $('time').each(function () { - var t = $(this); - var d = t.attr('datetime').replace(/-/g, '/' - ).replace('T', ' ').replace('Z', ' GMT'); - t.html(readable_time(new Date(d).getTime())); + var date = date_from_time_el(this); + this.innerHTML = readab...
b9270fe41a91bf51f775f8fea818b4bdce222cb7
logology-v12/src/www/js/app/views/lemmaList.js
logology-v12/src/www/js/app/views/lemmaList.js
"use strict"; import h from "yasmf-h"; import el from "$LIB/templates/el"; import L from "$APP/localization/localization"; import glyph from "$WIDGETS/glyph"; import list from "$WIDGETS/list"; import listItem from "$WIDGETS/listItem"; import listItemContents from "$WIDGETS/listItemContents"; import listItemActions fr...
"use strict"; import h from "yasmf-h"; import el from "$LIB/templates/el"; import L from "$APP/localization/localization"; import glyph from "$WIDGETS/glyph"; import list from "$WIDGETS/list"; import listItem from "$WIDGETS/listItem"; import listItemContents from "$WIDGETS/listItemContents"; import listItemActions fr...
Remove indicator; refactor actions to separate view
Remove indicator; refactor actions to separate view
JavaScript
mit
kerrishotts/Mastering-PhoneGap-Code-Package,kerrishotts/Mastering-PhoneGap-Code-Package,kerrishotts/Mastering-PhoneGap-Code-Package,kerrishotts/Mastering-PhoneGap-Code-Package
--- +++ @@ -9,7 +9,7 @@ import listItem from "$WIDGETS/listItem"; import listItemContents from "$WIDGETS/listItemContents"; import listItemActions from "$WIDGETS/listItemActions"; -import listIndicator from "$WIDGETS/listIndicator"; +import lemmaActions from "./lemmaActions"; export default function lemmaList(l...
3ad8c63ebeb63d0739287888a717a14833b04b92
modules/core/ui/test/shape-item-promise-handler.js
modules/core/ui/test/shape-item-promise-handler.js
// DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details. 'use strict'; var expect = require('chai').expect; describe('Shape Item Promise Handler', function() { it('changes the promise shape into a content shape and runs a new rendering life cycle for the item', function(done) { va...
// DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details. 'use strict'; var expect = require('chai').expect; describe('Shape Item Promise Handler', function() { it('changes the promise shape into a content shape and runs a new rendering life cycle for the item', function(done) { va...
Fix shape item promise handler test suite
Fix shape item promise handler test suite
JavaScript
mit
DecentCMS/DecentCMS
--- +++ @@ -23,6 +23,12 @@ }; case 'shape': return require('../services/shape'); + case 'content-manager': + return { + getPartNames: function() { + return []; + } + }; } ...
90d450bf4183942e81865a20f91780d27f208994
src/main/web/florence/js/functions/_viewLogIn.js
src/main/web/florence/js/functions/_viewLogIn.js
function viewLogIn() { var login_form = templates.login; $('.section').html(login_form); $('.form-login').submit(function (e) { e.preventDefault(); var email = $('.fl-user-and-access__email').val(); var password = $('.fl-user-and-access__password').val(); postLogin(email, password); }); }
function viewLogIn() { var login_form = templates.login; $('.section').html(login_form); $('.form-login').submit(function (e) { e.preventDefault(); loadingBtn($('#login')); var email = $('.fl-user-and-access__email').val(); var password = $('.fl-user-and-access__password')....
Add loading icon to login screen
Add loading icon to login screen
JavaScript
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -1,13 +1,14 @@ function viewLogIn() { - var login_form = templates.login; - $('.section').html(login_form); + var login_form = templates.login; + $('.section').html(login_form); - $('.form-login').submit(function (e) { - e.preventDefault(); - var email = $('.fl-user-and-access__email')....
f9569ceee9c7db8c35240c66f511ef8472d936f0
ui/features/lti_collaborations/index.js
ui/features/lti_collaborations/index.js
/* * Copyright (C) 2014 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
/* * Copyright (C) 2014 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
Fix lti collaborations page unresponsive on load in chrome
Fix lti collaborations page unresponsive on load in chrome fixes VICE-2440 flag=none Test Plan: - follow repro steps in linked ticket Change-Id: I9b682719ea1e258f98caf90a197167a031995f7b Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/284881 Reviewed-by: Jeffrey Johnson <7a0f98bfe168bc29d5611ba0275e88567...
JavaScript
agpl-3.0
sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms
--- +++ @@ -17,5 +17,8 @@ */ import router from './react/router' +import ready from '@instructure/ready' -router.start() +ready(() => { + router.start() +})
16e2716fddd2d217b53ab0141f74fadf628d589c
config/database.js
config/database.js
var mongodb = require('mongodb'); var host = "alex.mongohq.com"; var port = 10016; var options = {}; var server = new mongodb.Server(host, port, options, {native_parser: true}); var Database = new mongodb.Db("TexasEstimateEm", server, {safe: false}); var inspect = require('eyes').inspector({ stream: null }); expor...
var mongodb = require('mongodb'); var host = "alex.mongohq.com"; var port = 10016; var options = {}; var server = new mongodb.Server(host, port, options, {native_parser: true}); var Database = new mongodb.Db("TexasEstimateEm", server, {safe: false}); var inspect = require('eyes').inspector({ stream: null }); expor...
Add games and tasks collections
Add games and tasks collections
JavaScript
mit
tangosource/pokerestimate,tangosource/pokerestimate
--- +++ @@ -25,7 +25,9 @@ console.log(inspect("We are now connected and authenticated .")); var collections = { - users: new mongodb.Collection(db, "users") + users: new mongodb.Collection(db, "users"), + tasks: new mongodb.Collection(db, "tasks"), + games: new mongodb.Coll...
b52d81de1ccf370e813e7f35dee48d0340e542a6
app/redux/constants.js
app/redux/constants.js
export default { FETCH_DATA_BATCH_SIZE: 75, FETCH_DATA_EXPIRE_SEC: 30, DEFAULT_SORT_ORDER: 'trending', JULY_14_HACK: new Date('2016-07-14T00:00:00Z').getTime(), };
export default { FETCH_DATA_BATCH_SIZE: 20, FETCH_DATA_EXPIRE_SEC: 30, DEFAULT_SORT_ORDER: 'trending', JULY_14_HACK: new Date('2016-07-14T00:00:00Z').getTime(), };
Revert "Temp increase fetch batch size to work around missing blog history"
Revert "Temp increase fetch batch size to work around missing blog history" This reverts commit edc49e88c559aee6ee42fae6cd8e93a43e1457b3.
JavaScript
mit
steemit-intl/steemit.com,TimCliff/steemit.com,GolosChain/tolstoy,TimCliff/steemit.com,enisey14/platform,steemit/steemit.com,steemit/steemit.com,steemit-intl/steemit.com,enisey14/platform,GolosChain/tolstoy,TimCliff/steemit.com,GolosChain/tolstoy,steemit/steemit.com
--- +++ @@ -1,5 +1,5 @@ export default { - FETCH_DATA_BATCH_SIZE: 75, + FETCH_DATA_BATCH_SIZE: 20, FETCH_DATA_EXPIRE_SEC: 30, DEFAULT_SORT_ORDER: 'trending', JULY_14_HACK: new Date('2016-07-14T00:00:00Z').getTime(),
0a480399709fb4b22b1e6be4edc32ceb261520f8
tests/system/test-trigger-upload-on-file-selection.js
tests/system/test-trigger-upload-on-file-selection.js
const numberOfPlannedTests = 6 casper.test.begin('test-trigger-upload-on-file-selection', numberOfPlannedTests, (test) => { casper.start(`http://${testhost}/trigger-on-file-select`, function () { }) casper.then(function () { const curr = this.getCurrentUrl() const fixturePath = this.fetchText('#fixture_...
const numberOfPlannedTests = 5 casper.test.begin('test-trigger-upload-on-file-selection', numberOfPlannedTests, (test) => { casper.start(`http://${testhost}/trigger-on-file-select`, function () { }) casper.then(function () { const curr = this.getCurrentUrl() const fixturePath = this.fetchText('#fixture_...
Change num of planned tests.
Change num of planned tests.
JavaScript
mit
transloadit/jquery-sdk,transloadit/jquery-sdk,transloadit/jquery-sdk
--- +++ @@ -1,4 +1,4 @@ -const numberOfPlannedTests = 6 +const numberOfPlannedTests = 5 casper.test.begin('test-trigger-upload-on-file-selection', numberOfPlannedTests, (test) => { casper.start(`http://${testhost}/trigger-on-file-select`, function () { })
a01fac7c6dc5979b98d1206b91d8798cdfbcf33e
src/Oro/Bundle/EmailBundle/Resources/public/js/app/modules/views-module.js
src/Oro/Bundle/EmailBundle/Resources/public/js/app/modules/views-module.js
require([ 'oroui/js/app/controllers/base/controller' ], function(BaseController) { 'use strict'; BaseController.loadBeforeAction([ 'jquery', 'oroemail/js/app/components/email-notification-component', 'oroemail/js/app/components/new-email-message-component', 'oroemail/js/app/...
require([ 'oroui/js/app/controllers/base/controller' ], function(BaseController) { 'use strict'; BaseController.loadBeforeAction([ 'jquery', 'oroemail/js/app/components/email-notification-component', 'oroemail/js/app/models/email-notification/email-notification-count-model' ], f...
Fix "You have a new email" message
CRM-4194: Fix "You have a new email" message fixed compositions concept
JavaScript
mit
orocrm/platform,orocrm/platform,geoffroycochard/platform,ramunasd/platform,trustify/oroplatform,geoffroycochard/platform,geoffroycochard/platform,ramunasd/platform,Djamy/platform,orocrm/platform,trustify/oroplatform,ramunasd/platform,Djamy/platform,trustify/oroplatform,Djamy/platform
--- +++ @@ -6,13 +6,11 @@ BaseController.loadBeforeAction([ 'jquery', 'oroemail/js/app/components/email-notification-component', - 'oroemail/js/app/components/new-email-message-component', 'oroemail/js/app/models/email-notification/email-notification-count-model' - ], functio...
7ba9860efaf5e6eee85d3343cd257e8f46c78a06
assets/js/components/notifications/site/mark-notification.js
assets/js/components/notifications/site/mark-notification.js
/** * External dependencies */ import data, { TYPE_CORE } from 'GoogleComponents/data'; import { trackEvent } from 'assets/js/util/tracking'; const ACCEPTED = 'accepted'; const DISMISSED = 'dismissed'; /** * Marks the given notification with the provided state. * * @param {string} id Notification ID. * @param...
/** * External dependencies */ import data, { TYPE_CORE } from 'GoogleComponents/data'; import { trackEvent } from 'assets/js/util/tracking'; const ACCEPTED = 'accepted'; const DISMISSED = 'dismissed'; /** * Marks the given notification with the provided state. * * @param {string} id Notification ID. * @para...
Fix invalid type in JSdoc.
Fix invalid type in JSdoc.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
--- +++ @@ -10,8 +10,8 @@ /** * Marks the given notification with the provided state. * - * @param {string} id Notification ID. - * @param {state} state Notification state. + * @param {string} id Notification ID. + * @param {string} state Notification state. */ export async function markNotification( id,...
4ed024451e1bcfd5657c0814f16cd1ce56ed620e
scripts/publishForDesktop.js
scripts/publishForDesktop.js
const fs = require('fs'); const glob = require('glob'); const path = require('path'); const rimraf = require('rimraf'); const workspaceRoot = path.join(__dirname, '..'); const desktopUpdatesPath = path.join(workspaceRoot, '..', 'toolkit-for-ynab-gh-pages', 'desktop-updates'); // Clear out the directory and create it ...
const fs = require('fs'); const glob = require('glob'); const path = require('path'); const rimraf = require('rimraf'); const workspaceRoot = path.join(__dirname, '..'); const desktopUpdatesPath = path.join(workspaceRoot, '..', 'toolkit-for-ynab-gh-pages', 'desktop-updates'); // Clear out the directory and create it ...
Update publish for desktop script
Update publish for desktop script
JavaScript
mit
toolkit-for-ynab/toolkit-for-ynab,dbaldon/toolkit-for-ynab,dbaldon/toolkit-for-ynab,dbaldon/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,dbaldon/toolkit-for-ynab,blargity/toolkit-for-ynab,blargity/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,ahatzz11/toolkit-for-ynab,falkencreative/toolkit-for-ynab,ahatzz11...
--- +++ @@ -11,7 +11,7 @@ fs.mkdirSync(desktopUpdatesPath); // Copy the extension over first. -const filesToCopy = glob.sync(path.join(workspaceRoot, 'dist/*.zip')); +const filesToCopy = glob.sync(path.join(workspaceRoot, 'dist/toolkit-for-ynab-v*.zip')); if (filesToCopy.length !== 1) { throw new Error(`The...
4e335d931c15995c29989cc2e5e6b2ac77fbd4eb
assets/js/wikipedia.js
assets/js/wikipedia.js
/** * Retrieves the first wikipedia article for a provided * name and passes it to the provided callback. If it fails, * "null" will be provided to the callback, or if provided, * the failCallback will be called. */ function getWikipediaExcerpt(name, callback, failCallback) { $.getJSON("https://en.wikipedia.or...
/** * Retrieves the first wikipedia article for a provided * name and passes it to the provided callback. If it fails, * "null" will be provided to the callback, or if provided, * the failCallback will be called. */ function getWikipediaExcerpt(name, callback, failCallback) { $.getJSON("https://en.wikipedia.or...
Fix calling fail every time
Fix calling fail every time
JavaScript
mit
thenaterhood/todayinmy.city,thenaterhood/todayinmy.city,thenaterhood/todayinmy.city
--- +++ @@ -6,11 +6,13 @@ */ function getWikipediaExcerpt(name, callback, failCallback) { - $.getJSON("https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=" + name + "&redirects=1&callback=?", - function(json) { + $.getJSON("https://en.wikipedia.org/...
de4f102e9e02ecdf6778ee3a2e5cd60a65cea2c4
assets/github.js
assets/github.js
require([ 'gitbook' ], function (gitbook) { gitbook.events.bind('start', function (e, config) { var githubURL = config.github.url; if (githubURL) { jQuery('.book-header > h1').before( '<a href="' + githubURL + '" _target="blank" class="btn pull-right github-sharing-link sharing-link" aria-label...
require([ 'gitbook' ], function (gitbook) { var githubURL; function insertGitHubLink() { if (githubURL && jQuery('.github-sharing-link').length === 0) { jQuery('.book-header > h1').before( '<a href="' + githubURL + '" _target="blank" class="btn pull-right github-sharing-link sharing-link" aria-la...
Update link on page.change event
Update link on page.change event
JavaScript
apache-2.0
GitbookIO/plugin-github
--- +++ @@ -1,13 +1,22 @@ require([ 'gitbook' ], function (gitbook) { - gitbook.events.bind('start', function (e, config) { - var githubURL = config.github.url; + var githubURL; - if (githubURL) { + function insertGitHubLink() { + if (githubURL && jQuery('.github-sharing-link').length === 0) { j...
101d2d24a28145bd1352c96d4e361223dd0a464d
src/js/components/Footer.js
src/js/components/Footer.js
import React from 'react'; import SocialLinks from './SocialLinks'; import { withClassName } from './HOC'; import { currentYear } from '../utils'; function Footer({ className }) { return ( <footer className={className}> <SocialLinks /> <p> <small className="footer__copy"> Slava Pav...
import React from 'react'; import SocialLinks from './SocialLinks'; import { withClassName } from './HOC'; import { currentYear } from '../utils'; function Footer({ className }) { return ( <footer className={className}> <SocialLinks /> <div> <small className="footer__copy"> Slava P...
Replace <p> with <div> in .footer
Replace <p> with <div> in .footer [skip ci]
JavaScript
mit
slavapavlutin/pavlutin-node,slavapavlutin/pavlutin-node
--- +++ @@ -8,11 +8,11 @@ return ( <footer className={className}> <SocialLinks /> - <p> + <div> <small className="footer__copy"> Slava Pavlutin &copy; 2016-{ currentYear() } </small> - </p> + </div> </footer> ); }
abc6c2d42c1f5d7063974ac0bd196bbf05b3205a
src/mixins/updateable.js
src/mixins/updateable.js
var updatable = function() { var self = this; // Update all children this.on('update', dt => { self.children.forEach(child => { if (child.update) { child.trigger('update', dt); } }); }); }; export default updatable;
import checkForFlag from 'flockn/utils/ckeckforflag'; var isStatic = checkForFlag('static'); // TODO: This is not completely how I want it be as it only sets the children as static and not the element itself var updatable = function updateable() { // Update all children this.on('update', dt => { if (!isStatic...
Add an "visible" equivalent for update mixin
Add an "visible" equivalent for update mixin
JavaScript
mit
freezedev/flockn,freezedev/flockn
--- +++ @@ -1,9 +1,16 @@ -var updatable = function() { - var self = this; +import checkForFlag from 'flockn/utils/ckeckforflag'; +var isStatic = checkForFlag('static'); + +// TODO: This is not completely how I want it be as it only sets the children as static and not the element itself +var updatable = function up...
7d68d53d3ad32b8c1e6a301a8c5a038e0d0f89f6
coeus-webapp/src/main/webapp/scripts/common/global.js
coeus-webapp/src/main/webapp/scripts/common/global.js
var Kc = Kc || {}; Kc.Global = Kc.Global || {}; (function (namespace, $) { // set all modals to static behavior (clicking out does not close) $.fn.modal.Constructor.DEFAULTS.backdrop = "static"; })(Kc.Global, jQuery);
var Kc = Kc || {}; Kc.Global = Kc.Global || {}; (function (namespace, $) { // set all modals to static behavior (clicking out does not close) $.fn.modal.Constructor.DEFAULTS.backdrop = "static"; $(document).on("ready", function(){ // date conversion for date fields to full leading 0 - for days and ...
Convert non-full date to full date on loss of focus in js
[KRACOEUS-8479] Convert non-full date to full date on loss of focus in js
JavaScript
agpl-3.0
iu-uits-es/kc,jwillia/kc-old1,mukadder/kc,kuali/kc,ColostateResearchServices/kc,iu-uits-es/kc,kuali/kc,UniversityOfHawaiiORS/kc,jwillia/kc-old1,iu-uits-es/kc,ColostateResearchServices/kc,jwillia/kc-old1,UniversityOfHawaiiORS/kc,jwillia/kc-old1,mukadder/kc,UniversityOfHawaiiORS/kc,mukadder/kc,ColostateResearchServices/k...
--- +++ @@ -3,4 +3,46 @@ (function (namespace, $) { // set all modals to static behavior (clicking out does not close) $.fn.modal.Constructor.DEFAULTS.backdrop = "static"; + + $(document).on("ready", function(){ + // date conversion for date fields to full leading 0 - for days and months and to f...
3f7e152cbcbca8429658b45a6805d0ff5d721d05
app/models/employee.js
app/models/employee.js
import DS from 'ember-data'; import ProjectedModel from './projected-model'; import Proj from '../utils/projection-attributes'; var Model = ProjectedModel.extend({ firstName: DS.attr('string'), lastName: DS.attr('string'), birthDate: DS.attr('date'), employee1: DS.belongsTo('employee', { inverse: null, async: ...
import DS from 'ember-data'; import ProjectedModel from './projected-model'; import Proj from '../utils/projection-attributes'; var Model = ProjectedModel.extend({ firstName: DS.attr('string'), lastName: DS.attr('string'), birthDate: DS.attr('date'), employee1: DS.belongsTo('employee', { inverse: null, async: ...
Fix typos in EmployeeE projection
Fix typos in EmployeeE projection
JavaScript
mit
Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry
--- +++ @@ -32,8 +32,8 @@ }), orders: Proj.hasMany('order', { shipName: Proj.attr('Ship Name'), - ShipCountry: Proj.attr('Ship Country'), - OrderDate: Proj.attr('Order Date') + shipCountry: Proj.attr('Ship Country'), + orderDate: Proj.attr('Order Date') }) });
e53e51c0adf5a027148067ccbf06535e49bea469
numeric-string/numeric-string.js
numeric-string/numeric-string.js
var numericString = function (number) { var string = ('' + number).split('.'), length = string[0].length, places = 0; while (--length) { places += 1; // At every third position we want to insert a comma if (places % 3 === 0) { string[0] = string[0].substr(0, length) + ',' + string[0]....
var numericString = function (number) { var parts = ('' + number).split('.'), length = parts[0].length, places = 0; while (--length) { places += 1; // At every third position we want to insert a comma if (places % 3 === 0) { parts[0] = parts[0].substr(0, length) + ',' + parts[0].subs...
Implement regex numeric string solution.
Implement regex numeric string solution.
JavaScript
mit
saurabhjn76/code-problems,angelkar/code-problems,sethdame/code-problems,jefimenko/code-problems,lgulliver/code-problems,caoglish/code-problems,lgulliver/code-problems,SterlingVix/code-problems,aloisdg/code-problems,diversedition/code-problems,patrickford/code-problems,caoglish/code-problems,caoglish/code-problems,patri...
--- +++ @@ -1,15 +1,25 @@ var numericString = function (number) { - var string = ('' + number).split('.'), - length = string[0].length, + var parts = ('' + number).split('.'), + length = parts[0].length, places = 0; while (--length) { places += 1; // At every third position we want...
1b95d90af76ebeea88e3c12b34c3360b09486ea8
src/reducers/reducerTone.js
src/reducers/reducerTone.js
import { GET_TONE } from '../actions/index'; export default function (state = [], action) { switch (action.type) { case GET_TONE: return action.payload.data; default: return state; } }
import { GET_TONE } from '../actions/index'; export default function (state = [], action) { switch (action.type) { case GET_TONE: if (action.payload.status === 200) { return action.payload.data; } return state; default: return state; } }
Add conditional to tone reducer
Add conditional to tone reducer
JavaScript
mit
badT/Chatson,badT/twitchBot,dramich/twitchBot,dramich/Chatson,dramich/Chatson,TerryCapan/twitchBot,TerryCapan/twitchBot,dramich/twitchBot,badT/Chatson,badT/twitchBot
--- +++ @@ -3,8 +3,10 @@ export default function (state = [], action) { switch (action.type) { case GET_TONE: - return action.payload.data; - + if (action.payload.status === 200) { + return action.payload.data; + } + return state; default: return state; }
a44798bff6aae4b6436ed15c62af5d4f700b6552
website/mcapp.projects/src/app/project/experiments/experiment/components/processes/mc-workflow-process-templates.component.js
website/mcapp.projects/src/app/project/experiments/experiment/components/processes/mc-workflow-process-templates.component.js
class MCWorkflowProcessTemplatesComponentController { /*@ngInit*/ constructor(templates) { this.templates = templates.get(); this.templateTypes = [ { title: 'CREATE SAMPLES', cssClass: 'mc-create-samples-color', icon: 'fa-cubes', ...
class MCWorkflowProcessTemplatesComponentController { /*@ngInit*/ constructor(templates) { this.templates = templates.get(); this.templateTypes = [ { title: 'CREATE SAMPLES', cssClass: 'mc-create-samples-color', icon: 'fa-cubes', ...
Modify filter to show new computational sample templates.
Modify filter to show new computational sample templates.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
--- +++ @@ -8,13 +8,13 @@ cssClass: 'mc-create-samples-color', icon: 'fa-cubes', margin: true, - templates: this.templates.filter(t => t.process_type === 'create' && t.name === 'Create Samples') + templates: this.templates.filter(t => t....
b8a79dd951253822bcfe1f48f6eb7f351d457f02
IPython/html/static/notebook/js/widgets/button.js
IPython/html/static/notebook/js/widgets/button.js
//---------------------------------------------------------------------------- // Copyright (C) 2013 The IPython Development Team // // Distributed under the terms of the BSD License. The full license is in // the file COPYING, distributed as part of this software. //------------------------------------------------...
//---------------------------------------------------------------------------- // Copyright (C) 2013 The IPython Development Team // // Distributed under the terms of the BSD License. The full license is in // the file COPYING, distributed as part of this software. //------------------------------------------------...
Use setElement to set the view's element properly.
Use setElement to set the view's element properly.
JavaScript
bsd-3-clause
ipython/ipython,ipython/ipython
--- +++ @@ -24,13 +24,12 @@ // Called when view is rendered. render : function(){ var that = this; - this.$el = $("<button />") + this.setElement($("<button />") .addClass('btn') .click(function() { that.model....
a773fb3910892ce18e9566f849a8ab3069367c0d
app/templates/_main.js
app/templates/_main.js
import Vue from 'vue'; import app from './App';<% if (extraConfig.isUseVueRouter) { %> import VueRouter from 'vue-router'; import { configRouter } from './route';<% } %> <% if (extraConfig.isUseVueRouter) { %> Vue.use(VueRouter); const App = Vue.extend(app); const router = new VueRouter(); configRouter(router); route...
import Vue from 'vue'; import app from './App';<% if (extraConfig.isUseVueRouter) { %> import VueRouter from 'vue-router'; import { configRouter } from './route';<% } %> <% if (extraConfig.isUseVueRouter) { %> Vue.use(VueRouter); const App = Vue.extend(app); const router = new VueRouter(); configRouter(router); route...
Fix code style error in main.js
Fix code style error in main.js
JavaScript
mit
PeachScript/generator-abstack-vuejs,PeachScript/generator-abstack-vuejs
--- +++ @@ -14,8 +14,8 @@ const App = new Vue({ el: 'body', components: { - app - } + app, + }, }); <% } %> Vue.config.debug = process.env.NODE_ENV !== 'production';
9fc6057d0c29a21ea40284a13ad4af79251cde10
app/assets/javascripts/koi/controllers/application.js
app/assets/javascripts/koi/controllers/application.js
import { Application } from "@hotwired/stimulus" // Stimulus controllers. This should ultimately be moved to koi/admin.js import "@hotwired/turbo-rails" import "trix"; import "@rails/actiontext"; const application = Application.start() window.Stimulus = application export { application }
import { Application } from "@hotwired/stimulus" // Stimulus controllers. This should ultimately be moved to koi/admin.js import "@hotwired/turbo-rails" import "@rails/actiontext"; const application = Application.start() window.Stimulus = application export { application }
Move trix dependency to content gem
FRIN23-19: Move trix dependency to content gem
JavaScript
mit
katalyst/koi,katalyst/koi,katalyst/koi
--- +++ @@ -2,7 +2,6 @@ // Stimulus controllers. This should ultimately be moved to koi/admin.js import "@hotwired/turbo-rails" -import "trix"; import "@rails/actiontext"; const application = Application.start()
ca78cd4901e2322a5f63fcd4c0f555b5c553dde9
assets/js/functions.js
assets/js/functions.js
$(document).ready(function () { attachResizeVideo(); switchAd(); }); function attachResizeVideo() { $(window).resize(function () { resizeVideo(); }); resizeVideo(); } function resizeVideo() { console.log("fired"); var $ytplayer = $('#ytplayer'); var $parent = $ytplayer.par...
$(document).ready(function () { attachResizeVideo(); switchAd(); }); function attachResizeVideo() { $(window).resize(function () { resizeVideo(); }); resizeVideo(); } function resizeVideo() { console.log("fired"); var $ytplayer = $('#ytplayer'); var $parent = $ytplayer.par...
Add width checking to video javascript.
Add width checking to video javascript.
JavaScript
unlicense
LiteracyFanatic/TruckAdvertisements,LiteracyFanatic/TruckAdvertisements
--- +++ @@ -20,18 +20,28 @@ var $parent = $ytplayer.parent(); - var newWidth = $parent.width() - 40; + var newHeight = $parent.height(); var aspectRatio = $ytplayer.get(0).height / $ytplayer.get(0).width; console.log(aspectRatio); $ytplayer - .width(newWidth) - .height(...
b15abeabe4b0b395485cb8754e05732c9de4953d
test/integration/server/test_bunyan.js
test/integration/server/test_bunyan.js
'use strict'; var path = require('path'); var expect = require('thehelp-test').expect; var util = require('./util'); describe('bunyan', function() { var child; before(function(done) { this.timeout(10000); util.setupScenario('bunyan', function(err) { if (err) { throw err; } ...
'use strict'; var path = require('path'); var expect = require('thehelp-test').expect; var util = require('./util'); describe('bunyan', function() { var child; before(function(done) { this.timeout(30000); util.setupScenario('bunyan', function(err) { if (err) { throw err; } ...
Increase timeout for bunyan test
Increase timeout for bunyan test Build can sometimes take a long time…
JavaScript
mit
thehelp/log-shim
--- +++ @@ -12,7 +12,7 @@ var child; before(function(done) { - this.timeout(10000); + this.timeout(30000); util.setupScenario('bunyan', function(err) { if (err) {
b5750d7cb92e99e8eb2fb6e419336d2e5a96c521
server/api/controllers/utils/utilsCtrl.spec.js
server/api/controllers/utils/utilsCtrl.spec.js
'use strict'; var should = require('should'); var utils = require('./utilsCtrl.js'); describe('utilsCtrl tests', function() { it('should find list with some id', function(done) { var lists = { listContainer1: [ {id: 'idlist1'}, {id: 'idlist2'}, {id: 'idlist3'} ], listContainer2: [ {id: 'idlist4'},...
'use strict'; var should = require('should'); var utils = require('./utilsCtrl.js'); describe('utils module tests', function() { it('should find list with some id', function(done) { var lists = { listContainer1: [ {id: 'idlist1'}, {id: 'idlist2'}, {id: 'idlist3'} ], listContainer2: [ {id: 'idlist4...
Add automatic test for utils
Add automatic test for utils
JavaScript
mit
safv12/trello-metrics,safv12/trello-metrics
--- +++ @@ -3,7 +3,7 @@ var should = require('should'); var utils = require('./utilsCtrl.js'); -describe('utilsCtrl tests', function() { +describe('utils module tests', function() { it('should find list with some id', function(done) { @@ -28,4 +28,18 @@ should(dateDiff).be.eql(172800000); done();...
9b53d4814b4170dd3e502e459e2a145ff3eec779
app/operation/operation.js
app/operation/operation.js
'use strict'; angular.module('myApp.operation', ['ngRoute']) .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/operation', { templateUrl: 'operation/operation.html', controller: 'OperationController' }); }]) .controller('OperationController', ['$scope', '$rootScope', function($s...
'use strict'; angular.module('myApp.operation', ['ngRoute']) .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/operation', { templateUrl: 'operation/operation.html', controller: 'OperationController' }); }]) .controller('OperationController', ['$scope', '$rootScope', function($s...
Set typeOperation for default to select option
Set typeOperation for default to select option
JavaScript
mit
AitorRodriguez990/angular-testing-examples,AitorRodriguez990/angular-testing-examples
--- +++ @@ -15,4 +15,6 @@ operation: true, contact: false }; + + $scope.typeOperation = 'rent'; }]);
e45662e92bee7e48ef2df981d0b6322f7522b463
app/scripts/src/request.js
app/scripts/src/request.js
'use strict'; var Settings = require('./settings.js'); var ChromeStorage = require('./chrome-storage.js'); function Request() {}; Request._send = function _send(options, accessToken) { var xhr = new XMLHttpRequest(); xhr.open(options.method, options.url, true); xhr.setRequestHeader('Content-type', 'applicatio...
'use strict'; var Settings = require('./settings.js'); var ChromeStorage = require('./chrome-storage.js'); function Request() {}; Request._send = function _send(options, accessToken) { var xhr = new XMLHttpRequest(); xhr.open(options.method, options.url, true); xhr.setRequestHeader('Content-type', 'applicatio...
Increase timeout for trakt.tv API calls
Increase timeout for trakt.tv API calls
JavaScript
mit
tegon/traktflix,MrMamen/traktflix,MrMamen/traktflix,tegon/traktflix
--- +++ @@ -12,7 +12,7 @@ xhr.setRequestHeader('Content-type', 'application/json'); xhr.setRequestHeader('trakt-api-key', Settings.clientId); xhr.setRequestHeader('trakt-api-version', Settings.apiVersion); - xhr.timeout = 4000; // increase the timeout for trakt.tv calls + xhr.timeout = 10000; // increase t...
10d041569a0b19dee2024001f7aae310ddd89dca
tests/unit/components/compiler-test.js
tests/unit/components/compiler-test.js
import hbs from 'htmlbars-inline-precompile'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('my-component', { integration: true }); test('precompile enabled flags', function(assert) { this.render(hbs` {{#if-flag-ENABLE_FOO}}Foo{{/if-flag-ENABLE_FOO}} `); assert.equal(this.$()...
import hbs from 'htmlbars-inline-precompile'; import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent('my-component', { integration: true }); test('precompile enabled flags', function(assert) { this.render(hbs` {{#if-flag-ENABLE_FOO}}Foo{{/if-flag-ENABLE_FOO}} `); assert.equal(this.$()...
Add test for {{else}} block
Add test for {{else}} block
JavaScript
mit
minichate/ember-cli-conditional-compile,minichate/ember-cli-conditional-compile
--- +++ @@ -20,3 +20,11 @@ assert.equal(this.$().text().trim(), ''); }); + +test('precompile else block', function(assert) { + this.render(hbs` + {{#if-flag-ENABLE_BAR}}Bar{{else}}Baz{{/if-flag-ENABLE_BAR}} + `); + + assert.equal(this.$().text().trim(), 'Baz'); +});
01d5c7a264f47306646e04cabab5d5e08ec76d20
template/share/spice/example/example.js
template/share/spice/example/example.js
(function (env) { "use strict"; env.ddg_spice_<: $lia_name :> = function(api_result){ // Validate the response (customize for your Spice) if (api_result.error) { return Spice.failed('<: $lia_name :>'); } // Render the response Spice.add({ ...
(function (env) { "use strict"; env.ddg_spice_<: $lia_name :> = function(api_result){ // Validate the response (customize for your Spice) if (api_result.error) { return Spice.failed('<: $lia_name :>'); } // Render the response Spice.add({ ...
Add new placeholders to Example.js
Add new placeholders to Example.js
JavaScript
apache-2.0
shyamalschandra/zeroclickinfo-spice,P71/zeroclickinfo-spice,soleo/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,toenu23/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,imwally/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,TomBebbington/zeroclic...
--- +++ @@ -16,15 +16,15 @@ data: api_result, meta: { sourceName: "Example.com", - sourceUrl: 'http://example.com/url/to/details/' + api_result.name + sourceUrl: 'http://<: $ia_domain :>/details/' + api_result.name }, t...
3febb3230f340f61103a3a93b8ca0623b57613d9
.eslintrc.js
.eslintrc.js
const package = require('./package.json') module.exports = { parser: 'babel-eslint', env: { browser: true, commonjs: true, es6: true, jest: true, node: true }, extends: [ 'eslint:recommended', 'plugin:import/errors', 'plugin:react/recommended', 'plugin:flowtype/recommended',...
const package = require('./package.json') module.exports = { parser: 'babel-eslint', env: { browser: true, commonjs: true, es6: true, jest: true, node: true }, extends: [ 'eslint:recommended', 'plugin:import/errors', 'plugin:react/recommended', 'plugin:flowtype/recommended',...
Remove unnecessary plugin using declaration
:shower: Remove unnecessary plugin using declaration
JavaScript
mit
keik/gh,keik/gh,keik/gh
--- +++ @@ -27,7 +27,7 @@ }, sourceType: 'module' }, - plugins: ['flowtype'], + plugins: [], settings: { react: { version: package.dependencies.react
e5773320c3bd1b47c00388f9fda6d3ece8f0fb1c
.eslintrc.js
.eslintrc.js
module.exports = { "env": { "browser": true, "node": true }, "globals": { "app": true, "angular": true, "_": true }, "extends": "eslint:recommended", "rules": { "indent": [ "error", 2 ], "linebreak-style": ...
module.exports = { "env": { "browser": true, "node": true }, "globals": { "app": true, "angular": true, "_": true }, "extends": "eslint:recommended", "rules": { "no-console": [ "error", { allow: ["log", "warn", "error"] } ], ...
Allow console log warn error
Allow console log warn error
JavaScript
mit
FreaKzero/gzdoom-launcher,FreaKzero/gzdoom-launcher
--- +++ @@ -12,6 +12,10 @@ "extends": "eslint:recommended", "rules": { + + "no-console": [ + "error", { allow: ["log", "warn", "error"] } + ], "indent": [ "error", 2
7551cdf761228536485caaa838b106092050d300
.eslintrc.js
.eslintrc.js
module.exports = { "env": { "browser": true }, "extends": "eslint:recommended", "rules": { "indent": [ "error", 4 ], "linebreak-style": [ "error", "unix" ], "quotes": [ "error", "doubl...
module.exports = { "env": { "browser": true, "es6": true, "node": true }, "extends": "eslint:recommended", "rules": { "indent": [ "error", 4 ], "linebreak-style": [ "error", "unix" ], "quotes"...
Allow eslint to use node and es6
Allow eslint to use node and es6
JavaScript
mit
albertyw/gentle-alerts,albertyw/gentle-alerts
--- +++ @@ -1,6 +1,8 @@ module.exports = { "env": { - "browser": true + "browser": true, + "es6": true, + "node": true }, "extends": "eslint:recommended", "rules": {
6a0a7cf7e91b7d9e216d58230c3ef87b5a5af305
static/js/logs-screen.js
static/js/logs-screen.js
/** * Logs Screen * * Shows all logs * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict'; const Log = require('./logs/log'); const LogsScreen = {...
/** * Logs Screen * * Shows all logs * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 'use strict'; const Log = require('./logs/log'); const LogsScreen = {...
Add graph of boolean property
Add graph of boolean property
JavaScript
mpl-2.0
moziot/gateway,mozilla-iot/gateway,mozilla-iot/gateway,moziot/gateway,mozilla-iot/gateway,moziot/gateway,mozilla-iot/gateway,mozilla-iot/gateway
--- +++ @@ -17,6 +17,7 @@ this.logsContainer = this.view.querySelector('.logs'); this.logs = [ new Log('virtual-things-2', 'level'), + new Log('virtual-things-2', 'on'), new Log('weather-8b8f279cfcc42b05f2b3cdfd4b0c7f9c5eac5b18', 'temperature'), new Log('philips-hue-...
508f54ba5774bc2a3a6597cb709fa67ad0632a8b
lib/livereload.js
lib/livereload.js
'use strict'; // socket.io-client requires the window object, and navigator.userAgent to be present. var window = {}, navigator = {userAgent: 'tvos'}; var io = require('socket.io-client'); /* import * as router from 'lib/router'; */ function resume(lastLocation) { if (!lastLocation) { return; } //rou...
'use strict'; // socket.io-client requires the window object, and navigator.userAgent to be present. var window = global; window.navigator = {userAgent: 'tvos'}; var io = require('socket.io-client'); function resume(lastLocation) { if (!lastLocation) { return; } } function logDebug(msg) { if (console && c...
Fix reload errors with latest tvOS
Fix reload errors with latest tvOS
JavaScript
mit
hypery2k/tvml-kit-livereload
--- +++ @@ -1,21 +1,15 @@ 'use strict'; // socket.io-client requires the window object, and navigator.userAgent to be present. -var window = {}, - navigator = {userAgent: 'tvos'}; +var window = global; +window.navigator = {userAgent: 'tvos'}; var io = require('socket.io-client'); - -/* - import * as router fr...
a588182dfe07bee8c74ccf9c3ae9e3e6e572652a
lib/logFactory.js
lib/logFactory.js
var LogStream = require('./LogStream'); var lodash = require('lodash'); /** * The LogFactory constructor. * @constructor */ var LogFactory = function () { var self = this; self._streams = {}; self._filters = []; }; /** * Create a new LogStream. * @param name The name of the component originating the logs. * ...
var LogStream = require('./LogStream'); var lodash = require('lodash'); /** * The LogFactory constructor. * @constructor */ var LogFactory = function () { var self = this; self._inputs = {}; self._outputs = []; }; /** * Create a new LogStream. * @param name The name of the component originating the logs. * @...
Fix a race condition when adding output streams before all input streams are added.
Fix a race condition when adding output streams before all input streams are added.
JavaScript
mit
ericrini/node-streamlogger
--- +++ @@ -7,8 +7,8 @@ */ var LogFactory = function () { var self = this; - self._streams = {}; - self._filters = []; + self._inputs = {}; + self._outputs = []; }; /** @@ -18,11 +18,11 @@ */ LogFactory.prototype.create = function (name) { var self = this; - self._streams[name] = new LogStream(name); - ...
f5bc7da306376fb34171ad2eb9f2869dbf68a35f
apps/baumeister_web/web/static/js/app.js
apps/baumeister_web/web/static/js/app.js
// Brunch automatically concatenates all files in your // watched paths. Those paths can be configured at // config.paths.watched in "brunch-config.js". // // However, those files will only be executed if // explicitly imported. The only exception are files // in vendor, which are never wrapped in imports and // theref...
// Brunch automatically concatenates all files in your // watched paths. Those paths can be configured at // config.paths.watched in "brunch-config.js". // // However, those files will only be executed if // explicitly imported. The only exception are files // in vendor, which are never wrapped in imports and // theref...
Enable the web socket for channel transports
Enable the web socket for channel transports
JavaScript
apache-2.0
alfert/baumeister,alfert/baumeister,alfert/baumeister
--- +++ @@ -18,4 +18,4 @@ // Local files can be imported directly using relative // paths "./socket" or full ones "web/static/js/socket". -// import socket from "./socket" +import socket from "./socket"
1dd9f0bc886a501ce015dfcf3bcbc947566641b4
src/mui/button/SaveButton.js
src/mui/button/SaveButton.js
import React from 'react'; import RaisedButton from 'material-ui/RaisedButton'; import ContentSave from 'material-ui/svg-icons/content/save'; const SaveButton = () => <RaisedButton type="submit" label="Save" icon={<ContentSave />} primary style={{ margin: '10px 24px', position: 'rel...
import React, { Component } from 'react'; import RaisedButton from 'material-ui/RaisedButton'; import ContentSave from 'material-ui/svg-icons/content/save'; import CircularProgress from 'material-ui/CircularProgress'; class SaveButton extends Component { constructor(props) { super(props); this.stat...
Add double submission protection in Save button
Add double submission protection in Save button
JavaScript
mit
marmelab/admin-on-rest,matteolc/admin-on-rest,matteolc/admin-on-rest,marmelab/admin-on-rest
--- +++ @@ -1,16 +1,37 @@ -import React from 'react'; +import React, { Component } from 'react'; import RaisedButton from 'material-ui/RaisedButton'; import ContentSave from 'material-ui/svg-icons/content/save'; +import CircularProgress from 'material-ui/CircularProgress'; -const SaveButton = () => <RaisedButton ...