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
66bea3348e4c84a9a9d45eddbc1cf1e8c0932d3a
index.js
index.js
var ids = ['yeka52', 'maboyong', 'datouma', 'gaizhilizcw', 'tianhao', 'qinnan', 'lianghuan', 'talich', 'loveletter', 'zenithdie', 'Glasschurch', 'nosensedigit', 'oldplusnew', 'negative2', 'taosay', 'DKLearnsPop', 'mactalk', 'lswlsw', 'rosicky311', 'zhimovie', 'liangbianyao', 'bianzhongqingnianxingdongzhinan', 'phos-...
var ids = ['yeka52', 'maboyong', 'datouma', 'gaizhilizcw', 'tianhao', 'qinnan', 'lianghuan', 'talich', 'loveletter', 'zenithdie', 'Glasschurch', 'nosensedigit', 'oldplusnew', 'negative2', 'taosay', 'DKLearnsPop', 'mactalk', 'lswlsw', 'rosicky311', 'zhimovie', 'liangbianyao', 'bianzhongqingnianxingdongzhinan', 'phos-...
Revert "Revert "Revert "Revert "trigger update""""
Revert "Revert "Revert "Revert "trigger update"""" This reverts commit d2be7c861e979d444b4f39aa8167d99fe93ad812.
JavaScript
apache-2.0
songchenwen/zhuanlan-rss,songchenwen/zhuanlan-rss
--- +++ @@ -6,3 +6,4 @@ var rssPath = 'out/zhuanlanrss.xml'; require('./lib/rss')(ids, rssPath); +
e11cdbfdf605225184acbc48a7af45a719d0a832
app/resize/index.js
app/resize/index.js
import candela from './../../src/candela'; import indexContent from './index.jade'; import 'javascript-detect-element-resize/detect-element-resize'; import './index.styl'; function showPage () { [...document.getElementsByClassName('page')].forEach(el => { el.classList.add('hidden'); }); let pageId = 'main'; ...
import candela from './../../src/candela'; import indexContent from './index.jade'; import 'javascript-detect-element-resize/detect-element-resize'; import './index.styl'; function showPage () { [...document.getElementsByClassName('page')].forEach(el => { el.classList.add('hidden'); }); let pageId = 'main'; ...
Fix resize demo to work with updated Scatter plot
Fix resize demo to work with updated Scatter plot
JavaScript
apache-2.0
Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela
--- +++ @@ -27,8 +27,8 @@ [...document.getElementsByClassName('vis-element')].forEach(el => { let vis = new candela.components.Scatter( el, - data, { + data, x: 'x', y: 'y' }
29ec5b25a9a10568e98eee4bd6964e58090ac470
gulp/tasks/clean.js
gulp/tasks/clean.js
import gulp from 'gulp'; import del from 'del'; const list = [ 'src/web/**/*.css', 'src/web/**/*.css.map', 'src/web/**/*.js.map', 'dist/**/*', // exclusion '!src/web/vendor/**' ]; export default (options) => { gulp.task('clean', (callback) => { del(list).then(() => { ca...
import gulp from 'gulp'; import del from 'del'; const list = [ 'dist/cnc/app', 'dist/cnc/web', 'src/web/**/*.css', 'src/web/**/*.css.map', 'src/web/**/*.js.map', // exclusion '!src/web/vendor/**' ]; export default (options) => { gulp.task('clean', (callback) => { del(list).then...
Clean only app and web from dist/cnc
Clean only app and web from dist/cnc
JavaScript
mit
cheton/cnc,cncjs/cncjs,cncjs/cncjs,cheton/piduino-grbl,cncjs/cncjs,cheton/piduino-grbl,cheton/cnc.js,cheton/cnc,cheton/cnc.js,cheton/piduino-grbl,cheton/cnc,cheton/cnc.js
--- +++ @@ -2,10 +2,11 @@ import del from 'del'; const list = [ + 'dist/cnc/app', + 'dist/cnc/web', 'src/web/**/*.css', 'src/web/**/*.css.map', 'src/web/**/*.js.map', - 'dist/**/*', // exclusion '!src/web/vendor/**' ];
d73050a1e157f1786a0361cec00768f170fad647
config-sample.js
config-sample.js
"use strict"; module.exports = { twitter: { consumer_key: "", consumer_secret: "", access_token: "", access_token_secret: "" }, timezone: "Asia/Tokyo", themeCount: 4, themes: [ "ココア", "チノ", "リゼ", "千夜", "シャロ", "マヤ", "メグ", "青山ブルーマウンテン", "モカ", "ティッピー",...
"use strict"; module.exports = { twitter: { consumer_key: "", consumer_secret: "", access_token: "", access_token_secret: "" }, timezone: "Asia/Tokyo", themeCount: 4, themes: [ "ココア", "チノ", "リゼ", "千夜", "シャロ", "マヤ", "メグ", "青山ブルーマウンテン", "モカ", "凛", ...
Add themes to default config
Add themes to default config
JavaScript
mit
rot1024/gochiusa-onedraw-bot
--- +++ @@ -23,6 +23,13 @@ "メグ", "青山ブルーマウンテン", "モカ", + "凛", + "タカヒロ", + "チノ母", + "ココア母", + "リゼ父", + "千夜祖母", + "メグ母", "ティッピー", "ワイルドギース", "あんこ"
2fc2997ac3f47d4101a96d39e6850ff620e976d3
assets/js/common.js
assets/js/common.js
function successMessage(message) { new PNotify({ title: 'Success!!', text: message, type: 'success' }); } function errorMessage(message) { new PNotify({ title: 'Failed!!', text: message, type: 'error' }); }
function successMessage(message) { new PNotify({ title: 'Success!!', text: message, type: 'success' }); } function errorMessage(message) { new PNotify({ title: 'Failed!!', text: message, type: 'error' }); } // Preview image function previewImage(input) {...
Add previewImage on Common js
Add previewImage on Common js
JavaScript
mit
gctomakin/renTRMNL,gctomakin/renTRMNL,gctomakin/renTRMNL
--- +++ @@ -13,3 +13,21 @@ type: 'error' }); } + +// Preview image +function previewImage(input) { + if (input.files && input.files[0]) { + var sizeMB = input.files[0].size/1024/1024; + if (sizeMB > 0.5) { + errorMessage("Image Size exceeds the limit. Please try again."); + $(i...
a03b6f2c8c34123f1213cfc790fc4b06ee94bef0
config/initializers/database.js
config/initializers/database.js
// config/initializers/database.js var config = require('nconf'); var mongoose = require('mongoose'); module.exports = function(cb) { 'use strict'; // Initialize the component here then call the callback mongoose.connect(process.env.MONGO_DB_URL || config.get('MONGO_DB_URL')); // connect to our database // Re...
// config/initializers/database.js var config = require('nconf'); var mongoose = require('mongoose'); module.exports = function(cb) { 'use strict'; // Initialize the component here then call the callback mongoose.connect(process.env.MONGOLAB_URI || config.get('MONGO_DB_URL')); // connect to our database // Re...
Change mongo URI environment var
Change mongo URI environment var
JavaScript
mit
hamehta3/aaa-drivinglaws-api
--- +++ @@ -6,7 +6,7 @@ module.exports = function(cb) { 'use strict'; // Initialize the component here then call the callback - mongoose.connect(process.env.MONGO_DB_URL || config.get('MONGO_DB_URL')); // connect to our database + mongoose.connect(process.env.MONGOLAB_URI || config.get('MONGO_DB_URL')); // c...
95a5b7ae3438ae47aff3102077dce77464a5430c
setup/setupBeta.js
setup/setupBeta.js
/** * Validate if the application is in beta * and the user has the access token to * view the beta version. * * If not authorized session, then display coming soon */ const env = require('../env') module.exports = (app) => { // This is only valid for Heroku. // Change this if you're using other // hosting...
/** * Validate if the application is in beta * and the user has the access token to * view the beta version. * * If not authorized session, then display coming soon */ const env = require('../env') module.exports = (app) => { // This is only valid for Heroku. // Change this if you're using other // hosting...
Check if beta flag is activated
Check if beta flag is activated
JavaScript
mit
ferreiro/website,ferreiro/website
--- +++ @@ -11,7 +11,7 @@ // This is only valid for Heroku. // Change this if you're using other // hosting provider. - if (process.env.BETA_ACTIVATED && process.env.NODE_ENV === 'production') { + if (process.env.BETA_ACTIVATED === 'true' && process.env.NODE_ENV === 'production') { app.use(setupBetaFi...
486b73ea5f37f93c120e2b9b683be50641690fd9
lib/exec.js
lib/exec.js
'use strict'; const { execFile } = require('child_process'); const exec = (...args) => { return new Promise((resolve, reject) => { execFile(...args, (err, stdout) => { if (err) { reject(err); return; } resolve(stdout); }); });...
'use strict'; const util = require('util'); const childProcess = require('child_process'); const execFile = util.promisify(childProcess.execFile); const exec = async (...args) => { const { stdout } = await execFile(...args); return stdout; }; module.exports = exec;
Simplify with async and await
Simplify with async and await
JavaScript
mpl-2.0
sholladay/os-proxy
--- +++ @@ -1,17 +1,13 @@ 'use strict'; -const { execFile } = require('child_process'); +const util = require('util'); +const childProcess = require('child_process'); -const exec = (...args) => { - return new Promise((resolve, reject) => { - execFile(...args, (err, stdout) => { - if (err) { ...
6d702bff33fc8da1f8063219674ac4f2d02aa103
src/actions/searchActions.js
src/actions/searchActions.js
import { createAction } from 'redux-actions'; import backend from '../service/backend.js'; export default createAction( 'GET_CARDATA', async (searchQuery) => await backend.getCarData(searchQuery) );
import { createAction } from 'redux-actions'; import backend from '../service/backend.js'; export default createAction( 'GET_CARDATA', async (searchQuery) => await backend.getCarData(searchQuery) );
Edit file to include async actions instead of sync actions
Edit file to include async actions instead of sync actions */ reducers now resolve promises with new middleware
JavaScript
mit
InconspicuousPaprika/Car.ly,Biletnikoff/Car.ly,Biletnikoff/Car.ly,dgilroy77/Car.ly,cehsu/Car.ly,dgilroy77/Car.ly,cehsu/Car.ly,InconspicuousPaprika/Car.ly,Biletnikoff/Car.ly,cehsu/Car.ly,Jzucca/Car.ly,Jzucca/Car.ly,dgilroy77/Car.ly,InconspicuousPaprika/Car.ly,Jzucca/Car.ly
--- +++ @@ -4,5 +4,5 @@ export default createAction( 'GET_CARDATA', - async (searchQuery) => await backend.getCarData(searchQuery) + async (searchQuery) => await backend.getCarData(searchQuery) );
d7ef13680371c6ca8176826a5f140cd1fe6eea13
tests/routes/Home/index.spec.js
tests/routes/Home/index.spec.js
import HomeRoute from 'routes/Home' describe('(Route) Home', () => { let _component beforeEach(() => { _component = HomeRoute.component() }) it('Should return a route configuration object', () => { expect(typeof HomeRoute).to.equal('object') }) it('Should define a route component', () => { e...
import HomeRoute from 'routes/Home' import { Content } from 'react-mdc-web' describe('(Route) Home', () => { let _component beforeEach(() => { _component = HomeRoute.component() }) it('Should return a route configuration object', () => { expect(typeof HomeRoute).to.equal('object') }) it('Should ...
Fix text for new component
Fix text for new component
JavaScript
mit
techcoop/techcoop.group,techcoop/techcoop.group
--- +++ @@ -1,4 +1,5 @@ import HomeRoute from 'routes/Home' +import { Content } from 'react-mdc-web' describe('(Route) Home', () => { let _component @@ -12,6 +13,6 @@ }) it('Should define a route component', () => { - expect(_component.type).to.equal('main') + expect(_component.type).to.equal(Con...
5fe6d82e9acbdd8baed5bd8d8e3e0eb182c5fd19
src/components/search_bar.js
src/components/search_bar.js
import React, { Component } from 'react' //class-based component (ES6) class SearchBar extends Component { constructor(props) { super(props); this.state = { term: '' } } render() { //method definition in ES6 return <input onChange={event => console.log(event.target.value)} />; } } export defaul...
import React, { Component } from 'react' //class-based component (ES6) class SearchBar extends Component { constructor(props) { super(props); this.state = { searchInput: '' } //This is the only time we set state like this. We usually use setState } render() { //method definition in ES6 return ( ...
Set the state of the component and output it to the screen
Set the state of the component and output it to the screen
JavaScript
mit
phirefly/react-redux-starter,phirefly/react-redux-starter
--- +++ @@ -5,11 +5,16 @@ constructor(props) { super(props); - this.state = { term: '' } + this.state = { searchInput: '' } //This is the only time we set state like this. We usually use setState } render() { //method definition in ES6 - return <input onChange={event => console.log(event.ta...
13dfef553e22433d89800c6a2d90dadc8a968fcd
src/engine/monitor-record.js
src/engine/monitor-record.js
const {Record} = require('immutable'); const MonitorRecord = Record({ id: null, // Block Id /** Present only if the monitor is sprite-specific, such as x position */ spriteName: null, /** Present only if the monitor is sprite-specific, such as x position */ targetId: null, opcode: null, val...
const {Record} = require('immutable'); const MonitorRecord = Record({ id: null, // Block Id /** Present only if the monitor is sprite-specific, such as x position */ spriteName: null, /** Present only if the monitor is sprite-specific, such as x position */ targetId: null, opcode: null, val...
Fix default value for monitor record
Fix default value for monitor record
JavaScript
bsd-3-clause
LLK/scratch-vm,LLK/scratch-vm,LLK/scratch-vm
--- +++ @@ -9,7 +9,7 @@ opcode: null, value: null, params: null, - mode: 1, // 1=default, 2=big, 3=slider + mode: 'default', sliderMin: 0, sliderMax: 100, x: 0,
c09a44b92c9d689e80f6c0492614dc56705bbfb0
test/fixtures/test_article.js
test/fixtures/test_article.js
/** @jsx React.DOM */ 'use strict' var React = require('react-tools/build/modules/React'); var statusForm = React.createClass({ render: function(){ return <form class="form-horizontal" role="form"> <div class="form-group"> <label for="brand-lead" class="col-sm-4 control-label">Bra...
'use strict' var React = require('react-tools/build/modules/React'); var statusForm = React.createClass({ render: function(){ return <form class="form-horizontal" role="form"> <div class="form-group"> <label for="brand-lead" class="col-sm-4 control-label">Brand lead:</label> ...
Fix test: JSX pragma is deprecated in React 0.12
Fix test: JSX pragma is deprecated in React 0.12
JavaScript
mit
thomasboyt/JSXHint,STRML/JSXHint,henricavalcante/JSXHint,Shriken/JSXHint
--- +++ @@ -1,4 +1,3 @@ -/** @jsx React.DOM */ 'use strict' var React = require('react-tools/build/modules/React');
88799cb55ee1b65f89469cee296fc40d51ac05d4
test/queue/with_delay_test.js
test/queue/with_delay_test.js
'use strict'; require('../helpers'); const assert = require('assert'); const Ironium = require('../..'); describe('Queue with delay', function() { const captureQueue = Ironium.queue('capture'); // Capture processed jobs here. const processed = []; before(function() { Ironium.configure({ concurrency: 1...
'use strict'; require('../helpers'); const assert = require('assert'); const Ironium = require('../..'); describe('Queue with delay', function() { let captureQueue; // Capture processed jobs here. const processed = []; before(function() { Ironium.stop(); Ironium.configure({ concurrency: 1 }); ...
Clean up before running this test.
Clean up before running this test.
JavaScript
mit
assaf/ironium
--- +++ @@ -6,13 +6,15 @@ describe('Queue with delay', function() { - const captureQueue = Ironium.queue('capture'); + let captureQueue; // Capture processed jobs here. const processed = []; before(function() { + Ironium.stop(); Ironium.configure({ concurrency: 1 }); + captureQueue = Ir...
cbbce1c48f784449a4210e4eefc5dff339649eb6
src/firefox/lib/main.js
src/firefox/lib/main.js
var buttons = require('sdk/ui/button/action'); var panels = require("sdk/panel"); var self = require("sdk/self"); const {Cu} = require("chrome"); Cu.import(self.data.url('freedom-for-firefox.jsm')); // Main uProxy button. var button = buttons.ActionButton({ id: "uProxy-button", label: "uProxy-button", icon: { ...
var buttons = require('sdk/ui/button/action'); var panels = require("sdk/panel"); var self = require("sdk/self"); const {Cu} = require("chrome"); Cu.import(self.data.url('freedom-for-firefox.jsm')); // Main uProxy button. var button = buttons.ActionButton({ id: "uProxy-button", label: "uProxy-button", icon: { ...
Update FF icon to correct size
Update FF icon to correct size
JavaScript
apache-2.0
chinarustin/uproxy,jpevarnek/uproxy,qida/uproxy,itplanes/uproxy,uProxy/uproxy,qida/uproxy,chinarustin/uproxy,roceys/uproxy,jpevarnek/uproxy,MinFu/uproxy,chinarustin/uproxy,dhkong88/uproxy,IveWong/uproxy,roceys/uproxy,dhkong88/uproxy,dhkong88/uproxy,chinarustin/uproxy,uProxy/uproxy,itplanes/uproxy,roceys/uproxy,dhkong88...
--- +++ @@ -10,9 +10,7 @@ id: "uProxy-button", label: "uProxy-button", icon: { - "16": "./icons/NotLoggedIn_32.gif", - "19": "./icons/NotLoggedIn_32.gif", - "128": "./icons/LoggedIn_256.gif" + "32": "./icons/NotLoggedIn_32.gif" }, onClick: start });
7eb522b3cd72bb584d7b053cde79b9ca08f0ec22
src/systems/renderer/sample-renderer-system.js
src/systems/renderer/sample-renderer-system.js
"use strict"; module.exports = function(ecs, data) { // eslint-disable-line no-unused-vars ecs.addEach(function(entity, context) { // eslint-disable-line no-unused-vars var position = data.entities.get(entity, "position"); var size = data.entities.get(entity, "size"); context.fillStyle = "black"; context.fill...
"use strict"; module.exports = function(ecs, data) { // eslint-disable-line no-unused-vars data.entities.registerSearch("sampleRendererSystem", ["camera", "position", "size"]); ecs.addEach(function(entity, context) { // eslint-disable-line no-unused-vars var position = data.entities.get(entity, "position"); var ...
Fix crash when camera doesn't have size
Fix crash when camera doesn't have size
JavaScript
mit
CaldwellYSR/Bug_Catcher,RiseAndShineGames/LudumDare35,RiseAndShineGames/BugCatcher,RiseAndShineGames/BugCatcher,RiseAndShineGames/LudumDare35,RiseAndShineGames/Polymorphic,SplatJS/splat-ecs-starter-project,RiseAndShineGames/Polymorphic,SplatJS/splat-ecs-starter-project,CaldwellYSR/Bug_Catcher
--- +++ @@ -1,10 +1,11 @@ "use strict"; module.exports = function(ecs, data) { // eslint-disable-line no-unused-vars + data.entities.registerSearch("sampleRendererSystem", ["camera", "position", "size"]); ecs.addEach(function(entity, context) { // eslint-disable-line no-unused-vars var position = data.entiti...
0f39be8e6d579dca27d371545a6e1f53658da8a6
veil-knockout.js
veil-knockout.js
// Expose plugin as an AMD module if AMD loader is present: (function (factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(['knockout', 'jquery'], factory); } else { window.ko.bindingHandlers.veil = factory(ko, jQuery); } }(function (ko, $) { 'use strict'; /** * A...
// Expose plugin as an AMD module if AMD loader is present: (function (factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(['knockout', 'jquery'], factory); } else { window.ko.bindingHandlers.veil = factory(ko, jQuery); } }(function (ko, $) { 'use strict'; /** * A...
Use the value accessor as the binding context for the template
Use the value accessor as the binding context for the template
JavaScript
mit
janfoeh/veiljs,janfoeh/veiljs,janfoeh/veiljs
--- +++ @@ -20,13 +20,12 @@ /** @lends ko.bindingHandlers.veil */ init: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { var $element = $(element), - user = ko.unwrap(valueAccessor()), veilTemplate = allBindingsAccessor().veil...
aeac97437c856d08a5bc545c966b5701004d82d0
js/lambda.js
js/lambda.js
(function (context) { var λ = {}; λ.map = function (coll, func) { var output = []; for (var index in coll) { output.push(func(coll[index])); } return output; }; λ.reduce = function (coll, func) { }; })(this);
(function (context) { var λ = {}; λ.map = function (coll, func) { var output = []; for (var index in coll) { if (coll.hasOwnProperty(index)) { output.push(func(coll[index])); } } return output; }; λ.reduce = function (coll, func, memo) { for (var index in coll) { ...
Implement reduce and fix map.
Implement reduce and fix map.
JavaScript
unlicense
CWDG/Functional-JavaScript-Talk
--- +++ @@ -4,11 +4,55 @@ λ.map = function (coll, func) { var output = []; for (var index in coll) { - output.push(func(coll[index])); + if (coll.hasOwnProperty(index)) { + output.push(func(coll[index])); + } } return output; }; - λ.reduce = function (coll, func) { +...
9346e4bdabedbd3f5e97152577dbaaa3c9fd0779
src/js/sprites/enemy.js
src/js/sprites/enemy.js
export class Enemy extends Phaser.Sprite { constructor(game, x, y) { super(game, x, y, 'enemy'); this.anchor.setTo(0.5); this.game.add.existing(this); this.game.physics.arcade.enable(this); // Disable gravity because it's flying this.body.allowGravity = false; } ...
export class Enemy extends Phaser.Sprite { constructor(game, x, y) { super(game, x, y, 'enemy'); this.anchor.setTo(0.5); this.game.add.existing(this); this.game.physics.arcade.enable(this); // Disable gravity because it's flying this.body.allowGravity = false; ...
Add patrol behavior with a simple yoyo tween
Add patrol behavior with a simple yoyo tween
JavaScript
mit
themadknights/wellofeternity,themadknights/wellofeternity
--- +++ @@ -7,5 +7,9 @@ // Disable gravity because it's flying this.body.allowGravity = false; + + // Create a patrol behavior with a simple yoyo tween + this.movementTween = this.game.add.tween(this).to({ x: "+200" }, 800, "Linear", true, 0, -1); + this.movementTween.yoyo(tru...
1309a7fbab4fd501b2280f48357b24632a0f8337
web/js/script.js
web/js/script.js
$(document).ready(function () { alert('page loaded.'); mixpanel.track("Page loaded"); $("#my_button").click(function() { // This sends us an event every time a user clicks the button mixpanel.track("Button clicked"); }); }); function hide_welcome() { $('#welcome').slideUp(); mix...
$(document).ready(function () { mixpanel.track("Page loaded"); $("#my_button").click(function() { // This sends us an event every time a user clicks the button mixpanel.track("Button clicked"); }); }); function hide_welcome() { $('#welcome').slideUp(); mixpanel.track("Hide welco...
Remove test alert on page load
Remove test alert on page load
JavaScript
mit
stefanhapper/politix,stefanhapper/politix,stefanhapper/politix
--- +++ @@ -1,6 +1,6 @@ $(document).ready(function () { - alert('page loaded.'); + mixpanel.track("Page loaded"); $("#my_button").click(function() {
0fc2d4b516a5534184e2ff7e3bcd89c2e5e579ff
extensions/field_upload/assets/publish.js
extensions/field_upload/assets/publish.js
jQuery(document).ready(function() { jQuery('.field-upload').each(function() { var field = jQuery(this); var file = field.find('.file'); var upload = field.find('.upload'); var hidden = upload.find('input[type = "hidden"]'); if (file.length) { var clear = jQuery('<a />') .text('Change') .prepend...
jQuery(document).ready(function() { jQuery('.field-upload').each(function() { var field = jQuery(this); var file = field.find('.file'); var upload = field.find('.upload'); var hidden = upload.find('input[type = "hidden"]'); if (file.length) { var clear = jQuery('<a />') .text('Change') .addClas...
Add classes to identify Upload Field interface actions.
Add classes to identify Upload Field interface actions.
JavaScript
mit
embarknow/journey-cms,symphonycms/symphony-3,psychoticmeow/journey-cms,embarknow/journey-cms,embarknow/journey-cms,psychoticmeow/journey-cms,embarknow/journey-cms,embarknow/journey-cms,psychoticmeow/journey-cms,psychoticmeow/journey-cms,psychoticmeow/journey-cms,symphonycms/symphony-3
--- +++ @@ -8,8 +8,10 @@ if (file.length) { var clear = jQuery('<a />') .text('Change') + .addClass('action-change') .prependTo(field.find('.label')); var keep = jQuery('<a />') + .addClass('action-keep') .text('Keep') .prependTo(field.find('.label')) .hide();
b6db9444b7bb99d519c47baae311c7db005c07e8
src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/editor/select-cell-radio-editor.js
src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/editor/select-cell-radio-editor.js
/*global define*/ define([ 'underscore', 'backgrid' ], function (_, Backgrid) { 'use strict'; var SelectCellRadioEditor; SelectCellRadioEditor = Backgrid.SelectCellEditor.extend({ /** * @inheritDoc */ tagName: "div", /** * @inheritDoc */...
/*global define*/ define([ 'underscore', 'backgrid' ], function (_, Backgrid) { 'use strict'; var SelectCellRadioEditor; SelectCellRadioEditor = Backgrid.SelectCellEditor.extend({ /** * @inheritDoc */ tagName: "div", /** * @inheritDoc */...
Create editor for input=radio, apply it in select-cell - CR fix
BB-701: Create editor for input=radio, apply it in select-cell - CR fix
JavaScript
mit
2ndkauboy/platform,trustify/oroplatform,ramunasd/platform,trustify/oroplatform,ramunasd/platform,ramunasd/platform,orocrm/platform,Djamy/platform,northdakota/platform,2ndkauboy/platform,geoffroycochard/platform,hugeval/platform,trustify/oroplatform,orocrm/platform,Djamy/platform,geoffroycochard/platform,hugeval/platfor...
--- +++ @@ -26,7 +26,7 @@ /** * @inheritDoc */ - template: _.template('<input name="<%- this.model.cid + \'_\' + this.cid %>" type="radio" value="<%- value %>" <%= selected ? checked : "" %>><%- text %>', null, {variable: null}), + template: _.template('<input name="<%- this...
ac95603a12c5b49e073b019c462ebad714159c5e
packages/strapi-generate-new/lib/resources/files/config/functions/bootstrap.js
packages/strapi-generate-new/lib/resources/files/config/functions/bootstrap.js
'use strict'; /** * An asynchronous bootstrap function that runs before * your application gets started. * * This gives you an opportunity to set up your data model, * run jobs, or perform some special logic. */ module.exports = cb => { cb(); };
'use strict'; /** * An asynchronous bootstrap function that runs before * your application gets started. * * This gives you an opportunity to set up your data model, * run jobs, or perform some special logic. */ module.exports = () => {};
Update strapi-generate-new boostrapi function template
Update strapi-generate-new boostrapi function template
JavaScript
mit
wistityhq/strapi,wistityhq/strapi
--- +++ @@ -8,6 +8,4 @@ * run jobs, or perform some special logic. */ -module.exports = cb => { - cb(); -}; +module.exports = () => {};
070e31a447ec330c25609dd2f88c0ee0e06fd70e
client/src/helpers/getRemainingTime.js
client/src/helpers/getRemainingTime.js
export default date => { const diff = new Date(date).getTime() - Date.now(); const days = Math.floor(diff / 86400 / 1000); return `${days} days`; };
export default date => { const diff = new Date(date).getTime() - Date.now(); const days = Math.floor(diff / 86400 / 1000); const ending = days > 1 ? 's' : ''; return days > 0 ? `${days} day${ending}` : `Last day`; };
Change wording for 0 and 1 day
Change wording for 0 and 1 day
JavaScript
mit
jenovs/bears-team-14,jenovs/bears-team-14
--- +++ @@ -2,5 +2,7 @@ const diff = new Date(date).getTime() - Date.now(); const days = Math.floor(diff / 86400 / 1000); - return `${days} days`; + const ending = days > 1 ? 's' : ''; + + return days > 0 ? `${days} day${ending}` : `Last day`; };
1bbd5bcc31fe2f812d559378ee598742faa3a2e9
spec/MydemoSpec.js
spec/MydemoSpec.js
describe("My demo suite", function() { it("contains spec with my demo expectation", function() { expect(1).toBe(1); }); });
describe("My demo suite", function() { it("contains spec with my demo expectation", function() { expect(1).toBe(1); }); }); describe("My suite is just a function", function() { var a = false; it("and so is a spec", function(){ expect(a).toBe(false); }); it("the spec is using not matcher", function() { ...
Use toBe and not.toBe matcher. Look spec as a function
Use toBe and not.toBe matcher. Look spec as a function
JavaScript
mit
philipdai/myjasminedemo,philipdai/myjasminedemo
--- +++ @@ -4,3 +4,16 @@ }); }); +describe("My suite is just a function", function() { + var a = false; + + it("and so is a spec", function(){ + expect(a).toBe(false); + }); + + it("the spec is using not matcher", function() { + expect(a).not.toBe(true); + expect(a).not.toBe(null); + }); +}); +
678557cd57ef1bbad3d46af3219e78ef619198dc
lib/index.js
lib/index.js
function createSleepPromise(timeout) { return new Promise(function(resolve) { setTimeout(resolve, timeout); }); } function sleep(timeout) { // Pass value through, if used in a promise chain function promiseFunction(value) { return createSleepPromise(timeout).then(function() { ...
function createSleepPromise(timeout) { return new Promise(resolve => { setTimeout(resolve, timeout); }); } function sleep(timeout) { // Pass value through, if used in a promise chain function promiseFunction(value) { return createSleepPromise(timeout).then(() => value); } const...
Refactor code to use arrow functions
Refactor code to use arrow functions
JavaScript
mit
brummelte/sleep-promise
--- +++ @@ -1,5 +1,5 @@ function createSleepPromise(timeout) { - return new Promise(function(resolve) { + return new Promise(resolve => { setTimeout(resolve, timeout); }); } @@ -7,17 +7,13 @@ function sleep(timeout) { // Pass value through, if used in a promise chain function promiseF...
6afaf2ee4bce41abc100ca69745a95e768d0e9b5
lib/index.js
lib/index.js
'use strict' var BridgeObservable = require('vigour-native/lib/bridge/BridgeObservable') var Plugin = require('vigour-native/lib/bridge/Plugin') var name = require('../package.json').name var AlphaColor = new BridgeObservable({ color: { condition: { $hex: 'color' } }, opacity: { condition: { ...
'use strict' var BridgeObservable = require('vigour-native/lib/bridge/BridgeObservable') var Plugin = require('vigour-native/lib/bridge/Plugin') var name = require('../package.json').name var AlphaColor = new BridgeObservable({ color: { // condition: { // $hex: 'color' // } }, opacity: { // co...
Comment out validation for now
Comment out validation for now
JavaScript
bsd-2-clause
vigour-io/statusbar,vigour-io/statusbar
--- +++ @@ -6,14 +6,14 @@ var AlphaColor = new BridgeObservable({ color: { - condition: { - $hex: 'color' - } + // condition: { + // $hex: 'color' + // } }, opacity: { - condition: { - $number: 'percentage' - } + // condition: { + // $number: 'percentage' + // }...
2b7306be7ce8b2a003494239ba3b72150171d0de
client/app/scripts/controllers/admin/features/new.js
client/app/scripts/controllers/admin/features/new.js
angular .module('app') .controller('featureNewController', [ '$scope', '$location', '$routeParams', 'userService', 'featureService', 'actionKitService', '$rootScope', function($scope, $location, $routeParams, userAPI, Feature, actionKitService, $rootScope) { $scope.feature = ...
angular .module('app') .controller('featureNewController', [ '$scope', '$location', '$routeParams', 'userService', 'featureService', 'actionKitService', 'FormHelper', '$rootScope', function($scope, $location, $routeParams, userAPI, Feature, actionKitService, FormHelper, $rootScop...
Update New Feature form to use the Form Helper. Add validations and alerts.
Update New Feature form to use the Form Helper. Add validations and alerts.
JavaScript
mit
brettshollenberger/rootstrikers,brettshollenberger/rootstrikers
--- +++ @@ -7,14 +7,20 @@ 'userService', 'featureService', 'actionKitService', + 'FormHelper', '$rootScope', - function($scope, $location, $routeParams, userAPI, Feature, actionKitService, $rootScope) { + function($scope, $location, $routeParams, userAPI, Feature, actionKitService, FormHe...
45507b79754ca953b2017bb3b71f86cb379365ac
routes/debug.js
routes/debug.js
var async = require('async'); var User = require('../models/user'); var BadgeInstance = require('../models/badge-instance'); exports.showFlushDbForm = function (req, res) { return res.render('admin/flush-user-info.html', { issuer: req.issuer, }); }; exports.flushDb = function flushDb(req, res) { function re...
var async = require('async'); var User = require('../models/user'); var BadgeInstance = require('../models/badge-instance'); exports.showFlushDbForm = function (req, res) { return res.render('admin/flush-user-info.html', { issuer: req.issuer, }); }; function removeItem(item, callback) { return item.remove(c...
Move functions out of route endpoint.
Move functions out of route endpoint.
JavaScript
mpl-2.0
kayaelle/msol-badger,bdgio/msol-site,bdgio/msol-site,kayaelle/msol-badger,bdgio/msol-site,mozilla/openbadger,kayaelle/msol-badger,mozilla/openbadger
--- +++ @@ -8,22 +8,23 @@ }); }; +function removeItem(item, callback) { + return item.remove(callback); +} +function removeAfterFind(callback) { + return function (err, items) { + if (err) return callback(err); + return async.map(items, removeItem, callback); + } +} +function flushUsers(callback) { + ...
c2cab2cafb54106a5f0b5b185d1ff2614e70ae7b
blankshield.js
blankshield.js
;(function(root) { 'use strict'; var blankshield = function(ele) { addEvent(ele, 'click', function(e) { var href, usedModifier, child; href = e.target.getAttribute('href'); if (!href) return; usedModifier = (e.ctrlKey || e.shiftKey || e.metaKey); if (!usedModifier && e.target.ge...
;(function(root) { 'use strict'; var handler = function(e) { var href, usedModifier, child; href = e.target.getAttribute('href'); if (!href) return; usedModifier = (e.ctrlKey || e.shiftKey || e.metaKey); if (!usedModifier && e.target.getAttribute('target') !== '_blank') { return; } ...
Support arrays and array-like objects
Support arrays and array-like objects
JavaScript
mit
danielstjules/blankshield
--- +++ @@ -1,24 +1,31 @@ ;(function(root) { 'use strict'; - var blankshield = function(ele) { - addEvent(ele, 'click', function(e) { - var href, usedModifier, child; + var handler = function(e) { + var href, usedModifier, child; - href = e.target.getAttribute('href'); - if (!href) retu...
64e11acbe71330da23c162b0907d8e0e3ca98e10
_build/Gruntfile.js
_build/Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), sass: { dist: { files: { 'css/application.css': '../application.sass' } } }, cssmin: { minify: { expand: true, cwd: 'css/', src: ['*.cs...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), sass: { dist: { files: { 'css/application.css': '../application.sass' } } }, cssmin: { minify: { expand: true, cwd: 'css/', src: ['*.cs...
Remove csslint fron the grunt build task
Remove csslint fron the grunt build task
JavaScript
mit
mvcss/mvcss,mvcss/mvcss
--- +++ @@ -21,12 +21,6 @@ } }, - csslint: { - strict: { - src: ['css/application.css'] - } - }, - csscss: { dist: { src: ['css/application.css'] @@ -37,10 +31,9 @@ grunt.loadNpmTasks('grunt-contrib-sass'); grunt.loadNpmTasks('grunt-contrib-cssmin'); -...
bd8053484844208b72f825dd4c41fda41b9ea2d9
client/src/components/Index.js
client/src/components/Index.js
import React, { Component } from 'react'; import { Link } from 'react-router'; import gamepad from '../dependencies/img/gamepad.png'; import keyboard from '../dependencies/img/keyboard.png'; export default class Index extends Component { render() { return ( <div> <div className="page-header"><h1>Ac...
import React, { Component } from 'react'; import { Link } from 'react-router'; import { translate } from 'react-i18next'; import { Row, Col, Panel } from 'react-bootstrap'; import gamepad from '../dependencies/img/gamepad.png'; import keyboard from '../dependencies/img/keyboard.png'; class Index extends Component { ...
Add missing i18n and use bootstrap-react
Add missing i18n and use bootstrap-react
JavaScript
mit
DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager
--- +++ @@ -1,41 +1,45 @@ import React, { Component } from 'react'; import { Link } from 'react-router'; +import { translate } from 'react-i18next'; +import { Row, Col, Panel } from 'react-bootstrap'; import gamepad from '../dependencies/img/gamepad.png'; import keyboard from '../dependencies/img/keyboard.png'; ...
ee8233732cb43aa0a5aa638a55ac7dabb67e3732
models/complaint.js
models/complaint.js
/* jslint node: true */ 'use strict' var utils = require('../lib/utils') var challenges = require('../data/datacache').challenges module.exports = function (sequelize, DataTypes) { var Complaint = sequelize.define('Complaint', { message: DataTypes.STRING, file: DataTypes.STRING }, { classMethods...
/* jslint node: true */ 'use strict' var utils = require('../lib/utils') var challenges = require('../data/datacache').challenges module.exports = function (sequelize, DataTypes) { var Complaint = sequelize.define('Complaint', { message: DataTypes.STRING, file: DataTypes.STRING }, { classMethods...
Fix anonymous upload challenge verification
Fix anonymous upload challenge verification
JavaScript
mit
bonze/juice-shop,oviroman/disertatieiap2017,oviroman/disertatieiap2017,bonze/juice-shop,bonze/juice-shop,m4l1c3/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,m4l1c3/juice-shop,bkimminich/juice-shop,bonze/juice-shop,bonze/juice-shop,m4l1c3/juice-shop,m4l1c3/juice-shop,oviroman/disertatieiap2017,oviroman/diserta...
--- +++ @@ -27,7 +27,7 @@ } function uploadAnonymousChallengeHook (complaint) { - if (utils.notSolved(challenges.uploadAnonymous) && !complaint.UserId && complaint.file === 'clickme.pdf') { + if (utils.notSolved(challenges.uploadAnonymous) && !complaint.UserId && complaint.file === 'clickme.html') { utils....
45428b90917b117a32d21e4c762037953c3a65dd
commonjs/cookie-opt/adapter.js
commonjs/cookie-opt/adapter.js
var $ = require('jQuery'); var componentEvent = require('kwf/component-event'); var cookies = require('js-cookie'); var onOptChangedCb = []; var api = { getDefaultOpt: function() { var defaultOpt = $('body').data('cookieDefaultOpt'); if (defaultOpt != 'in' && defaultOpt != 'out') defaultOpt = 'in';...
var $ = require('jQuery'); var componentEvent = require('kwf/component-event'); var cookies = require('js-cookie'); var onOptChangedCb = []; var api = { getDefaultOpt: function() { var defaultOpt = $('body').data('cookieDefaultOpt'); if (defaultOpt != 'in' && defaultOpt != 'out') defaultOpt = 'in';...
Fix wrong value in cookie opt change event
Fix wrong value in cookie opt change event
JavaScript
bsd-2-clause
koala-framework/koala-framework,koala-framework/koala-framework
--- +++ @@ -27,7 +27,7 @@ cookies.set('cookieOpt', value, { expires: 3*365 }); if (opt != value) { for (var i=0; i< onOptChangedCb.length; i++) { - onOptChangedCb[i].call(this, opt); + onOptChangedCb[i].call(this, value); } } },
97ed59bcd2f80b4ed03e144bc7e7e9badfed09fb
app.js
app.js
var config = require("./config.js"); var express = require('express'); var http = require('http'); var path = require('path'); var app = express(); var server = http.createServer(app); var io = require('socket.io').listen(server); io.set('log level', 1); // all environments app.set('port', process.env.PORT || 80); a...
var config = require("./config.js"); var express = require('express'); var http = require('http'); var path = require('path'); var app = express(); var server = http.createServer(app); var io = require('socket.io').listen(server); io.set('log level', 1); // all environments app.set('port', process.env.PORT || 80); a...
Change incorrect comment for error handler
Change incorrect comment for error handler
JavaScript
mit
jimguys/poemlab,jimguys/poemlab
--- +++ @@ -27,7 +27,7 @@ // socket.io server logic require('./lib/poem-editing')(io, config.db); -// development only +// error handler app.use(function(err, req, res, next) { console.error('***UNHANDLED ERROR: ', err.stack); res.send(500, 'Internal server error');
ba530e5b88e07b5e6df70da60283f4d70567ac19
cli.js
cli.js
#!/usr/bin/env node 'use strict'; var fs = require('fs'); var path = require('path'); var log = require('verbalize'); var argv = require('minimist')(process.argv.slice(2)); var parser = require('./'); log.runner = 'npmignore'; /** * Find the local `ignore` files we need */ var gitignore = argv.g || '.gitignore';...
#!/usr/bin/env node 'use strict'; var fs = require('fs'); var path = require('path'); var log = require('verbalize'); var argv = require('minimist')(process.argv.slice(2)); var parser = require('./'); log.runner = 'npmignore'; /** * Find the local `ignore` files we need */ var gitignore = argv.g || argv.gitignor...
Add missing --gitignore --npmignore argument keys
Add missing --gitignore --npmignore argument keys
JavaScript
mit
jonschlinkert/npmignore
--- +++ @@ -14,8 +14,8 @@ * Find the local `ignore` files we need */ -var gitignore = argv.g || '.gitignore'; -var npmignore = argv.n || '.npmignore'; +var gitignore = argv.g || argv.gitignore || '.gitignore'; +var npmignore = argv.n || argv.npmignore || '.npmignore'; // optionally specify a different destin...
bb899803405e9f3bb24008d0019ddc9c931c81d0
server/wsEvents.js
server/wsEvents.js
var Runner = require('./runner').Runner; module.exports = function (ws) { /*var id = setInterval(function() { ws.send(JSON.stringify(process.memoryUsage()), function() { }); }, 1000); console.log('started client interval');*/ ws.on('message', function(message) { var data = JSON.parse(...
var Runner = require('./runner').Runner; module.exports = function (ws) { /*var id = setInterval(function() { ws.send(JSON.stringify(process.memoryUsage()), function() { }); }, 1000); console.log('started client interval');*/ ws.on('message', function(message) { var data = JSON.parse(...
Fix server program to show game result.
Fix server program to show game result.
JavaScript
apache-2.0
AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers
--- +++ @@ -11,7 +11,7 @@ var data = JSON.parse(message); var runner = new Runner(data.commands); runner.runGame(function() { - ws.send(runner.gameResult, function() { /* No error handling yet */ }); + ws.send(runner.gameResult.log + runner.gameResult.result, function(...
d3bdcaf614aa877ed102ff1041a7884d6eee84f0
R7.Documents.Dnn/js/selectDocuments.js
R7.Documents.Dnn/js/selectDocuments.js
function r7d_selectDocument(documentId, checked, value) { var values = JSON.parse(value); var index = values.indexOf(documentId); if (checked) { if (index < 0) { values.push(documentId); } } else { if (index >= 0) { values.splice(index, 1); } }...
function r7d_selectDocument(documentId, checked, value) { var values = JSON.parse(value); var index = values.indexOf(documentId); if (checked) { if (index < 0) { values.push(documentId); } } else { if (index >= 0) { values.splice(index, 1); } }...
Fix GH-115 Cannot select documents with checkboxes on DNN 9
Fix GH-115 Cannot select documents with checkboxes on DNN 9
JavaScript
mit
roman-yagodin/R7.Documents,roman-yagodin/R7.Documents,roman-yagodin/R7.Documents
--- +++ @@ -14,7 +14,8 @@ } function r7d_getModuleId(target) { var c = $(target).closest("div.DnnModule").attr("class"); - return c.substr(c.lastIndexOf("DnnModule-") + 10); + var moduleId = c.match("DnnModule-(\\d+)")[1]; + return moduleId; } function r7d_selectDocument2(target) { var documentId = $(target)....
b345f6212f3c783a4736914b19f411dadf90b0c4
webpack.config.js
webpack.config.js
var HtmlWebpackPlugin = require('html-webpack-plugin'); var HTMLWebpackPluginConfig = new HtmlWebpackPlugin({ template: __dirname + '/app/index.html', filename: 'index.html', inject: 'body' }); module.exports = { entry: [ './app/index.js' ], output: { path: __dirname + '/dist', filename: 'index...
var HtmlWebpackPlugin = require('html-webpack-plugin'); var HTMLWebpackPluginConfig = new HtmlWebpackPlugin({ template: __dirname + '/app/index.html', filename: 'index.html', inject: 'body' }); module.exports = { entry: [ './app/index.js' ], output: { path: __dirname + '/dist', filename: 'index...
Fix JSX parsing with Babel
Fix JSX parsing with Babel
JavaScript
mit
cimm/blathy,cimm/blathy
--- +++ @@ -15,7 +15,14 @@ }, module: { loaders: [ - {test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'} + { + test: /\.js$/, + exclude: /node_modules/, + loader: 'babel-loader', + query: { + presets: ['react'] + } + } ] }, ...
a451e50a75d7ee01d72d34c680c9d948c4fde14f
controller/users-admin/server.js
controller/users-admin/server.js
'use strict'; var assign = require('es5-ext/object/assign') , promisify = require('deferred').promisify , bcrypt = require('bcrypt') , dbjsCreate = require('mano/lib/utils/dbjs-form-create') , router = require('mano/server/post-router') , changePassword = require('mano-auth/c...
'use strict'; var assign = require('es5-ext/object/assign') , promisify = require('deferred').promisify , bcrypt = require('bcrypt') , dbjsCreate = require('mano/lib/utils/dbjs-form-create') , submit = require('mano/utils/save') , changePassword = require('mano-auth/controlle...
Fix resolution of submit function
Fix resolution of submit function
JavaScript
mit
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
--- +++ @@ -4,12 +4,11 @@ , promisify = require('deferred').promisify , bcrypt = require('bcrypt') , dbjsCreate = require('mano/lib/utils/dbjs-form-create') - , router = require('mano/server/post-router') + , submit = require('mano/utils/save') , changePassword = require...
cbd66e8256e91941e91eebb999ea65e2250c5d7f
webpack.config.js
webpack.config.js
/* global __dirname */ 'use strict'; var webpack = require('webpack'); var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js'); module.exports = { context: __dirname + '/client', entry: { index: './js/index', embed: './js/embed' }, output: { filename: '[name].bundle.js', chu...
/* global __dirname */ 'use strict'; var webpack = require('webpack'); var path = require('path'); var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js'); module.exports = { context: path.resolve(__dirname, 'client'), entry: { index: './js/index', embed: './js/embed' }, output: { ...
Fix webpack context path on windows
Fix webpack context path on windows
JavaScript
mit
ebertmi/webbox,ebertmi/webbox,ebertmi/webbox
--- +++ @@ -3,11 +3,12 @@ 'use strict'; var webpack = require('webpack'); +var path = require('path'); var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js'); module.exports = { - context: __dirname + '/client', + context: path.resolve(__dirname, 'client'), entry: { index: './js...
8f41cbedd9afca3c812e8c98cfd8e50d7394ae4c
src/instantiateObjectTypes.js
src/instantiateObjectTypes.js
import { GraphQLObjectType, GraphQLID } from 'graphql'; import buildAttributes from './buildAttributes'; import buildRelationships from './buildRelationships'; import titleizeType from './titleizeType'; const getDefaultDescription = (name) => `The ${titleizeType(name)} Cohere model.`; export default (schema) => { c...
import { GraphQLObjectType, GraphQLID } from 'graphql'; import buildAttributes from './buildAttributes'; import buildRelationships from './buildRelationships'; import titleizeType from './titleizeType'; const getDefaultDescription = (name) => `The ${titleizeType(name)} Cohere model.`; const typeCache = {}; export def...
Fix type cache getting result on func calls
Fix type cache getting result on func calls
JavaScript
mit
dylnslck/micrograph
--- +++ @@ -4,10 +4,9 @@ import titleizeType from './titleizeType'; const getDefaultDescription = (name) => `The ${titleizeType(name)} Cohere model.`; +const typeCache = {}; export default (schema) => { - const typeCache = {}; - const graphQLObjectTypes = schema.types.reduce((prev, type) => { const { ...
7074cfd271da781ded38d612a88881c882e193dd
src/jquery-input-file-text.js
src/jquery-input-file-text.js
/** */ (function($) { $.fn.inputFileText = function(userOptions) { var MARKER_ATTRIBUTE = 'data-inputFileText'; if(this.attr(MARKER_ATTRIBUTE) === 'true') { // Plugin has already been applied to input file element return this; } var options = $.extend({ ...
/** */ (function($) { $.fn.inputFileText = function(userOptions) { var MARKER_ATTRIBUTE = 'data-inputFileText'; if(this.attr(MARKER_ATTRIBUTE) === 'true') { // Plugin has already been applied to input file element return this; } var options = $.extend({ ...
Fix for Chrome filepath C:\fakepath\
Fix for Chrome filepath C:\fakepath\
JavaScript
mit
datchung/jquery.inputFileText,datchung/jquery.inputFileText
--- +++ @@ -41,7 +41,8 @@ // Update text when input file chosen this.change(function() { - text.val(self.val()); + // Chrome puts C:\fakepath\... for file path + text.val(self.val().replace('C:\\fakepath\\', '')); }); // Mark that this plugin h...
d4c777e3412db2820a53bd51aa28a72440dce0fb
webapp/src/components/highchart/themes.js
webapp/src/components/highchart/themes.js
export default { standard: { credits: { enabled: false }, chart: { spacingBottom: 20, style: { fontFamily: "'proxima', 'Helvetica', sans-serif' ", paddingTop: '20px' // Make room for buttons } }, exporting: { buttons: { contextButton: { symbol...
export default { standard: { credits: { enabled: false }, chart: { spacingBottom: 20, style: { fontFamily: "'proxima', 'Helvetica', sans-serif' ", paddingTop: '20px' // Make room for buttons } }, exporting: { buttons: { contextButton: { onclic...
Make export button only export jpegs
Make export button only export jpegs
JavaScript
agpl-3.0
unicef/rhizome,unicef/rhizome,unicef/rhizome,unicef/rhizome
--- +++ @@ -11,6 +11,9 @@ exporting: { buttons: { contextButton: { + onclick: function () { + this.exportChart({type: 'jpeg'}) + }, symbol: null, text: 'Export', x: -20,
fd8013b3e7635940abba3382940792c41316aacf
lib/assets/javascripts/spree/backend/store_picker.js
lib/assets/javascripts/spree/backend/store_picker.js
$.fn.storeAutocomplete = function() { this.select2({ minimumInputLength: 1, multiple: true, initSelection: function(element, callback) { $.get(Spree.routes.store_search, { ids: element.val() }, function(data) { callback(data) }) }, ajax: { url: Spree.routes.store_search, ...
$.fn.storeAutocomplete = function() { this.select2({ minimumInputLength: 1, multiple: true, initSelection: function(element, callback) { $.get(Spree.routes.store_search, { ids: element.val() }, function(data) { callback(data) }) }, ajax: { url: Spree.routes.store_search, ...
Remove duplicate call to storeAutocomplete
Remove duplicate call to storeAutocomplete This was causing javascript errors. storeAutocomplete also doesn't work until the store rule partial is run, since Spree.routes.store_search won't be set.
JavaScript
bsd-3-clause
solidusio/solidus_multi_domain,solidusio/solidus_multi_domain,solidusio/solidus_multi_domain
--- +++ @@ -28,7 +28,3 @@ } }); } - -$(document).ready(function () { - $('.store_picker').storeAutocomplete(); -})
f6f772cf69611eaadc29527b230a62c66af2a8cd
workbox.config.js
workbox.config.js
const path = require('path'); const BUILD_DIR = 'build'; module.exports = { globDirectory: BUILD_DIR, globPatterns: ['/', '**/*.{html,js,css,woff2,webmanifest}'], swSrc: path.join(BUILD_DIR, 'service-worker.js'), swDest: path.join(BUILD_DIR, 'service-worker.js'), mode: 'production', };
const path = require('path'); const BUILD_DIR = 'build'; module.exports = { globDirectory: BUILD_DIR, globPatterns: ['/', '**/*.{js,css,woff2,webmanifest}'], swSrc: path.join(BUILD_DIR, 'service-worker.js'), swDest: path.join(BUILD_DIR, 'service-worker.js'), mode: 'production', };
Remove other HTML pages from precaching
Remove other HTML pages from precaching
JavaScript
mit
esviji/esviji,esviji/esviji
--- +++ @@ -4,7 +4,7 @@ module.exports = { globDirectory: BUILD_DIR, - globPatterns: ['/', '**/*.{html,js,css,woff2,webmanifest}'], + globPatterns: ['/', '**/*.{js,css,woff2,webmanifest}'], swSrc: path.join(BUILD_DIR, 'service-worker.js'), swDest: path.join(BUILD_DIR, 'service-worker.js'), mode: 'pro...
9694448f9d41dec92e9cb901e6aa1df163c09d30
src/ipc-helpers.js
src/ipc-helpers.js
const Disposable = require('event-kit').Disposable let ipcRenderer = null let ipcMain = null let BrowserWindow = null exports.on = function (emitter, eventName, callback) { emitter.on(eventName, callback) return new Disposable(() => emitter.removeListener(eventName, callback)) } exports.call = function (channel, ...
const Disposable = require('event-kit').Disposable let ipcRenderer = null let ipcMain = null let BrowserWindow = null let nextResponseChannelId = 0 exports.on = function (emitter, eventName, callback) { emitter.on(eventName, callback) return new Disposable(() => emitter.removeListener(eventName, callback)) } exp...
Handle concurrent calls to the same channel in ipc helpers
Handle concurrent calls to the same channel in ipc helpers
JavaScript
mit
PKRoma/atom,Mokolea/atom,Mokolea/atom,PKRoma/atom,andrewleverette/atom,stinsonga/atom,Arcanemagus/atom,Arcanemagus/atom,atom/atom,PKRoma/atom,ardeshirj/atom,andrewleverette/atom,t9md/atom,Mokolea/atom,atom/atom,brettle/atom,brettle/atom,t9md/atom,liuderchi/atom,liuderchi/atom,liuderchi/atom,brettle/atom,ardeshirj/atom,...
--- +++ @@ -2,6 +2,8 @@ let ipcRenderer = null let ipcMain = null let BrowserWindow = null + +let nextResponseChannelId = 0 exports.on = function (emitter, eventName, callback) { emitter.on(eventName, callback) @@ -14,7 +16,7 @@ ipcRenderer.setMaxListeners(20) } - const responseChannel = getRespon...
1a444d80b0d5538063cc78477f89034c83271056
src/application.js
src/application.js
"use strict"; var View = require("./view"); var Router = require("./router"); var util = require("substance-util"); var _ = require("underscore"); // Substance.Application // ========================================================================== // // Application abstraction suggesting strict MVC var Application...
"use strict"; var View = require("./view"); var Router = require("./router"); var util = require("substance-util"); var _ = require("underscore"); // Substance.Application // ========================================================================== // // Application abstraction suggesting strict MVC var Application...
Change order of initial app render and router activation.
Change order of initial app render and router activation.
JavaScript
mit
substance/application
--- +++ @@ -35,10 +35,15 @@ // this.start = function() { - this.initRouter(); + // First setup the top level view this.$el = $('body'); this.el = this.$el[0]; this.render(); + + // Now the normal app lifecycle can begin + // Because app state changes require the main view to be pres...
01828cfc40451604b00b7e2380ef3d10bd4714a3
src/components/Warning/Warning.js
src/components/Warning/Warning.js
import React from 'react' import PropTypes from 'prop-types' import { Sticky } from 'react-sticky' import styles from './Warning.scss' class Warning extends React.PureComponent { static propTypes = { error: PropTypes.bool, title: PropTypes.string.isRequired, children: PropTypes.node.isRequired } st...
import React from 'react' import PropTypes from 'prop-types' import { Sticky } from 'react-sticky' import styles from './Warning.scss' class Warning extends React.PureComponent { static propTypes = { error: PropTypes.bool, title: PropTypes.string.isRequired, children: PropTypes.node.isRequired } st...
Remove braces for simple return
Remove braces for simple return
JavaScript
mit
sgmap/inspire,sgmap/inspire
--- +++ @@ -28,9 +28,7 @@ render() { const { displayed } = this.state - if (!displayed) { - return null - } + if (!displayed) return const { error, title, children } = this.props const color = error ? styles.errorStyle : styles.warning
07500b1d868a4c623233b54c9cf8c29048cc732e
app/assets/javascripts/edsn.js
app/assets/javascripts/edsn.js
var EDSN_THRESHOLD = 30; var EdsnSwitch = (function(){ var editing; var validBaseLoads = /^(base_load|base_load_edsn)$/; EdsnSwitch.prototype = { enable: function(){ if(editing){ swapEdsnBaseLoadSelectBoxes(); } }, isEdsn: function(){ return validBaseLoads.test($(this).dat...
var EDSN_THRESHOLD = 30; var EdsnSwitch = (function(){ var editing; var validBaseLoads = /^(base_load|base_load_edsn)$/; EdsnSwitch.prototype = { enable: function(){ if(editing){ swapEdsnBaseLoadSelectBoxes(); } }, isEdsn: function(){ return validBaseLoads.test($(this).val...
Revert "Use data attribute instead of val()"
Revert "Use data attribute instead of val()" This reverts commit 680debc53973355b553155bdfae857907af0a259. Ref #471
JavaScript
mit
quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses
--- +++ @@ -12,7 +12,7 @@ }, isEdsn: function(){ - return validBaseLoads.test($(this).data('type')); + return validBaseLoads.test($(this).val()); }, cloneAndAppendProfileSelect: function(){
e4a2d9412379274d43851f7983dcb3056227f273
actions/navigate.js
actions/navigate.js
var debug = require('debug')('navigateAction'); module.exports = function (context, payload, done) { if (!context.router || !context.router.getRoute) { debug('no router available for navigate handling'); return; } debug('executing', payload); var route = context.router.getRoute(payload....
var debug = require('debug')('navigateAction'); module.exports = function (context, payload, done) { if (!context.router || !context.router.getRoute) { debug('no router available for navigate handling'); return; } debug('executing', payload); var route = context.router.getRoute(payload....
Add success and failure events
Add success and failure events
JavaScript
bsd-3-clause
yahoo/flux-router-component
--- +++ @@ -15,7 +15,7 @@ return; } debug('dispatching CHANGE_ROUTE', route); - context.dispatch('CHANGE_ROUTE', route); + context.dispatch('CHANGE_ROUTE_START', route); var routeHandler = route.config && route.config.handler; if (!routeHandler) { done(); @@ -23,6 +23,12 @@...
d316c7a0e2b7f46344ab97465e2f52be10f0a529
client/routes/_config.js
client/routes/_config.js
Router.configure({ layoutTemplate: 'mainLayout' }); /* Actions */ var requiresUserLogin = function () { if (!Meteor.user()) { this.render('login'); } else { this.next(); } }; // User login required for all areas of site Router.onBeforeAction(requiresUserLogin, {except: ['login']});
Router.configure({ layoutTemplate: 'mainLayout' }); /* Actions */ var requiresUserLogin = function () { if (!Meteor.user()) { this.render('login'); } else { this.next(); } }; var anonymousRoutes = [ 'login', 'atChangePwd', 'atEnrollAccount', 'atForgotPwd', 'atResetPwd', 'atSignIn', 'a...
Exclude AccountsTemplates routes in ensureSignedIn
Exclude AccountsTemplates routes in ensureSignedIn
JavaScript
agpl-3.0
GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing
--- +++ @@ -14,5 +14,17 @@ } }; +var anonymousRoutes = [ + 'login', + 'atChangePwd', + 'atEnrollAccount', + 'atForgotPwd', + 'atResetPwd', + 'atSignIn', + 'atSignUp', + 'atVerifyEmail', + 'atresendVerificationEmail' +]; + // User login required for all areas of site -Router.onBeforeAction(requiresUser...
fb7f50252c31c503e1ebe65561fa03f5a868ce56
packages/pundle-core/lib/watcher/adapter-chokidar.js
packages/pundle-core/lib/watcher/adapter-chokidar.js
// @flow import chokidar from 'chokidar' export default class AdapterChokdiar { handle: Object rootDirectory: string constructor(rootDirectory: string, onChange: (path: string) => void) { this.rootDirectory = rootDirectory this.handle = chokidar.watch([], { ignoreInitial: true, awaitWriteFi...
// @flow import chokidar from 'chokidar' export default class AdapterChokdiar { handle: Object rootDirectory: string constructor(rootDirectory: string, onChange: (path: string) => void) { this.rootDirectory = rootDirectory this.handle = chokidar.watch([], { ignoreInitial: true, awaitWriteFi...
Reduce stability threshold in watcher for faster HMR
:art: Reduce stability threshold in watcher for faster HMR
JavaScript
mit
steelbrain/pundle,steelbrain/pundle,steelbrain/pundle,motion/pundle
--- +++ @@ -11,8 +11,8 @@ this.handle = chokidar.watch([], { ignoreInitial: true, awaitWriteFinish: { - pollInterval: 50, - stabilityThreshold: 250, + pollInterval: 30, + stabilityThreshold: 60, }, }) this.handle.on('change', path => onChange(path))
fd84a884f2d13247b149e162e8bfe1e41bddc0fa
jujugui/static/gui/src/app/components/expert-store-card/test-expert-store-card.js
jujugui/static/gui/src/app/components/expert-store-card/test-expert-store-card.js
/* Copyright (C) 2018 Canonical Ltd. */ 'use strict'; const React = require('react'); const EXPERTS = require('../expert-card/experts'); const ExpertCard = require('../expert-card/expert-card'); const ExpertStoreCard = require('../expert-store-card/expert-store-card'); const jsTestUtils = require('../../utils/compon...
/* Copyright (C) 2018 Canonical Ltd. */ 'use strict'; const React = require('react'); const enzyme = require('enzyme'); const ExpertStoreCard = require('../expert-store-card/expert-store-card'); describe('ExpertStoreCard', function() { const renderComponent = (options = {}) => enzyme.shallow( <ExpertStoreCard...
Update expert store card tests to use enzyme.
Update expert store card tests to use enzyme.
JavaScript
agpl-3.0
mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui
--- +++ @@ -2,42 +2,33 @@ 'use strict'; const React = require('react'); +const enzyme = require('enzyme'); -const EXPERTS = require('../expert-card/experts'); -const ExpertCard = require('../expert-card/expert-card'); const ExpertStoreCard = require('../expert-store-card/expert-store-card'); -const jsTestUti...
eec5c8bf08302afc8863223973f7e0e117bcfc8e
app_api/controllers/classes.js
app_api/controllers/classes.js
var mongoose = require('mongoose'); var Class = mongoose.model('Class'); var sendJSONresponse = function(res, status, content) { res.status(status); res.json(content); }; module.exports.classesGetAll = function(req, res) { sendJSONresponse(res, 200, {"status": "success"}); }; module.exports.professorsForClas...
var mongoose = require('mongoose'); var Class = mongoose.model('Class'); var Prof = mongoose.model('Professor'); var sendJSONresponse = function(res, status, content) { res.status(status); res.json(content); }; var errNotFound = {"message": "Not found"}; var success = function(res, data) { sendJSONresponse(r...
Return MongoDB data for class and professor requests.
Return MongoDB data for class and professor requests.
JavaScript
mpl-2.0
jdthomas718/ClassRat,jdthomas718/ClassRat
--- +++ @@ -1,15 +1,57 @@ var mongoose = require('mongoose'); var Class = mongoose.model('Class'); +var Prof = mongoose.model('Professor'); var sendJSONresponse = function(res, status, content) { res.status(status); res.json(content); }; +var errNotFound = {"message": "Not found"}; + +var success = func...
4853ca160e8d11e536249db120fce4a556be08df
src/data-access/bukovelAdapter.js
src/data-access/bukovelAdapter.js
import cheerio from 'cheerio'; import moment from 'moment-timezone'; const originalTimeZone = 'Europe/Kiev'; const skiLiftDateFormat = 'DD.MM.YYYY HH:mm:ss'; export default function proceed(data) { if (data.error) { return { errors: Object.values(data.error), lifts: [] }; } const cardNumbe...
import cheerio from 'cheerio'; import moment from 'moment-timezone'; const originalTimeZone = 'Europe/Kiev'; const skiLiftDateFormat = 'DD.MM.YYYY HH:mm:ss'; export default function proceed(data) { if (data.error) { return { errors: Object.values(data.error), lifts: [] }; } const cardNumbe...
Use eq function to ge element by index.
Use eq function to ge element by index.
JavaScript
apache-2.0
blobor/buka,blobor/skipass.site,blobor/skipass.site,blobor/buka
--- +++ @@ -34,10 +34,10 @@ var columns = $(element).find('td'); return { - skiLiftId: $(columns[0]).text(), - date: getAdoptedDateString($(columns[1]).text()), - initialLift: Number.parseInt($(columns[2]).text()), - liftsLeft: Number.parseInt($(columns[3]).text...
529811b2a3ca5fd1293a31cf9a18d1c4aa2da1a4
app/assets/javascripts/FormMessageController.js
app/assets/javascripts/FormMessageController.js
/** * Created by elisahilprecht on 09/04/15. */ (function(){ var clickOnErrorMessage = function(e) { e.toElement.setAttribute('class','help-inline display-none'); document.getElementById(e.toElement.id.replace('ErrorText','')).focus(); }; var clickOnInputField = function(e){ document.getElementById...
/** * Created by elisahilprecht on 09/04/15. */ (function(){ var clickOnErrorMessage = function(e) { e.toElement.setAttribute('class','help-inline display-none'); document.getElementById(e.toElement.id.replace('ErrorText','')).focus(); }; var clickOnInputField = function(e){ document.getElementById...
Set error message at the bottom, if input field is filled.
Set error message at the bottom, if input field is filled.
JavaScript
mit
yetu/oauth2-provider,yetu/oauth2-provider,yetu/oauth2-provider,yetu/oauth2-provider
--- +++ @@ -16,6 +16,11 @@ var ele = helpInlines[i]; if(ele.getAttribute('class')==='help-inline'){ ele.onclick = clickOnErrorMessage; + var inputId = ele.id.replace('ErrorText', ''); + var inputValue = document.getElementById(inputId).value; + if(inputValue!==undefined && inputValue!=...
4fcfb59b100274a49f5d0e1690d00f042a919b97
server/routes/webRTC_routes.js
server/routes/webRTC_routes.js
var dbHelpers = require('../database_queries/database_queries.js'); module.exports = function(app){ app.post('/users', function(req, res){ var packet = req.body; if(packet.userId){ console.log('SENDER post event'); dbHelpers.addLink(packet.hash, packet.userId) .then(function(result){ res.status(200);...
var dbHelpers = require('../database_queries/database_queries.js'); module.exports = function(app){ app.post('/users', function(req, res){ var packet = req.body; if(packet.userId){ console.log('SENDER post event'); dbHelpers.addLink(packet.hash, packet.userId) .then(function(result){ res.status(201);...
Fix post request to send status 201
[fix] Fix post request to send status 201
JavaScript
mit
MAKE-SITY/MKSTream,MAKE-SITY/MKSTream,SimonDing87/MKSTream,SimonDing87/MKSTream
--- +++ @@ -7,7 +7,7 @@ console.log('SENDER post event'); dbHelpers.addLink(packet.hash, packet.userId) .then(function(result){ - res.status(200); + res.status(201); res.send('link added'); }); } else {
7dbb7b7bdf33ed50f6e2a719a32e79a91f031e77
src/_store/AppStateProvider.js
src/_store/AppStateProvider.js
import React, { Children, Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import LoadingView from '../loading-view/LoadingView'; import { appStateSelector } from '../_selectors/AppStateSelectors'; /** * Note: The loading view is tightly coupled with the auto-signin flow of apps, * If we r...
import React, { Children, Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import LoadingView from '../loading-view/LoadingView'; import { appStateSelector } from '../_selectors/AppStateSelectors'; /** * Note: The loading view is tightly coupled with the auto-signin flow of apps, * If we r...
Store timer as variable instead of state
Store timer as variable instead of state
JavaScript
mit
binary-com/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary...
--- +++ @@ -11,11 +11,11 @@ export default class AppStateProvider extends Component { componentWillMount() { - this.setState({ timer: window.setTimeout(this.showMessageForSlowConnection.bind(this), 4000) }); + this.timer = window.setTimeout(this.showMessageForSlowConnection.bind(this), 4000); ...
9af7f30985a280c6b697f552efdb595752ac2b83
test/stripStyle-test.js
test/stripStyle-test.js
import stripStyle from '../src/stripStyle'; describe('stripStyle', () => { it('should ignore `undefined`', () => { expect(stripStyle({a: undefined})).toEqual({a: undefined}); }); });
import stripStyle from '../src/stripStyle'; import spring from '../src/spring'; describe('stripStyle', () => { it('should return spring object into value', () => { expect(stripStyle({a: spring(1, [1, 2])})).toEqual({a: 1}); }); it('should ignore non-configured values', () => { expect(stripStyle({a: 10, ...
Add some tests for stripStyle()
Add some tests for stripStyle() While fixing #180, I noticed that stripStyle() was untested, so I decided to add a couple of basic tests here.
JavaScript
mit
bishopZ/react-motion,chenglou/react-motion,BenoitZugmeyer/preact-motion,keyanzhang/react-motion,threepointone/react-motion,keyanzhang/react-motion,threepointone/react-motion,dieface/react-motion,dieface/react-motion,chenglou/react-motion,bishopZ/react-motion,BenoitZugmeyer/preact-motion
--- +++ @@ -1,6 +1,15 @@ import stripStyle from '../src/stripStyle'; +import spring from '../src/spring'; describe('stripStyle', () => { + it('should return spring object into value', () => { + expect(stripStyle({a: spring(1, [1, 2])})).toEqual({a: 1}); + }); + + it('should ignore non-configured values', ()...
2be2bf5058c3d0fc8d340b851dac267fd8805c47
src/views/Meal.js
src/views/Meal.js
import React from 'react' export default (props) => ( <div> {props.name} </div> )
import React from 'react' export default props => <div> <a target="_blank" href={props.url}> {props.name} </a> </div>
Add url to meal index
Add url to meal index
JavaScript
mit
cernanb/personal-chef-react-app,cernanb/personal-chef-react-app
--- +++ @@ -1,7 +1,8 @@ import React from 'react' -export default (props) => ( +export default props => <div> - {props.name} + <a target="_blank" href={props.url}> + {props.name} + </a> </div> -)
1ad83da4b627cd7e6c33068ee48cc76d6592265e
src/js/lsClient.js
src/js/lsClient.js
/* Copyright 2013 Weswit Srl Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
/* Copyright 2013 Weswit Srl Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
Change adapter set to CHATTILE
Change adapter set to CHATTILE
JavaScript
apache-2.0
Lightstreamer/Lightstreamer-example-ChatTile-client-javascript,Weswit/Lightstreamer-example-ChatTile-client-javascript,Weswit/Lightstreamer-example-ChatTile-client-javascript,Lightstreamer/Lightstreamer-example-ChatTile-client-javascript
--- +++ @@ -16,7 +16,7 @@ //////////////// Connect to current host (or localhost) and configure a StatusWidget define(["LightstreamerClient"],function(LightstreamerClient) { - var lsClient = new LightstreamerClient(null,"ROOM"); + var lsClient = new LightstreamerClient(null,"CHATTILE"); lsClient.connect(); ...
dd9d5a3b9d9d6a03f955dfa23e35d8a73d14b611
examples/Trading-GetOrders.js
examples/Trading-GetOrders.js
/** * example ebay API request to Trading:GetOrders */ var ebay = require('../index.js'); ebay.xmlRequest({ serviceName : 'Trading', opType : 'GetOrders', // app/environment devId: '...........', certId: '...........', appName: '...........', sandbox: true, // per user authToken: '...........', ...
/** * example ebay API request to Trading:GetOrders */ var ebay = require('../index.js'); ebay.xmlRequest({ serviceName : 'Trading', opType : 'GetOrders', // app/environment devId: '...........', certId: '...........', appId: '...........', sandbox: true, // per user authToken: '...........', ...
Change appName to appId since appName no longer works
Change appName to appId since appName no longer works I used this example only to find out a few hours later the example code is outdated
JavaScript
mit
benbuckman/nodejs-ebay-api
--- +++ @@ -11,7 +11,7 @@ // app/environment devId: '...........', certId: '...........', - appName: '...........', + appId: '...........', sandbox: true, // per user
980856c30e0f0d63a6235d82b7d04960bec5f741
remove_duplicate_shorter.js
remove_duplicate_shorter.js
function r_d(a) { "use strict"; var b = a.slice(), //copy array i = 0, k = 0, length = b.length, j, buffer = []; //splicing same elements for (i; i < length; i++) { j = 0; for (j; j < length; j++) { if (i < j && b[j] === b[i]) { ...
function r_d(a) { "use strict"; var b = a.slice(), //copy array i = 0, k = 0, length = b.length, j, buffer = []; //splicing same elements for (i; i < length; i++) { j = 0; for (j; j < length; j++) { if (i < j && b[j] === b[i]) { ...
Update lline 15 and 21
Update lline 15 and 21 It's about the dummy string replacement.
JavaScript
mit
monkeyraptor/remove_duplicates
--- +++ @@ -12,13 +12,13 @@ j = 0; for (j; j < length; j++) { if (i < j && b[j] === b[i]) { - b.splice(j, 1, "deleted"); + b.splice(j, 1, j + " (deleted)"); //added token the "original element + (deleted)" string } } } //remo...
dffda50a1cad5dd6ac8f6c6f0db45b702ac54f5b
src/RunWrappers/DockerCompose.js
src/RunWrappers/DockerCompose.js
var spawn = require('child_process').spawn; function Runner() { } Runner.prototype.init = function(bosco, next) { this.bosco = bosco; next(); }; Runner.prototype.list = function(options, next) { var installed = true; spawn('docker-compose', ['--version'], { stdio: 'ignore' }) .on('error', function() { ...
var spawn = require('child_process').spawn; function Runner() { } Runner.prototype.init = function(bosco, next) { this.bosco = bosco; next(); }; Runner.prototype.list = function(options, next) { var installed = true; spawn('docker-compose', ['--version'], { cwd: options.cwd, stdio: 'ignore' }) .on('error',...
Add cwd to docker-compose to make it actually work
Add cwd to docker-compose to make it actually work
JavaScript
mit
tes/bosco,tes/bosco
--- +++ @@ -10,7 +10,7 @@ Runner.prototype.list = function(options, next) { var installed = true; - spawn('docker-compose', ['--version'], { stdio: 'ignore' }) + spawn('docker-compose', ['--version'], { cwd: options.cwd, stdio: 'ignore' }) .on('error', function() { installed = false; return next(...
561fae2e6e5786c8e885e0ff9e6ac10ecc606b94
api/models/Event.js
api/models/Event.js
/** * Event.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/#!documentation/models */ module.exports = { autoWatch: false, autosubscribe: [], attributes: { room: {model: 'room', required: true...
/** * Event.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/#!documentation/models */ module.exports = { autoWatch: false, autosubscribe: [], attributes: { room: {model: 'room', required: true...
Check to make sure haunt hasn't started before starting it.
Check to make sure haunt hasn't started before starting it.
JavaScript
mit
wallaceicy06/Betrayal,wallaceicy06/Betrayal,wallaceicy06/Betrayal
--- +++ @@ -31,7 +31,7 @@ .then(function(numRelics) { sails.log.info('relics remaining: ' + numRelics); - if (numRelics == 0) { + if (numRelics == 0 && event.game.haunt == undefined) { Game.startHaunt(event.game); }
20894c85aea4ea577dd5c5566dd30d7f9acabf8b
server/api/index.js
server/api/index.js
const express = require('express'); const pg = require('pg'); const router = express.Router(); // SSL must be used to connect to the DB const DB_URL = process.env.DATABASE_URL + '?ssl=true'; router.get('/db', (req, res) => { pg.connect(DB_URL, (err, client, done) => { if (err) { console.error(err); ...
const express = require('express'); const pg = require('pg'); const router = express.Router(); // SSL must be used to connect to the DB const DB_URL = process.env.DATABASE_URL + '?ssl=true'; // A catch-all error function generateGenericError() { return { title: "Server Error", description: "There was an er...
Add route to retrieve a single test resource
Add route to retrieve a single test resource Also make API a bit more robust
JavaScript
mit
jmeas/moolah,jmeas/moolah,jmeas/finance-app,jmeas/finance-app
--- +++ @@ -6,21 +6,76 @@ // SSL must be used to connect to the DB const DB_URL = process.env.DATABASE_URL + '?ssl=true'; -router.get('/db', (req, res) => { +// A catch-all error +function generateGenericError() { + return { + title: "Server Error", + description: "There was an error while processing your ...
447a892ba1c6f4b6c6d50a0ca94b041a1eccc3e2
src/comanche.js
src/comanche.js
const Hooter = require('hooter') const EVENTS = [ ['init', 'sync'], ['start', 'sync'], ['execute', 'async'], ['execute.batch', 'async'], ['execute.one', 'async'], ['execute.handle', 'async'], ['error', 'sync'], ] module.exports = function comanche(args, plugins) { let lifecycle = new Hooter() if ...
const Hooter = require('hooter') const EVENTS = [ ['init', 'sync'], ['start', 'sync'], ['execute', 'async'], ['execute.batch', 'async'], ['execute.one', 'async'], ['execute.handle', 'async'], ['error', 'sync'], ] module.exports = function comanche(args, plugins) { let lifecycle = new Hooter() if ...
Make every plugin receive a bound version of the lifecycle
Make every plugin receive a bound version of the lifecycle
JavaScript
isc
alex-shnayder/comanche
--- +++ @@ -22,7 +22,9 @@ EVENTS.forEach(([event, mode]) => { lifecycle.register(event, mode) }) - plugins.forEach((plugin) => plugin(lifecycle)) + plugins.forEach((plugin) => { + plugin(lifecycle.bind(plugin)) + }) return lifecycle.tootWith('init', (Class) => { if (!Class) {
26179d2b79fd1eba4a9db10cb4a5ce615f6b6c51
src/vendor/core/dom/isNode.js
src/vendor/core/dom/isNode.js
/** * Copyright 2013-2014 Facebook, 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 law or agree...
/** * Copyright 2013-2014 Facebook, 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 law or agree...
Test that Node is a function before using instanceof on it
Test that Node is a function before using instanceof on it
JavaScript
bsd-3-clause
S0lahart-AIRpanas-081905220200-Service/react,ArunTesco/react,RReverser/react,skyFi/react,billfeller/react,reggi/react,zigi74/react,pandoraui/react,dmitriiabramov/react,jeromjoy/react,nhunzaker/react,ashwin01/react,it33/react,ZhouYong10/react,tomv564/react,orzyang/react,atom/react,arasmussen/react,eoin/react,jmacman007/...
--- +++ @@ -23,7 +23,7 @@ */ function isNode(object) { return !!(object && ( - typeof Node !== 'undefined' ? object instanceof Node : + typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName ===...
1407ea164be846b079933809649ed8e2f375ae89
src/utils/index.js
src/utils/index.js
/* 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/. */ // @flow /** * Firefox has issues switching quickly between fill style colors, as the CSS color * is fully parse...
/* 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/. */ // @flow /** * Firefox has issues switching quickly between fill style colors, as the CSS color * is fully parse...
Remove outdated comment in FastFillStyle
Remove outdated comment in FastFillStyle
JavaScript
mpl-2.0
mstange/cleopatra,devtools-html/perf.html,devtools-html/perf.html,mstange/cleopatra
--- +++ @@ -19,8 +19,6 @@ set(fillStyle: string) { if (fillStyle !== this._previousFillColor) { - // This could throw if setCtx wasn't set before calling it. Don't provide an - // extra check here since this code is so hot. this._ctx.fillStyle = fillStyle; this._previousFillColor = f...
2fcd149b6418298ed41be1bb5167ceca681426a1
test/docstrings.js
test/docstrings.js
Date; //doc: Creates JavaScript Date instances which let you work with dates and times. new Date; //doc: Creates JavaScript Date instances which let you work with dates and times. var myalias = Date; myalias; //doc: Creates JavaScript Date instances which let you work with dates and times. // This is variable foo. v...
Date; //doc: Creates JavaScript Date instances which let you work with dates and times. new Date; //doc: Creates JavaScript Date instances which let you work with dates and times. var myalias = Date; myalias; //doc: Creates JavaScript Date instances which let you work with dates and times. // This is variable foo. v...
Check `o.name` docstring ("doc:" was omitted from comment test)
Check `o.name` docstring ("doc:" was omitted from comment test)
JavaScript
mit
emacsmirror/tern,neoclide/tern,neoclide/tern,emallson/tern,neoclide/tern,jgiles/tern,othree/tern,rustemferreira/tern,ryanstewart/tern,marijnh/tern,talyian/tern,ternjs/tern,anandthakker/tern,talyian/tern,talyian/tern,adrianton3/tern,MarcelGerber/tern,messfairy/tern,cdosborn/tern,angelozerr/tern,mcanthony/tern,pombredann...
--- +++ @@ -49,4 +49,4 @@ }; o.getName; //doc: Get the name. -o.name; // The name +o.name; //doc: The name
8ca59435d4e2827171d3428db821da6e70111139
examples/books-AMD/app/views.js
examples/books-AMD/app/views.js
/*global define:false */ define(["underscore", "backbone"], function (_, Backbone) { "use strict"; var views = { BookListItem: Backbone.View.extend({ tagName: 'li', template: _.template("<a href='/#book-details/<%-id%>'><%-title%></a>"), initialize: ...
/*global define:false */ define(["underscore", "backbone"], function (_, Backbone) { "use strict"; var views = { BookListItem: Backbone.View.extend({ tagName: 'li', template: _.template("<a href='/#book-details/<%-id%>'><%-title%></a>"), initialize: ...
Insert missing line break at end-of-file
Insert missing line break at end-of-file
JavaScript
mit
biril/backbone-faux-server
f8a02fad40dde2daa0600e17e3a44dc132b2981c
src/regex/index.js
src/regex/index.js
var main = require('./main'); var extend = require('extend'); var defaultOptions = { definitions: false, quotes: '"' }; module.exports = function (data, options) { var regexOptions = options.parserConfig.regex || {}; var finalOptions = extend(options, regexOptions); var migrated = main(data.toString(), final...
var main = require('./main'); var extend = require('extend'); var defaultOptions = { definitions: false, quotes: '"' }; module.exports = function (data, options) { options = options || {}; options.parserConfig = options.parserConfig || {}; var regexOptions = options.parserConfig.regex || {}; var finalOpti...
Fix options argument in regex parser
Fix options argument in regex parser
JavaScript
mit
apsdehal/qunit-migrate
--- +++ @@ -6,6 +6,8 @@ }; module.exports = function (data, options) { + options = options || {}; + options.parserConfig = options.parserConfig || {}; var regexOptions = options.parserConfig.regex || {}; var finalOptions = extend(options, regexOptions);
12d843dc88533f6db7b43bb72d654053a57ca307
test/mysql.test.js
test/mysql.test.js
var assert = require('assert'), Lapidus = require('../index.js'), spawnSync = require('child_process').spawnSync, fs = require('fs'); describe('MySQL', function () { var output; before(function(done) { output = spawnSync('node', ['index.js', '-c', './test/config/lapidus.json'], {timeout: 1...
var assert = require('assert'), Lapidus = require('../index.js'), spawnSync = require('child_process').spawnSync, fs = require('fs'); describe('MySQL', function () { var output; before(function(done) { output = spawnSync('node', ['index.js', '-c', './test/config/lapidus.json'], { timeout: ...
Increase timeout to see if it fixes invalid packet sequence in Travis
Increase timeout to see if it fixes invalid packet sequence in Travis
JavaScript
mit
JarvusInnovations/lapidus
--- +++ @@ -7,7 +7,7 @@ var output; before(function(done) { - output = spawnSync('node', ['index.js', '-c', './test/config/lapidus.json'], {timeout: 1000 }); + output = spawnSync('node', ['index.js', '-c', './test/config/lapidus.json'], { timeout: 1500 }); done(); });
5f98bffa11b065ac1b075d30b0ce5be2fe453a2b
app/scripts/main.js
app/scripts/main.js
(function(window, document, undefined) { "use strict"; require.config({ paths: { // Libraries "jquery": "../../libraries/jquery/jquery", "hljs": "../../libraries/highlightjs/highlight.pack", // /Libraries // Application "app": "app", // /Application }, shim: ...
require.config({ paths: { // Libraries "jquery": "../../libraries/jquery/jquery", "hljs": "../../libraries/highlightjs/highlight.pack", // /Libraries }, shim: { } }); require(["jquery", "app"], function( $, App) { var app = App.create({ name: "voxel", useHighlight: true }); ...
Remove IIFE and app module path.
Remove IIFE and app module path.
JavaScript
mit
rishabhsrao/voxel,rishabhsrao/voxel,rishabhsrao/voxel
--- +++ @@ -1,29 +1,21 @@ -(function(window, document, undefined) { - "use strict"; +require.config({ + paths: { + // Libraries + "jquery": "../../libraries/jquery/jquery", + "hljs": "../../libraries/highlightjs/highlight.pack", + // /Libraries + }, - require.config({ - paths: { - // Librari...
c90523eae80f211105fd7e2905a549455a544716
src/firewyrm.js
src/firewyrm.js
if (typeof define !== 'function') { var define = require('amdefine')(module); } define(['./deferred', './tools'], function(Deferred, tools) { return { asVal: asVal, create: create }; function create(wyrmhole, mimetype, args) { var send = Deferred.fn(wyrmhole, 'sendMessage'); ...
if (typeof define !== 'function') { var define = require('amdefine')(module); } define(['./deferred', './tools'], function(Deferred, tools) { return { asVal: asVal, create: create }; function create(wyrmhole, mimetype, args) { var send = Deferred.fn(wyrmhole, 'sendMessage'); ...
Make queenling.destroy non-writable, non-enumerable, non-configurable
Make queenling.destroy non-writable, non-enumerable, non-configurable
JavaScript
mit
gradecam/firewyrm-js,gradecam/firewyrm-js
--- +++ @@ -11,9 +11,11 @@ return send(['New', mimetype, args]).then(function(spawnId) { return tools.wrapAlienWyrmling(wyrmhole, spawnId, 0); }).then(function(queenling) { - queenling.destroy = function() { - return send(['Destroy', queenling.spawnId]); - ...
c6856449d0b69e0199e842458028d04f51668e36
src/components/NotFoundPage.js
src/components/NotFoundPage.js
import React from 'react'; import Image from './Image'; import { Link } from 'react-router'; const NotFoundPage = () => { const locations = [ 'Sahasrahla\'s pocket', 'sick kid\'s bed', 'Hera basement', 'king\'s tomb' ]; const location = locations[Math.floor(Math.random() * (locations.length))];...
import React from 'react'; import Image from './Image'; import { Link } from 'react-router'; const NotFoundPage = () => { const sahanames = [ 'sahasralah', 'sabotaging', 'sacahuista', 'sacahuiste', 'saccharase', 'saccharide', 'saccharify', 'saccharine', 'saccharins', 'sacerdotal', 'sackcloths', 'salmonella'...
Add Sahasrahla's nicknames to the 404 page
Add Sahasrahla's nicknames to the 404 page
JavaScript
mit
easymac/alttp-map-tracker,easymac/alttp-map-tracker
--- +++ @@ -4,11 +4,26 @@ import { Link } from 'react-router'; const NotFoundPage = () => { + const sahanames = [ + 'sahasralah', 'sabotaging', 'sacahuista', 'sacahuiste', 'saccharase', 'saccharide', 'saccharify', + 'saccharine', 'saccharins', 'sacerdotal', 'sackcloths', 'salmonella', 'saltarelli', 'saltar...
381b357f0bf25d9f345f70d3b8c55a16e4fac166
src/components/html-message.js
src/components/html-message.js
/* global React */ /* jslint esnext:true */ import escape from '../escape'; import IntlMixin from '../mixin'; function escapeProps(props) { return Object.keys(props).reduce(function (escapedProps, name) { var value = props[name]; // TODO: Can we force string coersion here? Or would that not be ne...
/* global React */ /* jslint esnext:true */ import escape from '../escape'; import IntlMixin from '../mixin'; function escapeProps(props) { return Object.keys(props).reduce(function (escapedProps, name) { var value = props[name]; // TODO: Can we force string coersion here? Or would that not be ne...
Add support for configured tagName to HTMLMessage
Add support for configured tagName to HTMLMessage
JavaScript
bsd-3-clause
btd/react-intl,ryan1234/react-intl,btd/react-intl,CumpsD/react-intl,Jonekee/react-intl,hukka/react-intl,keppelen/react-intl,keppelen/react-intl,ryan1234/react-intl,mattikl/react-intl,ericf/react-intl,CumpsD/react-intl,baer/react-intl,tsironis/react-intl,Vungle/react-intl,mattikl/react-intl,tsironis/react-intl,tsironis/...
--- +++ @@ -20,19 +20,25 @@ } var IntlHTMLMessage = React.createClass({ - displayName: 'HTMLMessage', + displayName: 'IntlHTMLMessage', mixins : [IntlMixin], + getDefaultProps: function () { + return {__tagName: 'span'}; + }, + render: function () { - var message = R...
28de0bd2815c0abe4a9cef56d4707f78ede3ee1f
client/app/app.js
client/app/app.js
// we don't need to use a variable // or the from keyword when importing a css/styl file // thanks the the styles loader it gets added as a // <style> tag in the head by default but can be changed import 'normalize.css'; import {appDirective} from './app.directive'; // the angular libs are just common js // and therefo...
// we don't need to use a variable // or the from keyword when importing a css/styl file // thanks the the styles loader it gets added as a // <style> tag in the head by default but can be changed import 'normalize.css'; import {appDirective} from './app.directive'; // the angular libs are just common js // and therefo...
Add a service to get the posts
Add a service to get the posts
JavaScript
mit
kbeloborodko/angular-blog,kbeloborodko/angular-blog
--- +++ @@ -20,8 +20,8 @@ // we must import it with the brackets import {home} from './components/home/home'; import {blog} from './components/blog/blog'; -// TODO: register common with app -// TODO: register shared with app +import {common} from './components/common/common'; +import {shared} from './shared/shared...
49f8abc62323c6384345e370a5330e477cc1eb64
src/action-types.js
src/action-types.js
// This function generates the five statuses from a single CRUD action. // For instance, you'd probably pass "CREATE", "READ", "UPDATE", or "DELETE" // as `crudAction`. const mapConstant = (resourceName, crudAction) => ({ [`${crudAction}_${resourceName}`]: `${crudAction}_${resourceName}`, [`${crudAction}_${resource...
// This function generates the five statuses from a single CRUD action. // For instance, you'd probably pass "CREATE", "READ", "UPDATE", or "DELETE" // as `crudAction`. const mapConstant = (crudAction) => ({ [`${crudAction}_RESOURCES`]: `${crudAction}_RESOURCES`, [`${crudAction}_RESOURCES_SUCCEED`]: `${crudAction}_...
Simplify action type generation code
Simplify action type generation code
JavaScript
mit
jmeas/resourceful-redux,jmeas/resourceful-redux
--- +++ @@ -1,17 +1,17 @@ // This function generates the five statuses from a single CRUD action. // For instance, you'd probably pass "CREATE", "READ", "UPDATE", or "DELETE" // as `crudAction`. -const mapConstant = (resourceName, crudAction) => ({ - [`${crudAction}_${resourceName}`]: `${crudAction}_${resourceNam...
98e25d04c5fd4541a66cae07fe8043ba5605676a
express/models/rule_parser.js
express/models/rule_parser.js
// L-System Rule Parser function RuleParser(str) { this.str = str; this.rules = {}; this.parse = function() { var c, d; var env = 0; var rule_str; var variable; for (var i = 0; i < this.str.length; i++) { c = this.str[i]; if (i > 0) { d = this.str[i-1]; } else { d = null;...
// L-System Rule Parser function RuleParser(str) { this.str = str; this.rules = {}; this.parse = function() { var c, d; var env = 0; var rule_str; var variable; var variable_regex = /[A-Z]/; var control_regex = /[\+-\[\]]/; for (var i = 0; i < this.str.length; i++) { c = this....
Fix rule parser to allow certain rules
Fix rule parser to allow certain rules Specifically, rules that have control characters as their "variable" (thse should always be "constant" rules). An example is (+ -> +).
JavaScript
bsd-3-clause
dwjackson/html_fractals
--- +++ @@ -8,6 +8,9 @@ var env = 0; var rule_str; var variable; + + var variable_regex = /[A-Z]/; + var control_regex = /[\+-\[\]]/; for (var i = 0; i < this.str.length; i++) { c = this.str[i]; @@ -20,13 +23,14 @@ if (c == '(') { env = 1; rule_str = ""; - } else if ...
e68591417bc299995bdb41e50dc1e6e67995e9a7
blocks/sms/index.js
blocks/sms/index.js
module.exports = { className: 'sms', template: require('./index.html'), data: { name: 'SMS', icon: '/images/blocks_sms.png', attributes: { value: { label: 'Phone #', type: 'string', value: '+18005555555' }, ...
module.exports = { className: 'sms', template: require('./index.html'), data: { name: 'SMS', icon: '/images/blocks_sms.png', attributes: { value: { label: 'Phone #', type: 'string', value: '+18005555555' }, ...
Use standard sms: format rather than MozActivity for SMS brick.
Use standard sms: format rather than MozActivity for SMS brick.
JavaScript
mpl-2.0
rodmoreno/webmaker-android,codex8/webmaker-app,bolaram/webmaker-android,gvn/webmaker-android,mozilla/webmaker-android,adamlofting/webmaker-android,alanmoo/webmaker-android,secretrobotron/webmaker-android,thejdeep/webmaker-app,bolaram/webmaker-android,mozilla/webmaker-android,k88hudson/webmaker-android,k88hudson/webmake...
--- +++ @@ -25,19 +25,12 @@ ready: function () { var self = this; self.$el.addEventListener('click', function (e) { - if (!window.MozActivity) return; + if (self.$parent.$parent.$data.params.mode !== 'play') return; + e.preventDefault(); - if (self....
1be130e89f07ac9d28ddc133ba9f7d335e4e83e5
src/ext/Function.js
src/ext/Function.js
/* ================================================================================================== Lowland - JavaScript low level functions Copyright (C) 2012 Sebatian Fastner ================================================================================================== */ /** * #require(ext.sugar.Object) ...
/* ================================================================================================== Lowland - JavaScript low level functions Copyright (C) 2012 Sebatian Fastner ================================================================================================== */ /** * #require(ext.sugar.Object) ...
Rename delay to lowDelay as original name conflicts with Prototype
Rename delay to lowDelay as original name conflicts with Prototype
JavaScript
mit
fastner/lowland,fastner/lowland
--- +++ @@ -29,10 +29,10 @@ core.Main.addMembers("Function", { - delay : function(time, context) { + lowDelay : function(time, context) { var func = this; return setTimeout(function(context, args) { - func.apply(context, args); + func.apply(context||this, args||[]); ...
cee19b9e8c5c9f3901aa061c066cffe8d37bb88a
app/controllers/patient-view.js
app/controllers/patient-view.js
var express = require('express'); var router = express.Router(); var pipe = require('../transformers/pipe'); router.post('/\\$cds-hook', function(req, res, next) { var context = { requestParams: req.query || {}, language: "fi", nation: "fi", cards: ["reminders", "guidelink", "cmrli...
var express = require('express'); var router = express.Router(); var pipe = require('../transformers/pipe'); router.post('/\\$cds-hook', function(req, res, next) { var context = { requestParams: req.query || {}, language: "en_US", nation: "US", cards: ["reminders", "guidelink", "cm...
Change language to en_US for patient view API
Change language to en_US for patient view API
JavaScript
mit
ebmeds/ebmeds-fhir,ebmeds/ebmeds-fhir
--- +++ @@ -6,8 +6,8 @@ var context = { requestParams: req.query || {}, - language: "fi", - nation: "fi", + language: "en_US", + nation: "US", cards: ["reminders", "guidelink", "cmrlink"] };
e4445e5850d68d02059c3280fe29aa1f70690a1b
config/express.js
config/express.js
'use strict'; // Initialize express. const config = {}; // Port config.port = process.env.LISTEN_PORT || 5050; module.exports = config;
'use strict'; // Initialize express. const config = {}; // Port config.port = process.env.PORT || 5050; module.exports = config;
Use PORT env variable for compatibility with Heroku
Use PORT env variable for compatibility with Heroku
JavaScript
mit
DoSomething/blink,DoSomething/blink
--- +++ @@ -4,6 +4,6 @@ const config = {}; // Port -config.port = process.env.LISTEN_PORT || 5050; +config.port = process.env.PORT || 5050; module.exports = config;
8a841f7c7501c9085f32a3c08c448f6f102737d2
test/await-test.js
test/await-test.js
require('buster').spec.expose(); var expect = require('buster').expect; var await = require('../lib/combinators/await').await; var observe = require('../lib/combinators/observe').observe; var Stream = require('../lib/Stream'); var resolve = require('../lib/promises').Promise.resolve; var sentinel = { value: 'sentinel...
require('buster').spec.expose(); var expect = require('buster').expect; var await = require('../lib/combinators/await').await; var delay = require('../lib/combinators/timed').delay; var observe = require('../lib/combinators/observe').observe; var reduce = require('../lib/combinators/reduce').reduce; var Stream = requi...
Test that await preserves event order
Test that await preserves event order
JavaScript
mit
mostjs/core,mostjs/core,axefrog/most,axefrog/core,nissoh/core,cujojs/most
--- +++ @@ -2,9 +2,16 @@ var expect = require('buster').expect; var await = require('../lib/combinators/await').await; +var delay = require('../lib/combinators/timed').delay; var observe = require('../lib/combinators/observe').observe; +var reduce = require('../lib/combinators/reduce').reduce; var Stream = requ...
5d667bf9f7df2f07ec3bac215e23f5621efe739b
app/scripts/src/content/item.js
app/scripts/src/content/item.js
'use strict'; /* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003). I left this object because it could be useful for other movies/shows */ var fullTitles = { 'Star Wars: The Clone Wars': '"Star Wars: The Clone Wars"', 'The Office (U.S.)': 'The Office (US)', 'The...
'use strict'; /* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003). I left this object because it could be useful for other movies/shows */ var fullTitles = { 'Star Wars: The Clone Wars': '"Star Wars: The Clone Wars"', 'The Office (U.S.)': 'The Office (US)', 'The...
Add Young and Hungry and The 100 to fullTitles search
Add Young and Hungry and The 100 to fullTitles search
JavaScript
mit
MrMamen/traktflix,tegon/traktflix,tegon/traktflix,MrMamen/traktflix
--- +++ @@ -7,7 +7,9 @@ 'The Office (U.S.)': 'The Office (US)', 'The Blind Side': '"The Blind Side"', 'The Avengers': '"The Avengers"', - 'The Seven Deadly Sins': '"The Seven Deadly Sins"' + 'The Seven Deadly Sins': '"The Seven Deadly Sins"', + 'Young and Hungry': '"Young and Hungry"', + 'The 100': '"The...
da8c91153b1eb24b14927ad8b49f4ebf5465340d
test/karma.conf.js
test/karma.conf.js
module.exports = function (config) { var CI = process.env.CI; config.set({ basePath: '..', frameworks: ['mocha', 'chai'], browsers: CI ? ['PhantomJS'] : ['Chrome', 'Firefox', 'IE'], files: [ 'http://jdataview.github.io/dist/jdataview.js', 'dist/browser/jbinary.js', 'test/karma.mocha.conf.js', 'te...
module.exports = function (config) { var CI = process.env.CI; config.set({ basePath: '..', frameworks: ['mocha', 'chai'], browsers: CI ? ['PhantomJS', 'Firefox'] : ['Chrome', 'Firefox', 'IE'], files: [ 'http://jdataview.github.io/dist/jdataview.js', 'dist/browser/jbinary.js', 'test/karma.mocha.conf....
Include Firefox for CI testing.
Include Firefox for CI testing.
JavaScript
mit
dark5un/jBinary,jDataView/jBinary,dark5un/jBinary,npmcomponent/jDataView-jBinary
--- +++ @@ -4,7 +4,7 @@ config.set({ basePath: '..', frameworks: ['mocha', 'chai'], - browsers: CI ? ['PhantomJS'] : ['Chrome', 'Firefox', 'IE'], + browsers: CI ? ['PhantomJS', 'Firefox'] : ['Chrome', 'Firefox', 'IE'], files: [ 'http://jdataview.github.io/dist/jdataview.js', 'dist/browser/jbinary...
edf7ecdcc5d6a2bd6268be7b9bf213edb4baa9ca
jest/moveSnapshots.js
jest/moveSnapshots.js
const fs = require('fs') const glob = require('glob') const outputDirectory = [process.env.CIRCLE_ARTIFACTS, 'snapshots'] .filter(x => x) .join('/') const createDir = dir => { const splitPath = dir.split('/') splitPath.reduce((path, subPath) => { if (!fs.existsSync(path)) { console.log(`Create direc...
const fs = require('fs') const glob = require('glob') const outputDirectory = [process.env.$CIRCLE_ARTIFACTS, 'snapshots'] .filter(x => x) .join('/') const createDir = dir => { const splitPath = dir.split('/') splitPath.reduce((path, subPath) => { if (!fs.existsSync(path)) { console.log(`Create dire...
Fix CircleCI artifacts env path
Fix CircleCI artifacts env path
JavaScript
mit
Ciunkos/ciunkos.com
--- +++ @@ -1,7 +1,7 @@ const fs = require('fs') const glob = require('glob') -const outputDirectory = [process.env.CIRCLE_ARTIFACTS, 'snapshots'] +const outputDirectory = [process.env.$CIRCLE_ARTIFACTS, 'snapshots'] .filter(x => x) .join('/')
8f290015079b2c2dcf46077afc75c19b6dad655c
src/notifiers/slack/webtask.js
src/notifiers/slack/webtask.js
'use strict'; var util = require('util'); /** * @param {secret} SLACK_WEBHOOK_URL * @param {secret} SLACK_CHANNEL_NAME */ module.exports = function(ctx, cb) { var params = ctx.body; if (!ctx.secrets.SLACK_WEBHOOK_URL || !ctx.secrets.SLACK_CHANNEL_NAME) { return cb(new Error('"SLACK_WEBHOOK_URL" an...
'use strict'; const assert = require('assert'); const util = require('util'); /** * @param {secret} SLACK_WEBHOOK_URL * @param {secret} SLACK_CHANNEL_NAME * @param JSON body * * body: [{name: 'GitHub', accounts: ['john', 'mark']}] */ module.exports = (ctx, cb) => { assert(ctx.secrets.SLACK_CHANNEL_NAME, '...
Update Slack notifier to use new data format.
Update Slack notifier to use new data format.
JavaScript
mit
radekk/webtask-mfa-monitor,radekk/webtask-tfa-monitor,radekk/mfa-monitor
--- +++ @@ -1,38 +1,34 @@ 'use strict'; -var util = require('util'); +const assert = require('assert'); +const util = require('util'); /** * @param {secret} SLACK_WEBHOOK_URL * @param {secret} SLACK_CHANNEL_NAME + * @param JSON body + * + * body: [{name: 'GitHub', accounts: ['john', 'mark']}] */ -modu...
ea2f8dce2e4c331f69aaca71823e12593ad25d6f
ui/main.js
ui/main.js
// Blank the document so the 404 page doesn't show up visibly. document.documentElement.style.display = 'none'; // Can't use DOMContentLoaded, calling document.write or document.close inside it from // inside an extension causes a crash. onload = function() { document.write("<!DOCTYPE html><script src='" + resolv...
// Blank the document so the 404 page doesn't show up visibly. document.documentElement.style.display = 'none'; // Can't use DOMContentLoaded, calling document.write or document.close inside it from // inside an extension causes a crash. onload = function() { document.write( "<!DOCTYPE html>" + "<...
Add a meta viewport. The app doesn't quite look right on mobile, but at least this paves the way.
Add a meta viewport. The app doesn't quite look right on mobile, but at least this paves the way.
JavaScript
bsd-3-clause
esprehn/chromium-codereview,esprehn/chromium-codereview
--- +++ @@ -5,7 +5,12 @@ // Can't use DOMContentLoaded, calling document.write or document.close inside it from // inside an extension causes a crash. onload = function() { - document.write("<!DOCTYPE html><script src='" + resolveUrl("bower_components/platform/platform.js") + "'></script><cr-app></cr-app>"); + ...
6b3018fdece04e9c8328a4609ab34c20ad012598
test/karma.conf.js
test/karma.conf.js
module.exports = function (config) { config.set({ frameworks: ['browserify', 'mocha'], reporters: ['mocha'], preprocessors: { 'build/karma.js': ['browserify'] }, browserify: { debug: true }, client: { mocha: { timeout: 10000 } }, files: ['build/karma.js'], colors: true, singleRun: true...
module.exports = function (config) { config.set({ frameworks: ['browserify', 'mocha'], reporters: ['mocha'], preprocessors: { 'build/karma.js': ['browserify'] }, browserify: { debug: true }, client: { mocha: { timeout: 30000 } }, files: ['build/karma.js'], colors: true, singleRun: true...
Increase timeout for Travis test
Increase timeout for Travis test
JavaScript
bsd-3-clause
jupyter/jupyter-js-services,jupyterlab/services,blink1073/services,blink1073/jupyter-js-services,minrk/jupyter-js-services,jupyter/jupyter-js-services,blink1073/jupyter-js-services,blink1073/services,blink1073/services,minrk/jupyter-js-services,blink1073/jupyter-js-services,blink1073/services,jupyterlab/services,jupyte...
--- +++ @@ -4,7 +4,7 @@ reporters: ['mocha'], preprocessors: { 'build/karma.js': ['browserify'] }, browserify: { debug: true }, - client: { mocha: { timeout: 10000 } }, + client: { mocha: { timeout: 30000 } }, files: ['build/karma.js'], colors: true, singleRun: true,
7f4821f63a9eb0679191b0cae6057b62ec4b0572
src/vdom/dom.js
src/vdom/dom.js
function createElement (el) { const realNode = document.createElement(el.tagName); if (el.attributes) { for (let a = 0; a < el.attributes.length; a++) { const attr = el.attributes[a]; const name = attr.name; const value = attr.value; if (!value) { continue; } if (n...
function createElement (el) { const realNode = document.createElement(el.tagName); if (el.attributes) { for (let a = 0; a < el.attributes.length; a++) { const attr = el.attributes[a]; const name = attr.name; const value = attr.value; if (!value) { continue; } if (n...
Add event automation for on prefixes.
Add event automation for on prefixes.
JavaScript
mit
skatejs/dom-diff
--- +++ @@ -17,6 +17,8 @@ } else { realNode.appendChild(render(value)); } + } else if (name.indexOf('on') === 0) { + realNode.addEventListener(name.substring(2).toLowerCase(), value); } else { realNode.setAttribute(name, value); }
9eb190f80faceee9a431925207049fcbc5cf0a38
src/react-web3/Web3Provider.js
src/react-web3/Web3Provider.js
import React, { Component } from 'react'; import PropTypes from 'prop-types' class Web3Provider extends Component { render() { if (window.web3) { return this.props.children } return <this.props.web3UnavailableScreen /> } getChildContext() { return { web3: window.web3 } } } We...
import React, { Component } from 'react' import PropTypes from 'prop-types' import Web3 from 'web3' const ONE_SECOND = 1000; class Web3Provider extends Component { constructor(props, context) { super(props, context) this.state = { selectedAccount: null } this.web3 = null this.interval = ...
Add onChangeAccount callback and selectedAccount context variable
Add onChangeAccount callback and selectedAccount context variable
JavaScript
mit
oraclesorg/ico-wizard,oraclesorg/ico-wizard,oraclesorg/ico-wizard
--- +++ @@ -1,24 +1,88 @@ -import React, { Component } from 'react'; +import React, { Component } from 'react' import PropTypes from 'prop-types' +import Web3 from 'web3' + +const ONE_SECOND = 1000; class Web3Provider extends Component { + constructor(props, context) { + super(props, context) + + this.stat...
9790f7aa9215185dbec94f20187962e0bb0af7b6
app/card/card_service.js
app/card/card_service.js
app.service("cardService", function() { this.getCardUrl = function(name) { return "http://gatherer.wizards.com/Pages/Card/Details.aspx?name=" + name; }; this.getCardImage = function(name) { return "http://gatherer.wizards.com/Handlers/Image.ashx?name=" + name + "&type=card&.jpg"; }; });
app.service("cardService", function() { this.getCardUrl = function(name) { name = this.sanitizeName_(name); return "http://gatherer.wizards.com/Pages/Card/Details.aspx?name=" + name; }; this.getCardImage = function(name) { name = this.sanitizeName_(name); return "http://gatherer.wizards.com/Han...
Fix card image/links that have Æ in the name
Fix card image/links that have Æ in the name
JavaScript
mit
kevinpang/edhrec-site
--- +++ @@ -1,9 +1,15 @@ app.service("cardService", function() { this.getCardUrl = function(name) { + name = this.sanitizeName_(name); return "http://gatherer.wizards.com/Pages/Card/Details.aspx?name=" + name; }; this.getCardImage = function(name) { + name = this.sanitizeName_(name); ret...
63d03c065b816bedace4756350fa4c49b6da18b1
test/message.js
test/message.js
var test = require('tape') var error = require('../') test('message', function(t) { t.plan(3) var MyError = error('MyError') t.equals(MyError().name, 'MyError', 'name should be correct') t.equals(MyError('rawr').message, 'rawr', 'message should be correct') t.equals(MyError('meh').stack.split('\n')[0], 'MyE...
var test = require('tape') var error = require('../') test('message', function(t) { t.plan(3) var MyError = error('MyError') t.equals(MyError().name, 'MyError', 'name should be correct') t.equals(MyError('rawr').message, 'rawr', 'message should be correct') try { throw new MyError('meh') } catch (er...
Throw the error so IE sets the stack property
Throw the error so IE sets the stack property
JavaScript
mit
andrezsanchez/custom-error
--- +++ @@ -7,5 +7,10 @@ t.equals(MyError().name, 'MyError', 'name should be correct') t.equals(MyError('rawr').message, 'rawr', 'message should be correct') - t.equals(MyError('meh').stack.split('\n')[0], 'MyError: meh', 'stack should contain name and message') + try { + throw new MyError('meh') + } + ...
8efe68d397b3416d196009178e26c46194c81b27
tests/test.config.circle-ci.js
tests/test.config.circle-ci.js
module.exports = { store_url: 'http://localhost:8080', account_user: 'test:tester', account_password: 'testing', account_name: 'AUTH_test', container_name: 'test_container', object_name: 'test_object', segment_container_name: 'segment_test_container', segment_object_name: 'segment_test_o...
module.exports = { store_url: 'http://localhost:8080', account_user: 'test', account_password: 'testing', account_name: 'tester', container_name: 'test_container', object_name: 'test_object', segment_container_name: 'segment_test_container', segment_object_name: 'segment_test_object', ...
Fix circleci test config file
Fix circleci test config file
JavaScript
mit
Tezirg/os2
--- +++ @@ -1,8 +1,8 @@ module.exports = { store_url: 'http://localhost:8080', - account_user: 'test:tester', + account_user: 'test', account_password: 'testing', - account_name: 'AUTH_test', + account_name: 'tester', container_name: 'test_container', object_name: 'test_object', ...
b5a5dcf506c4be39afdc9a9a0700272f9807efaf
test/unit/index.js
test/unit/index.js
const testsContext = require.context('./specs', true, /\.spec$/); testsContext.keys().forEach(testsContext); const srcContext = require.context('../../src', true, /^\/(?!index(\.js)?$)/); srcContext.keys().forEach(srcContext);
// mock passive event listener support and upsupport (() => { const originAddListener = window.addEventListener; let flag; window.addEventListener = (...args) => { // try to read passive property and only read once time if it is accessible if (!flag && args[2] && args[2].passive) { flag = false; ...
Improve unit tests for passive event support logic
Improve unit tests for passive event support logic
JavaScript
mit
PeachScript/vue-infinite-loading,PeachScript/vue-infinite-loading
--- +++ @@ -1,3 +1,17 @@ +// mock passive event listener support and upsupport +(() => { + const originAddListener = window.addEventListener; + let flag; + + window.addEventListener = (...args) => { + // try to read passive property and only read once time if it is accessible + if (!flag && args[2] && args[2...
7aafe74a946594994027c6439c18135291aad82d
lib/tape/test.js
lib/tape/test.js
'use strict'; // MODULES // var test = require( 'tape' ); var lib = require( './../lib' ); // TESTS // test( 'main export is a function', function test( t ) { t.ok( typeof lib === 'function', 'main export is a function' ); t.end(); });
'use strict'; // MODULES // var tape = require( 'tape' ); var lib = require( './../lib' ); // TESTS // tape( 'main export is a function', function test( t ) { t.ok( typeof lib === 'function', 'main export is a function' ); t.end(); });
Update tape template so that tape is assigned to a variable of the same name
Update tape template so that tape is assigned to a variable of the same name
JavaScript
mit
kgryte/test-snippet
--- +++ @@ -2,13 +2,13 @@ // MODULES // -var test = require( 'tape' ); +var tape = require( 'tape' ); var lib = require( './../lib' ); // TESTS // -test( 'main export is a function', function test( t ) { +tape( 'main export is a function', function test( t ) { t.ok( typeof lib === 'function', 'main exp...
d3589b80adc8d1f358e297d880cf6404bae469c8
lib/ui/events.js
lib/ui/events.js
exports = module.exports = function (UI) { var setHistoryHeight = function () { // Set the history component dynamic height UI.components.history.height = UI.screen.height - UI.components.input.height; }; UI.screen.on('prerender', function () { setHistoryHeight(); }); UI.screen.on('resize', fun...
exports = module.exports = function (UI) { var setHistoryHeight = function () { // Set the history component dynamic height UI.components.history.height = UI.screen.height - UI.components.input.height; }; UI.screen.on('prerender', function () { setHistoryHeight(); }); UI.screen.on('resize', fun...
Add vi scrolling keys to scrolling key-binding
Add vi scrolling keys to scrolling key-binding
JavaScript
mit
KillerDesigner/gitter-cli,RodrigoEspinosa/gitter-cli,leohmoraes/gitter-cli,Acidburn0zzz/gitter-cli,juliosueiras/gitter-cli
--- +++ @@ -34,7 +34,12 @@ UI.components.input.focus(); }); - UI.screen.key(['up', 'down'], function (ch, key) { - UI.components.history[key.name](); + // History scrolling events. + UI.screen.key(['up', 'k'], function () { + UI.components.history.up(); }); + UI.screen.key(['down', 'j'], functi...