commit stringlengths 40 40 | old_file stringlengths 4 236 | new_file stringlengths 4 236 | old_contents stringlengths 1 3.26k | new_contents stringlengths 16 4.43k | subject stringlengths 16 624 | message stringlengths 17 3.29k | lang stringclasses 5
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
9ba3095bdc0a81a1546634160f2a20c3a0196d51 | src/time_slot.js | src/time_slot.js | Occasion.Modules.push(function(library) {
library.TimeSlot = class TimeSlot extends library.Base {};
library.TimeSlot.className = 'TimeSlot';
library.TimeSlot.queryName = 'time_slots';
library.TimeSlot.belongsTo('product');
library.TimeSlot.belongsTo('venue');
library.TimeSlot.afterRequest(function() {
... | Occasion.Modules.push(function(library) {
library.TimeSlot = class TimeSlot extends library.Base {};
library.TimeSlot.className = 'TimeSlot';
library.TimeSlot.queryName = 'time_slots';
library.TimeSlot.belongsTo('order');
library.TimeSlot.belongsTo('product');
library.TimeSlot.belongsTo('venue');
libra... | Add TimeSlot belongsTo order relationship | Add TimeSlot belongsTo order relationship
| JavaScript | mit | nicklandgrebe/occasion-sdk-js |
b447e585b0c77739315677deb367140184d24a17 | src/models/reminder.js | src/models/reminder.js | const mongoose = require('mongoose');
const reminderSchema = new mongoose.Schema({
user_address: { type: Object, required: true, index: true },
value: { type: String, required: true },
expiration: { type: Date, required: true }
});
module.exports = mongoose.model('Reminder', reminderSchema); | const mongoose = require('mongoose');
const reminderSchema = new mongoose.Schema({
user_address: {
useAuth: Boolean,
serviceUrl: String,
bot: {
name: String,
id: String
},
conversation: {
id: String,
isGroup: Boolean
... | Improve mongoose schema, index user.name | Improve mongoose schema, index user.name
| JavaScript | mit | sebsylvester/reminder-bot |
26fa40b50deee67a1ce8711ef5f35a7cd977c18d | src/openpoliticians.js | src/openpoliticians.js | "use strict";
var cors = require('cors');
var originWhitelist = [
'http://openpoliticians.org',
'http://localhost:4000',
];
var openPoliticiansCors = cors({
origin: function(origin, callback) {
var originIsWhitelisted = originWhitelist.indexOf(origin) !== -1;
callback(null, originIsWhitelisted);
},
... | "use strict";
var cors = require('cors');
var originWhitelist = [
'http://openpoliticians.org',
'http://everypolitician.org',
'http://localhost:4000',
];
var openPoliticiansCors = cors({
origin: function(origin, callback) {
var originIsWhitelisted = originWhitelist.indexOf(origin) !== -1;
callback(nu... | Add everypolitician.org to allowed CORS addresses | Add everypolitician.org to allowed CORS addresses
| JavaScript | agpl-3.0 | Sinar/popit-api,mysociety/popit-api,mysociety/popit-api,Sinar/popit-api |
0edf973af2efff8614ddae037eb28d5f2b178599 | ext/codecast/7.1/codecast-loader.js | ext/codecast/7.1/codecast-loader.js | $(document).ready(function() {
if (window.taskData) {
var taskInstructionsHtml = $('#taskIntro').html();
var hints = $('#taskHints > div').toArray().map(elm => {
return {
content: elm.innerHTML.trim()
};
});
var additionalOptions = window.taskData.codecastParameters ? window.task... | $(document).ready(function() {
if (window.taskData) {
var taskInstructionsHtml = $('#taskIntro').html();
var hints = $('#taskHints > div').toArray().map(elm => {
return {
content: elm.innerHTML.trim()
};
});
var additionalOptions = window.taskData.codecastParameters ? window.task... | Revert "Revert "Use window.stringsLanguage by default if fulfilled"" | Revert "Revert "Use window.stringsLanguage by default if fulfilled""
This reverts commit 6c738f09b3c930a90847440c564d65179417c469.
| JavaScript | mit | France-ioi/bebras-modules,France-ioi/bebras-modules |
f3f2ed4622828fdce9ca809e32939548267cf406 | lib/node_modules/@stdlib/types/ndarray/ctor/lib/get2d.js | lib/node_modules/@stdlib/types/ndarray/ctor/lib/get2d.js | 'use strict';
// MODULES //
var isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;
// FUNCTIONS //
/**
* Returns an array element.
*
* @private
* @param {integer} i - index for first dimension
* @param {integer} j - index for second dimension
* @throws {TypeError} index for first dimension must be an ... | 'use strict';
// MODULES //
var isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;
var getIndex = require( './get_index.js' );
// FUNCTIONS //
/**
* Returns an array element.
*
* @private
* @param {integer} i - index for first dimension
* @param {integer} j - index for second dimension
* @throws {Type... | Add support for an index mode | Add support for an index mode
| JavaScript | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib |
5620dd2921b534e1328c9305c66c254d04131797 | app/index.js | app/index.js | 'use strict';
var util = require('util');
var yeoman = require('yeoman-generator');
var Generator = module.exports = function () {
var cb = this.async();
var ignores = [
'.git',
'CHANGELOG.md',
'CONTRIBUTING.md',
'LICENSE.md',
'README.md'
];
this.prompt([{
type: 'confirm',
name: 'docs',
message: ... | 'use strict';
var util = require('util');
var yeoman = require('yeoman-generator');
var Generator = module.exports = function Generator () {
yeoman.generators.Base.apply(this, arguments);
};
util.inherits(Generator, yeoman.generators.NamedBase);
Generator.prototype.copyFiles = function () {
var cb = this.async()... | Make generator work with `yo` v1.0.5 | Make generator work with `yo` v1.0.5
Ref #12.
Fix #11.
| JavaScript | mit | h5bp/generator-h5bp |
7aee442d3b12698bb027c747a11719a075d9c586 | lib/autoprefix-processor.js | lib/autoprefix-processor.js | var autoprefixer = require('autoprefixer-core');
module.exports = function(less) {
function AutoprefixProcessor(options) {
this.options = options || {};
};
AutoprefixProcessor.prototype = {
process: function (css, extra) {
var options = this.options;
var sourceMap =... | var autoprefixer = require('autoprefixer-core');
module.exports = function(less) {
function AutoprefixProcessor(options) {
this.options = options || {};
};
AutoprefixProcessor.prototype = {
process: function (css, extra) {
var options = this.options;
var sourceMap =... | Fix sourcemaps when in a directory | Fix sourcemaps when in a directory
| JavaScript | apache-2.0 | less/less-plugin-autoprefix,PixnBits/less-plugin-autoprefix |
7df02298180fcd94019506f363392c48e0fe21cf | app.js | app.js | function Person(name)
{
this.name = name;
this.parent = null;
this.children = [];
this.siblings = [];
this.getChildren = function ()
{
return this.children;
}
};
var Nancy = new Person("Nancy")
var Adam = new Person("Adam")
var Jill = new Person("Jill")
var Carl = new Person("Carl")
Nancy.children.push(A... | var familyTree = [];
function Person(name)
{
this.name = name;
this.parent = null;
this.children = [];
this.siblings = [];
this.addChild = function(name)
{
var child = new Person(name)
child.parent = this
this.children.push(child);
};
this.init();
};
Person.prototype.init = function(){
familyTree.... | Restructure Person prototype and add family array | Restructure Person prototype and add family array
| JavaScript | mit | Nilaco/Family-Tree,Nilaco/Family-Tree |
cf73385957d54ef0c808aa69e261fe57b87cb7f9 | ukelonn.web.frontend/src/main/frontend/reducers/passwordReducer.js | ukelonn.web.frontend/src/main/frontend/reducers/passwordReducer.js | import { createReducer } from 'redux-starter-kit';
import {
UPDATE,
} from '../actiontypes';
const passwordReducer = createReducer(null, {
[UPDATE]: (state, action) => {
if (!(action.payload && action.payload.password)) {
return state;
}
return action.payload.password;
}... | import { createReducer } from 'redux-starter-kit';
import {
UPDATE,
LOGIN_RECEIVE,
INITIAL_LOGIN_STATE_RECEIVE,
} from '../actiontypes';
const passwordReducer = createReducer(null, {
[UPDATE]: (state, action) => {
if (!(action.payload && action.payload.password)) {
return state;
... | Set password in redux to empty string on successful login | Set password in redux to empty string on successful login
| JavaScript | apache-2.0 | steinarb/ukelonn,steinarb/ukelonn,steinarb/ukelonn |
ea015fcb266ab4287e583bed76bf5fbbb62205e5 | database/index.js | database/index.js | let pgp = require('pg-promise')({ssl: true});
// let databaseUrl = process.env.DATABASE_URL || require('./config');
// module.exports = pgp(databaseUrl);
| let pgp = require('pg-promise')(); // initialization option was {ssl: true}, sorry for deleting, but wasn't working for me with it
let connection = process.env.DATABASE_URL || require('./config');
module.exports = pgp(connection);
| Delete initialization options and change variable name | Delete initialization options and change variable name
| JavaScript | mit | SentinelsOfMagic/SentinelsOfMagic |
62188e803684cb8b7cf965a895da23bc583b83a5 | postcss.config.js | postcss.config.js | "use strict";
const {media_breakpoints} = require("./static/js/css_variables");
module.exports = {
plugins: {
// Warning: despite appearances, order is significant
"postcss-nested": {},
"postcss-extend-rule": {},
"postcss-simple-vars": {
variables: media_breakpoints,
... | "use strict";
const {media_breakpoints} = require("./static/js/css_variables");
module.exports = {
plugins: [
require("postcss-nested"),
require("postcss-extend-rule"),
require("postcss-simple-vars")({variables: media_breakpoints}),
require("postcss-calc"),
require("postcss... | Convert plugins object to an array. | postcss: Convert plugins object to an array.
Since order matters for plugins, its better to use the Array syntax
to pass plugins to the PostCSS instead of Object.
This also allows us to reliably add more plugins programatically if
we so choose.
[dfdb7392591db597bc41cf266a9c3bc12a2706e5@zulip.com: Adjust to work with... | JavaScript | apache-2.0 | eeshangarg/zulip,kou/zulip,kou/zulip,kou/zulip,andersk/zulip,zulip/zulip,rht/zulip,kou/zulip,andersk/zulip,eeshangarg/zulip,rht/zulip,rht/zulip,rht/zulip,zulip/zulip,zulip/zulip,eeshangarg/zulip,eeshangarg/zulip,rht/zulip,zulip/zulip,andersk/zulip,rht/zulip,andersk/zulip,zulip/zulip,rht/zulip,zulip/zulip,zulip/zulip,ko... |
55a531708dfcf895433ce9abaf2c11fe9635df14 | public/js/read.js | public/js/read.js |
var imgWidth = new Array();
function imageWidth()
{
var width = $(window).width() - fixedPadding;
$(".img_flex").each(function(index)
{
if (width != $(this).width())
{
if (width < imgWidth[index])
{
$(this).width(width);
}
els... |
var imgWidth = new Array();
var imagePadding = 100;
function imageWidth()
{
var width = $(window).width() - imagePadding;
$(".img_flex").each(function(index)
{
if (width != $(this).width())
{
if (width < imgWidth[index])
{
$(this).width(width);
... | Change padding depend on window width (the bigger the more big the width is) | Change padding depend on window width (the bigger the more big the width is)
| JavaScript | mit | hernantas/MangaReader,hernantas/MangaReader,hernantas/MangaReader |
8be4bc9543ba1f23019d619c822bc7e4769e22da | stories/Autocomplete.stories.js | stories/Autocomplete.stories.js | import React from 'react';
import { storiesOf } from '@storybook/react';
import Autocomplete from '../src/Autocomplete';
const stories = storiesOf('javascript/Autocomplete', module);
stories.addParameters({
info: {
text: `Add an autocomplete dropdown below your input
to suggest possible values in your form... | import React from 'react';
import { storiesOf } from '@storybook/react';
import Autocomplete from '../src/Autocomplete';
const stories = storiesOf('javascript/Autocomplete', module);
stories.addParameters({
info: {
text: `Add an autocomplete dropdown below your input
to suggest possible values in your form... | Add autocomplete with icon story | Add autocomplete with icon story
| JavaScript | mit | react-materialize/react-materialize,react-materialize/react-materialize,react-materialize/react-materialize |
ef090c4c1b819b2df89ec50a855260decdf5ace0 | app/tradeapi/tradeapi.js | app/tradeapi/tradeapi.js | /**
This Angular module provide interface to VNDIRECT API, include:
- Auth API
- Trade API
*/
angular.module('myApp.tradeapi', [])
.factory('tradeapi', ['$http', function($http) {
var AUTH_URL = 'https://auth-api.vndirect.com.vn/auth';
var token = null;
return {
login: function(username, passwor... | /**
This Angular module provide interface to VNDIRECT API, include:
- Auth API
- Trade API
*/
angular.module('myApp.tradeapi', [])
.factory('tradeapi', ['$http', '$q', function($http, $q) {
var AUTH_URL = 'https://auth-api.vndirect.com.vn/auth';
var CUSOMTER_URL = 'https://trade-api.vndirect.com.vn/customer';... | Integrate login & retrieve customer with Trade API | Integrate login & retrieve customer with Trade API
| JavaScript | mit | VNDIRECT/SmartP,VNDIRECT/SmartP |
d299ceac7d3d115266a8f45a14f1fd9f42cea883 | tests/test-simple.js | tests/test-simple.js | /*
* Copyright 2011 Rackspace
*
* 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... | /*
* Copyright 2011 Rackspace
*
* 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... | Add simple attributes test case | Add simple attributes test case
| JavaScript | apache-2.0 | racker/node-elementtree |
f8c3893888e1cd5d8b31e4621fe6c04b3343bfce | src/app/UI/lib/managers/statistics/client/components/routes.js | src/app/UI/lib/managers/statistics/client/components/routes.js |
import React from "react";
import { Route } from "react-router";
import {
View as TAView
} from "ui-components/type_admin";
import Item from "./Item";
import List from "./List";
const routes = [
<Route
key="charts"
path="charts"
component={TAView}
List={List}
type="stat... |
import React from "react";
import { Route } from "react-router";
import {
View as TAView,
EditTags as TAEditTags
} from "ui-components/type_admin";
import Item from "./Item";
import List from "./List";
const routes = [
<Route
key="charts"
path="charts"
component={TAView}
Li... | Add edit tags to statistics chart | UI: Add edit tags to statistics chart
| JavaScript | mit | Combitech/codefarm,Combitech/codefarm,Combitech/codefarm |
d6ab81e3e201e08004aee6ec30d4cf0d85678886 | src/D3TopoJson.js | src/D3TopoJson.js | po.d3TopoJson = function(fetch) {
if (!arguments.length) fetch = po.queue.json;
var topoToGeo = function(url, callback) {
function convert(topology, object, layer, features) {
if (object.type == "GeometryCollection" && !object.properties) {
object.geometries.forEach(function(g) {
conver... | po.d3TopoJson = function(fetch) {
if (!arguments.length) fetch = po.queue.json;
var topologyFeatures = function(topology) {
function convert(topology, object, layer, features) {
if (object.type == "GeometryCollection" && !object.properties) {
object.geometries.forEach(function(g) {
conv... | Allow changing the function used to extract GeoJSON features from TopoJSON. | Allow changing the function used to extract GeoJSON features from TopoJSON.
| JavaScript | bsd-3-clause | dillan/mapsense.js,RavishankarDuMCA10/mapsense.js,sfchronicle/mapsense.js,manueltimita/mapsense.js,cksachdev/mapsense.js,mapsense/mapsense.js,shkfnly/mapsense.js,Laurian/mapsense.js,gimlids/mapsense.js |
97e1d783d9a09dca204dff19bf046fc0af198643 | test/js/thumbs_test.js | test/js/thumbs_test.js | window.addEventListener('load', function(){
// touchstart
module('touchstart', environment);
test('should respond to touchstart', 1, function() {
listen('touchstart').trigger('mousedown');
});
// touchend
module('touchend', environment);
test('should respond to touchend', 1, fu... | window.addEventListener('load', function(){
// mousedown
module('mousedown', environment);
test('should respond to mousedown', 1, function() {
listen('mousedown').trigger('mousedown');
});
// mouseup
module('mouseup', environment);
test('should respond to mouseup', 1, function(... | Add mousedown/mouseup/mousemove to test suite. | Add mousedown/mouseup/mousemove to test suite.
To make sure that we do not clobber those events.
| JavaScript | mit | mwbrooks/thumbs.js,pyrinelaw/thumbs.js,pyrinelaw/thumbs.js |
11ec2067d683564efe69793ee2345e05d8264e94 | lib/flux_mixin.js | lib/flux_mixin.js | var React = require("react");
module.exports = {
propTypes: {
flux: React.PropTypes.object
},
childContextTypes: {
flux: React.PropTypes.object
},
contextTypes: {
flux: React.PropTypes.object
},
getChildContext: function() {
return {
flux: this.context.flux || this.props.flux
... | var React = require("react");
module.exports = {
propTypes: {
flux: React.PropTypes.object.isRequired
},
childContextTypes: {
flux: React.PropTypes.object
},
getChildContext: function() {
return {
flux: this.props.flux
};
}
};
| Make Fluxbox.Mixin only for the top-level components | Make Fluxbox.Mixin only for the top-level components
| JavaScript | mit | alcedo/fluxxor,dantman/fluxxor,chimpinano/fluxxor,nagyistoce/fluxxor,VincentHoang/fluxxor,vsakaria/fluxxor,dantman/fluxxor,nagyistoce/fluxxor,davesag/fluxxor,hoanglamhuynh/fluxxor,demiazz/fluxxor,davesag/fluxxor,BinaryMuse/fluxxor,dantman/fluxxor,davesag/fluxxor,VincentHoang/fluxxor,hoanglamhuynh/fluxxor,STRML/fluxxor,... |
7d566b878a58ec91c2f88e3bd58ff5d7ec9b41df | lib/orbit/main.js | lib/orbit/main.js | /**
Contains core methods and classes for Orbit.js
@module orbit
@main orbit
*/
// Prototype extensions
if (!Array.prototype.forEach) {
Array.prototype.forEach = function (fn, scope) {
var i, len;
for (i = 0, len = this.length; i < len; ++i) {
if (i in this) {
fn.call(scope, this[i], i, th... | /**
Contains core methods and classes for Orbit.js
@module orbit
@main orbit
*/
/**
Namespace for core Orbit methods and classes.
@class Orbit
@static
*/
var Orbit = {};
export default Orbit;
| Remove prototype extensions. ES5.1 now required. | Remove prototype extensions. ES5.1 now required. | JavaScript | mit | greyhwndz/orbit.js,orbitjs/orbit.js,orbitjs/orbit-core,lytbulb/orbit.js,opsb/orbit.js,opsb/orbit.js,rollokb/orbit.js,lytbulb/orbit.js,ProlificLab/orbit.js,SmuliS/orbit.js,orbitjs/orbit.js,rollokb/orbit.js,jpvanhal/orbit.js,greyhwndz/orbit.js,beni55/orbit.js,jpvanhal/orbit.js,ProlificLab/orbit.js,SmuliS/orbit.js,beni55/... |
49adc111cd02ea1d1d22281f172fda0819876970 | main.js | main.js | var game = new Phaser.Game(600, 800, Phaser.AUTO, '', {preload: preload, create: create, update: update});
function preload() {
game.load.image('player', 'assets/player.png');
}
var player;
function create() {
player = game.add.sprite(game.world.width / 2 - 50, game.world.height - 76, 'player');
}
fun... | var game = new Phaser.Game(600, 800, Phaser.AUTO, '', {preload: preload, create: create, update: update});
function preload() {
game.load.image('player', 'assets/player.png');
}
var player;
var cursors;
function create() {
game.physics.startSystem(Phaser.Physics.ARCADE);
player = game.add.sprite(game.... | Allow player to move up/down/right/left | Allow player to move up/down/right/left
| JavaScript | mit | Acaki/WWW_project,Acaki/WWW_project,Acaki/WWW_project |
3f32dd2bede0cb23f5453891d7b92a83e90c2d71 | routes/apiRoot.js | routes/apiRoot.js |
var contentType = require('../middleware/contentType'),
config = require('../config');
function apiRoot(req, res) {
var root = config.get('apiEndpoint');
var answer = {
motd: 'Welcome to the NGP VAN OSDI Service!',
max_pagesize: 200,
vendor_name: 'NGP VAN, Inc.',
product_name: 'VAN',
osdi_... |
var contentType = require('../middleware/contentType'),
config = require('../config');
function apiRoot(req, res) {
var root = config.get('apiEndpoint');
var answer = {
motd: 'Welcome to the NGP VAN OSDI Service!',
max_pagesize: 200,
vendor_name: 'NGP VAN, Inc.',
product_name: 'VAN',
osdi_... | Correct AEP resource for person signup helper | Correct AEP resource for person signup helper
Signed-off-by: shaisachs <47bd79f9420edf5d0991d1e2710179d4e040d480@ngpvan.com>
| JavaScript | apache-2.0 | NGPVAN/osdi-service,joshco/osdi-service |
929e85200848bb9974eb480efa9945c6af3250f4 | resource-router-middleware.js | resource-router-middleware.js | var Router = require('express').Router;
var keyed = ['get', 'read', 'put', 'patch', 'update', 'del', 'delete'],
map = { index:'get', list:'get', read:'get', create:'post', update:'put', modify:'patch' };
module.exports = function ResourceRouter(route) {
route.mergeParams = route.mergeParams ? true : false;
var rou... | var Router = require('express').Router;
var keyed = ['get', 'read', 'put', 'update', 'patch', 'modify', 'del', 'delete'],
map = { index:'get', list:'get', read:'get', create:'post', update:'put', modify:'patch' };
module.exports = function ResourceRouter(route) {
route.mergeParams = route.mergeParams ? true : false... | Add modify to keyed methods to enable patch with id | Add modify to keyed methods to enable patch with id
| JavaScript | bsd-3-clause | developit/resource-router-middleware |
4383d7d3f566e33e5d4dc86e64fb1539ddad1642 | src/compressor.js | src/compressor.js | 'use strict';
var es = require('event-stream'),
path = require('path'),
zlib = require('zlib');
var compressibles = [
'.js',
'.json',
'.css',
'.html'
];
function isCompressibleFile( file ) {
var ext = path.extname( file.path ).toLowerCase();
return ( compressibles.indexOf( ext ) > -1 );
}
module.exports = f... | 'use strict';
var es = require('event-stream'),
path = require('path'),
zlib = require('zlib');
var compressibles = [
'.js',
'.css',
'.html'
];
function isCompressibleFile( file ) {
var ext = path.extname( file.path ).toLowerCase();
return ( compressibles.indexOf( ext ) > -1 );
}
module.exports = function() ... | Revert "adding JSON to the list of extensions that should be compressed" | Revert "adding JSON to the list of extensions that should be compressed"
This reverts commit c90513519febf8feeea78b06da6a467bb1085948.
| JavaScript | apache-2.0 | Brightspace/gulp-frau-publisher,Brightspace/gulp-frau-publisher,Brightspace/frau-publisher,Brightspace/frau-publisher |
fbf98e6125a702a63857688cfa07fefa6791a909 | src/stages/main/patchers/SoakedMemberAccessOpPatcher.js | src/stages/main/patchers/SoakedMemberAccessOpPatcher.js | import NodePatcher from './../../../patchers/NodePatcher.js';
export default class SoakedMemberAccessOpPatcher extends NodePatcher {
patchAsExpression() {
}
patchAsStatement() {
this.patchAsExpression();
}
}
| import NodePatcher from './../../../patchers/NodePatcher.js';
export default class SoakedMemberAccessOpPatcher extends NodePatcher {
patchAsExpression() {
throw this.error('cannot patch soaked member access (e.g. `a?.b`) yet');
}
}
| Throw when encountering a SoakedMemberAccessOp. | Throw when encountering a SoakedMemberAccessOp.
| JavaScript | mit | decaffeinate/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate,eventualbuddha/decaffeinate,alangpierce/decaffeinate,eventualbuddha/decaffeinate,alangpierce/decaffeinate |
666e5e1efa16941ac7ded51444b566a0d5faedd1 | move-plugins/moveplugins.js | move-plugins/moveplugins.js | module.exports.movePlugins = function (src, dest) {
var exec = require('child_process').exec
console.log(`Copying ${src} to ${dest}`)
exec(`rm -rf ${dest}${src}`, function (error) {
if (error) {
console.error(`exec error: ${error}`)
} else {
exec(`cp -r ${src} ${dest}`, function (error, stdout... | module.exports.movePlugins = function (src, dest) {
var exec = require('child_process').exec
exec(`rm ${dest}${src} -rf`, function (error) {
if (error) console.error(`exec error: ${error}`)
exec(`cp -r ${src} ${dest}`, function (error, stdout, stderr) {
if (error) console.error(`exec error: ${error}`)... | Revert "fixed possible bug & Mac OSX compatibility issue with rm" | Revert "fixed possible bug & Mac OSX compatibility issue with rm"
This reverts commit b4ed13e1cd70025d4b8bb4b29e98334b00bfdbed.
| JavaScript | mit | Lamassau/PiTrol,Lamassau/PiTrol,AlhasanIQ/PiTrol,fadeenk/PiTrol,fadeenk/PiTrol,AlhasanIQ/PiTrol |
eaf69c1a63c41db025a65d87e104390deb6db591 | components/CopyButton.js | components/CopyButton.js | import React from 'react';
import ClipboardJS from 'clipboard';
export default class CopyButton extends React.PureComponent {
constructor(props) {
super(props);
this.btnRef = React.createRef();
this.clipboardRef = React.createRef();
}
static defaultProps = {
content: '',
};
componentDidMoun... | import React from 'react';
import ClipboardJS from 'clipboard';
export default class CopyButton extends React.PureComponent {
constructor(props) {
super(props);
this.btnRef = React.createRef();
this.clipboardRef = React.createRef();
}
static defaultProps = {
content: '',
};
componentDidMoun... | Solve 'invalid target element' error | Solve 'invalid target element' error
| JavaScript | mit | cofacts/rumors-site,cofacts/rumors-site |
f0d2f99dbdd764915efd138361f815e86a3d2210 | app/assets/javascripts/angular/services/annotation_refresher.js | app/assets/javascripts/angular/services/annotation_refresher.js | angular.module("Prometheus.services").factory('AnnotationRefresher', ["$http", function($http) {
return function(graph, scope) {
var tags = graph.tags.map(function(e) {
if (e.name) {
return e.name.split(",").map(function(s) { return s.trim(); });
} else {
return "";
}
})
... | angular.module("Prometheus.services").factory('AnnotationRefresher', ["$http", function($http) {
return function(graph, scope) {
var tags = graph.tags.map(function(e) {
if (e.name) {
return e.name.split(",").map(function(s) { return s.trim(); });
} else {
return "";
}
})
... | Send annotation tags as array. | Send annotation tags as array.
| JavaScript | apache-2.0 | alonpeer/promdash,lborguetti/promdash,jonnenauha/promdash,lborguetti/promdash,lborguetti/promdash,jonnenauha/promdash,jmptrader/promdash,alonpeer/promdash,thooams/promdash,jonnenauha/promdash,prometheus/promdash,prometheus/promdash,juliusv/promdash,juliusv/promdash,jmptrader/promdash,juliusv/promdash,jmptrader/promdash... |
1896a56db306f7cadfc004373839887ce6b3c5cd | app/assets/javascripts/angular/services/annotation_refresher.js | app/assets/javascripts/angular/services/annotation_refresher.js | angular.module("Prometheus.services").factory('AnnotationRefresher', ["$http", function($http) {
return function(graph, scope) {
var tags = graph.tags.map(function(e) {
if (e.name) {
return e.name.split(",").map(function(s) { return s.trim(); });
} else {
return "";
}
})
... | angular.module("Prometheus.services").factory('AnnotationRefresher', ["$http", "VariableInterpolator", function($http, VariableInterpolator) {
return function(graph, scope) {
var tags = graph.tags.map(function(e) {
if (e.name) {
var n = VariableInterpolator(e.name, scope.vars);
return n.spli... | Allow for tags to be interpolated variables. | Allow for tags to be interpolated variables.
| JavaScript | apache-2.0 | prometheus/promdash,prometheus/promdash,thooams/promdash,lborguetti/promdash,jmptrader/promdash,juliusv/promdash,jonnenauha/promdash,lborguetti/promdash,lborguetti/promdash,jmptrader/promdash,prometheus/promdash,jmptrader/promdash,juliusv/promdash,juliusv/promdash,thooams/promdash,jonnenauha/promdash,lborguetti/promdas... |
ce79d7a652564fed3b86000e9c295f00f28e5223 | examples/myShellExtension.js | examples/myShellExtension.js | 'use strict';
exports.register = function (callback) {
var commands = [{
name : 'hello',
desc : 'print Hello, John',
options : {
wizard : false,
params : {
required: 'name',
optional: 'etc...'
}
},
handler : function (callback, args) {
console.log ('H... | 'use strict';
var cmd = {};
cmd.hello = function (callback, args) {
console.log ('Hello, ' + args.join (' '));
callback ();
};
cmd.wizard = function (callback) {
var wizard = [{
/* Inquirer definition... */
type: 'input',
name: 'zog',
message: 'tell zog'
}];
callback (wizard, function (ans... | Split the register function for the readability. | Split the register function for the readability.
| JavaScript | mit | Xcraft-Inc/shellcraft.js |
efda627489ccfa3bc6e3f64a40623da2d62ee316 | gatsby-browser.js | gatsby-browser.js | exports.onClientEntry = () => {
(() => {
function OptanonWrapper() { } // eslint-disable-line no-unused-vars
})();
};
| exports.onClientEntry = () => {
(() => {
function OptanonWrapper() {} // eslint-disable-line no-unused-vars
})();
};
// Always start at the top of the page on a route change.
exports.onInitialClientRender = () => {
if (!window.location.hash) {
window.scrollTo(0, 0);
} else {
window.location = windo... | Add function to start at top of new page unless window.location has a hash | [MARKENG-156] Add function to start at top of new page unless window.location has a hash
| JavaScript | apache-2.0 | postmanlabs/postman-docs,postmanlabs/postman-docs |
65a50b9a92299366e37a412d99b1b31a4f15b3d9 | lib/cape/mixins/propagator_methods.js | lib/cape/mixins/propagator_methods.js | 'use strict';
var PropagatorMethods = {
attach: function(component) {
var target = component;
for (var i = 0, len = this._.components.length; i < len; i++) {
if (this._.components[i] === component) return;
}
this._.components.push(component);
},
detach: function(component) {
for (var i... | 'use strict'
let PropagatorMethods = {
attach: function(component) {
let target = component
for (let i = 0, len = this._.components.length; i < len; i++) {
if (this._.components[i] === component) return
}
this._.components.push(component)
},
detach: function(component) {
for (let i = 0... | Rewrite PropagatorMethods module with ES6 syntax | Rewrite PropagatorMethods module with ES6 syntax
| JavaScript | mit | capejs/capejs,capejs/capejs |
ced84f283761f38156960f2d8e001ba6f3cd2b08 | src/hook/index.js | src/hook/index.js | import { Base } from 'yeoman-generator';
import generatorArguments from './arguments';
import generatorOptions from './options';
import generatorSteps from './steps';
export default class HookGenerator extends Base {
constructor(...args) {
super(...args);
Object.keys(generatorArguments).forEach(key => this.... | import { Base } from 'yeoman-generator';
import generatorArguments from './arguments';
import generatorOptions from './options';
import generatorSteps from './steps';
export default class HookGenerator extends Base {
constructor(...args) {
super(...args);
Object.keys(generatorArguments).forEach(key => this.... | Add description to hook generator | Add description to hook generator
| JavaScript | mit | tnunes/generator-trails,IncoCode/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,jaumard/generator-trails,konstantinzolotarev/generator-trails,italoag/generator-sails-rest-api,italoag/generator-sails-rest-api,ghaiklor/generator-sails-rest-api |
88135630eeee214e6a6777b325970084305a3028 | src/i18n/index.js | src/i18n/index.js | /**
* You can customize the initial state of the module from the editor initialization
* ```js
* const editor = grapesjs.init({
* i18n: {
* locale: 'en',
* messages: {
* en: {
* hello: 'Hello',
* },
* ...
* }
* }
* })
* ```
*
* Once the editor is instantiated you can use ... | /**
* You can customize the initial state of the module from the editor initialization
* ```js
* const editor = grapesjs.init({
* i18n: {
* locale: 'en',
* messages: {
* en: {
* hello: 'Hello',
* },
* ...
* }
* }
* })
* ```
*
* Once the editor is instantiated you can use ... | Add locales methods to i18n | Add locales methods to i18n
| JavaScript | bsd-3-clause | artf/grapesjs,QuorumDMS/grapesjs,artf/grapesjs,artf/grapesjs,QuorumDMS/grapesjs |
9963a7f7e6f161fa6b9b0085ae3f48df33c2fb20 | package.js | package.js | var path = Npm.require("path");
Package.describe({
summary: "JavaScript.next-to-JavaScript-of-today compiler",
version: "1.0.3+0.0.42"
});
Package._transitional_registerBuildPlugin({
name: "compileHarmony",
use: [],
sources: [
"plugin/compile-harmony.js"
],
npmDependencies: {
"traceur": "0.0.42"... | var path = Npm.require("path");
Package.describe({
summary: "JavaScript.next-to-JavaScript-of-today compiler",
version: "1.0.3+0.0.42"
});
Package._transitional_registerBuildPlugin({
name: "compileHarmony",
use: [],
sources: [
"plugin/compile-harmony.js"
],
npmDependencies: {
"traceur": "0.0.42"... | Use `imply` instead of `use` and `export` together | Use `imply` instead of `use` and `export` together
This commit uses the `api.imply` shorthand to use a package and export its exports. | JavaScript | mit | mquandalle/meteor-harmony |
92e4e867c02ab0d55ad54539568ac29692f01733 | src/index.node.js | src/index.node.js | /* eslint-env node */
const Canvas = require('canvas');
const fs = require('fs');
const { Image } = Canvas;
/**
* Create a new canvas object with height and width
* set to the given values.
*
* @param width {number} The width of the canvas.
* @param height {number} The height of the canvas.
*
* @return {Canva... | /* eslint-env node */
const Canvas = require('canvas');
const fs = require('fs');
const { Image } = Canvas;
/**
* Create a new canvas object with height and width
* set to the given values.
*
* @param width {number} The width of the canvas.
* @param height {number} The height of the canvas.
*
* @return {Canva... | Use image onload and onerror | Use image onload and onerror
| JavaScript | mit | bschlenk/canvas-everywhere |
053ce99dec181fa886818c69fe80507257dffd56 | src/Views/PickList.js | src/Views/PickList.js | /*
* Copyright (c) 1997-2013, SalesLogix, NA., LLC. All rights reserved.
*/
/**
* @class Mobile.SalesLogix.Views.PickList
*
*
* @extends Sage.Platform.Mobile.List
*
*/
define('Mobile/SalesLogix/Views/PickList', [
'dojo/_base/declare',
'dojo/string',
'Sage/Platform/Mobile/List'
], function(
decl... | /*
* Copyright (c) 1997-2013, SalesLogix, NA., LLC. All rights reserved.
*/
/**
* @class Mobile.SalesLogix.Views.PickList
*
*
* @extends Sage.Platform.Mobile.List
*
*/
define('Mobile/SalesLogix/Views/PickList', [
'dojo/_base/declare',
'dojo/string',
'Sage/Platform/Mobile/List'
], function(
decl... | Update the idProperty and labelProperty of the store properly based on what the picklist is using. | Update the idProperty and labelProperty of the store properly based on what the picklist is using.
| JavaScript | apache-2.0 | Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix |
433541eee8c71f67265240dcd35323cfb0790e2b | src/about.js | src/about.js | import h from 'hyperscript';
import fetch from 'unfetch';
import audio from './audio';
import aboutSrc from './content/about.md';
let visible = false;
let fetched = false;
const toggle = () => {
visible = !visible;
document.body.classList[visible ? 'remove' : 'add']('mod-overflow-hidden');
about.classList[visib... | import h from 'hyperscript';
import fetch from 'unfetch';
import audio from './audio';
import aboutSrc from './content/about.md';
let visible = false;
let fetched = false;
const toggle = async () => {
visible = !visible;
document.body.classList[visible ? 'remove' : 'add']('mod-overflow-hidden');
about.classList... | Switch markdown loading to fetch/async/await | Switch markdown loading to fetch/async/await
| JavaScript | apache-2.0 | puckey/dance-tonite,puckey/dance-tonite |
6dbe686652f6e642000b183a4063d68f27c8b6e0 | karma.conf.js | karma.conf.js | module.exports = (config) => {
config.set({
frameworks: ['mocha', 'karma-typescript'],
browsers: ['ChromeHeadless'],
singleRun: true,
concurrency: Infinity,
reporters: ['mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_WARN,
files: [
'src/*.ts',
'test/*.ts',
... | module.exports = (config) => {
config.set({
frameworks: ['mocha', 'karma-typescript'],
browsers: ['ChromeHeadless'],
singleRun: true,
concurrency: Infinity,
reporters: ['mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_WARN,
files: [
'src/*.ts',
'test/*.ts',
{
pattern: 'test/*.h... | Add file rule for test template file | Add file rule for test template file
| JavaScript | mit | marcoms/make-element,marcoms/make-element,marcoms/make-element |
a7eef3262e571e51f2f8a0403dbfbd7b51b1946a | src/tools/courseraSampleToArray.js | src/tools/courseraSampleToArray.js | var http = require('http');
/*
* Convert from coursera sample format to javascript array.
* e.g :
*
* a.txt :
*
* 111
* 222
* 333
* 444
*
* converts to
*
* [111,222,333,444]
* */
var strToArray = function(str) {
return str.trim().split('\r\n').map(function (elStr) {
return parseInt(elStr);
})
}
functi... | var http = require('http');
var courseraHttpHandler = function(url, processor, callback) {
http.get(url, function(response) {
var str = '';
response.on('data', function (chunk) {
str += chunk;
});
response.on('end', function () {
var processedStr = str.trim(... | Refactor coursera tool. Add getAdjacencylist function. | Refactor coursera tool. Add getAdjacencylist function.
lzhoucs|G580|Win8|WebStorm9
| JavaScript | apache-2.0 | lzhoucs/cs-algorithms |
b43e6f2a5fdbb355369d82a2c5ff65f5b0e42a23 | webroot/rsrc/js/application/repository/repository-crossreference.js | webroot/rsrc/js/application/repository/repository-crossreference.js | /**
* @provides javelin-behavior-repository-crossreference
* @requires javelin-behavior
* javelin-dom
* javelin-uri
*/
JX.behavior('repository-crossreference', function(config) {
// NOTE: Pretty much everything in this file is a worst practice. We're
// constrained by the markup generated... | /**
* @provides javelin-behavior-repository-crossreference
* @requires javelin-behavior
* javelin-dom
* javelin-uri
*/
JX.behavior('repository-crossreference', function(config) {
// NOTE: Pretty much everything in this file is a worst practice. We're
// constrained by the markup generated... | Make symbol linking more lenient. | Make symbol linking more lenient.
Summary:
Sometimes a symbol has a nested <span> in it. Clicks on that
should count as clicks on the symbol. So keep looking for symbols among
the ancestors of the click target.
This is a silly method because I don't know if there's a more idiomatic
way to do it in Javelin.
Test Plan... | JavaScript | apache-2.0 | parksangkil/phabricator,hach-que/unearth-phabricator,freebsd/phabricator,phacility/phabricator,dannysu/phabricator,wxstars/phabricator,schlaile/phabricator,apexstudios/phabricator,optimizely/phabricator,Soluis/phabricator,MicroWorldwide/phabricator,Drooids/phabricator,devurandom/phabricator,wikimedia/phabricator-phabri... |
48c94504fce5b6ccbdd84dec3e676a6867c0125f | lib/convoy.js | lib/convoy.js | var Queue = require('./queue');
var Job = require('./job');
var Worker = require('./worker');
var redis = require('./redis');
exports.redis = redis;
exports.createQueue = function(name){
var q = new Queue(name);
q.client = exports.redis.createClient();
q.workerClient = exports.redis.createClient();
return q;
... | var Queue = require('./queue');
var Job = require('./job');
var Worker = require('./worker');
var redis = require('./redis');
exports.redis = redis;
exports.createQueue = function(name, opts){
if(!opts)
opts = {};
if(typeof opts.redis == 'undefined'){
opts.redis = redis;
}
var q = new Queue(name, ... | Send redis library to queue via opts | Send redis library to queue via opts
| JavaScript | mit | gosquared/convoy,intertwine/convoy |
67ffd189c4717ff78dc04fdc7268d60e4840eebf | lib/linter.js | lib/linter.js | var JSLINT = require("../lib/nodelint");
function addDefaults(options) {
'use strict';
['node', 'es5'].forEach(function (opt) {
if (!options.hasOwnProperty(opt)) {
options[opt] = true;
}
});
return options;
}
exports.lint = function (script, options) {
'use strict';
... | var JSLINT = require("../lib/nodelint");
function addDefaults(options) {
'use strict';
['node', 'es5'].forEach(function (opt) {
if (!options.hasOwnProperty(opt)) {
options[opt] = true;
}
});
return options;
}
exports.lint = function (script, options) {
'use strict';
... | Fix unexpected error when there is no context in an error | Fix unexpected error when there is no context in an error
| JavaScript | bsd-3-clause | BenoitZugmeyer/node-jslint-extractor,BenoitZugmeyer/node-jslint-extractor |
3650f297790e9c53fe609e72c65771b70e1af6ab | app/scripts/directives/radioQuestion.js | app/scripts/directives/radioQuestion.js | 'use strict';
angular.module('confRegistrationWebApp')
.directive('radioQuestion', function () {
return {
templateUrl: 'views/radioQuestion.html',
restrict: 'E',
controller: function ($scope) {
$scope.answer = {};
}
};
});
| 'use strict';
angular.module('confRegistrationWebApp')
.directive('radioQuestion', function () {
return {
templateUrl: 'views/radioQuestion.html',
restrict: 'E',
controller: function ($scope) {
$scope.updateAnswer = function (answer) {
console.log('block ' + $scope.block.id + ... | Add the previously removed updateAnswer function | Add the previously removed updateAnswer function
| JavaScript | mit | CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web |
a1e8fb35145d772c9766b0e279b75969a2192491 | src/index.js | src/index.js | export function search(select, queryString, callback) {
select.find('input').simulate('change', { target: { value: queryString } });
setTimeout(() => { callback(); }, 0);
}
export function chooseOption(select, optionText) {
const options = select.find('.Select-option span');
const matchingOptions = options.fin... | import Select from 'react-select';
function findSelect(wrapper) {
const plainSelect = wrapper.find(Select);
if (plainSelect.length > 0) {
return plainSelect;
}
const asyncSelect = wrapper.find(Select.Async);
if (asyncSelect.length > 0) {
return asyncSelect;
}
throw "Couldn't find Select or Sele... | Make helpers a little more robust by searching specifically for Select or Select.Async components | Make helpers a little more robust by searching specifically for Select or Select.Async components
| JavaScript | mit | patientslikeme/react-select-test-utils |
903a944fd035f558f862dc7e8fa86d45625a6a9d | src/index.js | src/index.js | import {StreamTransformer} from './stream.transformer';
import {TracebackTransformer} from './traceback.transformer';
import {LaTeXTransformer} from './latex.transformer';
import {MarkdownTransformer} from 'transformime-commonmark';
import {PDFTransformer} from './pdf.transformer';
export default {StreamTransformer, T... | import {StreamTransformer} from './stream.transformer';
import {TracebackTransformer} from './traceback.transformer';
import {LaTeXTransformer} from './latex.transformer';
import {MarkdownTransformer} from 'transformime-commonmark';
import {PDFTransformer} from './pdf.transformer';
export default {
StreamTransform... | Include the PDF and LaTeX Transformers | Include the PDF and LaTeX Transformers
| JavaScript | bsd-3-clause | rgbkrk/transformime-jupyter-transformers,jdfreder/transformime-jupyter-transformers,nteract/transformime-jupyter-transformers,nteract/transformime-jupyter-renderers |
ec8a6e644a68f05da723bf5f463bda662ad0dde1 | lib/router.js | lib/router.js | Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound',
waitOn: function() {
return [Meteor.subscribe('posts'), Meteor.subscribe('notifications')];
}
});
Router.route('/', { name: 'postsList'});
Router.route('/posts/:_id', {
name: 'postPage',
waitOn: f... | Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound',
waitOn: function() {
return Meteor.subscribe('notifications');
}
});
Router.route('/', { name: 'postsList'});
Router.route('/posts/:_id', {
name: 'postPage',
waitOn: function() {
return Meteor... | Add route to limit posts | Add route to limit posts
| JavaScript | mit | Bennyz/microscope,Bennyz/microscope |
c11be7a5d0e635699f079e4d4151a0ffaeec4603 | src/candela/components/index.js | src/candela/components/index.js | import BarChart from './BarChart';
import BoxPlot from './BoxPlot';
import BulletChart from './BulletChart';
import GanttChart from './GanttChart';
import Geo from './Geo';
import Heatmap from './Heatmap';
import Histogram from './Histogram';
import LineChart from './LineChart';
import LineUp from './LineUp';
import Pa... | import BarChart from './BarChart';
import BoxPlot from './BoxPlot';
import BulletChart from './BulletChart';
import GanttChart from './GanttChart';
import Geo from './Geo';
import Heatmap from './Heatmap';
import Histogram from './Histogram';
import LineChart from './LineChart';
import LineUp from './LineUp';
import Pa... | Replace lost classes in components list | Replace lost classes in components list
| JavaScript | apache-2.0 | Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela |
f9ea9934ee9cfc21d9b1642452977c4f30474491 | src/client/app/trades/trades.js | src/client/app/trades/trades.js | "use strict";
(function () {
angular
.module("argo")
.controller("Trades", Trades);
Trades.$inject = ["toastService", "tradesService"];
function Trades(toastService, tradesService) {
var vm = this;
vm.getTrades = getTrades;
vm.closeTrade = closeTrade;
trad... | "use strict";
(function () {
angular
.module("argo")
.controller("Trades", Trades);
Trades.$inject = ["$mdDialog", "toastService", "tradesService"];
function Trades($mdDialog, toastService, tradesService) {
var vm = this;
vm.getTrades = getTrades;
vm.closeTrade = c... | Add confirmation dialog to close trade. | Add confirmation dialog to close trade. | JavaScript | mit | albertosantini/argo,albertosantini/argo |
637339c263e278e99b4bec3eb1b48d3c721ab57b | src/index.js | src/index.js | var Transmitter = function (config) {
var router = require('./router.js');
router(config);
var io = require('socket.io')(router.server);
// Socket.io connection handling
io.on('connection', function(socket){
console.log('PULSAR: client connected');
socket.on('disconnect', function() {
console... | var Transmitter = function (config) {
var router = require('./router.js');
router(config);
var io = require('socket.io')(router.server);
// Socket.io connection handling
io.on('connection', function(socket){
console.log('PULSAR: client connected');
socket.on('disconnect', function() {
console.... | Use the new EventEmitter input by passing its events to socket.io | Use the new EventEmitter input by passing its events to socket.io
| JavaScript | mit | Dermah/pulsar-transmitter |
0ee8baa8d70d20502f8c3134f6feea475646fbca | src/index.js | src/index.js | "use strict";
const http = require('http');
const mongoose = require('mongoose');
const requireAll = require('require-all');
const TelegramBot = require('node-telegram-bot-api');
const GitHubNotifications = require('./common/GitHubNotifications');
const User = require('./models/User');
const BOT_COMMANDS = requireAll... | "use strict";
const http = require('http');
const mongoose = require('mongoose');
const requireAll = require('require-all');
const TelegramBot = require('node-telegram-bot-api');
const GitHubNotifications = require('./services/GitHubNotifications');
const User = require('./models/User');
const BOT_COMMANDS = requireA... | Implement switching to webhooks in production | feat(bot): Implement switching to webhooks in production
| JavaScript | mit | ghaiklor/telegram-bot-github |
d8e2ceeb05de3c2fda22ef00486d50ef7fe9379c | src/index.js | src/index.js | 'use strict';
require('foundation-sites/scss/foundation.scss')
require('./styles.scss');
require('font-awesome/css/font-awesome.css');
// Require index.html so it gets copied to dist
require('./index.html');
var Elm = require('./Main.elm');
var mountNode = document.getElementById('main');
// The third value on embe... | 'use strict';
require('./styles.scss');
require('font-awesome/css/font-awesome.css');
// Require index.html so it gets copied to dist
require('./index.html');
var Elm = require('./Main.elm');
var mountNode = document.getElementById('main');
// The third value on embed are the initial values for incomming ports into... | Remove foundation-sites require as foundation is not used anymore. | Remove foundation-sites require as foundation is not used anymore.
Signed-off-by: Snorre Magnus Davøen <b6ec5a60a98746258b9d59fdb44419d796d6053e@gmail.com>
| JavaScript | mit | Snorremd/builds-dashboard-gitlab,Snorremd/builds-dashboard-gitlab |
bb40f82aaa28cfef7b362f97bbc0ef332b925fe0 | sandbox-react-redux/src/enhancer.js | sandbox-react-redux/src/enhancer.js | export default function enhancer() {
return (next) => (reducer, preloadedState) => {
const initialState = Object.assign({}, preloadedState, loadState(restoreState));
const store = next(reducer, initialState);
store.subscribe(() => saveState(store.getState()));
return store;
}
}
... | export default function enhancer() {
return (next) => (reducer, preloadedState) => {
const initialState = Object.assign({}, preloadedState, loadState(restoreState));
const store = next(reducer, initialState);
store.subscribe(() => saveState(store.getState(), filterState));
return sto... | Tweak sample for react-redux in order to use local storage | Tweak sample for react-redux in order to use local storage
| JavaScript | mit | ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox |
8b9af7220cc36962794a953525505bb57d8f426e | public/assets/wee/build/tasks/legacy-convert.js | public/assets/wee/build/tasks/legacy-convert.js | /* global legacyConvert, module, project */
module.exports = function(grunt) {
grunt.registerTask('convertLegacy', function(task) {
var dest = legacyConvert[task],
content = grunt.file.read(dest),
rootSize = project.style.legacy.rootSize,
rootValue = 10;
// Determine root value for unit conversion
if ... | /* global legacyConvert, module, project */
module.exports = function(grunt) {
grunt.registerTask('convertLegacy', function(task) {
var dest = legacyConvert[task],
content = grunt.file.read(dest),
rootSize = project.style.legacy.rootSize,
rootValue = 10;
// Determine root value for unit conversion
if ... | Replace :: with : in IE8 for backward compatibility with element pseudo selectors | Replace :: with : in IE8 for backward compatibility with element pseudo selectors
| JavaScript | apache-2.0 | weepower/wee,janusnic/wee,weepower/wee,janusnic/wee |
729fb1c904ca57b39110894b85e8439a11cab554 | src/widgets/Wizard.js | src/widgets/Wizard.js | /* eslint-disable import/no-named-as-default */
/* eslint-disable react/forbid-prop-types */
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Stepper } from './Stepper';
import { TabNavigator } from './TabNavigator';
import DataTablePageView from './DataTab... | /* eslint-disable import/no-named-as-default */
/* eslint-disable react/forbid-prop-types */
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Stepper } from './Stepper';
import { TabNavigator } from './TabNavigator';
import DataTablePageView from './DataTab... | Add renaming of nextTab -> switchTab | Add renaming of nextTab -> switchTab
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
04b32b2c6f6bc92f9fbe6cc994c137968f4b522c | lib/i18n/dicts.js | lib/i18n/dicts.js | module.exports = {
'ar': require('../../i18n/ar.json'),
'da': require('../../i18n/da.json'),
'de': require('../../i18n/de.json'),
'en': require('../../i18n/en.json'),
'es': require('../../i18n/es.json'),
'fr': require('../../i18n/fr-FR.json'),
'fr-FR': require('../../i18n/fr-FR.json'),
'he': require('..... | module.exports = {
'ar': require('../../i18n/ar.json'),
'da': require('../../i18n/da.json'),
'de': require('../../i18n/de.json'),
'en': require('../../i18n/en.json'),
'es': require('../../i18n/es.json'),
'fr': require('../../i18n/fr-FR.json'),
'fr-FR': require('../../i18n/fr-FR.json'),
'he': require('..... | Add polish dict to base code | Add polish dict to base code
| JavaScript | mit | cwilgenhoff/lock,cwilgenhoff/lock,adam2314/lock,cwilgenhoff/lock,adam2314/lock,adam2314/lock |
28b05e832339fafe433e5970b00466f5a915b895 | website/app/application/core/projects/project/processes/process-list-controller.js | website/app/application/core/projects/project/processes/process-list-controller.js | (function (module) {
module.controller('projectListProcess', projectListProcess);
projectListProcess.$inject = ["processes", "project", "$state", "mcmodal", "$filter"];
function projectListProcess(processes, project, $state, mcmodal, $filter) {
console.log('projectListProcess');
var ctrl = ... | (function (module) {
module.controller('projectListProcess', projectListProcess);
projectListProcess.$inject = ["processes", "project", "$state", "mcmodal", "$filter"];
function projectListProcess(processes, project, $state, mcmodal, $filter) {
var ctrl = this;
ctrl.viewProcess = viewProce... | Remove debug of ui router state changes. | Remove debug of ui router state changes.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
e022dd7bd62f4f088a9d943adfc5258fbfc91006 | app/components/Pit/index.js | app/components/Pit/index.js | import React, { PropTypes } from 'react';
import './index.css';
const Pit = React.createClass({
propTypes: {
pit: PropTypes.object.isRequired,
},
render() {
const { pit } = this.props;
return (
<div className="Pit">
<div className="Pit-name">{pit.name}</div>
<div className="P... | import React, { PropTypes } from 'react';
import './index.css';
const Pit = React.createClass({
propTypes: {
pit: PropTypes.object.isRequired,
},
render() {
const { pit } = this.props;
return (
<div className="Pit">
<div className="Pit-name">{pit.name}</div>
<div className="P... | Add keys to table loop | Add keys to table loop
| JavaScript | mit | transparantnederland/browser,waagsociety/tnl-relationizer,transparantnederland/browser,transparantnederland/relationizer,waagsociety/tnl-relationizer,transparantnederland/relationizer |
885f50a52c41cbc50f8de0d46ef57fc62fce1c17 | src/actions/socketActionsFactory.js | src/actions/socketActionsFactory.js | import {
SOCKET_SET_OPENING, SOCKET_SET_CLOSING, SOCKET_SEND_MESSAGE
} from "../constants/ActionTypes";
export default (socketClient) => ({
open: url => {
const action = { type: SOCKET_SET_OPENING };
try {
socketClient.open(url);
action.payload = url;
} catch (er... | import {
SOCKET_SET_OPENING, SOCKET_SET_CLOSING, SOCKET_SEND_MESSAGE
} from "../constants/ActionTypes";
export default (socketClient) => ({
open: url => {
const action = { type: SOCKET_SET_OPENING };
try {
socketClient.open(url);
action.payload = url;
} catch (er... | Add message to SEND_MESSAGE action for debugging. | Add message to SEND_MESSAGE action for debugging.
| JavaScript | mit | letitz/solstice-web,letitz/solstice-web |
f9efd3ba4b435a46a47aec284a30abe83efb9e6a | src/reducers/FridgeReducer.js | src/reducers/FridgeReducer.js | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2020
*/
import moment from 'moment';
import { UIDatabase } from '../database';
import { FRIDGE_ACTIONS } from '../actions/FridgeActions';
const initialState = () => {
const fridges = UIDatabase.objects('Location');
return {
fridges,
selectedFridge... | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2020
*/
import moment from 'moment';
import { UIDatabase } from '../database';
import { FRIDGE_ACTIONS } from '../actions/FridgeActions';
const initialState = () => {
const fridges = UIDatabase.objects('Location');
return {
fridges,
selectedFridge... | Add UTC manipulation of dates for to and froms | Add UTC manipulation of dates for to and froms
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
d3c58065a12e493e0a30bcdb9d19dcfebebff83e | src/misterT/skills/warnAboutMissingTimesheet.js | src/misterT/skills/warnAboutMissingTimesheet.js | 'use strict';
const moment = require('moment')
const _ = require('lodash')
const lastBusinessDay = require('../../businessDays').last
module.exports = ({ getChatUsers, getWorkEntries }) => {
return async function warnAboutMissingTimesheet () {
const day = lastBusinessDay(moment()).format('YYYY-MM-DD');
con... | 'use strict';
const moment = require('moment')
const _ = require('lodash')
const lastBusinessDay = require('../../businessDays').last
module.exports = ({ getChatUsers, getWorkEntries }) => {
return async function warnAboutMissingTimesheet () {
const day = lastBusinessDay(moment()).format('YYYY-MM-DD');
con... | Add link to report from hell | Add link to report from hell
| JavaScript | mit | ideatosrl/mister-t |
fe0a75812fd1e26ad45cf2457230641ed12af605 | static/js/base.js | static/js/base.js | 'use strict';
if (!waitlist) {
var waitlist = {};
}
waitlist.base = (function(){
function getMetaData (name) {
return $('meta[name="'+name+'"]').attr('content');
}
function displayMessage(message, type, html=false) {
var alertHTML = $($.parseHTML(`<div class="alert alert-dismissible alert-${type}" role="ale... | 'use strict';
if (!waitlist) {
var waitlist = {};
}
waitlist.base = (function(){
function getMetaData (name) {
return $('meta[name="'+name+'"]').attr('content');
}
function displayMessage(message, type, html=false, id=false) {
var alertHTML = $($.parseHTML(`<div class="alert alert-dismissible alert-${type}"... | Update alert to allow for setting an id. | Update alert to allow for setting an id.
| JavaScript | mit | SpeedProg/eve-inc-waitlist,SpeedProg/eve-inc-waitlist,SpeedProg/eve-inc-waitlist,SpeedProg/eve-inc-waitlist |
d34f4ef6b96090913839b158423d912bd18a585f | release.js | release.js | var shell = require('shelljs');
if (exec('git status --porcelain').output != '') {
console.error('Git working directory not clean.');
process.exit(2);
}
var versionIncrement = process.argv[process.argv.length -1];
if (versionIncrement != 'major' && versionIncrement != 'minor' && versionIncrement != 'patch') {
... | var shell = require('shelljs');
if (exec('git status --porcelain').stdout != '') {
console.error('Git working directory not clean.');
process.exit(2);
}
var versionIncrement = process.argv[process.argv.length -1];
if (versionIncrement != 'major' && versionIncrement != 'minor' && versionIncrement != 'pat... | Fix checking of exec output | Fix checking of exec output
| JavaScript | isc | saintedlama/git-visit |
d4673dcb8a1b07edec917c390311b20b22fd91c7 | app/javascript/app/components/scroll-to-highlight-index/scroll-to-highlight-index.js | app/javascript/app/components/scroll-to-highlight-index/scroll-to-highlight-index.js | import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { scrollIt } from 'utils/scroll';
class ScrollToHighlightIndex extends PureComponent {
// eslint-disable-line react/prefer-stateless-function
componentDidMount() {
setTimeout(this.handleScroll, 150);
}
componentWillReceivePr... | import { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { scrollIt } from 'utils/scroll';
class ScrollToHighlightIndex extends PureComponent {
// eslint-disable-line react/prefer-stateless-function
componentDidMount() {
setTimeout(this.handleScroll, 150);
}
componentWillReceivePr... | Use index to scroll to desired target | Use index to scroll to desired target
| JavaScript | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch |
98cb394af2d4244c85ddaf2e5ef02fa4e1c9c2c1 | templates/localise.js | templates/localise.js | function localizeHtmlPage() {
//Localize by replacing __MSG_***__ meta tags
var objects = document.querySelectorAll('.message');
for (var j = 0; j < objects.length; j++) {
var obj = objects[j];
var valStrH = obj.innerHTML.toString();
var valNewH = valStrH.replace(/__MSG_(\w+)__/g, function (match, v1) {
re... | function localizeHtmlPage() {
//Localize by replacing __MSG_***__ meta tags
var objects = document.querySelectorAll('.message');
for (var j = 0; j < objects.length; j++) {
var obj = objects[j];
var valStrH = obj.innerHTML.toString();
var valNewH = valStrH.replace(/__MSG_(\w+)__/g, function (match, v1) {
re... | Change to using textContent instead of innerHTML | Change to using textContent instead of innerHTML
| JavaScript | mit | codefisher/mozbutton_sdk,codefisher/mozbutton_sdk |
1a43f902beb82336e9f66dc75b1768721dc419c0 | frontend/app/components/modal-dialog.js | frontend/app/components/modal-dialog.js | import Ember from "ember";
export default Ember.Component.extend({
didInsertElement: function() {
// show the dialog
this.$('.modal').modal('show');
// send the according action after it has been hidden again
var _this = this;
this.$('.modal').one('hidden.bs.modal', function() {
Ember.run(... | import Ember from "ember";
export default Ember.Component.extend({
didInsertElement: function() {
// show the dialog
this.$('.modal').modal('show');
// send the according action after it has been hidden again
var _this = this;
this.$('.modal').one('hidden.bs.modal', function() {
Ember.run(... | Hide dialog when leaving route | Hide dialog when leaving route
| JavaScript | apache-2.0 | uboot/stromx-web,uboot/stromx-web,uboot/stromx-web |
e3389659239731bb5bb367061cc0dd113998097f | src/containers/NewsFeedContainer.js | src/containers/NewsFeedContainer.js | /* NewsFeedContainer.js
* Container for our NewsFeed as a view
* Dependencies: ActionTypes
* Modules: NewsActions, and NewsFeed
* Author: Tiffany Tse
* Created: July 29, 2017
*/
//import dependencie
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
//import modules
import { loadN... | /* NewsFeedContainer.js
* Container for our NewsFeed as a view
* Dependencies: ActionTypes
* Modules: NewsActions, and NewsFeed
* Author: Tiffany Tse
* Created: July 29, 2017
*/
//import dependencie
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
//import modules
import { loadN... | Update reshapeNewsData to use allNewsSelector and pass state to it | Update reshapeNewsData to use allNewsSelector and pass state to it
| JavaScript | mit | titse/NYTimes-Clone,titse/NYTimes-Clone,titse/NYTimes-Clone |
68f46c73a0de920803aebb9db5b78a28e458ea9e | lib/api/reddit.js | lib/api/reddit.js | /*jshint node:true */
"use strict";
var request = require('request');
var reddit = {
top: function (subreddit, callback) {
var url = "http://www.reddit.com/r/" + subreddit + "/top.json";
var currentTime = (new Date()).getTime();
request
.get({url: url + "?bust=" + currentTime, json: true}, functi... | /*jshint node:true */
"use strict";
var request = require('request');
var reddit = {
top: function (subreddit, callback) {
var url = "http://www.reddit.com/r/" + subreddit + "/top.json";
var currentTime = new Date();
request
.get({url: url + "?bust=" + currentTime, json: true}, function (error, r... | Expand timestamp json for db indicies | Expand timestamp json for db indicies
| JavaScript | mit | netherwarhead/netherwarhead,netherwarhead/baconytics2,netherwarhead/netherwarhead,netherwarhead/baconytics2,netherwarhead/baconytics2,netherwarhead/netherwarhead |
701feebf107a55a5720aca2ee52d40d421647cbc | js/app/app.js | js/app/app.js | App = Ember.Application.create();
// Add routes here
App.Router.map(function() {
// Atoms (Components)
this.resource('atoms', function() {
// Sub-routes here
this.route('hs-button');
});
// Molecules (Modules)
this.resource('molecules', function() {
// Sub-routes here
});
// Organisms ... | Ember.Route.reopen({
beforeModel: function(transition) {
if (transition) {
transition.then(function() {
Ember.run.scheduleOnce('afterRender', this, function() {
$(document).foundation();
});
});
}
}
});
App = Ember.Application.create();
// Add routes here
App.Rout... | Initialize Foundation after every route transition | Initialize Foundation after every route transition
| JavaScript | mit | jneurock/pattern-lib |
f7108b212c596ba5c3f2bbf0184d186714130e93 | app/assets/javascripts/ng-app/services/control-panel-service.js | app/assets/javascripts/ng-app/services/control-panel-service.js | angular.module('myApp')
.factory('ctrlPanelService', ['$rootScope', 'userService', 'locationService','transactionService',
function($rootScope, $userService, locationService, transactionService) {
var settings = { users: null, userId: null };
settings.updateUsers = function(users) {
settings.users = users;
$roo... | angular.module('myApp')
.factory('ctrlPanelService', ['$rootScope', 'userService', 'locationService','transactionService',
function($rootScope, $userService, locationService, transactionService) {
// this service is responsible for storing and broadcasting changes
// to any of the control panel's settings. These set... | Add comments for ctrlPanelService and its role | Add comments for ctrlPanelService and its role
| JavaScript | mit | godspeedyoo/Breeze-Mapper,godspeedyoo/Breeze-Mapper,godspeedyoo/Breeze-Mapper |
8a60c3bd25bd166d3e4c8a1bf6beb825bd84df81 | gulp/psk-config.js | gulp/psk-config.js | module.exports = {
// Autoprefixer
autoprefixer: {
// https://github.com/postcss/autoprefixer#browsers
browsers: [
'Explorer >= 10',
'ExplorerMobile >= 10',
'Firefox >= 30',
'Chrome >= 34',
'Safari >= 7',
'Opera >= 23',
'iOS >= 7',
'Android >= 4.4',
'Bla... | module.exports = {
// Autoprefixer
autoprefixer: {
// https://github.com/postcss/autoprefixer#browsers
browsers: [
'Explorer >= 10',
'ExplorerMobile >= 10',
'Firefox >= 30',
'Chrome >= 34',
'Safari >= 7',
'Opera >= 23',
'iOS >= 7',
'Android >= 4.4',
'Bla... | Add metalsmith config to gulp config | Add metalsmith config to gulp config
| JavaScript | mit | StartPolymer/polymer-static-app,StartPolymer/polymer-static-app |
2c1b060470eb3cb5b9c876a3fe64ccebc1bdbcab | app/assets/javascripts/respondent/question_answered.js | app/assets/javascripts/respondent/question_answered.js | $(document).ready(function() {
$(document).on('change', '.question-answered-box', function(){
the_id = $(this).data('the-id')
text_answer_field = $(this).closest('.text-answer').find('.text-answer-field')
matrix_answer_field = $(this).closest('.answer_fields_wrapper').find('.submission-matrix')
if($(t... | $(document).ready(function() {
$(document).on('change', '.question-answered-box', function(){
the_id = $(this).data('the-id')
text_answer_field = $(this).closest('.text-answer').find('.text-answer-field')
matrix_answer_field = $(this).closest('.answer_fields_wrapper').find('.submission-matrix')
if($(t... | Mark as answered to disable all matrix input types | Mark as answered to disable all matrix input types
| JavaScript | bsd-3-clause | unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS,unepwcmc/ORS |
d76319bf9ba2d629fd21c1cd5ac90f0f5b8a9981 | history-handler.js | history-handler.js | /*
* Copyright (c) 2010 Kevin Decker (http://www.incaseofstairs.com/)
* See LICENSE for license information
*/
var HistoryHandler = (function() {
var currentHash, callbackFn;
function loadHash() {
return decodeURIComponent(/#(.*)$/.exec(location.href)[1]);
}
function checkHistory(){
var hashValue = loadHash... | /*
* Copyright (c) 2010 Kevin Decker (http://www.incaseofstairs.com/)
* See LICENSE for license information
*/
var HistoryHandler = (function() {
var currentHash, callbackFn;
function loadHash() {
return decodeURIComponent(/#(.*)$/.exec((location.href || []))[1] || "");
}
function checkHistory(){
var hashVa... | Fix no hash case in history handler | Fix no hash case in history handler
| JavaScript | bsd-3-clause | leonardohipolito/border-image-generator,kpdecker/border-image-generator,kpdecker/border-image-generator,leonardohipolito/border-image-generator |
f6596240ba68ce13c08254cb864f0f353320e313 | application/widgets/source/class/widgets/view/Start.js | application/widgets/source/class/widgets/view/Start.js | /* ************************************************************************
widgets
Copyright:
2009 Deutsche Telekom AG, Germany, http://telekom.com
************************************************************************ */
/**
* Start View
*/
qx.Class.define("widgets.view.Start", {
extend : unify.vie... | /* ************************************************************************
widgets
Copyright:
2009 Deutsche Telekom AG, Germany, http://telekom.com
************************************************************************ */
/**
* Start View
*/
qx.Class.define("widgets.view.Start", {
extend : unify.vie... | Add scroll area to test application | Add scroll area to test application
| JavaScript | mit | unify/unify,unify/unify,unify/unify,unify/unify,unify/unify,unify/unify |
72e9f05a844f38eb03611625f5bc639c3c2a5f20 | app/javascript/packs/application.js | app/javascript/packs/application.js | /* eslint no-console:0 */
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
//... | /* eslint no-console:0 */
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
//... | Remove default message from webpack | Remove default message from webpack
| JavaScript | mit | apvale/apvale.github.io,apvale/apvale.github.io,apvale/apvale.github.io |
80d3bccc16c15681292e67edd69ec1631a4c63d1 | chrome/browser/resources/net_internals/http_cache_view.js | chrome/browser/resources/net_internals/http_cache_view.js | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* This view displays information on the HTTP cache.
* @constructor
*/
function HttpCacheView() {
const mainBoxId = 'http-cache-view-tab-cont... | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* This view displays information on the HTTP cache.
*/
var HttpCacheView = (function() {
// IDs for special HTML elements in http_cache_view.... | Refactor HttpCacheView to be defined inside an anonymous namespace. | Refactor HttpCacheView to be defined inside an anonymous namespace.
BUG=90857
Review URL: http://codereview.chromium.org/7544008
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@94868 0039d316-1c4b-4281-b951-d872f2087c98
| JavaScript | bsd-3-clause | PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,rogerwang/chromium,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging... |
679962935ae5303bde46ca18a216b14504e2327c | worldGenerator/DungeonBluePrints.js | worldGenerator/DungeonBluePrints.js | 'use strict';
const common = require('./../server/common');
export class DungeonBluePrints {
constructor (number, worldSize, locationSize) {
this.number = number;
this.worldSize = worldSize;
this.locationSize = locationSize;
this.blueprints = {};
}
generate () {
for (let i = 0; i < this.w... | 'use strict';
const common = require('./../server/common');
export class DungeonBluePrints {
constructor (number, worldSize, locationSize) {
this.number = number;
this.worldSize = worldSize;
this.locationSize = locationSize;
this.blueprints = {};
}
generate () {
const idList = [];
wh... | Improve generate method for uniq locations | Improve generate method for uniq locations
| JavaScript | mit | nobus/Labyrinth,nobus/Labyrinth |
bd7bd1f25231434489d425613f41e1bda888a291 | webpack.config.js | webpack.config.js | const path = require('path');
module.exports = {
entry: "./src/index.tsx",
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "public/")
},
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: [".ts", ".tsx", ".js", ".json"]
},
... | const path = require('path');
module.exports = {
entry: "./src/index.tsx",
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "public/")
},
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: [".ts", ".tsx", ".js", ".json"]
},
... | Fix for a source-map warning | :hammer: Fix for a source-map warning
| JavaScript | mit | tadashi-aikawa/owlora,tadashi-aikawa/owlora,tadashi-aikawa/owlora |
6d40c5a2511368407c86e4f9fc39850d3f2a74c2 | js/musichipster.js | js/musichipster.js | window.onload = function() {
var tabs = function() {
var args = models.application.arguments;
var current = $("#"+args[0]);
var sections = $(".section");
sections.hide();
current.show();
}
sp = getSpotifyApi(1);
var models = sp.require("sp://import/scripts/api/m... | window.onload = function() {
var tabs = function() {
var args = models.application.arguments;
var current = $("#"+args[0]);
var sections = $(".section");
sections.hide();
current.show();
}
sp = getSpotifyApi(1);
var models = sp.require("sp://import/scripts/api/m... | Add handler for Judging button | Add handler for Judging button
| JavaScript | mit | hassy/music_hipster |
22e747a989a343402fe54193b2780ef3d91c5d4a | node-tests/unit/utils/make-dir-test.js | node-tests/unit/utils/make-dir-test.js | 'use strict';
const td = require('testdouble');
const MakeDir = require('../../../src/utils/make-dir');
const fs = require('fs');
const path = require('path');
describe('MakeDir', () => {
context('when base and destPath', () => {
afterEach(() => {
td.reset();
});... | 'use strict';
const td = require('testdouble');
const MakeDir = require('../../../src/utils/make-dir');
const fs = require('fs');
const path = require('path');
describe('MakeDir', () => {
context('when base and destPath', () => {
let mkdirSync;
beforeEach(() => {
... | Update test to move test double replacement to before block | refactor(make-dir): Update test to move test double replacement to before block
| JavaScript | mit | isleofcode/splicon |
85ff298cf9f22036f83388a72cc99a868a2fabe5 | examples/Node.js/exportTadpoles.js | examples/Node.js/exportTadpoles.js | require('../../index.js');
var scope = require('./Tadpoles');
scope.view.exportFrames({
amount: 200,
directory: __dirname,
onComplete: function() {
console.log('Done exporting.');
},
onProgress: function(event) {
console.log(event.percentage + '% complete, frame took: ' + event.delta);
}
}); | require('../../node.js/');
var paper = require('./Tadpoles');
paper.view.exportFrames({
amount: 400,
directory: __dirname,
onComplete: function() {
console.log('Done exporting.');
},
onProgress: function(event) {
console.log(event.percentage + '% complete, frame took: ' + event.delta);
}
});
| Clean up Node.js tadpoles example. | Clean up Node.js tadpoles example.
| JavaScript | mit | NHQ/paper,NHQ/paper |
c5a54ec1b1de01baf05788b0602e20d41ebfc767 | packages/babel-plugin-inline-view-configs/__tests__/index-test.js | packages/babel-plugin-inline-view-configs/__tests__/index-test.js | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @format
*/
'use strict';
const {transform: babelTransform} = require('@babel/core');
const fixt... | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @format
*/
'use strict';
const {transform: babelTransform} = require('@babel/core');
const fixt... | Fix inline-view-configs test on Windows. | Fix inline-view-configs test on Windows.
Summary:
*facepalm* The file path is platform specific.
Changelog: [Internal]
Reviewed By: GijsWeterings
Differential Revision: D20793023
fbshipit-source-id: 4fbcbf982911ee449a4fa5067cc0c5d81088ce04
| JavaScript | bsd-3-clause | hammerandchisel/react-native,hoangpham95/react-native,janicduplessis/react-native,exponent/react-native,hammerandchisel/react-native,hoangpham95/react-native,exponentjs/react-native,facebook/react-native,hammerandchisel/react-native,myntra/react-native,javache/react-native,pandiaraj44/react-native,hammerandchisel/react... |
0cae8b6bebd3f28a92084289951b944bed35c937 | webpack.config.js | webpack.config.js | var webpack = require('webpack');
var path = require('path');
module.exports = {
context: __dirname + '/app',
entry: './index.js',
output: {
path: __dirname + '/bin',
publicPath: '/',
filename: 'bundle.js',
},
stats: {
colors: true,
progress: true,
},
resolve: {
extensions: [''... | var webpack = require('webpack');
var path = require('path');
module.exports = {
context: __dirname + '/app',
entry: './index.js',
output: {
path: __dirname + '/bin',
publicPath: '/',
filename: 'bundle.js',
},
stats: {
colors: true,
progress: true,
},
resolve: {
extensions: [''... | Resolve directories in the app folder | Resolve directories in the app folder
| JavaScript | mit | oliverbenns/pong,oliverbenns/pong |
219c639530f7e72ac12980291d03b2e9a2808d3e | webpack.config.js | webpack.config.js | const path = require('path');
module.exports = {
devtool: 'inline-source-map',
entry: './src/index.js',
module: {
rules: [
{
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
exclude: /node_modules/,
options: {
formatter: require('eslint-fri... | const path = require('path');
const port = process.env.PORT || 9000;
module.exports = {
devtool: 'inline-source-map',
entry: './src/index.js',
module: {
rules: [
{
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
exclude: /node_modules/,
options: {
... | Use PORT env for dev server | Use PORT env for dev server
| JavaScript | isc | muxy/extensions-js,muxy/extensions-js,muxy/extensions-js |
cdce8405c85996b5362ef05fc4c715725e640394 | webpack.config.prod.js | webpack.config.prod.js | const path = require('path');
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const project = require('./project.config.json');
const plugins = [
new CleanWebpackPlugin(['public']),
new webpack.optimize.Commo... | const path = require('path');
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const project = require('./project.config.json');
const plugins = [
new CleanWebpackPlugin(['public']),
new webpack.optimize.Commo... | Add hashing in build HMTL | Add hashing in build HMTL
| JavaScript | mit | ibleedfilm/fcc-react-project,ibleedfilm/recipe-box,ibleedfilm/fcc-react-project,ibleedfilm/recipe-box |
26e3988ea21f5dea1e47cefe51eb546ea6a06f64 | blueocean-web/src/main/js/try.js | blueocean-web/src/main/js/try.js | var $ = require('jquery-detached').getJQuery();
var jsModules = require('@jenkins-cd/js-modules');
$(document).ready(function () {
var tryBlueOcean = $('<div class="try-blueocean header-callout">Try Blue Ocean UI ...</div>');
tryBlueOcean.click(function () {
// We could enhance this further by loo... | var $ = require('jquery-detached').getJQuery();
var jsModules = require('@jenkins-cd/js-modules');
$(document).ready(() => {
var tryBlueOcean = $('<div class="try-blueocean header-callout">Try Blue Ocean UI ...</div>');
tryBlueOcean.click(() => {
// We could enhance this further by looking at the ... | Add a "Try Blue Ocean UI" button in classic Jenkins - fix lint errors | Add a "Try Blue Ocean UI" button in classic Jenkins - fix lint errors
| JavaScript | mit | kzantow/blueocean-plugin,kzantow/blueocean-plugin,tfennelly/blueocean-plugin,alvarolobato/blueocean-plugin,jenkinsci/blueocean-plugin,tfennelly/blueocean-plugin,jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,ModuloM/blueocean-plugin,tfennelly/blueocean-plugin,alvarolobato/blueocean-plu... |
bc864168d477192120b67ff32f71d07ea1674d76 | client/src/js/dispatcher/user.js | client/src/js/dispatcher/user.js | /**
* Copyright 2015, Government of Canada.
* All rights reserved.
*
* This source code is licensed under the MIT license.
*
* @providesModule User
*/
var Cookie = require('react-cookie');
var Events = require('./Events');
/**
* An object that manages all user authentication and the user profile.
*
* @const... | /**
* Copyright 2015, Government of Canada.
* All rights reserved.
*
* This source code is licensed under the MIT license.
*
* @providesModule User
*/
var Cookie = require('react-cookie');
var Events = require('./Events');
/**
* An object that manages all user authentication and the user profile.
*
* @const... | Delete Loki database and persistent storage on logout. | Delete Loki database and persistent storage on logout.
| JavaScript | mit | igboyes/virtool,igboyes/virtool,virtool/virtool,virtool/virtool |
64019f0ffd4582e8bb047e261152c9a034bfe378 | index.js | index.js | window.onload = function() {
sectionShow();
blogController();
};
function sectionShow() {
var sectionControls = {'home_btn': 'home', 'about_btn': 'about', 'projects_btn': 'projects', 'blog_btn': 'blog'}
document.getElementById('menu').addEventListener('click', function(event) {
event.preventDefault();
... | window.onload = function() {
sectionShow();
};
function sectionShow() {
var sectionControls = {'home_btn': 'home', 'about_btn': 'about', 'projects_btn': 'projects', 'blog_btn': 'blog'}
document.getElementById('menu').addEventListener('click', function(event) {
event.preventDefault();
hideSections(section... | Move blogController to run only if blog section is loaded | Index.js: Move blogController to run only if blog section is loaded
| JavaScript | mit | jorgerc85/jorgerc85.github.io,jorgerc85/jorgerc85.github.io |
c1928257ac5233ad15866c5d4675ebdf7f552203 | index.js | index.js | /* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-docker-config',
contentFor: function(type, config) {
if (type === 'head') {
return '<script type="text/javascript">window.DynamicENV = ' +
this.dynamicConfig(config.DynamicConfig) +
';</script>';
}
},
dyna... | /* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-docker-config',
contentFor: function(type, config) {
if (type === 'head') {
return '<script type="text/javascript">window.DynamicENV = ' +
this.dynamicConfig(config.DynamicConfig) +
';</script>';
}
},
dyna... | Add ability to specify a function instead of a string for dynamic configs | Add ability to specify a function instead of a string for dynamic configs
| JavaScript | mit | pk4media/ember-cli-docker-config,pk4media/ember-cli-docker-config |
d09cd9ef89e9860c7b972cba9fcb1736f4de17c7 | lib/node_modules/@stdlib/repl/lib/context/regexp/index.js | lib/node_modules/@stdlib/repl/lib/context/regexp/index.js | 'use strict';
var NS = {};
// MODULES //
var getKeys = require( 'object-keys' ).shim();
NS.RE_EOL = require( '@stdlib/regexp/eol' );
NS.RE_EXTNAME = require( '@stdlib/regexp/extname' );
NS.RE_EXTNAME_POSIX = require( '@stdlib/regexp/extname-posix' );
NS.RE_EXTNAME_WINDOWS = require( '@stdlib/regexp/extname-windows'... | 'use strict';
var NS = {};
// MODULES //
var getKeys = require( 'object-keys' ).shim();
NS.RE_EOL = require( '@stdlib/regexp/eol' );
NS.RE_DIRNAME = require( '@stdlib/regexp/dirname' );
NS.RE_DIRNAME_POSIX = require( '@stdlib/regexp/dirname-posix' );
NS.RE_DIRNAME_WINDOWS = require( '@stdlib/regexp/dirname-windows'... | Add dirname RegExps to REPL context | Add dirname RegExps to REPL context
| JavaScript | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib |
2beadbe92492133a4b643ec257ab40910e520031 | src/bot.js | src/bot.js | const Eris = require("eris");
const config = require("./cfg");
const bot = new Eris.Client(config.token, {
getAllUsers: true,
restMode: true,
});
module.exports = bot;
| const Eris = require("eris");
const config = require("./cfg");
const bot = new Eris.Client(config.token, {
restMode: true,
});
module.exports = bot;
| Disable getAllUsers from the client | Disable getAllUsers from the client
We can lazy-load members instead.
| JavaScript | mit | Dragory/modmailbot |
2efd96c382e193197acbbc30c0e0d6be135cd09c | lib/js/tabulate.js | lib/js/tabulate.js | (function($) {
$(document).ready(function() {
$('#template-entry-hidden').load("entry.template.html");
$('#btn-load-project').click(function(){
var project = $('#project-name').val();
$.getJSON(project, renderData);
});
});
function renderData(data) {
$.each(data, function(index, en... | (function($) {
$(document).ready(function() {
$('#template-entry-hidden').load("entry.template.html");
$('#btn-load-project').click(function(){
var project = $('#project-name').val();
$.getJSON(project, renderData);
});
});
function renderData(data) {
// For each entry
$.each(da... | Set the background colour based on exit status. | Set the background colour based on exit status.
| JavaScript | bsd-3-clause | nc6/tabula-viewer |
feab634e3d57c84f1e76ee6d00f13b2e99050b94 | src/view/table/cell/AmountEntryCell.js | src/view/table/cell/AmountEntryCell.js | /**
* Cell used for showing an AmountEntry
*
* Copyright 2015 Ethan Smith
*/
var Marionette = require('backbone.marionette');
var AmountEntryCell = Marionette.ItemView.extend({
tagName: 'td',
render: function() {
this.$el.html(this.model.entry.readable());
}
});
module.exports = AmountEntryCell;
| /**
* Cell used for showing an AmountEntry
*
* Copyright 2015 Ethan Smith
*/
var Marionette = require('backbone.marionette');
var AmountEntryCell = Marionette.ItemView.extend({
tagName: 'td',
className: function() {
return this.model.entry.get() === 0 ? 'zero' : '';
},
render: function() {
... | Add zero class to new AmountEntry cell | Add zero class to new AmountEntry cell
| JavaScript | mit | onebytegone/banknote-client,onebytegone/banknote-client |
f937a7643eb831c8ab4d5f4b2356a1ec2335acfa | db/migrations/20131219233339-ripple-addresses.js | db/migrations/20131219233339-ripple-addresses.js | var dbm = require('db-migrate');
var type = dbm.dataType;
exports.up = function(db, callback) {
db.createTable('ripple_addresses', {
id: { type: 'int', primaryKey: true, autoIncrement: true },
user_id: { type: 'int', notNull: true },
managed: { type: 'boolean', default: false, notNull: true},
addr... | var dbm = require('db-migrate');
var type = dbm.dataType;
exports.up = function(db, callback) {
db.createTable('ripple_addresses', {
id: { type: 'int', primaryKey: true, autoIncrement: true },
user_id: { type: 'int', notNull: true },
managed: { type: 'boolean', default: false, notNull: true},
addr... | Make ripple_address address column not required. Add timestamps. | [FEATURE] Make ripple_address address column not required. Add timestamps.
| JavaScript | isc | xdv/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,xdv/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd |
ee71493015ea0a949d6f9dcc77e641ffc77659f0 | misc/chrome_plugins/clean_concourse_pipeline/src/inject.user.js | misc/chrome_plugins/clean_concourse_pipeline/src/inject.user.js | // ==UserScript==
// @name Remove concourse elements
// @namespace cloudpipeline.digital
// @description Strips away some of the cruft from the concourse pipeline view when showing it on monitoring screens.
// @include https://deployer.*.cloudpipeline.digital/*
// @include https://deployer.cloud.servic... | // ==UserScript==
// @name Remove concourse elements
// @namespace cloudpipeline.digital
// @description Strips away some of the cruft from the concourse pipeline view when showing it on monitoring screens.
// @include https://deployer.*.cloudpipeline.digital/*
// @include https://deployer.cloud.servic... | Update chrome plugin for concourse 2.1.0 | Update chrome plugin for concourse 2.1.0
It was mostly working, but just left a dark bar across the top with the
env name in it. This updates it to remove that bar as well to maintain
consistency with the existing appearence.
| JavaScript | mit | alphagov/paas-cf,alphagov/paas-cf,jimconner/paas-cf,jimconner/paas-cf,alphagov/paas-cf,jimconner/paas-cf,jimconner/paas-cf,jimconner/paas-cf,alphagov/paas-cf,alphagov/paas-cf,jimconner/paas-cf,alphagov/paas-cf,alphagov/paas-cf,jimconner/paas-cf,alphagov/paas-cf |
e7004fd93bd36390c4d644f1ec0cd66e267ff61a | app/shared/current_user/currentUser.spec.js | app/shared/current_user/currentUser.spec.js | describe('current-user module', function() {
var currentUser;
beforeEach(module('current-user'));
beforeEach(inject(function(_currentUser_) {
currentUser = _currentUser_;
}));
describe('currentUser', function() {
it("should be a resource", function() {
expect(currentUser).toBeDefined();
}... | describe('current-user module', function() {
var currentUser;
beforeEach(module('current-user'));
beforeEach(inject(function(_currentUser_) {
currentUser = _currentUser_;
}));
describe('currentUser', function() {
it("should be a resource", function() {
expect(currentUser).toBeDefined();
}... | Update currentUser module test cases | Update currentUser module test cases
| JavaScript | mit | christse02/project,christse02/project |
2013acb3bdc6905b26a52c060309ba2605ad50f4 | jujugui/static/gui/src/app/components/spinner/spinner.js | jujugui/static/gui/src/app/components/spinner/spinner.js | /*
This file is part of the Juju GUI, which lets users view and manage Juju
environments within a graphical interface (https://launchpad.net/juju-gui).
Copyright (C) 2015 Canonical Ltd.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License vers... | /*
This file is part of the Juju GUI, which lets users view and manage Juju
environments within a graphical interface (https://launchpad.net/juju-gui).
Copyright (C) 2015 Canonical Ltd.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License vers... | Update Spinner to use es6 class. | Update Spinner to use es6 class.
| JavaScript | agpl-3.0 | mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui |
62f3a153dd791bcd8ff30b54aaa2b7c0d8254156 | src/utils/math.js | src/utils/math.js | /**
* Creates a new 2 dimensional Vector.
*
* @constructor
* @this {Circle}
* @param {number} x The x value of the new vector.
* @param {number} y The y value of the new vector.
*/
function Vector2(x, y) {
if (typeof x === 'undefined') {
x = 0;
}
if (typeof y === 'undefined') {
y = 0... | /**
* Creates a new 2 dimensional Vector.
*
* @constructor
* @this {Circle}
* @param {number} x The x value of the new vector.
* @param {number} y The y value of the new vector.
*/
function Vector2(x, y) {
if (typeof x === 'undefined') {
x = 0;
}
if (typeof y === 'undefined') {
y = 0... | Change add to return the vector itself, for method chaining | Change add to return the vector itself, for method chaining
| JavaScript | mit | zedutchgandalf/OpenJGL,zedutchgandalf/OpenJGL |
e067299612793593a85694901339bcbd78e4d417 | themes/hive-learning-networks/js/ui.js | themes/hive-learning-networks/js/ui.js |
$("#hive-intro-menu .hive-list li").click(function(event) {
var placeName = $(this).find(".the-place").text();
var twitterHandle = $(this).find(".the-details .twitter-handle").text();
var websiteURL = $(this).find(".the-details .website-url").text();
// show content
$("#hive-intro-box h2").html(placeName);
... |
$("#hive-intro-menu .hive-list li").click(function(event) {
var placeName = $(this).find(".the-place").text();
var twitterHandle = $(this).find(".the-details .twitter-handle").text();
var websiteURL = $(this).find(".the-details .website-url").text();
// show content
$("#hive-intro-box h2").html(placeName);
... | Hide twitter field if value is empty | Hide twitter field if value is empty
| JavaScript | mpl-2.0 | mmmavis/hivelearningnetworks.org,mmmavis/hivelearningnetworks.org,mozilla/hivelearningnetworks.org,mmmavis/hivelearningnetworks.org,mozilla/hivelearningnetworks.org |
8c6d9d92092b13a86b6cec85be8141757e2da8a4 | site/src/electron/ElectronInterface.js | site/src/electron/ElectronInterface.js | class ElectronInterface extends SiteInterface {
constructor() {
super();
}
} | class ElectronInterface extends SiteInterface {
constructor() {
super();
this.style = new Style(ElectronInterface.STYLE_PATH);
}
}
ElectronInterface.STYLE_PATH = "../interface/SiteInterface/siteInterface.css"; | Add style to Electron Interface | Add style to Electron Interface
| JavaScript | mit | ukahoot/ukahoot,ukahoot/ukahoot.github.io,ukahoot/ukahoot.github.io,ukahoot/ukahoot.github.io,ukahoot/ukahoot,ukahoot/ukahoot,ukahoot/ukahoot |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.