commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4 values | license stringclasses 13 values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
10ddc5f85fe449bed94a3bb751f0250d2ca4e01f | lib/index.js | lib/index.js | "use strict";
var util = require("util");
var AbstractError = require("./AbstractError.js"),
defaultRenderer = require("./defaultRenderer.js");
/**
* generate Error-classes based on AbstractError
*
* @param error
* @returns {Function}
*/
function erroz(error) {
var errorFn = function (data) {
//add per instance properties
this.data = data;
this.message = this.message || erroz.options.renderMessage(error.template, data);
errorFn.super_.call(this, this.constructor);
};
util.inherits(errorFn, AbstractError);
//add static error properties (name, status, etc.)
for (var errKey in error) {
if (error.hasOwnProperty(errKey)) {
errorFn.prototype[errKey] = error[errKey];
}
}
errorFn.prototype.toJSON = function() {
var data = this.data;
if(erroz.options.includeStack) {
data.stack = this.stack;
}
return {
status: this.status,
code: this.code,
message: this.message,
data: data
};
};
return errorFn;
}
erroz.options = {
/**
* overwrite this function for custom rendered messages
*
* @param {Object} data
* @param {String=} template
* @returns {String}
*/
renderMessage: defaultRenderer,
includeStack: true
};
module.exports = erroz; | "use strict";
var util = require("util");
var AbstractError = require("./AbstractError.js"),
defaultRenderer = require("./defaultRenderer.js");
/**
* generate Error-classes based on AbstractError
*
* @param error
* @returns {Function}
*/
function erroz(error) {
var errorFn = function (data) {
//add per instance properties
this.data = data;
this.message = this.message || erroz.options.renderMessage(error.template, data);
errorFn.super_.call(this, this.constructor);
};
util.inherits(errorFn, AbstractError);
//add static error properties (name, status, etc.)
for (var errKey in error) {
if (error.hasOwnProperty(errKey)) {
errorFn.prototype[errKey] = error[errKey];
}
}
errorFn.prototype.toJSON = function() {
var data = this.data || {};
if(erroz.options.includeStack) {
data.stack = this.stack;
}
return {
status: this.status,
code: this.code,
message: this.message,
data: data
};
};
return errorFn;
}
erroz.options = {
/**
* overwrite this function for custom rendered messages
*
* @param {Object} data
* @param {String=} template
* @returns {String}
*/
renderMessage: defaultRenderer,
includeStack: true
};
module.exports = erroz; | Handle toJSON call with missing this.data | Handle toJSON call with missing this.data
| JavaScript | mit | peerigon/erroz | ---
+++
@@ -33,7 +33,7 @@
errorFn.prototype.toJSON = function() {
- var data = this.data;
+ var data = this.data || {};
if(erroz.options.includeStack) {
data.stack = this.stack; |
7e05dc3eafd6a5ba970624b242d00bd139ec46eb | docs/src/lib/docs/md-loader.js | docs/src/lib/docs/md-loader.js | const fm = require('gray-matter');
// makes mdx in next.js suck less by injecting necessary exports so that
// the docs are still readable on github
// (Shamelessly stolen from Expo.io docs)
// @see https://github.com/expo/expo/blob/master/docs/common/md-loader.js
module.exports = async function (src) {
const callback = this.async();
const { content, data } = fm(src);
const layout = data.layout || 'Docs';
const code =
`import { Layout${layout} } from 'components/Layout${layout}';
export const meta = ${JSON.stringify(data)};
export default ({ children, ...props }) => (
<Layout${layout} meta={meta} {...props}>{children}</Layout${layout}>
);
` + content;
return callback(null, code);
};
| const fm = require('gray-matter');
// makes mdx in next.js suck less by injecting necessary exports so that
// the docs are still readable on github
// (Shamelessly stolen from Expo.io docs)
// @see https://github.com/expo/expo/blob/master/docs/common/md-loader.js
module.exports = async function (src) {
const callback = this.async();
const { content, data } = fm(src);
const layout = data.layout || 'Docs';
const code =
`import { Layout${layout} } from 'components/Layout${layout}';
export default function Wrapper ({ children, ...props }) { return (
<Layout${layout} meta={${JSON.stringify(
data
)}} {...props}>{children}</Layout${layout}>
);
}
` + content;
return callback(null, code);
};
| Enable fast refresh on mdx pages | Enable fast refresh on mdx pages
| JavaScript | apache-2.0 | jaredpalmer/formik,jaredpalmer/formik,jaredpalmer/formik | ---
+++
@@ -10,10 +10,13 @@
const layout = data.layout || 'Docs';
const code =
`import { Layout${layout} } from 'components/Layout${layout}';
-export const meta = ${JSON.stringify(data)};
-export default ({ children, ...props }) => (
- <Layout${layout} meta={meta} {...props}>{children}</Layout${layout}>
+
+export default function Wrapper ({ children, ...props }) { return (
+ <Layout${layout} meta={${JSON.stringify(
+ data
+ )}} {...props}>{children}</Layout${layout}>
);
+}
` + content; |
d6b653841d6b3553acdda2cf721e4be9b751bc24 | static/js/page_index.js | static/js/page_index.js | "use strict";
$(document).ready(function() {
$("#link_play").click(function (event) {
$.cookie("user_name", $("#credentials").find("input#username").val());
return true;
});
});
| "use strict";
$(document).ready(function() {
$("#link_play").click(function (event) {
$.cookie(
"user_name",
$("#credentials").find("input#username").val(),
{path: "/page/"}
);
return true;
});
});
| Set user name cookie only for the /page/ path where it is used. | Set user name cookie only for the /page/ path where it is used.
| JavaScript | agpl-3.0 | mose/poietic-generator,mose/poietic-generator,mose/poietic-generator | ---
+++
@@ -2,7 +2,11 @@
$(document).ready(function() {
$("#link_play").click(function (event) {
- $.cookie("user_name", $("#credentials").find("input#username").val());
+ $.cookie(
+ "user_name",
+ $("#credentials").find("input#username").val(),
+ {path: "/page/"}
+ );
return true;
});
}); |
40a85d221a90d4af0fe4377b77eaf9f10348a5c5 | bin/gitter-bot.js | bin/gitter-bot.js | var program = require('commander');
var pkg = require('../package.json');
var GitterBot = require('../lib/GitterBot');
program
.version(pkg.version)
.description('Gitter bot for evaluating expressions')
.usage('[options]')
.option('-k, --key <key>', 'Set API key')
.option('-r, --room <room>', 'Set room')
.parse(process.argv);
var bot = new GitterBot({apiKey: program.key, roomName: program.room});
process.on('exit', bot.destroy.bind(bot));
| var program = require('commander');
var pkg = require('../package.json');
var GitterBot = require('../lib/GitterBot');
program
.version(pkg.version)
.description('Gitter bot for evaluating expressions')
.usage('[options]')
.option('-k, --key <key>', 'Set API key')
.option('-r, --room <room>', 'Set room')
.option('-p, --pattern <pattern>', 'Set execution pattern')
.parse(process.argv);
var bot = new GitterBot({apiKey: program.key, roomName: program.room, execPattern: program.pattern});
process.on('exit', bot.destroy.bind(bot));
| Add overriding pattern from CLI | Add overriding pattern from CLI
| JavaScript | mit | ghaiklor/uwcua-vii | ---
+++
@@ -8,7 +8,8 @@
.usage('[options]')
.option('-k, --key <key>', 'Set API key')
.option('-r, --room <room>', 'Set room')
+ .option('-p, --pattern <pattern>', 'Set execution pattern')
.parse(process.argv);
-var bot = new GitterBot({apiKey: program.key, roomName: program.room});
+var bot = new GitterBot({apiKey: program.key, roomName: program.room, execPattern: program.pattern});
process.on('exit', bot.destroy.bind(bot)); |
25103c5b77422b369c9e1171fa0f03d9ed8dd337 | src/jsx/routes/portfolio/index.js | src/jsx/routes/portfolio/index.js | import echoRidge from './echo-ridge';
import fireflies from './fireflies';
export default [
echoRidge,
fireflies
];
| export default [
require('./echo-ridge').default,
require('./fireflies').default
];
| Clean up the portfolio imports | Clean up the portfolio imports
| JavaScript | mit | VoxelDavid/voxeldavid-website,VoxelDavid/voxeldavid-website,vocksel/my-website,vocksel/my-website | ---
+++
@@ -1,7 +1,4 @@
-import echoRidge from './echo-ridge';
-import fireflies from './fireflies';
-
export default [
- echoRidge,
- fireflies
+ require('./echo-ridge').default,
+ require('./fireflies').default
]; |
d5b71ae723decdf033d995247ee76a103df800ff | index.js | index.js | "use strict";
module.exports = {
rules: {
"sort-object-props": function(context) {
var caseSensitive = context.options[0].caseSensitive;
var ignoreMethods = context.options[0].ignoreMethods;
var ignorePrivate = context.options[0].ignorePrivate;
var MSG = "Property names in object literals should be sorted";
return {
"ObjectExpression": function(node) {
node.properties.reduce(function(lastProp, prop) {
if (ignoreMethods &&
prop.value.type === "FunctionExpression") {
return prop;
}
var lastPropId, propId;
if (prop.key.type === "Identifier") {
lastPropId = lastProp.key.name;
propId = prop.key.name;
} else if (prop.key.type === "Literal") {
lastPropId = lastProp.key.value;
propId = prop.key.value;
}
if (caseSensitive) {
lastPropId = lastPropId.toLowerCase();
propId = propId.toLowerCase();
}
if (ignorePrivate && /^_/.test(propId)) {
return prop;
}
if (propId < lastPropId) {
context.report(prop, MSG);
}
return prop;
}, node.properties[0]);
}
};
}
},
rulesConfig: {
"sort-object-props": [ 1, { caseSensitive: false, ignoreMethods: false } ]
}
};
| "use strict";
module.exports = {
rules: {
"sort-object-props": function(context) {
var caseSensitive = context.options[0].caseSensitive;
var ignoreMethods = context.options[0].ignoreMethods;
var ignorePrivate = context.options[0].ignorePrivate;
var MSG = "Property names in object literals should be sorted";
return {
"ObjectExpression": function(node) {
node.properties.reduce(function(lastProp, prop) {
if (ignoreMethods &&
prop.value.type === "FunctionExpression") {
return prop;
}
var lastPropId, propId;
if (prop.key.type === "Identifier") {
lastPropId = lastProp.key.name;
propId = prop.key.name;
} else if (prop.key.type === "Literal") {
lastPropId = lastProp.key.value;
propId = prop.key.value;
}
if ((caseSensitive) && (lastPropId !== undefined)) {
lastPropId = lastPropId.toLowerCase();
propId = propId.toLowerCase();
}
if (ignorePrivate && /^_/.test(propId)) {
return prop;
}
if (propId < lastPropId) {
context.report(prop, MSG);
}
return prop;
}, node.properties[0]);
}
};
}
},
rulesConfig: {
"sort-object-props": [ 1, { caseSensitive: false, ignoreMethods: false } ]
}
};
| Add checking if lastPropId is undefined | Add checking if lastPropId is undefined
| JavaScript | mit | shane-tomlinson/eslint-plugin-sorting,jacobrask/eslint-plugin-sorting | ---
+++
@@ -23,7 +23,7 @@
lastPropId = lastProp.key.value;
propId = prop.key.value;
}
- if (caseSensitive) {
+ if ((caseSensitive) && (lastPropId !== undefined)) {
lastPropId = lastPropId.toLowerCase();
propId = propId.toLowerCase();
} |
a23126cf3c1f6dc74d6759d33d238e8bcd80f2fb | cantina-vhosts.js | cantina-vhosts.js | module.exports = function (app) {
// Default conf.
app.conf.add({
vhosts: {
match: 'hostname',
notFound: true
}
});
// Depends on cantina-web.
app.require('cantina-web');
// Load stuff.
app.load('plugins');
app.load('middleware');
}; | module.exports = function (app) {
// Default conf.
app.conf.add({
vhosts: {
match: 'hostname',
middleware: true,
notFound: true
}
});
// Depends on cantina-web.
app.require('cantina-web');
// Load stuff.
app.load('plugins');
if (app.conf.get('vhosts:middleware')) {
app.load('middleware');
}
}; | Allow middleware to be disabled. | Allow middleware to be disabled.
| JavaScript | apache-2.0 | cantina/cantina-vhosts | ---
+++
@@ -3,6 +3,7 @@
app.conf.add({
vhosts: {
match: 'hostname',
+ middleware: true,
notFound: true
}
});
@@ -12,5 +13,7 @@
// Load stuff.
app.load('plugins');
- app.load('middleware');
+ if (app.conf.get('vhosts:middleware')) {
+ app.load('middleware');
+ }
}; |
56f30e597acc3cef1380f287531ba2f75668498d | index.js | index.js | /*
* redbloom
* Copyright(c) 2016 Benjamin Bartolome
* Apache 2.0 Licensed
*/
'use strict';
module.exports = redbloom;
var ee = require('event-emitter');
var Immutable = require('immutable');
var Rx = require('rx');
function redbloom(initialState, options) {
var state = Immutable.Map(initialState || {}); // eslint-disable-line new-cap
var instance = ee({});
var bloomrun = require('bloomrun')(options);
bloomrun.default((action, currentState) => {
return currentState;
});
var observable = Rx.Observable
.fromEvent(instance, 'dispatch')
.concatMap(action => {
var listActions = () => {
var listActions = bloomrun.list(action);
if (listActions.length == 0) {
listActions.push(bloomrun.lookup(action))
}
return listActions;
}
return Rx.Observable
.from(listActions())
.map(reducer => reducer.bind(observable, action));
})
.scan((currentState, reducer) => reducer(currentState), state);
observable.handle = (action, reducer) => bloomrun.add(action, reducer);
observable.dispatch = action => instance.emit('dispatch', action);
return observable;
}
| /*
* redbloom
* Copyright(c) 2016 Benjamin Bartolome
* Apache 2.0 Licensed
*/
'use strict';
module.exports = redbloom;
var ee = require('event-emitter');
var Immutable = require('immutable');
var Rx = require('rx');
function redbloom(initialState, options) {
var state = Immutable.Map(initialState || {}); // eslint-disable-line new-cap
var instance = ee({});
var bloomrun = require('bloomrun')(options);
bloomrun.default((action, currentState) => {
return currentState;
});
var observable = Rx.Observable
.fromEvent(instance, 'dispatch')
.concatMap(action => {
var listActions = () => {
var listActions = bloomrun.list(action);
if (listActions.length == 0) {
listActions.push(bloomrun.lookup(action))
}
return listActions;
}
return Rx.Observable
.from(listActions())
.map(reducer => reducer.bind(observable, action));
})
.scan((currentState, reducer) => {
return reducer(currentState);
}, state);
observable.handle = (action, reducer) => bloomrun.add(action, reducer);
observable.dispatch = action => instance.emit('dispatch', action);
return observable;
}
| Handle the default pattern with the last state when the command is not mathcing. | fix: Handle the default pattern with the last state when the command is not mathcing.
| JavaScript | apache-2.0 | eq8/redbloom | ---
+++
@@ -18,11 +18,9 @@
var instance = ee({});
var bloomrun = require('bloomrun')(options);
-
bloomrun.default((action, currentState) => {
return currentState;
});
-
var observable = Rx.Observable
.fromEvent(instance, 'dispatch')
.concatMap(action => {
@@ -37,10 +35,12 @@
.from(listActions())
.map(reducer => reducer.bind(observable, action));
})
- .scan((currentState, reducer) => reducer(currentState), state);
+ .scan((currentState, reducer) => {
+ return reducer(currentState);
+ }, state);
- observable.handle = (action, reducer) => bloomrun.add(action, reducer);
- observable.dispatch = action => instance.emit('dispatch', action);
+ observable.handle = (action, reducer) => bloomrun.add(action, reducer);
+ observable.dispatch = action => instance.emit('dispatch', action);
- return observable;
+ return observable;
} |
1d9e4ee3231173d5acaf96dbce94a7529b15396b | index.js | index.js | 'use strict';
const net = require('net');
const isAvailable = options => new Promise((resolve, reject) => {
const server = net.createServer();
server.unref();
server.on('error', reject);
server.listen(options, () => {
const {port} = server.address();
server.close(() => {
resolve(port);
});
});
});
const getPort = (options = {}) => {
if (typeof options.port === 'number') {
options.port = [options.port];
}
return (options.port || []).reduce(
(seq, port) => seq.catch(
() => isAvailable(Object.assign({}, options, {port}))
),
Promise.reject()
);
};
module.exports = options => options ?
getPort(options).catch(() => getPort({port: 0})) :
getPort({port: 0});
| 'use strict';
const net = require('net');
const isAvailable = options => new Promise((resolve, reject) => {
const server = net.createServer();
server.unref();
server.on('error', reject);
server.listen(options, () => {
const {port} = server.address();
server.close(() => {
resolve(port);
});
});
});
const getPort = (options = {}) => {
if (typeof options.port === 'number') {
options.port = [options.port];
}
return (options.port || []).reduce(
(seq, port) => seq.catch(
() => isAvailable(Object.assign({}, options, {port}))
),
Promise.reject()
);
};
module.exports = options => options ?
getPort(options).catch(() => getPort(Object.assign(options, {port: 0}))) :
getPort({port: 0});
| Use the correct `host` when falling back | Use the correct `host` when falling back
| JavaScript | mit | sindresorhus/get-port,sindresorhus/get-port | ---
+++
@@ -27,5 +27,5 @@
};
module.exports = options => options ?
- getPort(options).catch(() => getPort({port: 0})) :
+ getPort(options).catch(() => getPort(Object.assign(options, {port: 0}))) :
getPort({port: 0}); |
f23074f8943c95085c164455b3816c48940cc365 | index.js | index.js | /* jshint node: true */
'use strict';
module.exports = {
name: 'telling-stories',
included: function(app) {
if (!this.shouldIncludeFiles()) {
return;
}
this._super.included.apply(this, arguments);
app.import('vendor/telling-stories/qunit-configuration.js', { type: 'test' });
app.import('vendor/telling-stories/player-mode.css', { type: 'test' });
},
treeFor: function() {
if (!this.shouldIncludeFiles()) {
return;
}
return this._super.treeFor.apply(this, arguments);
},
isDevelopingAddon: function() {
return true;
},
shouldIncludeFiles: function() {
return this.app.env !== 'production';
}
};
| /* jshint node: true */
'use strict';
module.exports = {
name: 'telling-stories',
included: function(app) {
if (!this.shouldIncludeFiles()) {
return;
}
this._super.included.apply(this, arguments);
app.import('vendor/telling-stories/qunit-configuration.js', { type: 'test' });
app.import('vendor/telling-stories/player-mode.css', { type: 'test' });
},
treeFor: function() {
if (!this.shouldIncludeFiles()) {
return;
}
return this._super.treeFor.apply(this, arguments);
},
isDevelopingAddon: function() {
return true;
},
shouldIncludeFiles: function() {
return !!this.app.tests;
}
};
| Validate if app.tests are available | Validate if app.tests are available
Instead of relying on the environment
| JavaScript | mit | mvdwg/telling-stories,mvdwg/telling-stories | ---
+++
@@ -28,6 +28,6 @@
},
shouldIncludeFiles: function() {
- return this.app.env !== 'production';
+ return !!this.app.tests;
}
}; |
821f52c62015f457b98086643a49f2a000d9b033 | index.js | index.js | #!/usr/bin/env node
global.__base = __dirname + '/src/';
// Commands
var cli = require('commander');
cli
.version('0.0.1')
.option('-p, --port <port>' , 'Change static server port [8000]', 8000)
.option('-P, --livereload-port <port>' , 'Change livereload port [35729]', 35729)
.option('-d, --directory <path>' , 'Change the default directory for serving files [.]', __dirname)
.parse(process.argv);
// Start Asset server
var AssetServer = require(__base + 'assets_server');
var assetServer = new AssetServer({
port: cli.port,
directory: cli.directory,
livereloadPort: cli.livereloadPort
});
assetServer.start();
// Start Livereload server
var LivereloadServer = require(__base + 'livereload_server');
var livereloadServer = new LivereloadServer({
port: cli.livereloadPort
});
livereloadServer.start();
// Start Monitor
var Monitor = require(__base + 'monitor');
var monitor = new Monitor({
directory: cli.directory,
livereloadPort: cli.livereloadPort
})
monitor.start();
| #!/usr/bin/env node
global.__base = __dirname + '/src/';
// Commands
var cli = require('commander');
cli
.version('0.0.1')
.option('-p, --port <port>' , 'Change static server port [8000]', 8000)
.option('-P, --livereload-port <port>' , 'Change livereload port [35729]', 35729)
.option('-d, --directory <path>' , 'Change the default directory for serving files [.]', process.cwd())
.parse(process.argv);
// Start Asset server
var AssetServer = require(__base + 'assets_server');
var assetServer = new AssetServer({
port: cli.port,
directory: cli.directory,
livereloadPort: cli.livereloadPort
});
assetServer.start();
// Start Livereload server
var LivereloadServer = require(__base + 'livereload_server');
var livereloadServer = new LivereloadServer({
port: cli.livereloadPort
});
livereloadServer.start();
// Start Monitor
var Monitor = require(__base + 'monitor');
var monitor = new Monitor({
directory: cli.directory,
livereloadPort: cli.livereloadPort
})
monitor.start();
| Fix error if trying to do slr in current dir | Fix error if trying to do slr in current dir
| JavaScript | mit | eth0lo/slr | ---
+++
@@ -9,7 +9,7 @@
.version('0.0.1')
.option('-p, --port <port>' , 'Change static server port [8000]', 8000)
.option('-P, --livereload-port <port>' , 'Change livereload port [35729]', 35729)
- .option('-d, --directory <path>' , 'Change the default directory for serving files [.]', __dirname)
+ .option('-d, --directory <path>' , 'Change the default directory for serving files [.]', process.cwd())
.parse(process.argv);
|
5ec930689e6a43b010b1ba67099412db9ab2dd0e | hits.js | hits.js | export class Serializable {
constructor(props) {
this.properties = props || {};
}
toObject() {
return this.properties;
}
toString() {
return JSON.stringify(this.toObject());
}
toJSON() {
return JSON.stringify(this.properties);
}
toQueryString() {
var str = [];
var obj = this.toObject();
for (var p in obj) {
if (obj.hasOwnProperty(p) && obj[p]) {
str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p]));
}
}
return str.join('&');
}
}
class Hit extends Serializable {
sent = false
constructor(props){
super(props);
}
}
export class PageHit extends Hit {
constructor(screenName) {
super({ dp: screenName, t: 'pageview' });
}
}
export class ScreenHit extends Hit {
constructor(screenName) {
super({ dp: screenName, t: 'screenview' });
}
}
export class Event extends Hit {
constructor(category, action, label, value) {
super({ ec: category, ea: action, el: label, ev: value, t: 'event' });
}
} | export class Serializable {
constructor(props) {
this.properties = props || {};
}
toObject() {
return this.properties;
}
toString() {
return JSON.stringify(this.toObject());
}
toJSON() {
return JSON.stringify(this.properties);
}
toQueryString() {
var str = [];
var obj = this.toObject();
for (var p in obj) {
if (obj.hasOwnProperty(p) && obj[p]) {
str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p]));
}
}
return str.join('&');
}
}
class Hit extends Serializable {
sent = false
constructor(props){
super(props);
}
}
export class PageHit extends Hit {
constructor(screenName) {
super({ dp: screenName, t: 'pageview' });
}
}
export class ScreenHit extends Hit {
constructor(screenName) {
super({ cd: screenName, t: 'screenview' });
}
}
export class Event extends Hit {
constructor(category, action, label, value) {
super({ ec: category, ea: action, el: label, ev: value, t: 'event' });
}
}
| Fix screenName parameter in ScreenHit class | Fix screenName parameter in ScreenHit class
Changed property dp to cd to match Google Analytics screen hit request reference
See https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
*Request*
``
v=1 // Version.
&tid=UA-XXXXX-Y // Tracking ID / Property ID.
&cid=555 // Anonymous Client ID.
&t=screenview // Screenview hit type.
&an=funTimes // App name.
&av=1.5.0 // App version.
&aid=com.foo.App // App Id.
&aiid=com.android.vending // App Installer Id.
&cd=Home // Screen name / content description.
`` | JavaScript | mit | ryanvanderpol/expo-analytics | ---
+++
@@ -46,7 +46,7 @@
export class ScreenHit extends Hit {
constructor(screenName) {
- super({ dp: screenName, t: 'screenview' });
+ super({ cd: screenName, t: 'screenview' });
}
}
|
458ec938cf110488e3e1caca6738d837b95eae8a | index.js | index.js | 'use strict';
var p4 = require('node-perforce');
var through = require('through2');
var gutil = require('gulp-util');
var PluginError = gutil.PluginError;
var PLUGIN_NAME = 'gulp-p4';
module.exports = function (p4cmd, options) {
if (!p4cmd) throw new PluginError(PLUGIN_NAME, 'Missing p4 command');
if (!p4[p4cmd]) throw new PluginError(PLUGIN_NAME, 'Invalid command');
return through.obj(function (file, enc, callback) {
options = options || {};
options.files = [file.history];
p4[p4cmd](options, function(err) {
if (err) throw new PluginError(PLUGIN_NAME, err);
callback();
});
});
}; | 'use strict';
var p4 = require('node-perforce');
var through = require('through2');
var gutil = require('gulp-util');
var PluginError = gutil.PluginError;
var PLUGIN_NAME = 'gulp-p4';
module.exports = function (p4cmd, options) {
if (!p4cmd) throw new PluginError(PLUGIN_NAME, 'Missing p4 command');
if (!p4[p4cmd]) throw new PluginError(PLUGIN_NAME, 'Invalid command');
return through.obj(function (file, enc, callback) {
options = options || {};
options.files = [file.history];
p4[p4cmd](options, function(err) {
if (err) throw new PluginError(PLUGIN_NAME, err);
callback(null, file);
});
});
};
| Fix to work with trail pipes | Fix to work with trail pipes | JavaScript | mit | wokim/gulp-p4 | ---
+++
@@ -16,7 +16,7 @@
options.files = [file.history];
p4[p4cmd](options, function(err) {
if (err) throw new PluginError(PLUGIN_NAME, err);
- callback();
+ callback(null, file);
});
});
}; |
3c75375bf0c61e544c8f720ab4a5c2da7f495abd | index.js | index.js | #!/usr/bin/env node
"use strict";
const moment = require("moment");
const sugar = require("sugar");
const chalk = require("chalk");
const exec = require("child_process").exec;
process.argv.splice(0, 2);
if (process.argv.length > 0) {
// Attempt to parse the date
let date = process.argv.join(" ");
let parsedDate = new sugar.Date.create(date);
if (parsedDate != "Invalid Date") {
// Date could be parsed, parse the date to git date format
let dateString = moment(parsedDate).format("ddd MMM DD HH:mm:ss YYYY ZZ");
// Actually modify the dates
let command = "GIT_COMMITTER_DATE=\"" + dateString + "\" git commit --amend --date=\"" + dateString + "\" --no-edit";
exec(command, (err, stdout, stderr) => {
if (err) {
console.log("fatal: Could not change the previous commit");
} else {
console.log("\nModified previous commit:\n AUTHOR_DATE " + chalk.grey(dateString) + "\n COMMITTER_DATE " + chalk.grey(dateString) + "\n\nCommand executed:\n " + chalk.bgWhite.black(command) + "\n");
}
});
} else {
console.log("fatal: Could not parse \"" + date + "\" into a valid date");
}
} else {
console.log("fatal: No date string given");
}
| #!/usr/bin/env node
"use strict";
const moment = require("moment");
const sugar = require("sugar");
const chalk = require("chalk");
const exec = require("child_process").exec;
// Throw a fatal error
const fatal = err => {
console.error(`fatal: ${err}`);
}
process.argv.splice(0, 2);
if (process.argv.length > 0) {
// Attempt to parse the date
let date = process.argv.join(" ");
let parsedDate = new sugar.Date.create(date);
if (parsedDate != "Invalid Date") {
// Date could be parsed, parse the date to git date format
let dateString = moment(parsedDate).format("ddd MMM DD HH:mm:ss YYYY ZZ");
// Actually modify the dates
let command = "GIT_COMMITTER_DATE=\"" + dateString + "\" git commit --amend --date=\"" + dateString + "\" --no-edit";
exec(command, (err, stdout, stderr) => {
if (err) {
fatal("Could not change the previous commit");
} else {
console.log("\nModified previous commit:\n AUTHOR_DATE " + chalk.grey(dateString) + "\n COMMITTER_DATE " + chalk.grey(dateString) + "\n\nCommand executed:\n " + chalk.bgWhite.black(command) + "\n");
}
});
} else {
fatal("Could not parse \"" + date + "\" into a valid date");
}
} else {
fatal("No date string given");
}
| Move fatal throw to separate function | Move fatal throw to separate function
| JavaScript | mit | sam3d/git-date | ---
+++
@@ -6,6 +6,11 @@
const sugar = require("sugar");
const chalk = require("chalk");
const exec = require("child_process").exec;
+
+// Throw a fatal error
+const fatal = err => {
+ console.error(`fatal: ${err}`);
+}
process.argv.splice(0, 2);
if (process.argv.length > 0) {
@@ -23,16 +28,16 @@
let command = "GIT_COMMITTER_DATE=\"" + dateString + "\" git commit --amend --date=\"" + dateString + "\" --no-edit";
exec(command, (err, stdout, stderr) => {
if (err) {
- console.log("fatal: Could not change the previous commit");
+ fatal("Could not change the previous commit");
} else {
console.log("\nModified previous commit:\n AUTHOR_DATE " + chalk.grey(dateString) + "\n COMMITTER_DATE " + chalk.grey(dateString) + "\n\nCommand executed:\n " + chalk.bgWhite.black(command) + "\n");
}
});
} else {
- console.log("fatal: Could not parse \"" + date + "\" into a valid date");
+ fatal("Could not parse \"" + date + "\" into a valid date");
}
} else {
- console.log("fatal: No date string given");
+ fatal("No date string given");
} |
b6f80db17489eb5adea2e6afa1f1318de42f13e5 | index.js | index.js | /**
* Module dependencies.
*/
var reduceCSSCalc = require("reduce-css-calc")
/**
* Expose `plugin`.
*/
module.exports = plugin
/**
* Plugin to convert all function calls.
*
* @param {Object} stylesheet
*/
function plugin() {
return function(style) {
style.eachDecl(function declaration(dec) {
if (!dec.value) {
return
}
try {
dec.value = convert(dec.value)
}
catch (err) {
err.position = dec.position
throw err
}
})
}
}
/**
* Reduce CSS calc()
*
* @param {String} string
* @return {String}
*/
function convert(string) {
if (string.indexOf("calc(") === -1) {
return string
}
return reduceCSSCalc(string)
}
| /**
* Module dependencies.
*/
var reduceCSSCalc = require("reduce-css-calc")
/**
* Expose plugin & helper
*/
module.exports = plugin
module.exports.transformDecl = transformDecl
/**
* PostCSS plugin to reduce calc() function calls.
*/
function plugin() {
return function(style) {
style.eachDecl(transformDecl)
}
}
/**
* Reduce CSS calc on a declaration object
*
* @param {object} dec [description]
*/
function transformDecl(dec) {
if (!dec.value) {
return
}
try {
dec.value = transform(dec.value)
}
catch (err) {
err.position = dec.position
throw err
}
}
/**
* Reduce CSS calc() on a declaration value
*
* @param {String} string
* @return {String}
*/
function transform(string) {
if (string.indexOf("calc(") === -1) {
return string
}
return reduceCSSCalc(string)
}
| Update comment & expose transformDecl | Update comment & expose transformDecl
That will allow direct usage un a plugin to avoid multiple loop to
apply transformation directly in a global plugin
| JavaScript | mit | postcss/postcss-calc | ---
+++
@@ -4,43 +4,46 @@
var reduceCSSCalc = require("reduce-css-calc")
/**
- * Expose `plugin`.
+ * Expose plugin & helper
*/
-
module.exports = plugin
+module.exports.transformDecl = transformDecl
/**
- * Plugin to convert all function calls.
- *
- * @param {Object} stylesheet
+ * PostCSS plugin to reduce calc() function calls.
*/
-
function plugin() {
return function(style) {
- style.eachDecl(function declaration(dec) {
- if (!dec.value) {
- return
- }
-
- try {
- dec.value = convert(dec.value)
- }
- catch (err) {
- err.position = dec.position
- throw err
- }
- })
+ style.eachDecl(transformDecl)
}
}
/**
- * Reduce CSS calc()
+ * Reduce CSS calc on a declaration object
+ *
+ * @param {object} dec [description]
+ */
+function transformDecl(dec) {
+ if (!dec.value) {
+ return
+ }
+
+ try {
+ dec.value = transform(dec.value)
+ }
+ catch (err) {
+ err.position = dec.position
+ throw err
+ }
+}
+
+/**
+ * Reduce CSS calc() on a declaration value
*
* @param {String} string
* @return {String}
*/
-
-function convert(string) {
+function transform(string) {
if (string.indexOf("calc(") === -1) {
return string
} |
cd6156a92c7641fa3b3e7b0cfb2c258e5789bf6c | index.js | index.js | var os = require('os')
var path = require('path')
var homedir = require('os-homedir')
function linux (id) {
var cacheHome = process.env.XDG_CACHE_HOME || path.join(homedir(), '.cache')
return path.join(cacheHome, id)
}
function darwin (id) {
return path.join(homedir(), 'Library', 'Caches', id)
}
function win32 (id) {
var appData = process.env.LOCALAPPDATA || path.join(homedir(), 'AppData', 'Local')
return path.join(appData, id, 'Cache')
}
var implementation = (function () {
switch (os.platform()) {
case 'android':
case 'linux': return linux
case 'darwin': return darwin
case 'win32': return win32
default: throw new Error('Your OS is currently not supported by node-cachedir.')
}
}())
module.exports = function (id) {
if (typeof id !== 'string') {
throw new TypeError('id is not a string')
}
if (id.length === 0) {
throw new Error('id cannot be empty')
}
if (/[^0-9a-zA-Z-]/.test(id)) {
throw new Error('id cannot contain special characters')
}
return implementation(id)
}
| var os = require('os')
var path = require('path')
var homedir = require('os-homedir')
function posix (id) {
var cacheHome = process.env.XDG_CACHE_HOME || path.join(homedir(), '.cache')
return path.join(cacheHome, id)
}
function darwin (id) {
return path.join(homedir(), 'Library', 'Caches', id)
}
function win32 (id) {
var appData = process.env.LOCALAPPDATA || path.join(homedir(), 'AppData', 'Local')
return path.join(appData, id, 'Cache')
}
var implementation = (function () {
switch (os.platform()) {
case 'android': return posix
case 'darwin': return darwin
case 'linux': return posix
case 'win32': return win32
default: throw new Error('Your OS "' + os.platform() + '" is currently not supported by node-cachedir.')
}
}())
module.exports = function (id) {
if (typeof id !== 'string') {
throw new TypeError('id is not a string')
}
if (id.length === 0) {
throw new Error('id cannot be empty')
}
if (/[^0-9a-zA-Z-]/.test(id)) {
throw new Error('id cannot contain special characters')
}
return implementation(id)
}
| Clean up existing OS handling a little | Clean up existing OS handling a little
* Avoid fall-through in switch statement.
* Improve error message in the case of incompatibility.
* Rename linux() function to posix().
* Sort cases alphabetically for improved readability.
| JavaScript | mit | LinusU/node-cachedir | ---
+++
@@ -2,7 +2,7 @@
var path = require('path')
var homedir = require('os-homedir')
-function linux (id) {
+function posix (id) {
var cacheHome = process.env.XDG_CACHE_HOME || path.join(homedir(), '.cache')
return path.join(cacheHome, id)
}
@@ -18,11 +18,11 @@
var implementation = (function () {
switch (os.platform()) {
- case 'android':
- case 'linux': return linux
+ case 'android': return posix
case 'darwin': return darwin
+ case 'linux': return posix
case 'win32': return win32
- default: throw new Error('Your OS is currently not supported by node-cachedir.')
+ default: throw new Error('Your OS "' + os.platform() + '" is currently not supported by node-cachedir.')
}
}())
|
3c7d404115288f70c300e0ad26a7f23298ae25fd | index.js | index.js | var stati = [
'irritable',
'gassy',
'diuretic',
'constipated',
'twisted',
'cramped'
// Have another idea? Submit a pull request or issue
// https://github.com/itsananderson/gut-status/issues
];
function getStatus() {
var index = Math.floor(Math.random() * stati.length);
return stati[index];
}
module.exports = {
stati: stati,
getStatus: getStatus
};
| var stati = [
'irritable',
'gassy',
'diuretic',
'constipated',
'twisted',
'cramped',
'surly',
'churlish',
'hungry',
'famished'
// Have another idea? Submit a pull request or issue
// https://github.com/itsananderson/gut-status/issues
];
function getStatus() {
var index = Math.floor(Math.random() * stati.length);
return stati[index];
}
module.exports = {
stati: stati,
getStatus: getStatus
};
| Add surly, churlish, hungry, and famished | Add surly, churlish, hungry, and famished | JavaScript | mit | itsananderson/gut-status | ---
+++
@@ -4,7 +4,11 @@
'diuretic',
'constipated',
'twisted',
- 'cramped'
+ 'cramped',
+ 'surly',
+ 'churlish',
+ 'hungry',
+ 'famished'
// Have another idea? Submit a pull request or issue
// https://github.com/itsananderson/gut-status/issues
]; |
5dca57f086d68d9b5846f25c2a07d33a80abfa78 | index.js | index.js | 'use strict';
var tape = require('tape');
var through = require('through2');
var PluginError = require('gulp-util').PluginError;
var requireUncached = require('require-uncached');
var PLUGIN_NAME = 'gulp-tape';
var gulpTape = function(opts) {
opts = opts || {};
var outputStream = opts.outputStream || process.stdout;
var reporter = opts.reporter || through.obj();
var files = [];
var transform = function(file, encoding, cb) {
if (file.isNull()) {
return cb(null, file);
}
if (file.isStream()) {
return cb(new PluginError(PLUGIN_NAME, 'Streaming is not supported'));
}
files.push(file.path);
cb(null, file);
};
var flush = function(cb) {
try {
tape.createStream().pipe(reporter).pipe(outputStream);
files.forEach(function(file) {
requireUncached(file);
});
var tests = tape.getHarness()._tests;
var pending = tests.length;
tests.forEach(function(test) {
test.once('end', function() {
if (--pending === 0) {
cb();
}
});
});
} catch (err) {
cb(new PluginError(PLUGIN_NAME, err));
}
};
return through.obj(transform, flush);
};
module.exports = gulpTape;
| 'use strict';
var tape = require('tape');
var through = require('through2');
var PluginError = require('gulp-util').PluginError;
var requireUncached = require('require-uncached');
var PLUGIN_NAME = 'gulp-tape';
var gulpTape = function(opts) {
opts = opts || {};
var outputStream = opts.outputStream || process.stdout;
var reporter = opts.reporter || through.obj();
var files = [];
var transform = function(file, encoding, cb) {
if (file.isNull()) {
return cb(null, file);
}
if (file.isStream()) {
return cb(new PluginError(PLUGIN_NAME, 'Streaming is not supported'));
}
files.push(file.path);
cb(null, file);
};
var flush = function(cb) {
try {
tape.createStream().pipe(reporter).pipe(outputStream);
files.forEach(function(file) {
requireUncached(file);
});
var tests = tape.getHarness()._tests;
var pending = tests.length;
if (pending === 0) {
return cb();
}
tests.forEach(function(test) {
test.once('end', function() {
if (--pending === 0) {
cb();
}
});
});
} catch (err) {
cb(new PluginError(PLUGIN_NAME, err));
}
};
return through.obj(transform, flush);
};
module.exports = gulpTape;
| Call `cb` immediately if `pending` is zero | Call `cb` immediately if `pending` is zero
| JavaScript | mit | yuanqing/gulp-tape | ---
+++
@@ -33,6 +33,9 @@
});
var tests = tape.getHarness()._tests;
var pending = tests.length;
+ if (pending === 0) {
+ return cb();
+ }
tests.forEach(function(test) {
test.once('end', function() {
if (--pending === 0) { |
b57b340ac0bcc369156fcfe3295dc5e4a54aad55 | index.js | index.js | 'use strict';
const appPath = require('app-path');
const bundleId = require('bundle-id');
const osxAppVersion = require('osx-app-version');
const appSize = require('app-size');
module.exports = app => {
if (process.platform !== 'darwin') {
return Promise.reject(new Error('Only OS X is supported'));
}
if (typeof app !== 'string') {
return Promise.reject(new Error('Application is required'));
}
return Promise.all([osxAppVersion(app), bundleId(app), appPath(app), appSize(app)]).then(res => {
return {
version: res[0],
bundle: res[1],
path: res[2],
size: res[3]
};
});
};
| 'use strict';
const appPath = require('app-path');
const bundleId = require('bundle-id');
const osxAppVersion = require('osx-app-version');
const appSize = require('app-size');
module.exports = app => {
if (process.platform !== 'darwin') {
return Promise.reject(new Error('Only OS X is supported'));
}
if (typeof app !== 'string') {
return Promise.reject(new Error('Application is required'));
}
return Promise.all([osxAppVersion(app), bundleId(app), appPath(app), appSize(app)]).then(res => {
return {
path: res[2],
version: res[0],
bundle: res[1],
size: res[3]
};
});
};
| Reorder object to make more sense | Reorder object to make more sense
| JavaScript | mit | gillstrom/osx-app | ---
+++
@@ -15,9 +15,9 @@
return Promise.all([osxAppVersion(app), bundleId(app), appPath(app), appSize(app)]).then(res => {
return {
+ path: res[2],
version: res[0],
bundle: res[1],
- path: res[2],
size: res[3]
};
}); |
de29f2833d776a6405ab9f9fdf10f558ec916c7d | index.js | index.js | 'use strict';
/**
* Helper to avoid:
* var DatasetEditController = require('../../../app/hello/dataset/edit/DatasetEditController');
* Just use rrequire('DatasetEditController') instead!
*/
var path = require('path');
var rrequire = function (filename) {
var absPath = __dirname;
var projectRoot = process.cwd();
var projectRelativePath = absPath.replace(projectRoot, '').replace('test', 'app');
var absSrcPath = path.join(projectRoot, projectRelativePath, filename);
return require(absSrcPath);
};
module.exports = rrequire;
| 'use strict';
/**
* Helper to avoid:
* var DatasetEditController = require('../../../app/hello/dataset/edit/DatasetEditController');
* Just use rrequire('DatasetEditController') instead!
*/
var path = require('path');
var callsite = require('callsite');
var rrequire = function (filename) {
var absPath = path.dirname(callsite()[1].getFileName());
var projectRoot = process.cwd();
var projectRelativePath = absPath.replace(projectRoot, '').replace('test', 'app');
var absSrcPath = path.join(projectRoot, projectRelativePath, filename);
return require(absSrcPath);
};
module.exports = rrequire;
| Use callsite to get path of caller | Use callsite to get path of caller
| JavaScript | mit | baelter/require-helper | ---
+++
@@ -5,8 +5,9 @@
* Just use rrequire('DatasetEditController') instead!
*/
var path = require('path');
+var callsite = require('callsite');
var rrequire = function (filename) {
- var absPath = __dirname;
+ var absPath = path.dirname(callsite()[1].getFileName());
var projectRoot = process.cwd();
var projectRelativePath = absPath.replace(projectRoot, '').replace('test', 'app');
var absSrcPath = path.join(projectRoot, projectRelativePath, filename); |
4bcce86558e7be9e0baadef5e2686229241d5d6b | index.js | index.js | /*!
* days <https://github.com/jonschlinkert/days>
*
* Copyright (c) 2014 Jon Schlinkert, contributors.
* Licensed under the MIT license.
*/
module.exports = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
module.exports.abbr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
module.exports.short = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
| /*!
* days <https://github.com/jonschlinkert/days>
*
* Copyright (c) 2014 Jon Schlinkert, contributors.
* Licensed under the MIT license.
*/
// English
module.exports.en = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
module.exports.en.abbr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
module.exports.en.short = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
// French translation
module.exports.fr = ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'];
module.exports.fr.abbr = ['dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam'];
module.exports.fr.short = ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'];
// In order not to break compatibility
module.exports = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
module.exports.abbr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
module.exports.short = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
| Update to include multi-language support | Update to include multi-language support
Adding French and updating for English | JavaScript | mit | datetime/days | ---
+++
@@ -5,6 +5,17 @@
* Licensed under the MIT license.
*/
+// English
+module.exports.en = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
+module.exports.en.abbr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
+module.exports.en.short = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
+
+// French translation
+module.exports.fr = ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'];
+module.exports.fr.abbr = ['dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam'];
+module.exports.fr.short = ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'];
+
+// In order not to break compatibility
module.exports = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
module.exports.abbr = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
module.exports.short = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']; |
34c1352671382808810760a9908f4d8b1b3d507d | index.js | index.js |
var postcss = require('postcss'),
color = require('color');
module.exports = postcss.plugin('postcss-lowvision', function () {
return function (css) {
css.walkDecls('color', function (decl) {
var val = decl.value;
var rgb = color(val);
rgb.rgb();
decl.value = rgb;
decl.cloneAfter({ prop: 'text-shadow',
value: '0 0 5px rgba(0,0,0,0.5)' });
});
};
});
|
var postcss = require('postcss'),
color = require('color');
module.exports = postcss.plugin('postcss-lowvision', function () {
return function (css) {
css.walkDecls('color', function (decl) {
var val = decl.value;
var rgb = color(val);
rgb = rgb.rgbArray();
decl.value = transparent;
decl.cloneAfter({ prop: 'text-shadow',
value: '0 0 5px rgba(' + rgb[0] + ', ' + rgb[1] + ', '+ rgb[2] + ', ' + '0.5)' });
});
};
});
| Add text-shadow with used color rgb value | Add text-shadow with used color rgb value
| JavaScript | mit | keukenrolletje/postcss-lowvision | ---
+++
@@ -7,10 +7,10 @@
css.walkDecls('color', function (decl) {
var val = decl.value;
var rgb = color(val);
- rgb.rgb();
- decl.value = rgb;
+ rgb = rgb.rgbArray();
+ decl.value = transparent;
decl.cloneAfter({ prop: 'text-shadow',
- value: '0 0 5px rgba(0,0,0,0.5)' });
+ value: '0 0 5px rgba(' + rgb[0] + ', ' + rgb[1] + ', '+ rgb[2] + ', ' + '0.5)' });
});
};
}); |
75f75e238be54a709a29ddf4aa69adc693f3ef4a | index.js | index.js |
module.exports = function (options) {
options = options || {}
options.property = options.property || 'body'
options.stringify = options.stringify || JSON.stringify
return function (req, res, next) {
req.removeAllListeners('data')
req.removeAllListeners('end')
if(req.headers['content-length'] !== undefined){
req.headers['content-length'] = options.stringify(req[options.property]).length
}
next()
process.nextTick(function () {
if(req[options.property]) {
if('function' === typeof options.modify)
req[options.property] = options.modify(req[options.property])
req.emit('data', options.stringify(req[options.property]))
}
req.emit('end')
})
}
}
|
module.exports = function (options) {
options = options || {}
options.property = options.property || 'body'
options.stringify = options.stringify || JSON.stringify
return function (req, res, next) {
req.removeAllListeners('data')
req.removeAllListeners('end')
if(req.headers['content-length'] !== undefined){
req.headers['content-length'] = Buffer.byteLength(options.stringify(req[options.property]), 'utf8')
}
next()
process.nextTick(function () {
if(req[options.property]) {
if('function' === typeof options.modify)
req[options.property] = options.modify(req[options.property])
req.emit('data', options.stringify(req[options.property]))
}
req.emit('end')
})
}
}
| Set content-length in bytes instead of characters | Set content-length in bytes instead of characters
| JavaScript | mit | dominictarr/connect-restreamer | ---
+++
@@ -8,7 +8,7 @@
req.removeAllListeners('data')
req.removeAllListeners('end')
if(req.headers['content-length'] !== undefined){
- req.headers['content-length'] = options.stringify(req[options.property]).length
+ req.headers['content-length'] = Buffer.byteLength(options.stringify(req[options.property]), 'utf8')
}
next()
process.nextTick(function () { |
11de7f2f5db1b6107626a490cfd7f841a5f29568 | src/__tests__/TimeTable.test.js | src/__tests__/TimeTable.test.js | import React from 'react';
import ReactDOM from 'react-dom';
import { shallow } from 'enzyme';
import TimeTable from './../TimeTable.js';
import ErrorMsg from './../ErrorMsg';
import LoadingMsg from './../LoadingMsg';
describe('TimeTable', () => {
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<TimeTable />, div);
});
it('shows error when created with invalid props.', () => {
const component = shallow(<TimeTable lat={16.5} />);
expect(component.find(ErrorMsg)).toHaveLength(1);
});
it('shows loading when created.', () => {
const component = shallow(<TimeTable lat={16.5} lon={28.5}/>);
expect(component.find(LoadingMsg)).toHaveLength(1);
});
}); | import React from 'react';
import ReactDOM from 'react-dom';
import { shallow } from 'enzyme';
import TimeTable from './../TimeTable.js';
import ErrorMsg from './../ErrorMsg';
import LoadingMsg from './../LoadingMsg';
import DepartureInfo from './../DepartureInfo.js';
jest.mock('../APIQuery');
describe('TimeTable', () => {
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<TimeTable />, div);
});
it('shows error when created with invalid props.', () => {
const component = shallow(<TimeTable lat={16.5} />);
expect(component.find(ErrorMsg)).toHaveLength(1);
});
it('shows loading when created.', () => {
const component = shallow(<TimeTable lat={16.5} lon={28.5}/>);
expect(component.find(LoadingMsg)).toHaveLength(1);
});
it('shows nearest departure infos after succesfull API query.', async () => {
const component = shallow(<TimeTable lat={16.5} lon={28.5}/>);
await component.instance().sendQuery();
component.update();
expect(component.find(LoadingMsg)).toHaveLength(0);
expect(component.find(DepartureInfo)).not.toHaveLength(0);
});
it('shows stop departure infos after succesfull API query.', async () => {
const component = shallow(<TimeTable stopCode='E2036'/>);
await component.instance().sendQuery();
component.update();
expect(component.find(LoadingMsg)).toHaveLength(0);
expect(component.find(DepartureInfo)).not.toHaveLength(0);
});
}); | Test that departure infos are rendered. | Test that departure infos are rendered.
| JavaScript | mit | kangasta/timetablescreen,kangasta/timetablescreen | ---
+++
@@ -4,6 +4,9 @@
import TimeTable from './../TimeTable.js';
import ErrorMsg from './../ErrorMsg';
import LoadingMsg from './../LoadingMsg';
+import DepartureInfo from './../DepartureInfo.js';
+
+jest.mock('../APIQuery');
describe('TimeTable', () => {
it('renders without crashing', () => {
@@ -18,4 +21,18 @@
const component = shallow(<TimeTable lat={16.5} lon={28.5}/>);
expect(component.find(LoadingMsg)).toHaveLength(1);
});
+ it('shows nearest departure infos after succesfull API query.', async () => {
+ const component = shallow(<TimeTable lat={16.5} lon={28.5}/>);
+ await component.instance().sendQuery();
+ component.update();
+ expect(component.find(LoadingMsg)).toHaveLength(0);
+ expect(component.find(DepartureInfo)).not.toHaveLength(0);
+ });
+ it('shows stop departure infos after succesfull API query.', async () => {
+ const component = shallow(<TimeTable stopCode='E2036'/>);
+ await component.instance().sendQuery();
+ component.update();
+ expect(component.find(LoadingMsg)).toHaveLength(0);
+ expect(component.find(DepartureInfo)).not.toHaveLength(0);
+ });
}); |
1bd01d06e230b4f3a09f3404ac2ba4460a78fb8b | index.js | index.js | 'use strict';
module.exports = function (scope) {
var rc = require('rc')('npm');
return rc[scope + ':registry'] ||
rc.registry || 'https://registry.npmjs.org/';
};
| 'use strict';
module.exports = function (scope) {
var rc = require('rc')('npm', {registry: 'https://registry.npmjs.org/'});
return rc[scope + ':registry'] || rc.registry;
};
| Make it work in browsers | Make it work in browsers
| JavaScript | mit | sindresorhus/registry-url,sindresorhus/registry-url | ---
+++
@@ -1,6 +1,5 @@
'use strict';
module.exports = function (scope) {
- var rc = require('rc')('npm');
- return rc[scope + ':registry'] ||
- rc.registry || 'https://registry.npmjs.org/';
+ var rc = require('rc')('npm', {registry: 'https://registry.npmjs.org/'});
+ return rc[scope + ':registry'] || rc.registry;
}; |
6adbbb3a8de7bd37fe4508d0c8e16a564dd85413 | src/app/FacetsWrapper/index.js | src/app/FacetsWrapper/index.js | import React from 'react'
import Range from '../Range'
import RefinementList from '../RefinementList'
import SidebarSection from '../SidebarSection'
import './style.scss'
function Facets () {
return (
<div data-app='facets-wrapper'>
<RefinementList title='category' attributeName='category' />
<RefinementList title='provider' attributeName='provider' />
<RefinementList title='type' attributeName='type' />
<RefinementList title='brand' attributeName='brand' />
<RefinementList title='model' attributeName='model' />
<RefinementList title='diameter' attributeName='diameter' />
<RefinementList title='box' attributeName='box' />
<SidebarSection title='carbon' item={<Range attributeName='carbon' />} />
<SidebarSection title='price' item={<Range attributeName='price' />} />
<SidebarSection title='sail size' item={<Range attributeName='sail.size' />} />
<SidebarSection title='board size' item={<Range attributeName='board.size' />} />
<SidebarSection title='mast size' item={<Range attributeName='mast.size' />} />
<SidebarSection title='fin size' item={<Range attributeName='fin.size' />} />
</div>
)
}
export default Facets
| import React from 'react'
import Range from '../Range'
import RefinementList from '../RefinementList'
import SidebarSection from '../SidebarSection'
import './style.scss'
function Facets () {
return (
<div data-app='facets-wrapper'>
<RefinementList title='category' attributeName='category' />
<RefinementList title='provider' attributeName='provider' />
<RefinementList title='type' attributeName='type' />
<RefinementList title='brand' attributeName='brand' />
<RefinementList title='model' attributeName='model' />
<RefinementList title='diameter' attributeName='diameter' />
<RefinementList title='box' attributeName='box' />
<SidebarSection title='carbon' item={<Range attributeName='carbon' />} />
<SidebarSection title='price' item={<Range attributeName='price' />} />
<SidebarSection title='sail size' item={<Range attributeName='sail.size' />} />
<SidebarSection title='board size' item={<Range attributeName='board.size' />} />
<RefinementList title='mast size' attributeName='mast.size' />
<RefinementList title='fin size' attributeName='fin.size' />
</div>
)
}
export default Facets
| Improve mast and fin size facets | Improve mast and fin size facets
| JavaScript | mit | windtoday/windtoday-marketplace,windtoday/windtoday-marketplace,windtoday/windtoday-app | ---
+++
@@ -19,8 +19,8 @@
<SidebarSection title='price' item={<Range attributeName='price' />} />
<SidebarSection title='sail size' item={<Range attributeName='sail.size' />} />
<SidebarSection title='board size' item={<Range attributeName='board.size' />} />
- <SidebarSection title='mast size' item={<Range attributeName='mast.size' />} />
- <SidebarSection title='fin size' item={<Range attributeName='fin.size' />} />
+ <RefinementList title='mast size' attributeName='mast.size' />
+ <RefinementList title='fin size' attributeName='fin.size' />
</div>
)
} |
997a25099704796203d9c0364c0046e82b028ea9 | index.js | index.js | 'use strict';
var gutil = require('gulp-util');
var through = require('through2');
var assign = require('object-assign');
var nunjucks = require('nunjucks');
module.exports = function (opts) {
return through.obj(function (file, enc, cb) {
if (file.isNull()) {
cb(null, file);
return;
}
if (file.isStream()) {
cb(new gutil.PluginError('gulp-nunjucks', 'Streaming not supported'));
return;
}
opts = assign({}, opts);
var filePath = file.path;
try {
opts.name = typeof opts.name === 'function' && opts.name(file) || file.relative;
file.contents = new Buffer(nunjucks.precompileString(file.contents.toString(), opts));
file.path = gutil.replaceExtension(file.path, '.js');
this.push(file);
} catch (err) {
this.emit('error', new gutil.PluginError('gulp-nunjucks', err, {fileName: filePath}));
}
cb();
});
};
| 'use strict';
var gutil = require('gulp-util');
var through = require('through2');
var assign = require('object-assign');
var nunjucks = require('nunjucks');
module.exports = function (opts) {
return through.obj(function (file, enc, cb) {
if (file.isNull()) {
cb(null, file);
return;
}
if (file.isStream()) {
cb(new gutil.PluginError('gulp-nunjucks', 'Streaming not supported'));
return;
}
var options = assign({}, opts);
var filePath = file.path;
try {
options.name = typeof options.name === 'function' && options.name(file) || file.relative;
file.contents = new Buffer(nunjucks.precompileString(file.contents.toString(), options));
file.path = gutil.replaceExtension(file.path, '.js');
this.push(file);
} catch (err) {
this.emit('error', new gutil.PluginError('gulp-nunjucks', err, {fileName: filePath}));
}
cb();
});
};
| Fix wrong options variable assignment | Fix wrong options variable assignment
This caused the name options's function to ran only for the first file. | JavaScript | mit | sindresorhus/gulp-nunjucks | ---
+++
@@ -16,13 +16,13 @@
return;
}
- opts = assign({}, opts);
+ var options = assign({}, opts);
var filePath = file.path;
try {
- opts.name = typeof opts.name === 'function' && opts.name(file) || file.relative;
- file.contents = new Buffer(nunjucks.precompileString(file.contents.toString(), opts));
+ options.name = typeof options.name === 'function' && options.name(file) || file.relative;
+ file.contents = new Buffer(nunjucks.precompileString(file.contents.toString(), options));
file.path = gutil.replaceExtension(file.path, '.js');
this.push(file);
} catch (err) { |
3f7358297887dbff61704835a8cf782de9735846 | lib/utils/runGulp.js | lib/utils/runGulp.js | const path = require('path');
const execa = require('execa');
const errorHandler = require('./errorHandler');
module.exports = function runGulp() {
execa('gulp',
[
'--cwd', process.cwd(),
'--gulpfile', path.join(__dirname, '../gulpfile.js'),
],
{ stdio: 'inherit' },
)
.catch(err => errorHandler); // eslint-disable-line no-unused-vars
};
| const path = require('path');
const execa = require('execa');
const errorHandler = require('./errorHandler');
module.exports = function runGulp() {
execa('node',
[
path.join(__dirname, '../../node_modules/.bin/gulp'),
'--cwd', process.cwd(),
'--gulpfile', path.join(__dirname, '../gulpfile.js'),
],
{ stdio: 'inherit' },
)
.catch(err => errorHandler); // eslint-disable-line no-unused-vars
};
| Use bundled gulp instead of global | Use bundled gulp instead of global
| JavaScript | mit | strt/bricks | ---
+++
@@ -3,8 +3,9 @@
const errorHandler = require('./errorHandler');
module.exports = function runGulp() {
- execa('gulp',
+ execa('node',
[
+ path.join(__dirname, '../../node_modules/.bin/gulp'),
'--cwd', process.cwd(),
'--gulpfile', path.join(__dirname, '../gulpfile.js'),
], |
fcb2b86684d814825b3efc4d7b37484482e1a784 | index.js | index.js | 'use strict';
var bind = require('function-bind');
var define = require('define-properties');
var replace = bind.call(Function.call, String.prototype.replace);
var rightWhitespace = /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*$/;
var trimRight = function trimRight() {
return replace(this, rightWhitespace, '');
};
var boundTrimRight = bind.call(Function.call, trimRight);
define(boundTrimRight, {
shim: function shimTrimRight() {
if (!String.prototype.trimRight) {
define(String.prototype, { trimRight: trimRight });
}
return String.prototype.trimRight;
}
});
module.exports = boundTrimRight;
| 'use strict';
var bind = require('function-bind');
var define = require('define-properties');
var replace = bind.call(Function.call, String.prototype.replace);
var rightWhitespace = /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]*$/;
var trimRight = function trimRight() {
return replace(this, rightWhitespace, '');
};
var boundTrimRight = bind.call(Function.call, trimRight);
define(boundTrimRight, {
shim: function shimTrimRight() {
var zeroWidthSpace = '\u200b';
define(String.prototype, { trimRight: trimRight }, {
trimRight: function () {
return zeroWidthSpace.trimRight() !== zeroWidthSpace;
}
});
return String.prototype.trimRight;
}
});
module.exports = boundTrimRight;
| Fix a bug in node 0.10 (and presumably other browsers) where the zero-width space is erroneously trimmed. | Fix a bug in node 0.10 (and presumably other browsers) where the zero-width space is erroneously trimmed.
| JavaScript | mit | es-shims/String.prototype.trimRight,ljharb/String.prototype.trimRight | ---
+++
@@ -13,9 +13,12 @@
var boundTrimRight = bind.call(Function.call, trimRight);
define(boundTrimRight, {
shim: function shimTrimRight() {
- if (!String.prototype.trimRight) {
- define(String.prototype, { trimRight: trimRight });
- }
+ var zeroWidthSpace = '\u200b';
+ define(String.prototype, { trimRight: trimRight }, {
+ trimRight: function () {
+ return zeroWidthSpace.trimRight() !== zeroWidthSpace;
+ }
+ });
return String.prototype.trimRight;
}
}); |
0d5e4b013ae933aeb42a2c1c630206010c42e8ac | index.js | index.js | 'use babel';
import editorconfig from 'editorconfig';
import generateConfig from './commands/generate';
function init(editor) {
generateConfig();
if (!editor) {
return;
}
const file = editor.getURI();
if (!file) {
return;
}
editorconfig.parse(file).then(config => {
if (Object.keys(config).length === 0) {
return;
}
const indentStyle = config.indent_style || editor.getSoftTabs() ? 'space' : 'tab';
if (indentStyle === 'tab') {
editor.setSoftTabs(false);
if (config.tab_width) {
editor.setTabLength(config.tab_width);
}
} else if (indentStyle === 'space') {
editor.setSoftTabs(true);
if (config.indent_size) {
editor.setTabLength(config.indent_size);
}
}
if (config.charset) {
// EditorConfig charset names matches iconv charset names.
// Which is used by Atom. So no charset name convertion is needed.
editor.setEncoding(config.charset);
}
});
}
export const activate = () => {
atom.workspace.observeTextEditors(init);
};
| 'use babel';
import editorconfig from 'editorconfig';
import generateConfig from './commands/generate';
function init(editor) {
generateConfig();
if (!editor) {
return;
}
const file = editor.getURI();
if (!file) {
return;
}
editorconfig.parse(file).then(config => {
if (Object.keys(config).length === 0) {
return;
}
const indentStyle = config.indent_style || (editor.getSoftTabs() ? 'space' : 'tab');
if (indentStyle === 'tab') {
editor.setSoftTabs(false);
if (config.tab_width) {
editor.setTabLength(config.tab_width);
}
} else if (indentStyle === 'space') {
editor.setSoftTabs(true);
if (config.indent_size) {
editor.setTabLength(config.indent_size);
}
}
if (config.charset) {
// EditorConfig charset names matches iconv charset names.
// Which is used by Atom. So no charset name convertion is needed.
editor.setEncoding(config.charset);
}
});
}
export const activate = () => {
atom.workspace.observeTextEditors(init);
};
| Fix error with operator precedence | Fix error with operator precedence
| JavaScript | mit | florianb/atom-editorconfig,sindresorhus/atom-editorconfig,peterblazejewicz/atom-editorconfig | ---
+++
@@ -20,7 +20,7 @@
return;
}
- const indentStyle = config.indent_style || editor.getSoftTabs() ? 'space' : 'tab';
+ const indentStyle = config.indent_style || (editor.getSoftTabs() ? 'space' : 'tab');
if (indentStyle === 'tab') {
editor.setSoftTabs(false); |
f4644972b893e61bece5f40ec9bbd76fbae61765 | index.js | index.js | /**
* @typedef {import('unist').Node} Node
* @typedef {import('unist').Parent} Parent
*/
import {modifyChildren} from 'unist-util-modify-children'
export const affixEmoticonModifier = modifyChildren(mergeAffixEmoticon)
/**
* Merge emoticons into an `EmoticonNode`.
*
* @param {Node} child
* @param {number} index
* @param {Parent} parent
*/
function mergeAffixEmoticon(child, index, parent) {
var siblings = parent.children
/** @type {Array.<Node>} */
// @ts-ignore looks like a parent.
var children = child.children
var childIndex = -1
if (children && children.length > 0 && index) {
while (++childIndex < children.length) {
if (children[childIndex].type === 'EmoticonNode') {
siblings[index - 1].children = [].concat(
siblings[index - 1].children,
children.slice(0, childIndex + 1)
)
child.children = children.slice(childIndex + 1)
if (
children[childIndex].position &&
child.position &&
siblings[index - 1].position
) {
siblings[index - 1].position.end = children[childIndex].position.end
child.position.start = children[childIndex].position.end
}
// Next, iterate over the node again.
return index
}
if (children[childIndex].type !== 'WhiteSpaceNode') {
break
}
}
}
}
| /**
* @typedef {import('unist').Node} Node
* @typedef {import('unist').Parent} Parent
*/
import {modifyChildren} from 'unist-util-modify-children'
export const affixEmoticonModifier = modifyChildren(mergeAffixEmoticon)
/**
* Merge emoticons into an `EmoticonNode`.
*
* @param {Node} node
* @param {number} index
* @param {Parent} ancestor
*/
function mergeAffixEmoticon(node, index, ancestor) {
const previous = ancestor.children[index - 1]
var childIndex = -1
if (index && parent(previous) && parent(node)) {
var children = node.children
while (++childIndex < children.length) {
const child = children[childIndex]
if (child.type === 'EmoticonNode') {
previous.children = [].concat(
previous.children,
children.slice(0, childIndex + 1)
)
node.children = children.slice(childIndex + 1)
if (child.position && node.position && previous.position) {
previous.position.end = child.position.end
node.position.start = child.position.end
}
// Next, iterate over the node again.
return index
}
if (child.type !== 'WhiteSpaceNode') {
break
}
}
}
}
/**
* @param {Node} node
* @returns {node is Parent}
*/
function parent(node) {
return 'children' in node
}
| Fix tests for changes in `@types/unist` | Fix tests for changes in `@types/unist`
| JavaScript | mit | wooorm/nlcst-affix-emoticon-modifier | ---
+++
@@ -10,42 +10,47 @@
/**
* Merge emoticons into an `EmoticonNode`.
*
- * @param {Node} child
+ * @param {Node} node
* @param {number} index
- * @param {Parent} parent
+ * @param {Parent} ancestor
*/
-function mergeAffixEmoticon(child, index, parent) {
- var siblings = parent.children
- /** @type {Array.<Node>} */
- // @ts-ignore looks like a parent.
- var children = child.children
+function mergeAffixEmoticon(node, index, ancestor) {
+ const previous = ancestor.children[index - 1]
var childIndex = -1
- if (children && children.length > 0 && index) {
+ if (index && parent(previous) && parent(node)) {
+ var children = node.children
+
while (++childIndex < children.length) {
- if (children[childIndex].type === 'EmoticonNode') {
- siblings[index - 1].children = [].concat(
- siblings[index - 1].children,
+ const child = children[childIndex]
+
+ if (child.type === 'EmoticonNode') {
+ previous.children = [].concat(
+ previous.children,
children.slice(0, childIndex + 1)
)
- child.children = children.slice(childIndex + 1)
+ node.children = children.slice(childIndex + 1)
- if (
- children[childIndex].position &&
- child.position &&
- siblings[index - 1].position
- ) {
- siblings[index - 1].position.end = children[childIndex].position.end
- child.position.start = children[childIndex].position.end
+ if (child.position && node.position && previous.position) {
+ previous.position.end = child.position.end
+ node.position.start = child.position.end
}
// Next, iterate over the node again.
return index
}
- if (children[childIndex].type !== 'WhiteSpaceNode') {
+ if (child.type !== 'WhiteSpaceNode') {
break
}
}
}
}
+
+/**
+ * @param {Node} node
+ * @returns {node is Parent}
+ */
+function parent(node) {
+ return 'children' in node
+} |
9a93e67a36a9618c6f4511d267bf361ea104a07b | js/components/Incident.js | js/components/Incident.js | import React, { PropTypes } from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import styles from './Incident.css';
import Map from './Map';
import GridTile from 'material-ui/lib/grid-list/grid-tile';
const Incident = ({ incident }) => (
<ReactCSSTransitionGroup
transitionName={styles}
transitionEnterTimeout={500}
transitionLeaveTimeout={300}
transitionAppear
transitionAppearTimeout={500}
>
<div className={styles.incident}>
<GridTile
key={incident.id}
title={incident.description}
subtitle={incident.address}
>
<Map address={incident.address} />
</GridTile>
</div>
</ReactCSSTransitionGroup>
);
Incident.propTypes = {
incident: PropTypes.object.isRequired
};
export default Incident;
| import React, { PropTypes } from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import styles from './Incident.css';
import Map from './Map';
import GridTile from 'material-ui/lib/grid-list/grid-tile';
import Paper from 'material-ui/lib/paper';
const Incident = ({ incident }) => (
<ReactCSSTransitionGroup
transitionName={styles}
transitionEnterTimeout={500}
transitionLeaveTimeout={300}
transitionAppear
transitionAppearTimeout={500}
>
<div className={styles.incident}>
<Paper zDepth={2}>
<GridTile
key={incident.id}
title={incident.description}
subtitle={incident.address}
>
<Map address={incident.address} />
</GridTile>
</Paper>
</div>
</ReactCSSTransitionGroup>
);
Incident.propTypes = {
incident: PropTypes.object.isRequired
};
export default Incident;
| Add paper for neat effect on incidents | Add paper for neat effect on incidents
| JavaScript | mit | nickbabcock/udps,nickbabcock/udps,nickbabcock/udps | ---
+++
@@ -3,6 +3,7 @@
import styles from './Incident.css';
import Map from './Map';
import GridTile from 'material-ui/lib/grid-list/grid-tile';
+import Paper from 'material-ui/lib/paper';
const Incident = ({ incident }) => (
<ReactCSSTransitionGroup
@@ -13,13 +14,15 @@
transitionAppearTimeout={500}
>
<div className={styles.incident}>
- <GridTile
- key={incident.id}
- title={incident.description}
- subtitle={incident.address}
- >
- <Map address={incident.address} />
- </GridTile>
+ <Paper zDepth={2}>
+ <GridTile
+ key={incident.id}
+ title={incident.description}
+ subtitle={incident.address}
+ >
+ <Map address={incident.address} />
+ </GridTile>
+ </Paper>
</div>
</ReactCSSTransitionGroup>
); |
cc260e279f5055058471ad101266dd46199b9ae1 | public/dist/js/voter-ballot.js | public/dist/js/voter-ballot.js | $(document).ready(function() {
$('#ballot_response').submit(function(event) {
confirm("Are you sure you want to submit your ballot?");
var sortableList = $("#candidates");
var listElements = sortableList.children();
var listValues = [];
for (var i = 0; i < listElements.length; i++) {
listValues.push(listElements[i].id);
}
var formData = {
'ballot' : listValues,
'_csrf' : $('input[name=_csrf]').val()
};
var formsub = $.ajax({
type : 'POST',
url : '/endpoints/process_ballot.php',
data : formData,
dataType : 'json',
encode : true
});
formsub.done(function(data) {
if (data.success) {
setTimeout(function() { window.location.href = "/vote"; }, 100);
}
});
event.preventDefault();
});
});
| $(document).ready(function() {
$('#ballot_response').submit(function(event) {
if(confirm("Are you sure you want to submit your ballot?")) {
var sortableList = $("#candidates");
var listElements = sortableList.children();
var listValues = [];
for (var i = 0; i < listElements.length; i++) {
listValues.push(listElements[i].id);
}
var formData = {
'ballot' : listValues,
'_csrf' : $('input[name=_csrf]').val()
};
var formsub = $.ajax({
type : 'POST',
url : '/endpoints/process_ballot.php',
data : formData,
dataType : 'json',
encode : true
});
formsub.done(function(data) {
if (data.success) {
setTimeout(function() { window.location.href = "/vote"; }, 100);
}
});
}
event.preventDefault();
});
});
| Update confirm to be if | Update confirm to be if | JavaScript | agpl-3.0 | WireShoutLLC/votehaus,WireShoutLLC/votehaus,WireShoutLLC/votehaus,WireShoutLLC/votehaus | ---
+++
@@ -1,33 +1,32 @@
$(document).ready(function() {
$('#ballot_response').submit(function(event) {
- confirm("Are you sure you want to submit your ballot?");
-
- var sortableList = $("#candidates");
- var listElements = sortableList.children();
- var listValues = [];
- for (var i = 0; i < listElements.length; i++) {
- listValues.push(listElements[i].id);
+ if(confirm("Are you sure you want to submit your ballot?")) {
+ var sortableList = $("#candidates");
+ var listElements = sortableList.children();
+ var listValues = [];
+ for (var i = 0; i < listElements.length; i++) {
+ listValues.push(listElements[i].id);
+ }
+
+ var formData = {
+ 'ballot' : listValues,
+ '_csrf' : $('input[name=_csrf]').val()
+ };
+
+ var formsub = $.ajax({
+ type : 'POST',
+ url : '/endpoints/process_ballot.php',
+ data : formData,
+ dataType : 'json',
+ encode : true
+ });
+
+ formsub.done(function(data) {
+ if (data.success) {
+ setTimeout(function() { window.location.href = "/vote"; }, 100);
+ }
+ });
}
-
- var formData = {
- 'ballot' : listValues,
- '_csrf' : $('input[name=_csrf]').val()
- };
-
- var formsub = $.ajax({
- type : 'POST',
- url : '/endpoints/process_ballot.php',
- data : formData,
- dataType : 'json',
- encode : true
- });
-
- formsub.done(function(data) {
- if (data.success) {
- setTimeout(function() { window.location.href = "/vote"; }, 100);
- }
- });
-
event.preventDefault();
});
}); |
47c554a5ffa52d7c2a24ab3143a977edc99e1c8e | main/announcement.js | main/announcement.js | module.exports = {
init
}
var electron = require('electron')
var get = require('simple-get')
var config = require('../config')
var log = require('./log')
var ANNOUNCEMENT_URL = config.ANNOUNCEMENT_URL +
'?version=' + config.APP_VERSION +
'&platform=' + process.platform
function init () {
get.concat(ANNOUNCEMENT_URL, function (err, res, data) {
if (err) return log('failed to retrieve remote message')
if (res.statusCode !== 200) return log('no remote message')
electron.dialog.showMessageBox({
type: 'info',
buttons: ['OK'],
title: 'WebTorrent Desktop Announcement',
message: data.toString()
})
})
}
| module.exports = {
init
}
var electron = require('electron')
var get = require('simple-get')
var config = require('../config')
var log = require('./log')
var ANNOUNCEMENT_URL = config.ANNOUNCEMENT_URL +
'?version=' + config.APP_VERSION +
'&platform=' + process.platform
function init () {
get.concat(ANNOUNCEMENT_URL, function (err, res, data) {
if (err) return log('failed to retrieve remote message')
if (res.statusCode !== 200) return log('no remote message')
try {
data = JSON.parse(data.toString())
} catch (err) {
data = {
title: 'WebTorrent Desktop Announcement',
message: 'WebTorrent Desktop Announcement',
detail: data.toString()
}
}
electron.dialog.showMessageBox({
type: 'info',
buttons: ['OK'],
title: data.title,
message: data.message,
detail: data.detail
})
})
}
| Support custom window title, main message, details | Announcement: Support custom window title, main message, details
| JavaScript | mit | webtorrent/webtorrent-desktop,feross/webtorrent-desktop,feross/webtorrent-app,yciabaud/webtorrent-desktop,yciabaud/webtorrent-desktop,yciabaud/webtorrent-desktop,feross/webtorrent-desktop,feross/webtorrent-app,webtorrent/webtorrent-desktop,michaelgeorgeattard/webtorrent-desktop,feross/webtorrent-desktop,webtorrent/webtorrent-desktop,michaelgeorgeattard/webtorrent-desktop,michaelgeorgeattard/webtorrent-desktop,feross/webtorrent-app | ---
+++
@@ -17,11 +17,22 @@
if (err) return log('failed to retrieve remote message')
if (res.statusCode !== 200) return log('no remote message')
+ try {
+ data = JSON.parse(data.toString())
+ } catch (err) {
+ data = {
+ title: 'WebTorrent Desktop Announcement',
+ message: 'WebTorrent Desktop Announcement',
+ detail: data.toString()
+ }
+ }
+
electron.dialog.showMessageBox({
type: 'info',
buttons: ['OK'],
- title: 'WebTorrent Desktop Announcement',
- message: data.toString()
+ title: data.title,
+ message: data.message,
+ detail: data.detail
})
})
} |
7e962bb5df10f4740c37501360a8437b952853f7 | client/js/main.js | client/js/main.js | //make sure all dependencies are loaded
require([
'es5shim',
'angular',
'json!data/config.json',
'angular-ui-router',
'angular-flash',
'angular-moment',
'angular-sanitize',
'emoji',
'socketio',
'socket',
'jquery',
'jquery-filedrop',
'app',
'services/services',
'controllers/controllers',
'filters/filters',
'directives/directives',
'config/flash',
'config/http',
'config/routes',
'config/finalize',
'config/socket'
], function (es5shim, angular, config) {
'use strict';
console.log('Dependencies loaded');
//kick off!
angular.element(document).ready(function () {
console.log('Document ready, bootstrapping app');
angular.bootstrap(document, [config.appName]);
});
}); | //make sure all dependencies are loaded
require([
'es5shim',
'angular',
'json!data/config.json',
'angular-ui-router',
'angular-flash',
'angular-moment',
'angular-sanitize',
'emoji',
'socketio',
'socket',
'jquery',
'jquery-filedrop',
'app',
'services/services',
'controllers/controllers',
'filters/filters',
'directives/directives',
'config/flash',
'config/http',
'config/routes',
'config/finalize',
'config/socket'
], function (es5shim, angular, config) {
'use strict';
console.log('Dependencies loaded');
//kick off!
angular.element(document).ready(function () {
console.log('Document ready, bootstrapping app');
// Get user state before bootstrap so we can route correctly
var $http = angular.bootstrap().get('$http');
$http.get("/api/users/session").success(function(user) {
sessionStorage.setItem("user", user.id);
angular.bootstrap(document, [config.appName]);
}).error(function(data, status, headers, config) {
console.log('Error accessing api');
});
});
}); | Check for active session before bootstrapping | Check for active session before bootstrapping
| JavaScript | mit | rserve/arrangr,rserve/arrangr | ---
+++
@@ -31,6 +31,14 @@
//kick off!
angular.element(document).ready(function () {
console.log('Document ready, bootstrapping app');
- angular.bootstrap(document, [config.appName]);
+
+ // Get user state before bootstrap so we can route correctly
+ var $http = angular.bootstrap().get('$http');
+ $http.get("/api/users/session").success(function(user) {
+ sessionStorage.setItem("user", user.id);
+ angular.bootstrap(document, [config.appName]);
+ }).error(function(data, status, headers, config) {
+ console.log('Error accessing api');
+ });
});
}); |
363716de3e6996605d2457d1ac8d6b5fa09ad994 | lib/PropertyValue.js | lib/PropertyValue.js | const ParserCommon = require('./ParserCommon');
function PropertyValue(xml) {
this.Annotations = {};
this.validElements = {
};
this.validAttributes = {
'Bool': {bool: true},
'String': {},
'Path': {},
'Property': {alreadyHandeled: true}
};
var init = ParserCommon.initEntity.bind(this);
init(xml, 'PropertyValue', 'Property');
return this;
}
module.exports = PropertyValue;
/* vim: set tabstop=2 shiftwidth=2 expandtab: */
| const ParserCommon = require('./ParserCommon');
function PropertyValue(xml) {
this.Annotations = {};
this.validElements = {
};
this.validAttributes = {
'Bool': {bool: true},
'String': {},
'Path': {},
'Property': {alreadyHandeled: true},
'EnumMember': {}
};
var init = ParserCommon.initEntity.bind(this);
init(xml, 'PropertyValue', 'Property');
return this;
}
module.exports = PropertyValue;
/* vim: set tabstop=2 shiftwidth=2 expandtab: */
| Add EnumMember as a valid expression | Add EnumMember as a valid expression
| JavaScript | apache-2.0 | pboyd04/CSDLParser | ---
+++
@@ -9,7 +9,8 @@
'Bool': {bool: true},
'String': {},
'Path': {},
- 'Property': {alreadyHandeled: true}
+ 'Property': {alreadyHandeled: true},
+ 'EnumMember': {}
};
var init = ParserCommon.initEntity.bind(this); |
299db6b86cdc1434c9ab4ce181a7c58affb36afd | lib/decryptStream.js | lib/decryptStream.js | var crypto = require('crypto'),
util = require('util'),
Transform = require('stream').Transform;
function DecryptStream(options) {
if (!(this instanceof DecryptStream))
return new DecryptStream(options);
Transform.call(this, options);
this.key = options.key;
this._decipher = crypto.createDecipheriv('aes-128-ecb', this.key, '');
this._decipher.setAutoPadding(true);
};
util.inherits(DecryptStream, Transform);
DecryptStream.prototype._transform = function(chunk, encoding, done) {
this.push(this._decipher.update(chunk));
done();
};
module.exports = DecryptStream; | var crypto = require('crypto'),
util = require('util'),
Transform = require('stream').Transform;
function DecryptStream(options) {
if (!(this instanceof DecryptStream))
return new DecryptStream(options);
Transform.call(this, options);
this.key = options.key;
this._decipher = crypto.createDecipheriv('aes-128-ecb', this.key, '');
this._decipher.setAutoPadding(true);
};
util.inherits(DecryptStream, Transform);
DecryptStream.prototype._transform = function(chunk, encoding, callback) {
this.push(this._decipher.update(chunk));
callback();
};
DecryptStream.prototype._flush = function(callback) {
this.push(this._decipher.final());
callback();
}
module.exports = DecryptStream; | Call final() on stream flush. | Call final() on stream flush.
| JavaScript | mit | oliviert/node-snapchat | ---
+++
@@ -16,9 +16,14 @@
util.inherits(DecryptStream, Transform);
-DecryptStream.prototype._transform = function(chunk, encoding, done) {
+DecryptStream.prototype._transform = function(chunk, encoding, callback) {
this.push(this._decipher.update(chunk));
- done();
+ callback();
};
+DecryptStream.prototype._flush = function(callback) {
+ this.push(this._decipher.final());
+ callback();
+}
+
module.exports = DecryptStream; |
f1aa11423921ee52238330d68f7aa60d9c89d7cf | scripts/autoreload/reload.js | scripts/autoreload/reload.js | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// <![CDATA[
$(document).ready(function() {
$.ajaxSetup({ cache: false }); // This part addresses an IE bug. without it, IE will only load the first number and will never refresh
setInterval(function() {
$('#pjax_total').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_total');
$('#pjax_green').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_green');
$('#pjax_status').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_status');
$('#pjax_person').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_person');
$('#pjax_last6').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_last6');
$('#pjax_today').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_today');
$('#pjax_today2').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_today');
}, 1234); // the "3000" here refers to the time to refresh the div. it is in milliseconds.
});
// ]]>
| /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// <![CDATA[
$(document).ready(function() {
$.ajaxSetup({ cache: false }); // This part addresses an IE bug. without it, IE will only load the first number and will never refresh
setInterval(function() {
$('#pjax_total').load('https://reserv.solusi-integral.co.id/pajax/pjax_total');
$('#pjax_green').load('https://reserv.solusi-integral.co.id/pajax/pjax_green');
$('#pjax_status').load('https://reserv.solusi-integral.co.id/pajax/pjax_status');
$('#pjax_person').load('https://reserv.solusi-integral.co.id/pajax/pjax_person');
$('#pjax_last6').load('https://reserv.solusi-integral.co.id/pajax/pjax_last6');
$('#pjax_today').load('https://reserv.solusi-integral.co.id/pajax/pjax_today');
$('#pjax_today2').load('https://reserv.solusi-integral.co.id/pajax/pjax_today');
}, 1234); // the "3000" here refers to the time to refresh the div. it is in milliseconds.
});
// ]]>
| Change cache-control from 60s expired to 86.400 (1 day) | Change cache-control from 60s expired to 86.400 (1 day) | JavaScript | apache-2.0 | solusi-integral/reserv,solusi-integral/reserv,solusi-integral/reserv,solusi-integral/reserv | ---
+++
@@ -8,13 +8,13 @@
$(document).ready(function() {
$.ajaxSetup({ cache: false }); // This part addresses an IE bug. without it, IE will only load the first number and will never refresh
setInterval(function() {
-$('#pjax_total').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_total');
-$('#pjax_green').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_green');
-$('#pjax_status').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_status');
-$('#pjax_person').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_person');
-$('#pjax_last6').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_last6');
-$('#pjax_today').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_today');
-$('#pjax_today2').load('https://reserv.solusi-integral.co.id/index.php/pajax/pjax_today');
+$('#pjax_total').load('https://reserv.solusi-integral.co.id/pajax/pjax_total');
+$('#pjax_green').load('https://reserv.solusi-integral.co.id/pajax/pjax_green');
+$('#pjax_status').load('https://reserv.solusi-integral.co.id/pajax/pjax_status');
+$('#pjax_person').load('https://reserv.solusi-integral.co.id/pajax/pjax_person');
+$('#pjax_last6').load('https://reserv.solusi-integral.co.id/pajax/pjax_last6');
+$('#pjax_today').load('https://reserv.solusi-integral.co.id/pajax/pjax_today');
+$('#pjax_today2').load('https://reserv.solusi-integral.co.id/pajax/pjax_today');
}, 1234); // the "3000" here refers to the time to refresh the div. it is in milliseconds.
});
// ]]> |
5b50d1999c4dc41f7b47b47df24461fd7e098396 | agent.js | agent.js | /**
* Helper module used to alias browser names parsed out of the 'useragent'
* module to the equivalent names used in the config.json for each polyfill.
* Should always be lowercase values as it makes comparisons easier.
*/
var agentlist = {
"chromium": "chrome",
"mobile safari": "safari ios"
};
/**
* Return a normalized name for the user agent, if there is no normalized name
* the name is returned as is, without modification.
*
* @param {string} agentname The name of the user agent to normalize.
* @returns {string} A normalized user agent name.
*/
module.exports = function(agentname) {
return agentlist[agentname] || agentname;
};
| /**
* Helper module used to alias browser names parsed out of the 'useragent'
* module to the equivalent names used in the config.json for each polyfill.
* Should always be lowercase values as it makes comparisons easier.
*/
var agentlist = {
"chromium": "chrome",
"mobile safari": "safari ios",
"firefox beta": "firefox"
};
/**
* Return a normalized name for the user agent, if there is no normalized name
* the name is returned as is, without modification.
*
* @param {string} agentname The name of the user agent to normalize.
* @returns {string} A normalized user agent name.
*/
module.exports = function(agentname) {
return agentlist[agentname] || agentname;
};
| Add fx beta and mobile safari | Add fx beta and mobile safari
| JavaScript | mit | kdzwinel/polyfill-service,jonathan-fielding/polyfill-service,mcshaz/polyfill-service,JakeChampion/polyfill-service,mcshaz/polyfill-service,jonathan-fielding/polyfill-service,kdzwinel/polyfill-service,jonathan-fielding/polyfill-service,JakeChampion/polyfill-service,mcshaz/polyfill-service,kdzwinel/polyfill-service | ---
+++
@@ -6,7 +6,8 @@
var agentlist = {
"chromium": "chrome",
- "mobile safari": "safari ios"
+ "mobile safari": "safari ios",
+ "firefox beta": "firefox"
};
@@ -18,6 +19,5 @@
* @returns {string} A normalized user agent name.
*/
module.exports = function(agentname) {
-
return agentlist[agentname] || agentname;
}; |
8f98c3375a4f0d3172ad1b7f34112ebe7cb5280e | src/firefox/lib/url-handler.js | src/firefox/lib/url-handler.js | var { Cc, Ci, Cr } = require('chrome');
exports.setup = function(panel) {
var observer = {
observe: function (subject, topic, data) {
if ('http-on-modify-request' !== topic) {
return;
}
subject.QueryInterface(Ci.nsIHttpChannel);
var url = subject.URI.spec
if (!/https:\/\/www.uproxy.org\/(request|offer)\/(.*)/.test(url)) {
return;
}
panel.port.emit('handleUrlData', url);
panel.port.emit('showPanel');
subject.cancel(Cr.NS_BINDING_ABORTED);
}
};
var service = Cc['@mozilla.org/observer-service;1'].getService(Ci.nsIObserverService);
service.addObserver(observer, 'http-on-modify-request', false);
};
| var { Cc, Ci, Cr } = require('chrome');
exports.setup = function(panel) {
var observer = {
observe: function (subject, topic, data) {
if ('http-on-modify-request' !== topic) {
return;
}
subject.QueryInterface(Ci.nsIHttpChannel);
var url = subject.URI.spec
if (!/https:\/\/www.uproxy.org\/(request|offer)\/(.*)/.test(url)) {
return;
}
panel.port.emit('handleUrlData', url);
panel.show();
subject.cancel(Cr.NS_BINDING_ABORTED);
}
};
var service = Cc['@mozilla.org/observer-service;1'].getService(Ci.nsIObserverService);
service.addObserver(observer, 'http-on-modify-request', false);
};
| Fix a small mistake in how opening the uProxy panel is done in Firefox | Fix a small mistake in how opening the uProxy panel is done in Firefox
| JavaScript | apache-2.0 | jpevarnek/uproxy,roceys/uproxy,roceys/uproxy,IveWong/uproxy,chinarustin/uproxy,itplanes/uproxy,chinarustin/uproxy,MinFu/uproxy,roceys/uproxy,itplanes/uproxy,qida/uproxy,MinFu/uproxy,itplanes/uproxy,dhkong88/uproxy,MinFu/uproxy,qida/uproxy,itplanes/uproxy,MinFu/uproxy,IveWong/uproxy,chinarustin/uproxy,qida/uproxy,qida/uproxy,uProxy/uproxy,uProxy/uproxy,roceys/uproxy,itplanes/uproxy,roceys/uproxy,qida/uproxy,MinFu/uproxy,jpevarnek/uproxy,uProxy/uproxy,dhkong88/uproxy,uProxy/uproxy,chinarustin/uproxy,dhkong88/uproxy,jpevarnek/uproxy,chinarustin/uproxy,IveWong/uproxy,jpevarnek/uproxy,dhkong88/uproxy,jpevarnek/uproxy,IveWong/uproxy,uProxy/uproxy,dhkong88/uproxy | ---
+++
@@ -15,7 +15,7 @@
}
panel.port.emit('handleUrlData', url);
- panel.port.emit('showPanel');
+ panel.show();
subject.cancel(Cr.NS_BINDING_ABORTED);
} |
33e91cd319b71c6960a663a1462aee291825f753 | src/js/markovWordsetBuilder.js | src/js/markovWordsetBuilder.js | 'use strict';
var markovWordsetBuilder = (function() {
var max_words = 80000;
function stripChars(word) {
return word.replace(/[^A-Za-z0-9\s\.\!\?\'\,\—\-]/gi, '');
}
function addWords(words, delimiter) {
var wordSet = [];
var aw = words.split(delimiter);
var len = aw.length;
if (len > max_words) len = max_words;
console.log("adding words (max of " + len + ")");
for (var i = 0; i < len; i++) {
var word = stripChars(aw[i]);
if (word.length > 0) wordSet.push(word);
}
return wordSet;
}
return { addWords : addWords }
})();
| 'use strict';
var markovWordsetBuilder = (function() {
var max_words = 80000;
function transformWord(word) {
word = word.replace("Mr.", "Mr");
word = word.replace("Mrs.", "Mrs");
return word.replace(/[^A-Za-z0-9\s\.\!\?\'\,\—\-]/gi, '');
}
function addWords(words, delimiter) {
var wordSet = [];
var aw = words.split(delimiter);
var len = aw.length;
if (len > max_words) len = max_words;
console.log("adding words (max of " + len + ")");
for (var i = 0; i < len; i++) {
var word = transformWord(aw[i]);
if (word.length > 0) wordSet.push(word);
}
return wordSet;
}
return { addWords : addWords }
})();
| Rename stripChars() to transformWord(), and add some transforms to it (drop period from "Mr." and "Mrs.") | Rename stripChars() to transformWord(), and add some transforms to it (drop period from "Mr." and "Mrs.")
| JavaScript | bsd-3-clause | petejscott/jsMarkov | ---
+++
@@ -4,7 +4,9 @@
var max_words = 80000;
- function stripChars(word) {
+ function transformWord(word) {
+ word = word.replace("Mr.", "Mr");
+ word = word.replace("Mrs.", "Mrs");
return word.replace(/[^A-Za-z0-9\s\.\!\?\'\,\—\-]/gi, '');
}
@@ -17,7 +19,7 @@
console.log("adding words (max of " + len + ")");
for (var i = 0; i < len; i++) {
- var word = stripChars(aw[i]);
+ var word = transformWord(aw[i]);
if (word.length > 0) wordSet.push(word);
}
return wordSet; |
cdfe747966fed67ea9ad59ff8ad036984d986839 | util/load-config.js | util/load-config.js | "use strict";
var fs = require("fs");
var yaml = require("js-yaml");
module.exports = function loadConfig () {
var config = yaml.safeLoad(fs.readFileSync(".titorrc", "utf8"));
if (typeof config !== "object") throw Error("Invalid .titorrc");
if (typeof config.export !== "string")
throw Error("Invalid or missing export in .titorrc");
return config;
};
| "use strict";
var sh = require("shelljs");
sh.set("-e");
var yaml = require("js-yaml");
module.exports = function loadConfig () {
var config = yaml.safeLoad(sh.cat(".titorrc"));
if (typeof config !== "object") throw Error("Invalid .titorrc");
if (typeof config.export !== "string")
throw Error("Invalid or missing export in .titorrc");
return config;
};
| Use shelljs instead of fs for consistency | Use shelljs instead of fs for consistency
| JavaScript | mit | meeber/titor,meeber/titor | ---
+++
@@ -1,10 +1,13 @@
"use strict";
-var fs = require("fs");
+var sh = require("shelljs");
+
+sh.set("-e");
+
var yaml = require("js-yaml");
module.exports = function loadConfig () {
- var config = yaml.safeLoad(fs.readFileSync(".titorrc", "utf8"));
+ var config = yaml.safeLoad(sh.cat(".titorrc"));
if (typeof config !== "object") throw Error("Invalid .titorrc");
|
08f877cb5d0434e6d2ef605dceb7e7c53d0015a4 | server/build/loaders/polyfill-loader.js | server/build/loaders/polyfill-loader.js | import { getOptions, stringifyRequest } from 'loader-utils'
module.exports = function (content, sourceMap) {
this.cacheable()
const options = getOptions(this)
const { buildId, modules } = options
this.callback(null, `
// Webpack Polyfill Injector
function main() {${modules.map(module => `\n require(${stringifyRequest(this, module)});`).join('') + '\n'}}
if (require(${stringifyRequest(this, options.test)})) {
var js = document.createElement('script');
js.src = __webpack_public_path__ + '${buildId}/polyfill.js';
js.onload = main;
js.onerror = function onError(message) {
console.error('Could not load the polyfills: ' + message);
};
document.head.appendChild(js);
} else {
main();
}
`, sourceMap)
}
| import { getOptions, stringifyRequest } from 'loader-utils'
module.exports = function (content, sourceMap) {
this.cacheable()
const options = getOptions(this)
const { buildId, modules } = options
this.callback(null, `
// Webpack Polyfill Injector
function main() {${modules.map(module => `\n require(${stringifyRequest(this, module)});`).join('') + '\n'}}
if (require(${stringifyRequest(this, options.test)})) {
var js = document.createElement('script');
js.src = __NEXT_DATA__.publicPath + '${buildId}/polyfill.js';
js.onload = main;
js.onerror = function onError(message) {
console.error('Could not load the polyfills: ' + message);
};
document.head.appendChild(js);
} else {
main();
}
`, sourceMap)
}
| Use next public path for polyfill loader | Use next public path for polyfill loader | JavaScript | mit | kpdecker/next.js | ---
+++
@@ -11,7 +11,7 @@
function main() {${modules.map(module => `\n require(${stringifyRequest(this, module)});`).join('') + '\n'}}
if (require(${stringifyRequest(this, options.test)})) {
var js = document.createElement('script');
- js.src = __webpack_public_path__ + '${buildId}/polyfill.js';
+ js.src = __NEXT_DATA__.publicPath + '${buildId}/polyfill.js';
js.onload = main;
js.onerror = function onError(message) {
console.error('Could not load the polyfills: ' + message); |
419cc5591ecd9f10e8036b99cef314ee879c2395 | test/util/atomHelper.js | test/util/atomHelper.js | if (typeof global.atom === 'undefined') {
global.atom = {
notifications: {
addError: function (desc, obj) {
return new Promise(function (resolve, reject) {
console.log('wtf', obj)
reject(obj.error)
})
}
}
}
}
| if (typeof global.atom === 'undefined') {
global.atom = {
notifications: {
addError: function (desc, obj) {
return new Promise(function (resolve, reject) {
reject(obj.error)
})
}
}
}
}
| Stop logging error notifications in tests | Stop logging error notifications in tests
At least with Node.js v6 these unhandled rejections get reported to the console already.
| JavaScript | isc | gustavnikolaj/linter-js-standard-engine | ---
+++
@@ -3,7 +3,6 @@
notifications: {
addError: function (desc, obj) {
return new Promise(function (resolve, reject) {
- console.log('wtf', obj)
reject(obj.error)
})
} |
9afaf5672c012d944416e984b62e80e7f3bfbcd9 | config/default.js | config/default.js | /* eslint key-spacing:0 spaced-comment:0 */
const path = require('path');
const ip = require('ip');
const projectBase = path.resolve(__dirname, '..');
/************************************************
/* Default configuration
*************************************************/
module.exports = {
env : process.env.NODE_ENV || 'development',
log : {
level : 'debug'
},
/*************************************************
/* Project Structure
*************************************************/
structure : {
client : path.join(projectBase, 'app'),
build : path.join(projectBase, 'build'),
server : path.join(projectBase, 'server'),
config : path.join(projectBase, 'config'),
test : path.join(projectBase, 'tests')
},
/*************************************************
/* Server configuration
*************************************************/
server : {
host : ip.address(), // use string 'localhost' to prevent exposure on local network
port : process.env.PORT || 3000
},
/*************************************************
/* Compiler configuration
*************************************************/
compiler : {
babel : {
cache_directory : true,
plugins : ['transform-runtime'],
presets : ['es2015', 'react', 'stage-0']
},
devtool : 'source-map',
hash_type : 'hash',
fail_on_warning : false,
quiet : false,
public_path : '/',
stats : {
chunks : false,
chunkModules : false,
colors : true
}
},
/*************************************************
/* Build configuration
*************************************************/
build : {},
/*************************************************
/* Test configuration
*************************************************/
test : {}
};
| /* eslint key-spacing:0 spaced-comment:0 */
const path = require('path');
const ip = require('ip');
const projectBase = path.resolve(__dirname, '..');
/************************************************
/* Default configuration
*************************************************/
var configuration = {
env : process.env.NODE_ENV || 'development',
log : {
level : 'debug'
},
/*************************************************
/* Project Structure
*************************************************/
structure : {
root : projectBase,
client : path.join(projectBase, 'app'),
build : path.join(projectBase, 'build'),
server : path.join(projectBase, 'server'),
config : path.join(projectBase, 'config'),
test : path.join(projectBase, 'tests')
},
/*************************************************
/* Server configuration
*************************************************/
server : {
host : ip.address(), // use string 'localhost' to prevent exposure on local network
port : process.env.PORT || 3000
},
/*************************************************
/* Compiler configuration
*************************************************/
compiler : {
babel : {
cache_directory : true,
plugins : ['transform-runtime'],
presets : ['es2015', 'react', 'stage-0']
},
devtool : 'source-map',
hash_type : 'hash',
fail_on_warning : false,
quiet : false,
public_path : '/',
stats : {
chunks : false,
chunkModules : false,
colors : true
}
},
/*************************************************
/* Build configuration
*************************************************/
build : {},
/*************************************************
/* Test configuration
*************************************************/
test : {}
};
module.exports = configuration;
| Add root path to configuration | Add root path to configuration
| JavaScript | mit | Picta-it/barebare,Picta-it/barebare | ---
+++
@@ -7,7 +7,7 @@
/************************************************
/* Default configuration
*************************************************/
-module.exports = {
+var configuration = {
env : process.env.NODE_ENV || 'development',
log : {
@@ -18,6 +18,7 @@
/* Project Structure
*************************************************/
structure : {
+ root : projectBase,
client : path.join(projectBase, 'app'),
build : path.join(projectBase, 'build'),
server : path.join(projectBase, 'server'),
@@ -64,3 +65,5 @@
*************************************************/
test : {}
};
+
+module.exports = configuration; |
180173646ed757adf89a0fd4753cd9366cae481e | lib/persistent_session.js | lib/persistent_session.js | Session.old_set = Session.set;
Session.set = function _psSet(key, value, persist) {
if (persist === undefined) {
persist = true;
}
Session.old_set(key, value);
if (persist) {
if (value === undefined) {
value = null; // we can't pass (key, undefined) to amplify.store() to unset a value
}
amplify.store(key, value);
}
};
Session.setTemporary = function _psSetTemp(key, value) {
this.set(key, value, false);
};
Session.old_get = Session.get;
Session.get = function _psGet(key) {
Session.old_get(key);
var val = amplify.store(key);
if (val === undefined) {
return Session.old_get(key);
}
return val;
};
| Session.old_set = Session.set;
Session.set = function _psSet(key, value, persist) {
if (persist === undefined) {
persist = true;
}
Session.old_set(key, value);
if (persist) {
if (value === undefined) {
value = null; // we can't pass (key, undefined) to amplify.store() to unset a value
}
amplify.store(key, value);
}
};
Session.setTemporary = function _psSetTemp(key, value) {
this.set(key, value, false);
};
Session.old_get = Session.get;
Session.get = function _psGet(key) {
Session.old_get(key); // Required for reactivity
var val = amplify.store(key);
if (val === undefined) {
return Session.old_get(key);
}
return val;
};
| Add comment about unused get call | Add comment about unused get call
| JavaScript | mit | ryepdx/meteor-persistent-session,okgrow/meteor-persistent-session | ---
+++
@@ -18,7 +18,7 @@
Session.old_get = Session.get;
Session.get = function _psGet(key) {
- Session.old_get(key);
+ Session.old_get(key); // Required for reactivity
var val = amplify.store(key);
if (val === undefined) {
return Session.old_get(key); |
f59ee0289334a31336aadfae02cb28ebfc0ebbc8 | server/services/CardService.js | server/services/CardService.js | const _ = require('underscore');
const logger = require('../log.js');
class CardService {
constructor(db) {
this.cards = db.get('cards');
this.packs = db.get('packs');
}
replaceCards(cards) {
return this.cards.remove({})
.then(() => this.cards.insert(cards));
}
replacePacks(cards) {
return this.packs.remove({})
.then(() => this.packs.insert(cards));
}
getAllCards(options) {
return this.cards.find({})
.then(result => {
let cards = {};
_.each(result, card => {
if(options && options.shortForm) {
cards[card.id] = _.pick(card, 'id', 'name', 'type', 'clan', 'side', 'deck_limit', 'element', 'unicity', 'influence_cost', 'influence_pool', 'pack_cards');
} else {
cards[card.id] = card;
}
});
return cards;
}).catch(err => {
logger.info(err);
});
}
getAllPacks() {
return this.packs.find({}).catch(err => {
logger.info(err);
});
}
}
module.exports = CardService;
| const _ = require('underscore');
const logger = require('../log.js');
class CardService {
constructor(db) {
this.cards = db.get('cards');
this.packs = db.get('packs');
}
replaceCards(cards) {
return this.cards.remove({})
.then(() => this.cards.insert(cards));
}
replacePacks(cards) {
return this.packs.remove({})
.then(() => this.packs.insert(cards));
}
getAllCards(options) {
return this.cards.find({})
.then(result => {
let cards = {};
_.each(result, card => {
if(options && options.shortForm) {
cards[card.id] = _.pick(card, 'id', 'name', 'type', 'clan', 'side', 'deck_limit', 'element', 'unicity', 'influence_cost', 'influence_pool', 'pack_cards', 'role_restriction');
} else {
cards[card.id] = card;
}
});
return cards;
}).catch(err => {
logger.info(err);
});
}
getAllPacks() {
return this.packs.find({}).catch(err => {
logger.info(err);
});
}
}
module.exports = CardService;
| Fix role restriction validation bug | Fix role restriction validation bug
| JavaScript | mit | jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,jeremylarner/ringteki,gryffon/ringteki,gryffon/ringteki | ---
+++
@@ -25,7 +25,7 @@
_.each(result, card => {
if(options && options.shortForm) {
- cards[card.id] = _.pick(card, 'id', 'name', 'type', 'clan', 'side', 'deck_limit', 'element', 'unicity', 'influence_cost', 'influence_pool', 'pack_cards');
+ cards[card.id] = _.pick(card, 'id', 'name', 'type', 'clan', 'side', 'deck_limit', 'element', 'unicity', 'influence_cost', 'influence_pool', 'pack_cards', 'role_restriction');
} else {
cards[card.id] = card;
} |
df01fedc57674fb198c3a80889fabe546178a627 | signup/static/invite-dialog.js | signup/static/invite-dialog.js | if (!document.createElement('dialog').showModal) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'static/dialog-polyfill.css';
var script = document.createElement('script');
script.src = 'static/dialog-polyfill.js';
var head = document.getElementsByTagName('head')[0];
head.appendChild(link);
head.appendChild(script);
}
function showInviteDialog() {
var dialog = document.getElementById('invite_dialog');
if (window.dialogPolyfill) {
window.dialogPolyfill.registerDialog(dialog);
}
dialog.showModal();
}
document.getElementById('showInviteDialog').onclick = showInviteDialog;
function closeInviteDialog() {
var dialog = document.getElementById('invite_dialog');
dialog.close();
}
document.getElementById('closeInviteDialog').onclick = closeInviteDialog; | window.addEventListener("load", function() {
if (!document.createElement('dialog').showModal) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'static/dialog-polyfill.css';
var script = document.createElement('script');
script.src = 'static/dialog-polyfill.js';
var head = document.getElementsByTagName('head')[0];
head.appendChild(link);
head.appendChild(script);
}
function showInviteDialog() {
var dialog = document.getElementById('invite_dialog');
if (window.dialogPolyfill) {
window.dialogPolyfill.registerDialog(dialog);
}
dialog.showModal();
}
document.getElementById('showInviteDialog').onclick = showInviteDialog;
function closeInviteDialog() {
var dialog = document.getElementById('invite_dialog');
dialog.close();
}
document.getElementById('closeInviteDialog').onclick = closeInviteDialog;
});
| Fix JS error in invite dialog button | Fix JS error in invite dialog button
| JavaScript | apache-2.0 | notriddle/aelita,notriddle/aelita,notriddle/aelita,notriddle/aelita,notriddle/aelita | ---
+++
@@ -1,23 +1,25 @@
-if (!document.createElement('dialog').showModal) {
- var link = document.createElement('link');
- link.rel = 'stylesheet';
- link.href = 'static/dialog-polyfill.css';
- var script = document.createElement('script');
- script.src = 'static/dialog-polyfill.js';
- var head = document.getElementsByTagName('head')[0];
- head.appendChild(link);
- head.appendChild(script);
-}
-function showInviteDialog() {
- var dialog = document.getElementById('invite_dialog');
- if (window.dialogPolyfill) {
- window.dialogPolyfill.registerDialog(dialog);
+window.addEventListener("load", function() {
+ if (!document.createElement('dialog').showModal) {
+ var link = document.createElement('link');
+ link.rel = 'stylesheet';
+ link.href = 'static/dialog-polyfill.css';
+ var script = document.createElement('script');
+ script.src = 'static/dialog-polyfill.js';
+ var head = document.getElementsByTagName('head')[0];
+ head.appendChild(link);
+ head.appendChild(script);
}
- dialog.showModal();
-}
-document.getElementById('showInviteDialog').onclick = showInviteDialog;
-function closeInviteDialog() {
- var dialog = document.getElementById('invite_dialog');
- dialog.close();
-}
-document.getElementById('closeInviteDialog').onclick = closeInviteDialog;
+ function showInviteDialog() {
+ var dialog = document.getElementById('invite_dialog');
+ if (window.dialogPolyfill) {
+ window.dialogPolyfill.registerDialog(dialog);
+ }
+ dialog.showModal();
+ }
+ document.getElementById('showInviteDialog').onclick = showInviteDialog;
+ function closeInviteDialog() {
+ var dialog = document.getElementById('invite_dialog');
+ dialog.close();
+ }
+ document.getElementById('closeInviteDialog').onclick = closeInviteDialog;
+}); |
5e73ba5ca42329defbf277327cb21f2f1830c7ba | assets/js/review.js | assets/js/review.js | ( function( $ ) {
'use strict';
$( function() {
var body = $( 'body' ),
writeReview = $( '.write-a-review' );
// If review link exists.
if ( writeReview.length ) {
// On click trigger review window.
writeReview.on( 'click', function( e ) {
// Prevent default browser action.
e.preventDefault();
// Get URL for Reivew.
var urlReview = $(this).prop( 'href' );
// Add layout styles.
body.prepend( '<div class="open-review" />' );
$( '.open-review' ).prepend( '<h2>Use <span>Google</span><br>to leave your review?</h2>' );
$( '.open-review' ).append( '<a href="' + urlReview + '" class="button">Yes</a>' );
$( '.open-review' ).append( '<a href="#" class="close">Close</a>' );
// Close review.
$( '.close' ).on( 'click', function( e ) {
// Prevent default browser action.
e.preventDefault();
// Review review overlay.
$( '.open-review' ).remove();
} );
} );
}
} );
}( jQuery ) );
| ( function( $ ) {
'use strict';
$( function() {
var body = $( 'body' ),
writeReview = $( '.write-a-review' ),
singleReview = $( '.single-re-google-reviews' );
// If review link exists.
if ( writeReview.length ) {
// On click trigger review window.
writeReview.on( 'click', function( e ) {
// Prevent default browser action.
e.preventDefault();
// Get URL for Reivew.
var urlReview = $(this).prop( 'href' );
// Add layout styles.
body.prepend( '<div class="open-review" />' );
$( '.open-review' ).prepend( '<h2>Use <span>Google</span><br>to leave your review?</h2>' );
$( '.open-review' ).append( '<a href="' + urlReview + '" class="button">Yes</a>' );
$( '.open-review' ).append( '<a href="#" class="close">Close</a>' );
// Close review.
$( '.close' ).on( 'click', function( e ) {
// Prevent default browser action.
e.preventDefault();
// Review review overlay.
$( '.open-review' ).remove();
} );
} );
}
// If single custom post type.
if ( singleReview.length ) {
$( '.open-review' ).prependTo( body );
}
} );
}( jQuery ) );
| Update JS to prepend html from CPT to body. | Update JS to prepend html from CPT to body.
| JavaScript | mit | xBLADEx/re-google-review,xBLADEx/re-google-review | ---
+++
@@ -4,8 +4,9 @@
$( function() {
- var body = $( 'body' ),
- writeReview = $( '.write-a-review' );
+ var body = $( 'body' ),
+ writeReview = $( '.write-a-review' ),
+ singleReview = $( '.single-re-google-reviews' );
// If review link exists.
if ( writeReview.length ) {
@@ -41,6 +42,11 @@
}
+ // If single custom post type.
+ if ( singleReview.length ) {
+ $( '.open-review' ).prependTo( body );
+ }
+
} );
}( jQuery ) ); |
bfea8583060472a9d1996d59a4fe0128375bdacd | rendering/cases/layer-group/main.js | rendering/cases/layer-group/main.js | import Map from '../../../src/ol/Map.js';
import View from '../../../src/ol/View.js';
import {Group as LayerGroup, Tile as TileLayer} from '../../../src/ol/layer.js';
import XYZ from '../../../src/ol/source/XYZ';
new Map({
target: 'map',
view: new View({
center: [0, 0],
zoom: 3
}),
layers: new LayerGroup({
opacity: 0.75,
layers: [
new TileLayer({
opacity: 0.25,
source: new XYZ({
url: '/data/tiles/satellite/{z}/{x}/{y}.jpg'
})
}),
new TileLayer({
source: new XYZ({
url: '/data/tiles/stamen-labels/{z}/{x}/{y}.png'
})
})
]
})
});
render();
| import Map from '../../../src/ol/Map.js';
import View from '../../../src/ol/View.js';
import {Group as LayerGroup, Tile as TileLayer} from '../../../src/ol/layer.js';
import XYZ from '../../../src/ol/source/XYZ.js';
new Map({
target: 'map',
view: new View({
center: [0, 0],
zoom: 3
}),
layers: new LayerGroup({
opacity: 0.75,
layers: [
new TileLayer({
opacity: 0.25,
source: new XYZ({
url: '/data/tiles/satellite/{z}/{x}/{y}.jpg'
})
}),
new TileLayer({
source: new XYZ({
url: '/data/tiles/stamen-labels/{z}/{x}/{y}.png'
})
})
]
})
});
render();
| Add missing extension in import | Add missing extension in import
| JavaScript | bsd-2-clause | geekdenz/ol3,adube/ol3,ahocevar/ol3,geekdenz/openlayers,geekdenz/ol3,openlayers/openlayers,bjornharrtell/ol3,ahocevar/openlayers,geekdenz/openlayers,stweil/openlayers,adube/ol3,adube/ol3,stweil/ol3,ahocevar/openlayers,oterral/ol3,ahocevar/ol3,tschaub/ol3,ahocevar/ol3,bjornharrtell/ol3,ahocevar/openlayers,openlayers/openlayers,openlayers/openlayers,oterral/ol3,tschaub/ol3,tschaub/ol3,stweil/openlayers,bjornharrtell/ol3,stweil/ol3,geekdenz/ol3,geekdenz/ol3,stweil/ol3,ahocevar/ol3,geekdenz/openlayers,oterral/ol3,stweil/openlayers,tschaub/ol3,stweil/ol3 | ---
+++
@@ -1,7 +1,7 @@
import Map from '../../../src/ol/Map.js';
import View from '../../../src/ol/View.js';
import {Group as LayerGroup, Tile as TileLayer} from '../../../src/ol/layer.js';
-import XYZ from '../../../src/ol/source/XYZ';
+import XYZ from '../../../src/ol/source/XYZ.js';
new Map({
target: 'map', |
ab5432a99e858fe0bd1d82f09c2c1ac51b819138 | packages/meteor-tool/package.js | packages/meteor-tool/package.js | Package.describe({
summary: "The Meteor command-line tool",
version: '1.0.27-rc0'
});
Package.includeTool();
| Package.describe({
summary: "The Meteor command-line tool",
version: '1.0.27-rc1'
});
Package.includeTool();
| Bump meteor-tool version (not totally sure why... is Blaze used in the tool?) | Bump meteor-tool version (not totally sure why... is Blaze used in the tool?)
| JavaScript | mit | udhayam/meteor,mjmasn/meteor,ashwathgovind/meteor,somallg/meteor,yinhe007/meteor,papimomi/meteor,chiefninew/meteor,udhayam/meteor,dev-bobsong/meteor,brdtrpp/meteor,codedogfish/meteor,jirengu/meteor,jirengu/meteor,DAB0mB/meteor,Puena/meteor,aleclarson/meteor,IveWong/meteor,codedogfish/meteor,jenalgit/meteor,chasertech/meteor,rozzzly/meteor,shrop/meteor,servel333/meteor,chmac/meteor,benjamn/meteor,ericterpstra/meteor,lpinto93/meteor,namho102/meteor,sunny-g/meteor,daslicht/meteor,jeblister/meteor,cbonami/meteor,williambr/meteor,yonglehou/meteor,alexbeletsky/meteor,hristaki/meteor,brettle/meteor,l0rd0fwar/meteor,paul-barry-kenzan/meteor,hristaki/meteor,newswim/meteor,karlito40/meteor,AnjirHossain/meteor,aldeed/meteor,chengxiaole/meteor,justintung/meteor,somallg/meteor,saisai/meteor,sdeveloper/meteor,imanmafi/meteor,papimomi/meteor,yiliaofan/meteor,chiefninew/meteor,michielvanoeffelen/meteor,newswim/meteor,yonas/meteor-freebsd,alphanso/meteor,Quicksteve/meteor,Urigo/meteor,rabbyalone/meteor,shmiko/meteor,chmac/meteor,Prithvi-A/meteor,yonas/meteor-freebsd,dandv/meteor,mubassirhayat/meteor,lieuwex/meteor,benstoltz/meteor,luohuazju/meteor,pjump/meteor,brettle/meteor,Prithvi-A/meteor,neotim/meteor,steedos/meteor,Eynaliyev/meteor,yonas/meteor-freebsd,AnthonyAstige/meteor,Jeremy017/meteor,Profab/meteor,dfischer/meteor,TribeMedia/meteor,dfischer/meteor,4commerce-technologies-AG/meteor,guazipi/meteor,HugoRLopes/meteor,brdtrpp/meteor,neotim/meteor,cherbst/meteor,dboyliao/meteor,steedos/meteor,lawrenceAIO/meteor,kengchau/meteor,rozzzly/meteor,cbonami/meteor,mauricionr/meteor,baysao/meteor,ndarilek/meteor,arunoda/meteor,chengxiaole/meteor,h200863057/meteor,jenalgit/meteor,daslicht/meteor,vjau/meteor,lpinto93/meteor,newswim/meteor,daltonrenaldo/meteor,JesseQin/meteor,allanalexandre/meteor,Quicksteve/meteor,esteedqueen/meteor,TechplexEngineer/meteor,kencheung/meteor,emmerge/meteor,judsonbsilva/meteor,Ken-Liu/meteor,dboyliao/meteor,JesseQin/meteor,chinasb/meteor,whip112/meteor,Theviajerock/meteor,l0rd0fwar/meteor,iman-mafi/meteor,rabbyalone/meteor,benstoltz/meteor,deanius/meteor,jdivy/meteor,lawrenceAIO/meteor,pandeysoni/meteor,yanisIk/meteor,aldeed/meteor,kidaa/meteor,lpinto93/meteor,AnjirHossain/meteor,allanalexandre/meteor,meonkeys/meteor,shmiko/meteor,namho102/meteor,williambr/meteor,baysao/meteor,jrudio/meteor,jeblister/meteor,neotim/meteor,aldeed/meteor,dev-bobsong/meteor,JesseQin/meteor,ljack/meteor,somallg/meteor,yanisIk/meteor,Theviajerock/meteor,Jeremy017/meteor,EduShareOntario/meteor,l0rd0fwar/meteor,TribeMedia/meteor,zdd910/meteor,yiliaofan/meteor,jdivy/meteor,Theviajerock/meteor,PatrickMcGuinness/meteor,luohuazju/meteor,sunny-g/meteor,williambr/meteor,kidaa/meteor,4commerce-technologies-AG/meteor,TribeMedia/meteor,kidaa/meteor,yyx990803/meteor,arunoda/meteor,arunoda/meteor,modulexcite/meteor,johnthepink/meteor,jg3526/meteor,karlito40/meteor,servel333/meteor,sclausen/meteor,IveWong/meteor,mubassirhayat/meteor,Urigo/meteor,jagi/meteor,michielvanoeffelen/meteor,johnthepink/meteor,pandeysoni/meteor,jeblister/meteor,joannekoong/meteor,tdamsma/meteor,papimomi/meteor,modulexcite/meteor,deanius/meteor,IveWong/meteor,chinasb/meteor,dandv/meteor,GrimDerp/meteor,allanalexandre/meteor,ashwathgovind/meteor,ndarilek/meteor,alphanso/meteor,servel333/meteor,lassombra/meteor,LWHTarena/meteor,daltonrenaldo/meteor,karlito40/meteor,johnthepink/meteor,TribeMedia/meteor,bhargav175/meteor,justintung/meteor,ljack/meteor,ericterpstra/meteor,sitexa/meteor,fashionsun/meteor,Eynaliyev/meteor,fashionsun/meteor,kencheung/meteor,shmiko/meteor,TribeMedia/meteor,baiyunping333/meteor,dfischer/meteor,sclausen/meteor,chasertech/meteor,oceanzou123/meteor,mauricionr/meteor,Paulyoufu/meteor-1,AnthonyAstige/meteor,benjamn/meteor,aramk/meteor,modulexcite/meteor,Profab/meteor,daslicht/meteor,nuvipannu/meteor,HugoRLopes/meteor,alexbeletsky/meteor,emmerge/meteor,cog-64/meteor,IveWong/meteor,D1no/meteor,Theviajerock/meteor,eluck/meteor,henrypan/meteor,yonglehou/meteor,vacjaliu/meteor,saisai/meteor,neotim/meteor,Theviajerock/meteor,iman-mafi/meteor,D1no/meteor,jagi/meteor,sunny-g/meteor,papimomi/meteor,stevenliuit/meteor,rabbyalone/meteor,daslicht/meteor,katopz/meteor,paul-barry-kenzan/meteor,mubassirhayat/meteor,karlito40/meteor,yalexx/meteor,cherbst/meteor,HugoRLopes/meteor,whip112/meteor,skarekrow/meteor,zdd910/meteor,tdamsma/meteor,kencheung/meteor,JesseQin/meteor,pjump/meteor,deanius/meteor,eluck/meteor,tdamsma/meteor,calvintychan/meteor,yiliaofan/meteor,kencheung/meteor,AlexR1712/meteor,baiyunping333/meteor,qscripter/meteor,mauricionr/meteor,lassombra/meteor,skarekrow/meteor,esteedqueen/meteor,judsonbsilva/meteor,brdtrpp/meteor,henrypan/meteor,colinligertwood/meteor,shadedprofit/meteor,brettle/meteor,elkingtonmcb/meteor,zdd910/meteor,Profab/meteor,saisai/meteor,jrudio/meteor,IveWong/meteor,tdamsma/meteor,cog-64/meteor,DCKT/meteor,chasertech/meteor,PatrickMcGuinness/meteor,aramk/meteor,yonglehou/meteor,zdd910/meteor,EduShareOntario/meteor,h200863057/meteor,guazipi/meteor,henrypan/meteor,juansgaitan/meteor,elkingtonmcb/meteor,mirstan/meteor,servel333/meteor,eluck/meteor,lawrenceAIO/meteor,somallg/meteor,mirstan/meteor,rabbyalone/meteor,arunoda/meteor,ericterpstra/meteor,dev-bobsong/meteor,justintung/meteor,shadedprofit/meteor,oceanzou123/meteor,ljack/meteor,Theviajerock/meteor,chengxiaole/meteor,daltonrenaldo/meteor,dfischer/meteor,baiyunping333/meteor,Puena/meteor,bhargav175/meteor,meteor-velocity/meteor,Profab/meteor,Quicksteve/meteor,yinhe007/meteor,EduShareOntario/meteor,lorensr/meteor,iman-mafi/meteor,lorensr/meteor,bhargav175/meteor,namho102/meteor,yalexx/meteor,rabbyalone/meteor,katopz/meteor,vacjaliu/meteor,h200863057/meteor,DAB0mB/meteor,eluck/meteor,mirstan/meteor,TechplexEngineer/meteor,evilemon/meteor,Urigo/meteor,yanisIk/meteor,mjmasn/meteor,AlexR1712/meteor,SeanOceanHu/meteor,chmac/meteor,yyx990803/meteor,jrudio/meteor,skarekrow/meteor,baiyunping333/meteor,TribeMedia/meteor,arunoda/meteor,whip112/meteor,sdeveloper/meteor,shadedprofit/meteor,chinasb/meteor,yinhe007/meteor,neotim/meteor,lassombra/meteor,pjump/meteor,devgrok/meteor,jeblister/meteor,cog-64/meteor,benjamn/meteor,shadedprofit/meteor,sdeveloper/meteor,katopz/meteor,shrop/meteor,D1no/meteor,l0rd0fwar/meteor,jeblister/meteor,shrop/meteor,jenalgit/meteor,judsonbsilva/meteor,jg3526/meteor,TechplexEngineer/meteor,colinligertwood/meteor,ashwathgovind/meteor,mirstan/meteor,Profab/meteor,DAB0mB/meteor,wmkcc/meteor,justintung/meteor,namho102/meteor,whip112/meteor,oceanzou123/meteor,steedos/meteor,jg3526/meteor,queso/meteor,mjmasn/meteor,saisai/meteor,fashionsun/meteor,jrudio/meteor,stevenliuit/meteor,HugoRLopes/meteor,youprofit/meteor,AnjirHossain/meteor,iman-mafi/meteor,mubassirhayat/meteor,LWHTarena/meteor,JesseQin/meteor,paul-barry-kenzan/meteor,henrypan/meteor,elkingtonmcb/meteor,ljack/meteor,servel333/meteor,Prithvi-A/meteor,zdd910/meteor,Puena/meteor,alphanso/meteor,codingang/meteor,arunoda/meteor,justintung/meteor,shmiko/meteor,chiefninew/meteor,vjau/meteor,somallg/meteor,EduShareOntario/meteor,guazipi/meteor,Ken-Liu/meteor,alexbeletsky/meteor,henrypan/meteor,udhayam/meteor,yinhe007/meteor,LWHTarena/meteor,udhayam/meteor,dev-bobsong/meteor,brdtrpp/meteor,Eynaliyev/meteor,framewr/meteor,meteor-velocity/meteor,ericterpstra/meteor,eluck/meteor,vacjaliu/meteor,nuvipannu/meteor,daltonrenaldo/meteor,papimomi/meteor,benjamn/meteor,udhayam/meteor,mauricionr/meteor,calvintychan/meteor,vjau/meteor,kengchau/meteor,neotim/meteor,namho102/meteor,akintoey/meteor,chengxiaole/meteor,rozzzly/meteor,lassombra/meteor,chmac/meteor,deanius/meteor,juansgaitan/meteor,yalexx/meteor,esteedqueen/meteor,codedogfish/meteor,colinligertwood/meteor,lawrenceAIO/meteor,rozzzly/meteor,meteor-velocity/meteor,chengxiaole/meteor,brdtrpp/meteor,calvintychan/meteor,cog-64/meteor,Profab/meteor,yiliaofan/meteor,guazipi/meteor,LWHTarena/meteor,4commerce-technologies-AG/meteor,imanmafi/meteor,Eynaliyev/meteor,codedogfish/meteor,yanisIk/meteor,mirstan/meteor,joannekoong/meteor,calvintychan/meteor,michielvanoeffelen/meteor,AnjirHossain/meteor,emmerge/meteor,daltonrenaldo/meteor,rabbyalone/meteor,yiliaofan/meteor,williambr/meteor,DAB0mB/meteor,jeblister/meteor,EduShareOntario/meteor,lpinto93/meteor,papimomi/meteor,D1no/meteor,alexbeletsky/meteor,youprofit/meteor,bhargav175/meteor,Hansoft/meteor,ashwathgovind/meteor,meteor-velocity/meteor,sdeveloper/meteor,queso/meteor,nuvipannu/meteor,pjump/meteor,sclausen/meteor,ericterpstra/meteor,bhargav175/meteor,lassombra/meteor,eluck/meteor,SeanOceanHu/meteor,framewr/meteor,DCKT/meteor,4commerce-technologies-AG/meteor,stevenliuit/meteor,Puena/meteor,alphanso/meteor,steedos/meteor,chinasb/meteor,codingang/meteor,evilemon/meteor,sdeveloper/meteor,lpinto93/meteor,ndarilek/meteor,dandv/meteor,dboyliao/meteor,qscripter/meteor,somallg/meteor,whip112/meteor,Urigo/meteor,AnthonyAstige/meteor,chasertech/meteor,paul-barry-kenzan/meteor,oceanzou123/meteor,yonglehou/meteor,namho102/meteor,eluck/meteor,dfischer/meteor,chmac/meteor,jeblister/meteor,chasertech/meteor,vacjaliu/meteor,chiefninew/meteor,udhayam/meteor,joannekoong/meteor,stevenliuit/meteor,justintung/meteor,tdamsma/meteor,lorensr/meteor,ljack/meteor,aramk/meteor,colinligertwood/meteor,juansgaitan/meteor,hristaki/meteor,baysao/meteor,AnthonyAstige/meteor,PatrickMcGuinness/meteor,Quicksteve/meteor,dev-bobsong/meteor,SeanOceanHu/meteor,ndarilek/meteor,benstoltz/meteor,brdtrpp/meteor,lawrenceAIO/meteor,baysao/meteor,jenalgit/meteor,modulexcite/meteor,yinhe007/meteor,sunny-g/meteor,yonas/meteor-freebsd,saisai/meteor,zdd910/meteor,sclausen/meteor,jenalgit/meteor,planet-training/meteor,saisai/meteor,GrimDerp/meteor,jagi/meteor,brdtrpp/meteor,baysao/meteor,SeanOceanHu/meteor,shrop/meteor,dboyliao/meteor,GrimDerp/meteor,youprofit/meteor,lieuwex/meteor,hristaki/meteor,colinligertwood/meteor,baysao/meteor,sdeveloper/meteor,GrimDerp/meteor,juansgaitan/meteor,fashionsun/meteor,aldeed/meteor,chiefninew/meteor,dandv/meteor,shadedprofit/meteor,chmac/meteor,pjump/meteor,planet-training/meteor,meonkeys/meteor,pandeysoni/meteor,jagi/meteor,Prithvi-A/meteor,jdivy/meteor,GrimDerp/meteor,Ken-Liu/meteor,AnjirHossain/meteor,yonas/meteor-freebsd,imanmafi/meteor,skarekrow/meteor,newswim/meteor,Eynaliyev/meteor,planet-training/meteor,karlito40/meteor,framewr/meteor,yalexx/meteor,D1no/meteor,imanmafi/meteor,calvintychan/meteor,elkingtonmcb/meteor,williambr/meteor,framewr/meteor,sunny-g/meteor,dfischer/meteor,DCKT/meteor,jagi/meteor,stevenliuit/meteor,chinasb/meteor,alexbeletsky/meteor,dev-bobsong/meteor,meonkeys/meteor,hristaki/meteor,codingang/meteor,msavin/meteor,AnthonyAstige/meteor,skarekrow/meteor,sunny-g/meteor,Jonekee/meteor,lpinto93/meteor,johnthepink/meteor,bhargav175/meteor,aleclarson/meteor,iman-mafi/meteor,daltonrenaldo/meteor,Eynaliyev/meteor,rozzzly/meteor,kencheung/meteor,kidaa/meteor,mauricionr/meteor,HugoRLopes/meteor,wmkcc/meteor,framewr/meteor,mjmasn/meteor,EduShareOntario/meteor,tdamsma/meteor,yyx990803/meteor,PatrickMcGuinness/meteor,Jonekee/meteor,stevenliuit/meteor,allanalexandre/meteor,williambr/meteor,LWHTarena/meteor,emmerge/meteor,hristaki/meteor,evilemon/meteor,devgrok/meteor,alphanso/meteor,arunoda/meteor,HugoRLopes/meteor,ndarilek/meteor,lassombra/meteor,msavin/meteor,alexbeletsky/meteor,shadedprofit/meteor,benstoltz/meteor,4commerce-technologies-AG/meteor,Puena/meteor,guazipi/meteor,queso/meteor,calvintychan/meteor,Puena/meteor,chinasb/meteor,Ken-Liu/meteor,kidaa/meteor,michielvanoeffelen/meteor,devgrok/meteor,lorensr/meteor,sclausen/meteor,meonkeys/meteor,mirstan/meteor,cbonami/meteor,AlexR1712/meteor,lieuwex/meteor,planet-training/meteor,brettle/meteor,yonas/meteor-freebsd,colinligertwood/meteor,yalexx/meteor,paul-barry-kenzan/meteor,GrimDerp/meteor,benstoltz/meteor,dfischer/meteor,karlito40/meteor,alphanso/meteor,joannekoong/meteor,aramk/meteor,codingang/meteor,meonkeys/meteor,chasertech/meteor,juansgaitan/meteor,cog-64/meteor,paul-barry-kenzan/meteor,chasertech/meteor,akintoey/meteor,ljack/meteor,mjmasn/meteor,wmkcc/meteor,lpinto93/meteor,judsonbsilva/meteor,Paulyoufu/meteor-1,yiliaofan/meteor,imanmafi/meteor,tdamsma/meteor,Jonekee/meteor,msavin/meteor,somallg/meteor,Jeremy017/meteor,vacjaliu/meteor,cherbst/meteor,youprofit/meteor,Eynaliyev/meteor,shadedprofit/meteor,lieuwex/meteor,Jeremy017/meteor,benstoltz/meteor,yonglehou/meteor,williambr/meteor,judsonbsilva/meteor,jdivy/meteor,katopz/meteor,sclausen/meteor,DCKT/meteor,Hansoft/meteor,SeanOceanHu/meteor,michielvanoeffelen/meteor,sunny-g/meteor,newswim/meteor,guazipi/meteor,D1no/meteor,aldeed/meteor,cherbst/meteor,shrop/meteor,guazipi/meteor,SeanOceanHu/meteor,jirengu/meteor,cbonami/meteor,jirengu/meteor,l0rd0fwar/meteor,steedos/meteor,Jonekee/meteor,whip112/meteor,planet-training/meteor,qscripter/meteor,oceanzou123/meteor,TechplexEngineer/meteor,michielvanoeffelen/meteor,Jonekee/meteor,kidaa/meteor,SeanOceanHu/meteor,PatrickMcGuinness/meteor,akintoey/meteor,dboyliao/meteor,planet-training/meteor,yonglehou/meteor,karlito40/meteor,modulexcite/meteor,yalexx/meteor,vjau/meteor,evilemon/meteor,meonkeys/meteor,AlexR1712/meteor,rozzzly/meteor,Paulyoufu/meteor-1,vjau/meteor,baiyunping333/meteor,shmiko/meteor,devgrok/meteor,l0rd0fwar/meteor,akintoey/meteor,TechplexEngineer/meteor,Hansoft/meteor,esteedqueen/meteor,planet-training/meteor,AnthonyAstige/meteor,Quicksteve/meteor,wmkcc/meteor,qscripter/meteor,Quicksteve/meteor,yyx990803/meteor,cherbst/meteor,jrudio/meteor,Ken-Liu/meteor,servel333/meteor,mauricionr/meteor,akintoey/meteor,modulexcite/meteor,queso/meteor,cbonami/meteor,allanalexandre/meteor,calvintychan/meteor,qscripter/meteor,Prithvi-A/meteor,queso/meteor,qscripter/meteor,servel333/meteor,msavin/meteor,ericterpstra/meteor,vacjaliu/meteor,DAB0mB/meteor,Puena/meteor,h200863057/meteor,mubassirhayat/meteor,lieuwex/meteor,akintoey/meteor,jagi/meteor,Ken-Liu/meteor,benjamn/meteor,henrypan/meteor,justintung/meteor,nuvipannu/meteor,h200863057/meteor,jirengu/meteor,hristaki/meteor,LWHTarena/meteor,queso/meteor,chiefninew/meteor,modulexcite/meteor,jrudio/meteor,sitexa/meteor,yanisIk/meteor,4commerce-technologies-AG/meteor,brettle/meteor,skarekrow/meteor,Jeremy017/meteor,cherbst/meteor,aramk/meteor,joannekoong/meteor,jenalgit/meteor,meteor-velocity/meteor,lassombra/meteor,emmerge/meteor,alphanso/meteor,baiyunping333/meteor,AnjirHossain/meteor,ljack/meteor,esteedqueen/meteor,pandeysoni/meteor,lorensr/meteor,esteedqueen/meteor,Hansoft/meteor,mirstan/meteor,kengchau/meteor,baysao/meteor,brdtrpp/meteor,deanius/meteor,judsonbsilva/meteor,udhayam/meteor,ljack/meteor,4commerce-technologies-AG/meteor,nuvipannu/meteor,meonkeys/meteor,rozzzly/meteor,steedos/meteor,meteor-velocity/meteor,AnjirHossain/meteor,johnthepink/meteor,luohuazju/meteor,kengchau/meteor,jdivy/meteor,Prithvi-A/meteor,devgrok/meteor,oceanzou123/meteor,wmkcc/meteor,wmkcc/meteor,cog-64/meteor,daslicht/meteor,emmerge/meteor,jg3526/meteor,yiliaofan/meteor,sdeveloper/meteor,devgrok/meteor,fashionsun/meteor,dandv/meteor,pandeysoni/meteor,fashionsun/meteor,joannekoong/meteor,iman-mafi/meteor,qscripter/meteor,dandv/meteor,jdivy/meteor,jagi/meteor,Hansoft/meteor,dandv/meteor,ashwathgovind/meteor,benstoltz/meteor,vjau/meteor,aldeed/meteor,chiefninew/meteor,PatrickMcGuinness/meteor,TechplexEngineer/meteor,cog-64/meteor,dev-bobsong/meteor,yonas/meteor-freebsd,msavin/meteor,joannekoong/meteor,akintoey/meteor,shmiko/meteor,yonglehou/meteor,pjump/meteor,Eynaliyev/meteor,evilemon/meteor,codedogfish/meteor,sitexa/meteor,DAB0mB/meteor,TechplexEngineer/meteor,dboyliao/meteor,whip112/meteor,daslicht/meteor,Prithvi-A/meteor,Urigo/meteor,neotim/meteor,katopz/meteor,rabbyalone/meteor,brettle/meteor,imanmafi/meteor,D1no/meteor,h200863057/meteor,sunny-g/meteor,fashionsun/meteor,daltonrenaldo/meteor,DAB0mB/meteor,luohuazju/meteor,allanalexandre/meteor,daslicht/meteor,LWHTarena/meteor,henrypan/meteor,PatrickMcGuinness/meteor,sitexa/meteor,msavin/meteor,codedogfish/meteor,benjamn/meteor,jirengu/meteor,Ken-Liu/meteor,AnthonyAstige/meteor,nuvipannu/meteor,EduShareOntario/meteor,sitexa/meteor,mubassirhayat/meteor,juansgaitan/meteor,zdd910/meteor,chengxiaole/meteor,dboyliao/meteor,luohuazju/meteor,katopz/meteor,yanisIk/meteor,shrop/meteor,sitexa/meteor,baiyunping333/meteor,AlexR1712/meteor,Jonekee/meteor,kengchau/meteor,IveWong/meteor,Hansoft/meteor,katopz/meteor,ashwathgovind/meteor,yanisIk/meteor,michielvanoeffelen/meteor,ndarilek/meteor,somallg/meteor,jg3526/meteor,jdivy/meteor,chengxiaole/meteor,bhargav175/meteor,ericterpstra/meteor,devgrok/meteor,Jeremy017/meteor,brettle/meteor,colinligertwood/meteor,yinhe007/meteor,meteor-velocity/meteor,kengchau/meteor,Paulyoufu/meteor-1,newswim/meteor,yanisIk/meteor,luohuazju/meteor,iman-mafi/meteor,DCKT/meteor,wmkcc/meteor,yyx990803/meteor,aramk/meteor,HugoRLopes/meteor,evilemon/meteor,ashwathgovind/meteor,benjamn/meteor,jenalgit/meteor,lieuwex/meteor,karlito40/meteor,Profab/meteor,imanmafi/meteor,chinasb/meteor,yyx990803/meteor,Hansoft/meteor,newswim/meteor,pandeysoni/meteor,JesseQin/meteor,skarekrow/meteor,saisai/meteor,jg3526/meteor,daltonrenaldo/meteor,Theviajerock/meteor,nuvipannu/meteor,kidaa/meteor,Paulyoufu/meteor-1,lieuwex/meteor,mjmasn/meteor,pjump/meteor,servel333/meteor,lorensr/meteor,TribeMedia/meteor,juansgaitan/meteor,papimomi/meteor,JesseQin/meteor,Urigo/meteor,lawrenceAIO/meteor,Urigo/meteor,msavin/meteor,D1no/meteor,deanius/meteor,codingang/meteor,Paulyoufu/meteor-1,alexbeletsky/meteor,jirengu/meteor,oceanzou123/meteor,kencheung/meteor,luohuazju/meteor,tdamsma/meteor,mubassirhayat/meteor,elkingtonmcb/meteor,planet-training/meteor,shrop/meteor,cbonami/meteor,pandeysoni/meteor,h200863057/meteor,kengchau/meteor,eluck/meteor,mauricionr/meteor,jg3526/meteor,youprofit/meteor,kencheung/meteor,dboyliao/meteor,cherbst/meteor,stevenliuit/meteor,DCKT/meteor,Paulyoufu/meteor-1,yyx990803/meteor,elkingtonmcb/meteor,ndarilek/meteor,allanalexandre/meteor,AlexR1712/meteor,vacjaliu/meteor,youprofit/meteor,johnthepink/meteor,yinhe007/meteor,elkingtonmcb/meteor,johnthepink/meteor,Jeremy017/meteor,mjmasn/meteor,yalexx/meteor,mubassirhayat/meteor,IveWong/meteor,aleclarson/meteor,lawrenceAIO/meteor,youprofit/meteor,ndarilek/meteor,codingang/meteor,paul-barry-kenzan/meteor,aldeed/meteor,GrimDerp/meteor,aramk/meteor,evilemon/meteor,queso/meteor,codingang/meteor,namho102/meteor,esteedqueen/meteor,steedos/meteor,SeanOceanHu/meteor,DCKT/meteor,lorensr/meteor,shmiko/meteor,Quicksteve/meteor,allanalexandre/meteor,sitexa/meteor,chiefninew/meteor,l0rd0fwar/meteor,judsonbsilva/meteor,chmac/meteor,deanius/meteor,AlexR1712/meteor,AnthonyAstige/meteor,cbonami/meteor,sclausen/meteor,codedogfish/meteor,vjau/meteor,alexbeletsky/meteor,emmerge/meteor,Jonekee/meteor,framewr/meteor,HugoRLopes/meteor,framewr/meteor | ---
+++
@@ -1,6 +1,6 @@
Package.describe({
summary: "The Meteor command-line tool",
- version: '1.0.27-rc0'
+ version: '1.0.27-rc1'
});
Package.includeTool(); |
d55b8a04a1618e570c0bc3f3f266a2c1a96f860a | static/scripts/teamOverview.js | static/scripts/teamOverview.js | $(document).ready(() => {
console.log('event bla');
$('.section-teamInvitations a').click(function handler(e) {
e.stopPropagation();
e.preventDefault();
const id = $(this).parents('.sc-card-wrapper').data('id');
console.log(id, $(this).parents('.sc-card-wrapper'));
$.ajax({
url: `/teams/invitation/accept/${id}`,
method: 'GET',
}).done(() => {
$.showNotification('Einladung erfolgreich angenommen', 'success', true);
location.reload();
}).fail(() => {
$.showNotification('Problem beim Akzeptieren der Einladung', 'danger', true);
});
});
});
| $(document).ready(() => {
$('.section-teamInvitations a').click(function handler(e) {
e.stopPropagation();
e.preventDefault();
const id = $(this).parents('.sc-card-wrapper').data('id');
$.ajax({
url: `/teams/invitation/accept/${id}`,
method: 'GET',
}).done(() => {
$.showNotification('Einladung erfolgreich angenommen', 'success', true);
location.reload();
}).fail(() => {
$.showNotification('Problem beim Akzeptieren der Einladung', 'danger', true);
});
});
$('.btn-member').on('click', function (e) {
e.stopPropagation();
e.preventDefault();
let teamId = $(this).attr('data-id');
$.ajax({
url: "/teams/" + teamId + "/usersJson"
}).done(function (res) {
let $memberModal = $('.member-modal');
let teamMembers = 'Keine Teilnehmer';
let teamName = res.course.name;
if(res.course.userIds.length != 0) {
teamMembers = '<ol>';
res.course.userIds.forEach(member => {
if (member.displayName) {
teamMembers = teamMembers + '<li>' + member.displayName + '</li>';
} else {
teamMembers = teamMembers + '<li>' + member.firstName + ' ' + member.lastName + '</li>';
}
});
teamMembers = teamMembers + '</ol>';
}
populateModal($memberModal, '.modal-title', 'Mitglieder des Teams: '.concat(teamName));
populateModal($memberModal, '#member-modal-body', teamMembers);
$memberModal.appendTo('body').modal('show');
});
});
});
| Implement click handler for team card | Implement click handler for team card
| JavaScript | agpl-3.0 | schul-cloud/schulcloud-client,schul-cloud/schulcloud-client,schul-cloud/schulcloud-client | ---
+++
@@ -1,11 +1,9 @@
$(document).ready(() => {
- console.log('event bla');
$('.section-teamInvitations a').click(function handler(e) {
e.stopPropagation();
e.preventDefault();
const id = $(this).parents('.sc-card-wrapper').data('id');
- console.log(id, $(this).parents('.sc-card-wrapper'));
$.ajax({
url: `/teams/invitation/accept/${id}`,
@@ -17,4 +15,35 @@
$.showNotification('Problem beim Akzeptieren der Einladung', 'danger', true);
});
});
+
+ $('.btn-member').on('click', function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ let teamId = $(this).attr('data-id');
+
+ $.ajax({
+ url: "/teams/" + teamId + "/usersJson"
+ }).done(function (res) {
+ let $memberModal = $('.member-modal');
+ let teamMembers = 'Keine Teilnehmer';
+ let teamName = res.course.name;
+ if(res.course.userIds.length != 0) {
+ teamMembers = '<ol>';
+ res.course.userIds.forEach(member => {
+ if (member.displayName) {
+ teamMembers = teamMembers + '<li>' + member.displayName + '</li>';
+ } else {
+ teamMembers = teamMembers + '<li>' + member.firstName + ' ' + member.lastName + '</li>';
+ }
+ });
+ teamMembers = teamMembers + '</ol>';
+ }
+
+ populateModal($memberModal, '.modal-title', 'Mitglieder des Teams: '.concat(teamName));
+ populateModal($memberModal, '#member-modal-body', teamMembers);
+
+ $memberModal.appendTo('body').modal('show');
+ });
+ });
}); |
1333b6206866a2e1a8f3c4ce038f97f046105701 | app/actions/index.js | app/actions/index.js | 'use strict';
export const TOGGLE_EVENT_MODAL = 'TOGGLE_EVENT_MODAL';
export const toggleEventModal = () => ({
type: TOGGLE_EVENT_MODAL
});
| 'use strict';
export const LOG_EVENT_MODAL_DATA = 'LOG_EVENT_MODAL_DATA';
export const TOGGLE_EVENT_MODAL = 'TOGGLE_EVENT_MODAL';
export const logEventModalData = (payload) => ({
type: LOG_EVENT_MODAL_DATA,
payload
});
export const toggleEventModal = () => ({
type: TOGGLE_EVENT_MODAL
});
| Include Redux action for managing Modal's data | feat: Include Redux action for managing Modal's data
| JavaScript | mit | IsenrichO/react-timeline,IsenrichO/react-timeline | ---
+++
@@ -1,7 +1,13 @@
'use strict';
+export const LOG_EVENT_MODAL_DATA = 'LOG_EVENT_MODAL_DATA';
export const TOGGLE_EVENT_MODAL = 'TOGGLE_EVENT_MODAL';
+
+export const logEventModalData = (payload) => ({
+ type: LOG_EVENT_MODAL_DATA,
+ payload
+});
export const toggleEventModal = () => ({
type: TOGGLE_EVENT_MODAL |
59f1f7b14072ce7757b43f16d87d83db718a5bfb | gulpfile.js/tasks/javascript.js | gulpfile.js/tasks/javascript.js | 'use strict';
// Modules
// ===============================================
var gulp = require('gulp'),
paths = require('../paths'),
gutil = require('gulp-util'),
browserSync = require("browser-sync"),
changed = require('gulp-changed');
// Сopy javascript to build folder
// ===============================================
gulp.task('js', function() {
return gulp.src(paths.js.input)
// Pass only unchanged files
.pipe(changed(paths.js.output, {extension: '.js'}))
// Save files
.pipe(gulp.dest(paths.js.output))
.on('end', function() {
gutil.log(gutil.colors.magenta('js'), ':', gutil.colors.green('finished'));
gutil.log(gutil.colors.magenta('browserSync'), ':', gutil.colors.green('reload'));
browserSync.reload();
})
}); | 'use strict';
// Modules
// ===============================================
var gulp = require('gulp'),
paths = require('../paths'),
gutil = require('gulp-util'),
browserSync = require("browser-sync"),
debug = require('gulp-debug'),
changed = require('gulp-changed');
// Сopy javascript to build folder
// ===============================================
gulp.task('js', function() {
return gulp.src(paths.js.input)
// Pass only unchanged files
.pipe(changed(paths.js.output, {extension: '.js'}))
.pipe(debug({title: 'js:'}))
// Save files
.pipe(gulp.dest(paths.js.output))
.on('end', function() {
gutil.log(gutil.colors.magenta('js'), ':', gutil.colors.green('finished'));
gutil.log(gutil.colors.magenta('browserSync'), ':', gutil.colors.green('reload'));
browserSync.reload();
})
}); | Add info in js task | Add info in js task
| JavaScript | mit | ilkome/frontend,ilkome/frontend,ilkome/front-end,ilkome/front-end | ---
+++
@@ -6,6 +6,7 @@
paths = require('../paths'),
gutil = require('gulp-util'),
browserSync = require("browser-sync"),
+ debug = require('gulp-debug'),
changed = require('gulp-changed');
@@ -17,6 +18,8 @@
// Pass only unchanged files
.pipe(changed(paths.js.output, {extension: '.js'}))
+ .pipe(debug({title: 'js:'}))
+
// Save files
.pipe(gulp.dest(paths.js.output))
|
1b8bbca8489cea7a697ccfac935604fb3c41f36b | build.js | build.js | ({
baseUrl: 'src',
name: '../node_modules/almond/almond',
include: ['quick-switcher'],
out: 'dist/quick-switcher.min.js',
wrap: {
startFile: '.almond/start.frag',
endFile: '.almond/end.frag',
},
paths: {
'text': '../node_modules/requirejs-text/text',
},
});
| ({
baseUrl: 'src',
name: '../node_modules/almond/almond',
include: ['quick-switcher'],
out: 'dist/quick-switcher.min.js',
wrap: {
startFile: '.almond/start.frag',
endFile: '.almond/end.frag',
},
paths: {
'text': '../node_modules/text/text',
},
});
| Fix path to requirejs-text plugin | Fix path to requirejs-text plugin
| JavaScript | mit | lightster/quick-switcher,lightster/quick-switcher,lightster/quick-switcher | ---
+++
@@ -8,6 +8,6 @@
endFile: '.almond/end.frag',
},
paths: {
- 'text': '../node_modules/requirejs-text/text',
+ 'text': '../node_modules/text/text',
},
}); |
60ee494ac85e0d3d15462b04ce27f3f6f7de2a5b | lib/ui/src/containers/preview.js | lib/ui/src/containers/preview.js | import React from 'react';
import { Preview } from '@storybook/components';
import memoize from 'memoizerific';
import { Consumer } from '../core/context';
const createPreviewActions = memoize(1)(api => ({
toggleFullscreen: () => api.toggleFullscreen(),
}));
const createProps = (api, layout, location, path, storyId, viewMode) => ({
api,
getElements: api.getElements,
actions: createPreviewActions(api),
options: layout,
path,
storyId,
viewMode,
});
const PreviewConnected = React.memo(props => (
<Consumer>
{({ state, api }) => (
<Preview
{...props}
{...createProps(
api,
state.layout,
state.location,
state.path,
state.storyId,
state.viewMode
)}
/>
)}
</Consumer>
));
PreviewConnected.displayName = 'PreviewConnected';
export default PreviewConnected;
| import React from 'react';
import { Preview } from '@storybook/components';
import memoize from 'memoizerific';
import { Consumer } from '../core/context';
const createPreviewActions = memoize(1)(api => ({
toggleFullscreen: () => api.toggleFullscreen(),
}));
const createProps = (api, layout, location, path, storyId, viewMode) => ({
api,
getElements: api.getElements,
actions: createPreviewActions(api),
options: layout,
location,
path,
storyId,
viewMode,
});
const PreviewConnected = React.memo(props => (
<Consumer>
{({ state, api }) => (
<Preview
{...props}
{...createProps(
api,
state.layout,
state.location,
state.path,
state.storyId,
state.viewMode
)}
/>
)}
</Consumer>
));
PreviewConnected.displayName = 'PreviewConnected';
export default PreviewConnected;
| FIX failure to pass location | FIX failure to pass location
| JavaScript | mit | kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook | ---
+++
@@ -12,6 +12,7 @@
getElements: api.getElements,
actions: createPreviewActions(api),
options: layout,
+ location,
path,
storyId,
viewMode, |
ce3a7bb211bbcadd3b2483d5a88c0f471003d06c | function-bind-polyfill.js | function-bind-polyfill.js | if ( ! Function.prototype.bind) {
Function.prototype.bind = function bind(that) { // .length is 1
var target = this;
if (typeof target != "function") {
throw new TypeError("Function.prototype.bind called on incompatible " + target);
}
var args = Array.prototype.slice.call(arguments, 1); // for normal call
var bound = function () {
if (this instanceof bound) {
var result = target.apply(
this,
args.concat(Array.prototype.slice.call(arguments))
);
if (Object(result) === result) {
return result;
}
return this;
} else {
return target.apply(
that,
args.concat(Array.prototype.slice.call(arguments))
);
}
};
if(target.prototype) {
var empty = function() { }
empty.prototype = target.prototype;
bound.prototype = new empty();
}
return bound;
};
}
| if ( ! Function.prototype.bind) {
Function.prototype.bind = function bind(that) { // .length is 1
var target = this;
if (typeof target !== "function") {
throw new TypeError("Function.prototype.bind called on incompatible " + target);
}
var args = Array.prototype.slice.call(arguments, 1); // for normal call
var bound = function () {
if (this instanceof bound) {
var result = target.apply(
this,
args.concat(Array.prototype.slice.call(arguments))
);
if (Object(result) === result) {
return result;
}
return this;
} else {
return target.apply(
that,
args.concat(Array.prototype.slice.call(arguments))
);
}
};
if(target.prototype) {
var Empty = function() {};
empty.prototype = target.prototype;
bound.prototype = new Empty();
}
return bound;
};
}
| Make jshint happy with new bind polyfill | Make jshint happy with new bind polyfill
| JavaScript | mit | princed/karma-chai-plugins | ---
+++
@@ -1,7 +1,7 @@
if ( ! Function.prototype.bind) {
Function.prototype.bind = function bind(that) { // .length is 1
var target = this;
- if (typeof target != "function") {
+ if (typeof target !== "function") {
throw new TypeError("Function.prototype.bind called on incompatible " + target);
}
var args = Array.prototype.slice.call(arguments, 1); // for normal call
@@ -28,9 +28,9 @@
};
if(target.prototype) {
- var empty = function() { }
+ var Empty = function() {};
empty.prototype = target.prototype;
- bound.prototype = new empty();
+ bound.prototype = new Empty();
}
return bound;
}; |
93b2510b8f6125eeaf9dbb5aa6e10cc5696c228c | webpack.build.config.js | webpack.build.config.js | const commonConfig = require("./webpack.common.config");
const nodeExternals = require("webpack-node-externals");
const merge = (...objs) => require("deepmerge").all(objs, {arrayMerge: (arr1, arr2) => arr1.concat(arr2) });
const combinedConfig = merge({}, commonConfig, {
output: {
path: "./dist",
libraryTarget: "var",
filename: "bundle.js"
},
devtool: "#source-map",
});
module.exports = combinedConfig;
| const path = require("path");
const commonConfig = require("./webpack.common.config");
const nodeExternals = require("webpack-node-externals");
const merge = (...objs) => require("deepmerge").all(objs, {arrayMerge: (arr1, arr2) => arr1.concat(arr2) });
const combinedConfig = merge({}, commonConfig, {
output: {
path: path.resolve(__dirname, "./dist"),
libraryTarget: "var",
filename: "bundle.js"
},
devtool: "#source-map",
});
module.exports = combinedConfig;
| Fix absolute path requirement for output.path since webpack 2.3.0 | Fix absolute path requirement for output.path since webpack 2.3.0
| JavaScript | mit | aeinbu/webpack-application-template,aeinbu/webpack-application-template | ---
+++
@@ -1,10 +1,11 @@
+const path = require("path");
const commonConfig = require("./webpack.common.config");
const nodeExternals = require("webpack-node-externals");
const merge = (...objs) => require("deepmerge").all(objs, {arrayMerge: (arr1, arr2) => arr1.concat(arr2) });
const combinedConfig = merge({}, commonConfig, {
output: {
- path: "./dist",
+ path: path.resolve(__dirname, "./dist"),
libraryTarget: "var",
filename: "bundle.js"
}, |
dcd67ec9df7eeab92557e74aec127efb50a3a1ac | bin/babel-minify.js | bin/babel-minify.js | var code = '';
var replaceOptIndex = process.argv.indexOf('--replace');
if (replaceOptIndex !== -1) {
var replacements = [];
process.argv[replaceOptIndex + 1].split(',').forEach(function(record) {
var tmp = record.split(':');
var id = tmp[0];
var repl = tmp[1];
var member;
if (id.match(/\./)) {
tmp = id.split('.');
id = tmp[0];
member = tmp[1];
}
var type;
if (repl.match(/^\d/)) {
type = 'numericLiteral';
repl = parseInt(repl, 10);
if (isNaN(repl)) {
throw new Error('Error parsing number');
}
} else if (repl.match(/^(true|false)$/)) {
type = 'booleanLiteral';
} else if (repl.match(/^null$/)) {
type = 'nullLiteral';
} else {
type = 'identifier';
}
replacements.push({
identifierName: id,
member: member,
replacement: {
type: type,
value: repl,
},
});
});
}
process.stdin.on('data', function(d) {
code += d.toString('utf-8');
});
process.stdin.on('end', function() {
var res = require('../').compile(code, { replacements: replacements });
process.stdout.write(res.code);
});
| // TODO
| Remove bin (it's fb-specific api) | Remove bin (it's fb-specific api)
| JavaScript | mit | babel/babili,babel/babili,garyjN7/babili,garyjN7/babili,garyjN7/babili,babel/babili | ---
+++
@@ -1,49 +1 @@
-var code = '';
-
-var replaceOptIndex = process.argv.indexOf('--replace');
-if (replaceOptIndex !== -1) {
- var replacements = [];
- process.argv[replaceOptIndex + 1].split(',').forEach(function(record) {
- var tmp = record.split(':');
- var id = tmp[0];
- var repl = tmp[1];
- var member;
- if (id.match(/\./)) {
- tmp = id.split('.');
- id = tmp[0];
- member = tmp[1];
- }
- var type;
- if (repl.match(/^\d/)) {
- type = 'numericLiteral';
- repl = parseInt(repl, 10);
- if (isNaN(repl)) {
- throw new Error('Error parsing number');
- }
- } else if (repl.match(/^(true|false)$/)) {
- type = 'booleanLiteral';
- } else if (repl.match(/^null$/)) {
- type = 'nullLiteral';
- } else {
- type = 'identifier';
- }
-
- replacements.push({
- identifierName: id,
- member: member,
- replacement: {
- type: type,
- value: repl,
- },
- });
- });
-}
-
-process.stdin.on('data', function(d) {
- code += d.toString('utf-8');
-});
-
-process.stdin.on('end', function() {
- var res = require('../').compile(code, { replacements: replacements });
- process.stdout.write(res.code);
-});
+// TODO |
612a0782d71884c1f43e53083d2e02d3212a88ca | config/ember-try.js | config/ember-try.js | module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-1.10',
dependencies: {
ember: '~1.10.0'
}
},
{
name: 'ember-1.11',
dependencies: {
ember: '~1.11.0'
}
},
{
name: 'ember-1.12',
dependencies: {
ember: '~1.12.0'
}
},
{
name: 'ember-1.13',
dependencies: {
ember: '~1.13.0'
}
},
{
name: 'ember-release',
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
}
},
{
name: 'ember-beta',
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
}
},
{
name: 'ember-canary',
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
}
}
]
};
| module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-1.10',
dependencies: {
ember: '~1.10.0'
}
},
{
name: 'ember-1.11',
dependencies: {
ember: '~1.11.0'
}
},
{
name: 'ember-1.12',
dependencies: {
ember: '~1.12.0'
}
},
{
name: 'ember-1.13',
dependencies: {
ember: '~1.13.0'
}
},
{
name: 'ember-2.0',
dependencies: {
ember: '~2.0.0'
}
},
{
name: 'ember-2.1',
dependencies: {
ember: '~2.1.0'
}
},
{
name: 'ember-release',
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
}
},
{
name: 'ember-beta',
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
}
},
{
name: 'ember-canary',
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
}
}
]
};
| Test against ember 2.0.x and 2.1.x in CI | Test against ember 2.0.x and 2.1.x in CI
| JavaScript | mit | mike-north/ember-load,mike-north/ember-load,mike-north/ember-load | ---
+++
@@ -29,6 +29,18 @@
}
},
{
+ name: 'ember-2.0',
+ dependencies: {
+ ember: '~2.0.0'
+ }
+ },
+ {
+ name: 'ember-2.1',
+ dependencies: {
+ ember: '~2.1.0'
+ }
+ },
+ {
name: 'ember-release',
dependencies: {
'ember': 'components/ember#release' |
4ac00c206641644670113cee3dff506bd9b5ece6 | bufferjs/indexOf.js | bufferjs/indexOf.js | /*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/
(function () {
"use strict";
/**
* A naiive 'Buffer.indexOf' function. Requires both the
* needle and haystack to be Buffer instances.
*/
function indexOf(haystack, needle, i) {
if (!Buffer.isBuffer(needle)) needle = new Buffer(needle);
if (typeof i === 'undefined') i = 0;
var l = haystack.length - needle.length + 1;
while (i<l) {
var good = true;
for (var j=0, n=needle.length; j<n; j++) {
if (haystack.get(i+j) !== needle.get(j)) {
good = false;
break;
}
}
if (good) return i;
i++;
}
return -1;
}
if (!Buffer.indexOf) {
Buffer.indexOf = indexOf;
}
if (!Buffer.prototype.indexOf) {
Buffer.prototype.indexOf = function(needle, i) {
return Buffer.indexOf(this, needle, i);
};
}
})();
| /*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/
(function () {
"use strict";
/**
* A naiive 'Buffer.indexOf' function. Requires both the
* needle and haystack to be Buffer instances.
*/
function indexOf(haystack, needle, i) {
if (!Buffer.isBuffer(needle)) needle = new Buffer(needle);
if (typeof i === 'undefined') i = 0;
var l = haystack.length - needle.length + 1;
while (i<l) {
var good = true;
for (var j=0, n=needle.length; j<n; j++) {
if (haystack[i+j] !== needle[j]) {
good = false;
break;
}
}
if (good) return i;
i++;
}
return -1;
}
if (!Buffer.indexOf) {
Buffer.indexOf = indexOf;
}
if (!Buffer.prototype.indexOf) {
Buffer.prototype.indexOf = function(needle, i) {
return Buffer.indexOf(this, needle, i);
};
}
})();
| Use array index instead of Buffer.get | Use array index instead of Buffer.get
Buffer.get was depracted in 2013 [1] and removed entirely in
Node 6 [2].
Closes #13.
[1] https://github.com/nodejs/node/issues/4587
[2] https://github.com/nodejs/node/wiki/Breaking-changes-between-v5-and-v6#buffer
| JavaScript | mit | coolaj86/node-bufferjs | ---
+++
@@ -13,7 +13,7 @@
while (i<l) {
var good = true;
for (var j=0, n=needle.length; j<n; j++) {
- if (haystack.get(i+j) !== needle.get(j)) {
+ if (haystack[i+j] !== needle[j]) {
good = false;
break;
} |
1782ff515a8d4ddd1fcad495cadb9ce27eba361f | test/resources/BadConfigSuite/config.js | test/resources/BadConfigSuite/config.js | module.exports = {
build: function(promise, promiseTrigger) {
setTimeout(function() {
promise.reject(new Error('boom'));
}, 0);
return promise.promise;
}
}
| module.exports = {
build: function(promise) {
setTimeout(function() {
promise.reject(new Error('boom'));
}, 0);
return promise.promise;
}
}
| Remove obsolete promise trigger in test | Remove obsolete promise trigger in test
| JavaScript | agpl-3.0 | MattiSG/Watai,MattiSG/Watai | ---
+++
@@ -1,5 +1,5 @@
module.exports = {
- build: function(promise, promiseTrigger) {
+ build: function(promise) {
setTimeout(function() {
promise.reject(new Error('boom'));
}, 0); |
3ef6ecdaaf556dd67d82275883e0c9cd344e9fa8 | connectors/v2/odnoklassniki.js | connectors/v2/odnoklassniki.js | 'use strict';
/* global Connector */
Connector.playerSelector = 'body';
Connector.artistSelector = '.mus_player_artist';
Connector.trackSelector = '.mus_player_song';
Connector.isPlaying = function () {
return $('#topPanelMusicPlayerControl').hasClass('toolbar_music-play__active');
};
| 'use strict';
/* global Connector */
var INFO_CURRENT_TIME = 1;
var INFO_DURATION = 2;
Connector.playerSelector = 'body';
Connector.artistSelector = '.mus_player_artist';
Connector.trackSelector = '.mus_player_song';
Connector.getCurrentTime = function() {
return getTimeInfo(INFO_CURRENT_TIME);
};
Connector.getDuration = function() {
return getTimeInfo(INFO_DURATION);
};
Connector.isPlaying = function () {
return $('#topPanelMusicPlayerControl').hasClass('toolbar_music-play__active');
};
function getTimeInfo(field) {
var pattern = /(.+)\s\/\s(.+)/gi;
var songInfo = pattern.exec($('.mus_player_time').text());
if (songInfo) {
return Connector.stringToSeconds(songInfo[field]);
}
return 0;
}
| Add current time/duration processing to Odnoklassniki connector | Add current time/duration processing to Odnoklassniki connector
| JavaScript | mit | galeksandrp/web-scrobbler,alexesprit/web-scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,david-sabata/web-scrobbler,galeksandrp/web-scrobbler,alexesprit/web-scrobbler,Paszt/web-scrobbler,inverse/web-scrobbler,usdivad/web-scrobbler,carpet-berlin/web-scrobbler,ex47/web-scrobbler,ex47/web-scrobbler,usdivad/web-scrobbler,Paszt/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,inverse/web-scrobbler | ---
+++
@@ -1,6 +1,9 @@
'use strict';
/* global Connector */
+
+var INFO_CURRENT_TIME = 1;
+var INFO_DURATION = 2;
Connector.playerSelector = 'body';
@@ -8,6 +11,23 @@
Connector.trackSelector = '.mus_player_song';
+Connector.getCurrentTime = function() {
+ return getTimeInfo(INFO_CURRENT_TIME);
+};
+
+Connector.getDuration = function() {
+ return getTimeInfo(INFO_DURATION);
+};
+
Connector.isPlaying = function () {
return $('#topPanelMusicPlayerControl').hasClass('toolbar_music-play__active');
};
+
+function getTimeInfo(field) {
+ var pattern = /(.+)\s\/\s(.+)/gi;
+ var songInfo = pattern.exec($('.mus_player_time').text());
+ if (songInfo) {
+ return Connector.stringToSeconds(songInfo[field]);
+ }
+ return 0;
+} |
70e12c9f72267b70cf19d39913431a3a1315ec3d | app/Config.js | app/Config.js | 'use strict';
module.exports = Config;
Config.$inject = ['$stateProvider', '$urlRouterProvider', '$anchorScrollProvider'];
function Config($stateProvider, $urlRouterProvider, $anchorScrollProvider) {
$anchorScrollProvider.disableAutoScrolling();
$urlRouterProvider.otherwise('/dashboard/profile');
$stateProvider
.state('profile', {
url: '/dashboard/profile',
controller: 'ProfileController as vm',
templateUrl: 'templates/profile.html'
})
.state('settings', {
url: '/dashboard/settings',
controller: 'SettingsController as vm',
templateUrl: 'templates/settings.html'
})
.state('password', {
url: '/dashboard/settings/password',
controller: 'PasswordController as vm',
templateUrl: 'templates/password.html'
})
.state('email', {
url: '/dashboard/settings/email',
controller: 'EmailController as vm',
templateUrl: 'templates/email.html'
})
.state('messages', {
url: '/dashboard/messages',
controller: 'MessagesController as vm',
templateUrl: 'templates/messages.html'
})
;
} | 'use strict';
module.exports = Config;
Config.$inject = ['$stateProvider', '$urlRouterProvider', '$uiViewScrollProvider'];
function Config($stateProvider, $urlRouterProvider, $uiViewScrollProvider) {
$uiViewScrollProvider.useAnchorScroll();
$urlRouterProvider.otherwise('/dashboard/profile');
$stateProvider
.state('profile', {
url: '/dashboard/profile',
controller: 'ProfileController as vm',
templateUrl: 'templates/profile.html',
deepStateRedirect: true
})
.state('settings', {
url: '/dashboard/settings',
controller: 'SettingsController as vm',
templateUrl: 'templates/settings.html',
deepStateRedirect: true
})
.state('password', {
url: '/dashboard/settings/password',
controller: 'PasswordController as vm',
templateUrl: 'templates/password.html'
})
.state('email', {
url: '/dashboard/settings/email',
controller: 'EmailController as vm',
templateUrl: 'templates/email.html'
})
.state('messages', {
url: '/dashboard/messages',
controller: 'MessagesController as vm',
templateUrl: 'templates/messages.html',
deepStateRedirect: true
})
;
} | Fix the dumb scrolling issue | Fix the dumb scrolling issue
| JavaScript | mit | failpunk/angular-playground,failpunk/angular-playground | ---
+++
@@ -2,11 +2,11 @@
module.exports = Config;
-Config.$inject = ['$stateProvider', '$urlRouterProvider', '$anchorScrollProvider'];
+Config.$inject = ['$stateProvider', '$urlRouterProvider', '$uiViewScrollProvider'];
-function Config($stateProvider, $urlRouterProvider, $anchorScrollProvider) {
+function Config($stateProvider, $urlRouterProvider, $uiViewScrollProvider) {
- $anchorScrollProvider.disableAutoScrolling();
+ $uiViewScrollProvider.useAnchorScroll();
$urlRouterProvider.otherwise('/dashboard/profile');
@@ -14,12 +14,14 @@
.state('profile', {
url: '/dashboard/profile',
controller: 'ProfileController as vm',
- templateUrl: 'templates/profile.html'
+ templateUrl: 'templates/profile.html',
+ deepStateRedirect: true
})
.state('settings', {
url: '/dashboard/settings',
controller: 'SettingsController as vm',
- templateUrl: 'templates/settings.html'
+ templateUrl: 'templates/settings.html',
+ deepStateRedirect: true
})
.state('password', {
url: '/dashboard/settings/password',
@@ -34,7 +36,8 @@
.state('messages', {
url: '/dashboard/messages',
controller: 'MessagesController as vm',
- templateUrl: 'templates/messages.html'
+ templateUrl: 'templates/messages.html',
+ deepStateRedirect: true
})
;
} |
a3403a51a21ceade309af191278215c4c5244e69 | app/components/gravatar-image.js | app/components/gravatar-image.js | import Ember from 'ember';
export default Ember.Component.extend({
size: 250,
email: '',
alt: '',
imgClass: '',
gravatarUrl: function() {
var email = this.get('email'),
size = this.get('size');
return '//www.gravatar.com/avatar/' + md5(email) + '?s=' + size;
}.property('email', 'size'),
altText: function() {
return this.get('alt') || this.get('email');
}.property('alt')
});
| import Ember from 'ember';
export default Ember.Component.extend({
size: 250,
email: '',
alt: '',
imgClass: '',
default: '',
gravatarUrl: function() {
var email = this.get('email'),
size = this.get('size'),
def = this.get('default');
return '//www.gravatar.com/avatar/' + md5(email) + '?s=' + size + '&d=' + def;
}.property('email', 'size', 'default'),
altText: function() {
return this.get('alt') || this.get('email');
}.property('alt')
});
| Add property for default images. | Add property for default images.
| JavaScript | mit | johnotander/ember-cli-gravatar,johnotander/ember-cli-gravatar,nightsh/ember-cli-libravatar,nightsh/ember-cli-libravatar | ---
+++
@@ -5,13 +5,15 @@
email: '',
alt: '',
imgClass: '',
+ default: '',
gravatarUrl: function() {
var email = this.get('email'),
- size = this.get('size');
+ size = this.get('size'),
+ def = this.get('default');
- return '//www.gravatar.com/avatar/' + md5(email) + '?s=' + size;
- }.property('email', 'size'),
+ return '//www.gravatar.com/avatar/' + md5(email) + '?s=' + size + '&d=' + def;
+ }.property('email', 'size', 'default'),
altText: function() {
return this.get('alt') || this.get('email'); |
47c887ad3090b772440c049d63e9d867d03ea61e | bin/global.js | bin/global.js | #!/usr/bin/env node --harmony-async-await
const kamerbotchi = require('../index.js')
console.log('KamerBOTchi v'+require('../package.json').version)
console.log('Developed with <3 by Sander Laarhoven')
console.log('https://git.io/kamergotchi')
console.log('\nPlayer token is set to ' + process.argv[2])
kamerbotchi.setToken(process.argv[2])
kamerbotchi.init()
| #!/bin/sh
":" //# http://sambal.org/?p=1014 ; exec /usr/bin/env node --harmony-async-await "$0" "$@"
const kamerbotchi = require('../index.js')
console.log('KamerBOTchi v'+require('../package.json').version)
console.log('Developed with <3 by Sander Laarhoven')
console.log('https://git.io/kamergotchi')
console.log('\nPlayer token is set to ' + process.argv[2])
kamerbotchi.setToken(process.argv[2])
kamerbotchi.init()
| Fix shebang arguments for Ubuntu users. | Fix shebang arguments for Ubuntu users.
http://sambal.org/2014/02/passing-options-node-shebang-line/
| JavaScript | mit | lesander/kamergotchi-bot,lesander/kamergotchi-bot | ---
+++
@@ -1,4 +1,5 @@
-#!/usr/bin/env node --harmony-async-await
+#!/bin/sh
+":" //# http://sambal.org/?p=1014 ; exec /usr/bin/env node --harmony-async-await "$0" "$@"
const kamerbotchi = require('../index.js')
|
3302fe89cb1a30f54871e90ed177a1a8e8e832c7 | controllers.js | controllers.js | (function (angular){
'use strict';
angular.module('app')
.controller('counterController', counterController)
.controller('todoController', todoController)
counterController.$inject = []
todoController.$inject = []
function counterController(){
this.counter = 0;
this.add = function() {
this.counter >= 10 ? this.counter : this.counter ++;
}
this.sub = function(){
this.counter === 0 ? this.counter : this.counter --;
}
};
function todoController(){
this.tasks = [{name: "Brush Your Teeth", complete: true}, {name: "Tie Shoes", complete: false}];
this.newTask = '';
this.completed = 1;
this.total = this.tasks.length;
this.add = function(){
console.log(this.newTask)
this.tasks.push({name: this.newTask, complete: false});
this.total = this.tasks.length;
}.bind(this)
this.complete = function(taskIndex){
console.log(taskIndex);
this.tasks[taskIndex].complete = true;
this.
this.completed = this.tasks.reduce(function(p, n){
return n.complete === true ? p + 1 : p;
}, 0);
this.removeCompleted= function(){
};
}
}
})(window.angular);
| (function (angular){
'use strict';
angular.module('app')
.controller('counterController', counterController)
.controller('todoController', todoController)
counterController.$inject = []
todoController.$inject = []
function counterController(){
this.counter = 0;
this.add = function() {
this.counter >= 10 ? this.counter : this.counter ++;
}
this.sub = function(){
this.counter === 0 ? this.counter : this.counter --;
}
};
function todoController(){
this.tasks = [{name: "Brush Your Teeth", complete: true}, {name: "Tie Shoes", complete: false}];
this.newTask = '';
this.completed = 1;
this.total = this.tasks.length;
this.showCompleted = true
this.add = function(){
console.log(this.newTask)
this.tasks.push({name: this.newTask, complete: false});
this.newTask = ''
this.total = this.tasks.length;
}.bind(this)
this.complete = function(taskIndex){
console.log(taskIndex);
this.tasks[taskIndex].complete = true;
this.completed = this.tasks.reduce(function(p, n){
return n.complete === true ? p + 1 : p;
}, 0);
}
this.hideCompleted= function(){
showCompleted = false
};
}
})(window.angular);
| Fix input submit, now clear itself after submit | Fix input submit, now clear itself after submit
| JavaScript | mit | haworku/angular-todo,haworku/angular-todo | ---
+++
@@ -26,27 +26,28 @@
this.newTask = '';
this.completed = 1;
this.total = this.tasks.length;
+ this.showCompleted = true
+
this.add = function(){
console.log(this.newTask)
this.tasks.push({name: this.newTask, complete: false});
-
+ this.newTask = ''
this.total = this.tasks.length;
}.bind(this)
this.complete = function(taskIndex){
console.log(taskIndex);
this.tasks[taskIndex].complete = true;
- this.
+
this.completed = this.tasks.reduce(function(p, n){
return n.complete === true ? p + 1 : p;
}, 0);
+ }
- this.removeCompleted= function(){
-
+ this.hideCompleted= function(){
+ showCompleted = false
};
-
- }
}
|
2ea983793b5bb734954fa091be6a4579c4768203 | src/content_scripts/view/story_listener.js | src/content_scripts/view/story_listener.js | import $ from 'jquery'
import AnalyticsWrapper from "../utilities/analytics_wrapper";
export default (modal) => {
$(document).on('click', '.finish.button', function () {
chrome.runtime.sendMessage({ eventType: 'pop' });
modal.modal('show');
});
};
| import $ from 'jquery'
export default (modal) => {
$(document).on('click', '.finish.button', function () {
chrome.runtime.sendMessage({ eventType: 'pop' });
modal.modal('show');
});
};
| Revert "Missing import for AnalyticsWrapper" | Revert "Missing import for AnalyticsWrapper"
We stopped using AnalyticsWrapper and now send messages to the background instead
This reverts commit 0f6cd479b089319275d3f08e79c8e9ecbf96eb5e.
| JavaScript | isc | oliverswitzer/wwltw-for-pivotal-tracker,oliverswitzer/wwltw-for-pivotal-tracker | ---
+++
@@ -1,5 +1,4 @@
import $ from 'jquery'
-import AnalyticsWrapper from "../utilities/analytics_wrapper";
export default (modal) => {
$(document).on('click', '.finish.button', function () { |
40c6326cfd7a16f2643bf594d027a2b1dc4eda8f | api/services/Cron.js | api/services/Cron.js | // Cron.js - in api/services
"use strict";
const CronJob = require('cron').CronJob;
const _ = require('lodash');
const crons = [];
module.exports = {
start: () => {
sails.config.scientilla.crons.forEach(cron => {
crons.push(new CronJob(cron.time, onTick(cron), null, false, 'Europe/Rome'))
});
crons.forEach(cron => cron.start());
},
stop: () => {
crons.forEach(cron => cron.stop());
}
};
function onTick(cron) {
return async function () {
if (!cron.enabled) {
return;
}
sails.log.info('Cron ' + cron.name + ' started at ' + new Date().toISOString());
await GruntTaskRunner.run('cron:' + cron.name);
sails.log.info('Cron ' + cron.name + ' finished at ' + new Date().toISOString());
}
} | // Cron.js - in api/services
"use strict";
const CronJob = require('cron').CronJob;
const _ = require('lodash');
const crons = [];
module.exports = {
start: () => {
sails.config.scientilla.crons.forEach(cron => {
crons.push(new CronJob(cron.time, generateOnTick(cron), null, false, 'Europe/Rome'))
});
crons.forEach(cron => cron.start());
},
stop: () => {
crons.forEach(cron => cron.stop());
}
};
function generateOnTick(cron) {
return async function () {
if (!cron.enabled) {
return;
}
sails.log.info('Cron ' + cron.name + ' started at ' + new Date().toISOString());
try{
await GruntTaskRunner.run('cron:' + cron.name);
} catch(e) {
sails.log.debug(e);
}
sails.log.info('Cron ' + cron.name + ' finished at ' + new Date().toISOString());
}
} | Change name function generate on tick | Change name function generate on tick
| JavaScript | mit | scientilla/scientilla,scientilla/scientilla,scientilla/scientilla | ---
+++
@@ -9,7 +9,7 @@
module.exports = {
start: () => {
sails.config.scientilla.crons.forEach(cron => {
- crons.push(new CronJob(cron.time, onTick(cron), null, false, 'Europe/Rome'))
+ crons.push(new CronJob(cron.time, generateOnTick(cron), null, false, 'Europe/Rome'))
});
crons.forEach(cron => cron.start());
},
@@ -18,15 +18,18 @@
}
};
-function onTick(cron) {
+function generateOnTick(cron) {
return async function () {
if (!cron.enabled) {
return;
}
sails.log.info('Cron ' + cron.name + ' started at ' + new Date().toISOString());
-
- await GruntTaskRunner.run('cron:' + cron.name);
+ try{
+ await GruntTaskRunner.run('cron:' + cron.name);
+ } catch(e) {
+ sails.log.debug(e);
+ }
sails.log.info('Cron ' + cron.name + ' finished at ' + new Date().toISOString());
} |
141ac976ff38506cd68db5402d0a96fe0899abab | libs/cmd.js | libs/cmd.js | 'use strict';
const fs = require('fs');
var importCmd = () => {
let files = fs.readdirSync(__dirname+'/../cmds/');
let cmds = {};
for(var i in files) {
let ext = require(__dirname+'/../cmds/'+files[i]).cmds;
for(var index in ext) {
cmds[index] = ext[index];
}
}
return cmds;
};
module.exports = {
"import": importCmd
};
| 'use strict';
const fs = require('fs');
const remote = require('remote');
var getExtDir = () => {
return remote.app.getPath('userData')+'/cmds';
};
var importCmd = () => {
let cmds = {};
cmds = importInternal(cmds);
cmds = importExternal(cmds);
return cmds;
};
var importInternal = (cmds) => {
let files = fs.readdirSync(__dirname+'/../cmds/');
for(var i in files) {
let ext = require(__dirname+'/../cmds/'+files[i]).cmds;
for(var index in ext) {
cmds[index] = ext[index];
}
}
return cmds;
};
var importExternal = (cmds) => {
let files = fs.readdirSync(getExtDir());
files.splice(files.indexOf('.DS_Store'), 1);
for(var i in files) {
let ext = require(getExtDir()+'/test').cmds;
for(var index in ext) {
cmds[index] = ext[index];
}
}
return cmds;
};
module.exports = {
"getExtDir": getExtDir,
"import": importCmd,
};
| Allow injection of simple extensions | Allow injection of simple extensions
Allows to inject single file extensions with basic task.
| JavaScript | bsd-2-clause | de-luca/Pinata,de-luca/Pinata | ---
+++
@@ -1,10 +1,21 @@
'use strict';
const fs = require('fs');
+const remote = require('remote');
+
+var getExtDir = () => {
+ return remote.app.getPath('userData')+'/cmds';
+};
var importCmd = () => {
+ let cmds = {};
+ cmds = importInternal(cmds);
+ cmds = importExternal(cmds);
+ return cmds;
+};
+
+var importInternal = (cmds) => {
let files = fs.readdirSync(__dirname+'/../cmds/');
- let cmds = {};
for(var i in files) {
let ext = require(__dirname+'/../cmds/'+files[i]).cmds;
for(var index in ext) {
@@ -14,6 +25,19 @@
return cmds;
};
+var importExternal = (cmds) => {
+ let files = fs.readdirSync(getExtDir());
+ files.splice(files.indexOf('.DS_Store'), 1);
+ for(var i in files) {
+ let ext = require(getExtDir()+'/test').cmds;
+ for(var index in ext) {
+ cmds[index] = ext[index];
+ }
+ }
+ return cmds;
+};
+
module.exports = {
- "import": importCmd
+ "getExtDir": getExtDir,
+ "import": importCmd,
}; |
996398912fd327022bc934153cd58ee8b89e9393 | config/configuration.js | config/configuration.js | /**
* @file Defines the provider settings.
*
* Will set the path to Mongo, and applications id
* Most of the configuration can be done using system environment variables.
*/
// Load environment variables from .env file
var dotenv = require('dotenv');
dotenv.load();
// node_env can either be "development" or "production"
var node_env = process.env.NODE_ENV || "development";
// Port to run the app on. 8000 for development
// (Vagrant syncs this port)
// 80 for production
var default_port = 8000;
if(node_env === "production") {
default_port = 80;
}
// Exports configuration for use by app.js
module.exports = {
env: node_env,
port: process.env.PORT || default_port,
maxSize: process.env.MAX_SIZE || 50,
mongoUrl: process.env.MONGOLAB_URI,
redisUrl: process.env.REDISCLOUD_URL,
googleId: process.env.GOOGLE_DRIVE_ID,
googleSecret: process.env.GOOGLE_DRIVE_SECRET,
appId: process.env.GOOGLE_DRIVE_ANYFETCH_ID,
appSecret: process.env.GOOGLE_DRIVE_ANYFETCH_SECRET,
providerUrl: process.env.PROVIDER_URL,
testRefreshToken: process.env.GOOGLE_DRIVE_TEST_REFRESH_TOKEN
};
| /**
* @file Defines the provider settings.
*
* Will set the path to Mongo, and applications id
* Most of the configuration can be done using system environment variables.
*/
// Load environment variables from .env file
var dotenv = require('dotenv');
dotenv.load();
// node_env can either be "development" or "production"
var node_env = process.env.NODE_ENV || "development";
// Port to run the app on. 8000 for development
// (Vagrant syncs this port)
// 80 for production
var default_port = 8000;
if(node_env === "production") {
default_port = 80;
}
// Exports configuration for use by app.js
module.exports = {
env: node_env,
port: process.env.PORT || default_port,
maxSize: process.env.MAX_SIZE || 50,
mongoUrl: process.env.MONGOLAB_URI,
redisUrl: process.env.REDISCLOUD_URL,
googleId: process.env.GDRIVE_ID,
googleSecret: process.env.GDRIVE_SECRET,
appId: process.env.GDRIVE_ANYFETCH_ID,
appSecret: process.env.GDRIVE_ANYFETCH_SECRET,
providerUrl: process.env.PROVIDER_URL,
testRefreshToken: process.env.GDRIVE_TEST_REFRESH_TOKEN
};
| Use GDRIVE prefix in env vars | Use GDRIVE prefix in env vars
| JavaScript | mit | AnyFetch/gdrive-provider.anyfetch.com | ---
+++
@@ -29,13 +29,13 @@
mongoUrl: process.env.MONGOLAB_URI,
redisUrl: process.env.REDISCLOUD_URL,
- googleId: process.env.GOOGLE_DRIVE_ID,
- googleSecret: process.env.GOOGLE_DRIVE_SECRET,
+ googleId: process.env.GDRIVE_ID,
+ googleSecret: process.env.GDRIVE_SECRET,
- appId: process.env.GOOGLE_DRIVE_ANYFETCH_ID,
- appSecret: process.env.GOOGLE_DRIVE_ANYFETCH_SECRET,
+ appId: process.env.GDRIVE_ANYFETCH_ID,
+ appSecret: process.env.GDRIVE_ANYFETCH_SECRET,
providerUrl: process.env.PROVIDER_URL,
- testRefreshToken: process.env.GOOGLE_DRIVE_TEST_REFRESH_TOKEN
+ testRefreshToken: process.env.GDRIVE_TEST_REFRESH_TOKEN
}; |
65501f32f2266e0c6c6750c28218d5df5ad67bbd | swh/web/assets/src/bundles/webapp/index.js | swh/web/assets/src/bundles/webapp/index.js | /**
* Copyright (C) 2018 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
// webapp entrypoint bundle centralizing global custom stylesheets
// and utility js modules used in all swh-web applications
// explicitly import the vendors bundle
import '../vendors';
// global swh-web custom stylesheets
import './webapp.css';
import './breadcrumbs.css';
export * from './webapp-utils';
// utility js modules
export * from './code-highlighting';
export * from './readme-rendering';
export * from './pdf-rendering';
| /**
* Copyright (C) 2018 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
// webapp entrypoint bundle centralizing global custom stylesheets
// and utility js modules used in all swh-web applications
// explicitly import the vendors bundle
import '../vendors';
// global swh-web custom stylesheets
import './webapp.css';
import './breadcrumbs.css';
export * from './webapp-utils';
// utility js modules
export * from './code-highlighting';
export * from './readme-rendering';
export * from './pdf-rendering';
export * from './xss-filtering';
| Add missing filterXSS function export | assets/webapp: Add missing filterXSS function export
| JavaScript | agpl-3.0 | SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui | ---
+++
@@ -21,3 +21,4 @@
export * from './code-highlighting';
export * from './readme-rendering';
export * from './pdf-rendering';
+export * from './xss-filtering'; |
f37e42b6e9b33b2961239c52c58641eb959b9563 | app/js/mol.map.splash.js | app/js/mol.map.splash.js | mol.modules.map.splash = function(mol) {
mol.map.splash = {};
mol.map.splash.SplashEngine = mol.mvp.Engine.extend(
{
init: function(proxy, bus) {
this.proxy = proxy;
this.bus = bus;
},
/**
* Starts the MenuEngine. Note that the container parameter is
* ignored.
*/
start: function() {
this.display = new mol.map.splash.splashDisplay();
this.initDialog();
},
initDialog: function() {
this.display.dialog(
{
autoOpen: true,
width: "80%",
height: 500,
dialogClass: "mol-splash",
modal: true
}
);
$(this.display).width('98%');
}
}
);
mol.map.splash.splashDisplay = mol.mvp.View.extend(
{
init: function() {
var html = '' +
'<iframe class="mol-splash iframe_content" src="https://docs.google.com/document/pub?id=1vrttRdCz4YReWFq5qQmm4K6WmyWayiouEYrYtPrAyvY&embedded=true"></iframe>';
this._super(html);
this.iframe_content = $(this).find('.iframe_content');
}
}
);
};
| mol.modules.map.splash = function(mol) {
mol.map.splash = {};
mol.map.splash.SplashEngine = mol.mvp.Engine.extend(
{
init: function(proxy, bus) {
this.proxy = proxy;
this.bus = bus;
},
/**
* Starts the MenuEngine. Note that the container parameter is
* ignored.
*/
start: function() {
this.display = new mol.map.splash.splashDisplay();
this.initDialog();
},
initDialog: function() {
this.display.dialog(
{
autoOpen: true,
width: 800,
height: 500,
dialogClass: "mol-splash",
modal: true
}
);
$(this.display).width('98%');
}
}
);
mol.map.splash.splashDisplay = mol.mvp.View.extend(
{
init: function() {
var html = '' +
'<iframe class="mol-splash iframe_content" src="https://docs.google.com/document/pub?id=1vrttRdCz4YReWFq5qQmm4K6WmyWayiouEYrYtPrAyvY&embedded=true"></iframe>';
this._super(html);
this.iframe_content = $(this).find('.iframe_content');
}
}
);
};
| Fix Splash width to 800 px. | Fix Splash width to 800 px.
| JavaScript | bsd-3-clause | MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL,MapofLife/MOL | ---
+++
@@ -21,7 +21,7 @@
this.display.dialog(
{
autoOpen: true,
- width: "80%",
+ width: 800,
height: 500,
dialogClass: "mol-splash",
modal: true |
ba850707c1f8031717bb75065c23345665328977 | app/lib/firebase_auth.js | app/lib/firebase_auth.js | import EmberObject from "@ember/object";
import config from "fakturama/config/environment";
const { APP: { FIREBASE, FIREBASE: { projectId } } } = config;
const { firebase } = window;
const app = firebase.initializeApp(FIREBASE);
function delegateMethod(name) {
return function() {
return this.get("content")[name](...arguments);
};
}
export default EmberObject.extend({
init() {
this._super(...arguments);
this.set("content", app.auth(projectId));
this.set("googleProvider", new firebase.auth.GoogleAuthProvider());
},
onAuthStateChanged: delegateMethod("onAuthStateChanged"),
signInAnonymously: delegateMethod("signInAnonymously"),
signInWithGoogle() {
const content = this.get("content")
const provider = this.get("googleProvider")
provider.addScope("email");
return content.signInWithPopup(provider)
},
signOut: delegateMethod("signOut")
});
| import EmberObject from "@ember/object";
import config from "fakturama/config/environment";
const {
APP: {
FIREBASE,
FIREBASE: { projectId }
}
} = config;
const { firebase } = window;
const app = firebase.initializeApp(FIREBASE);
function delegateMethod(name) {
return function() {
return this.get("content")[name](...arguments);
};
}
export default EmberObject.extend({
init() {
this._super(...arguments);
this.set("content", app.auth(projectId));
this.set("googleProvider", new firebase.auth.GoogleAuthProvider());
},
onAuthStateChanged: delegateMethod("onAuthStateChanged"),
signInAnonymously: delegateMethod("signInAnonymously"),
signInWithGoogle() {
const content = this.get("content");
const provider = this.get("googleProvider");
provider.addScope("email");
provider.addScope("profile");
return content.signInWithPopup(provider);
},
signOut: delegateMethod("signOut")
});
| Add profile scope to google auth | Add profile scope to google auth
| JavaScript | mit | cowbell/fakturama,cowbell/fakturama | ---
+++
@@ -2,7 +2,12 @@
import config from "fakturama/config/environment";
-const { APP: { FIREBASE, FIREBASE: { projectId } } } = config;
+const {
+ APP: {
+ FIREBASE,
+ FIREBASE: { projectId }
+ }
+} = config;
const { firebase } = window;
const app = firebase.initializeApp(FIREBASE);
@@ -22,10 +27,11 @@
onAuthStateChanged: delegateMethod("onAuthStateChanged"),
signInAnonymously: delegateMethod("signInAnonymously"),
signInWithGoogle() {
- const content = this.get("content")
- const provider = this.get("googleProvider")
+ const content = this.get("content");
+ const provider = this.get("googleProvider");
provider.addScope("email");
- return content.signInWithPopup(provider)
+ provider.addScope("profile");
+ return content.signInWithPopup(provider);
},
signOut: delegateMethod("signOut")
}); |
c76b85a5f14d036433ceede9de69cf041a64d2bc | public/js/boot.js | public/js/boot.js | var bootState = {
create: function () {
//Initial GameSystem (Arcade, P2, Ninja)
game.physics.startSystem(Phaser.Physics.ARCADE);
//Initial Load State
game.state.start('load');
}
};
| var bootState = {
create: function () {
//Initial GameSystem (Arcade, P2, Ninja)
game.physics.startSystem(Phaser.Physics.P2JS);
//Initial Load State
game.state.start('load');
}
};
| Change physics engine to P2 | Change physics engine to P2
| JavaScript | mit | bunchopunch/ludum-38,bunchopunch/ludum-38 | ---
+++
@@ -3,7 +3,7 @@
create: function () {
//Initial GameSystem (Arcade, P2, Ninja)
- game.physics.startSystem(Phaser.Physics.ARCADE);
+ game.physics.startSystem(Phaser.Physics.P2JS);
//Initial Load State
game.state.start('load'); |
1515fe0fbfb7dfb39f602da4d1d9051069ee8454 | src/languages/css.js | src/languages/css.js | define(function() {
// Export
return function(Prism) {
Prism.languages.css = {
'comment': /\/\*[\w\W]*?\*\//g,
'atrule': /@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi,
'url': /url\((["']?).*?\1\)/gi,
'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g,
'property': /(\b|\B)[a-z-]+(?=\s*:)/ig,
'string': /("|')(\\?.)*?\1/g,
'important': /\B!important\b/gi,
'ignore': /&(lt|gt|amp);/gi,
'punctuation': /[\{\};:]/g
};
if (Prism.languages.markup) {
Prism.languages.insertBefore('markup', 'tag', {
'style': {
pattern: /(<|<)style[\w\W]*?(>|>)[\w\W]*?(<|<)\/style(>|>)/ig,
inside: {
'tag': {
pattern: /(<|<)style[\w\W]*?(>|>)|(<|<)\/style(>|>)/ig,
inside: Prism.languages.markup.tag.inside
},
rest: Prism.languages.css
}
}
});
}
};
});
| define(function() {
return function(Prism) {
Prism.languages.css = {
'comment': /\/\*[\w\W]*?\*\//g,
'atrule': /@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi,
'url': /url\((["']?).*?\1\)/gi,
'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g,
'property': /(\b|\B)[a-z-]+(?=\s*:)/ig,
'string': /("|')(\\?.)*?\1/g,
'important': /\B!important\b/gi,
'ignore': /&(lt|gt|amp);/gi,
'punctuation': /[\{\};:]/g
};
if (Prism.languages.markup) {
Prism.languages.insertBefore('markup', 'tag', {
'style': {
pattern: /(<|<)style[\w\W]*?(>|>)[\w\W]*?(<|<)\/style(>|>)/ig,
inside: {
'tag': {
pattern: /(<|<)style[\w\W]*?(>|>)|(<|<)\/style(>|>)/ig,
inside: Prism.languages.markup.tag.inside
},
rest: Prism.languages.css
}
}
});
}
};
});
| Fix indentation of the CSS grammar | Fix indentation of the CSS grammar
| JavaScript | mit | apiaryio/prism | ---
+++
@@ -1,35 +1,30 @@
define(function() {
+ return function(Prism) {
+ Prism.languages.css = {
+ 'comment': /\/\*[\w\W]*?\*\//g,
+ 'atrule': /@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi,
+ 'url': /url\((["']?).*?\1\)/gi,
+ 'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g,
+ 'property': /(\b|\B)[a-z-]+(?=\s*:)/ig,
+ 'string': /("|')(\\?.)*?\1/g,
+ 'important': /\B!important\b/gi,
+ 'ignore': /&(lt|gt|amp);/gi,
+ 'punctuation': /[\{\};:]/g
+ };
- // Export
- return function(Prism) {
-
- Prism.languages.css = {
- 'comment': /\/\*[\w\W]*?\*\//g,
- 'atrule': /@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi,
- 'url': /url\((["']?).*?\1\)/gi,
- 'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g,
- 'property': /(\b|\B)[a-z-]+(?=\s*:)/ig,
- 'string': /("|')(\\?.)*?\1/g,
- 'important': /\B!important\b/gi,
- 'ignore': /&(lt|gt|amp);/gi,
- 'punctuation': /[\{\};:]/g
- };
-
- if (Prism.languages.markup) {
- Prism.languages.insertBefore('markup', 'tag', {
- 'style': {
- pattern: /(<|<)style[\w\W]*?(>|>)[\w\W]*?(<|<)\/style(>|>)/ig,
- inside: {
- 'tag': {
- pattern: /(<|<)style[\w\W]*?(>|>)|(<|<)\/style(>|>)/ig,
- inside: Prism.languages.markup.tag.inside
- },
- rest: Prism.languages.css
- }
- }
- });
- }
-
+ if (Prism.languages.markup) {
+ Prism.languages.insertBefore('markup', 'tag', {
+ 'style': {
+ pattern: /(<|<)style[\w\W]*?(>|>)[\w\W]*?(<|<)\/style(>|>)/ig,
+ inside: {
+ 'tag': {
+ pattern: /(<|<)style[\w\W]*?(>|>)|(<|<)\/style(>|>)/ig,
+ inside: Prism.languages.markup.tag.inside
+ },
+ rest: Prism.languages.css
+ }
+ }
+ });
+ }
};
-
}); |
c0ca6b23053d338fd94f20a61c49b46634abb1fb | api/index.js | api/index.js | module.exports = function createApi (osm) {
return {
getMap: require('./get_map.js')(osm),
getElement: require('./get_element.js')(osm),
createElement: require('./create_element.js')(osm),
createChangeset: require('./create_changeset.js')(osm),
closeChangeset: require('./close_changeset.js')(osm),
getChanges: require('./get_changes.js')(osm),
putChanges: require('./put_changes.js')(osm),
osm: osm
}
}
| module.exports = function createApi (osm) {
return {
getMap: require('./get_map.js')(osm),
getElement: require('./get_element.js')(osm),
createElement: require('./create_element.js')(osm),
createChangeset: require('./create_changeset.js')(osm),
closeChangeset: require('./close_changeset.js')(osm),
getChanges: require('./get_changes.js')(osm),
putChanges: require('./put_changes.js')(osm)
}
}
| Remove osm export from API | Remove osm export from API
| JavaScript | bsd-2-clause | substack/osm-p2p-server,digidem/osm-p2p-server | ---
+++
@@ -6,7 +6,6 @@
createChangeset: require('./create_changeset.js')(osm),
closeChangeset: require('./close_changeset.js')(osm),
getChanges: require('./get_changes.js')(osm),
- putChanges: require('./put_changes.js')(osm),
- osm: osm
+ putChanges: require('./put_changes.js')(osm)
}
} |
c8c9d34c76811176d6c719527a69ec456005c0d2 | app/index.js | app/index.js | const canvas = document.getElementById('pong');
console.log('canvas', canvas);
| const canvas = document.getElementById('pong');
const context = canvas.getContext('2d');
const COLORS = {
BACKGROUND: '#000',
PROPS: '#FFF',
};
context.fillStyle = COLORS.BACKGROUND;
context.fillRect(0, 0, canvas.width, canvas.height);
const Player = function() {};
Player.prototype.draw = function(positionX, positionY) {
context.beginPath();
context.rect(positionX, positionY, 10, 20);
context.fillStyle = COLORS.PROPS;
context.fill();
}
const playerOne = new Player();
const playerTwo = new Player();
playerOne.draw(5, 50);
playerTwo.draw(285, 50);
| Add basic drawing functionality to test canvas is functional and behaving correctly | Add basic drawing functionality to test canvas is functional and behaving correctly
| JavaScript | mit | oliverbenns/pong,oliverbenns/pong | ---
+++
@@ -1,4 +1,25 @@
const canvas = document.getElementById('pong');
+const context = canvas.getContext('2d');
-console.log('canvas', canvas);
+const COLORS = {
+ BACKGROUND: '#000',
+ PROPS: '#FFF',
+};
+context.fillStyle = COLORS.BACKGROUND;
+context.fillRect(0, 0, canvas.width, canvas.height);
+
+const Player = function() {};
+
+Player.prototype.draw = function(positionX, positionY) {
+ context.beginPath();
+ context.rect(positionX, positionY, 10, 20);
+ context.fillStyle = COLORS.PROPS;
+ context.fill();
+}
+
+const playerOne = new Player();
+const playerTwo = new Player();
+
+playerOne.draw(5, 50);
+playerTwo.draw(285, 50); |
ed784e014f5258c82efeea34740d17c2527ac868 | src/public/js/settings.js | src/public/js/settings.js |
define([], function () {
'use strict';
return {
'oauthConsumerKey': 'wPfXjdZViPvrRWSlenSWBsAWhYKarmOkOKk5WS4U',
'oauthSecret': 'kaBZXTHZHKSk2jvBUr8vzk7JRI1cryFI08ubv7Du',
'overpassServer': 'http://overpass-api.de/api/',
// 'overpassServer': 'http://overpass.osm.rambler.ru/cgi/',
// 'overpassServer': 'http://api.openstreetmap.fr/oapi/',
'overpassTimeout': 30 * 1000, // Milliseconds
'defaultAvatar': 'img/default_avatar.png',
'apiPath': 'api/',
'largeScreenMinWidth': 800,
'largeScreenMinHeight': 600,
'shareIframeWidth': 100,
'shareIframeWidthUnit': '%',
'shareIframeHeight': 400,
'shareIframeHeightUnit': 'px',
};
});
|
define([], function () {
'use strict';
return {
'oauthConsumerKey': 'wPfXjdZViPvrRWSlenSWBsAWhYKarmOkOKk5WS4U',
'oauthSecret': 'kaBZXTHZHKSk2jvBUr8vzk7JRI1cryFI08ubv7Du',
// 'overpassServer': 'http://overpass-api.de/api/',
'overpassServer': 'http://overpass.osm.rambler.ru/cgi/',
// 'overpassServer': 'http://api.openstreetmap.fr/oapi/',
'overpassTimeout': 30 * 1000, // Milliseconds
'defaultAvatar': 'img/default_avatar.png',
'apiPath': 'api/',
'largeScreenMinWidth': 800,
'largeScreenMinHeight': 600,
'shareIframeWidth': 100,
'shareIframeWidthUnit': '%',
'shareIframeHeight': 400,
'shareIframeHeightUnit': 'px',
};
});
| Revert "New default Overpass server" | Revert "New default Overpass server"
This reverts commit a32767d2d697313c452f6a06aac16360b75e3619.
| JavaScript | mit | MapContrib/MapContrib,MapContrib/MapContrib,MapContrib/MapContrib | ---
+++
@@ -9,8 +9,8 @@
'oauthConsumerKey': 'wPfXjdZViPvrRWSlenSWBsAWhYKarmOkOKk5WS4U',
'oauthSecret': 'kaBZXTHZHKSk2jvBUr8vzk7JRI1cryFI08ubv7Du',
- 'overpassServer': 'http://overpass-api.de/api/',
- // 'overpassServer': 'http://overpass.osm.rambler.ru/cgi/',
+ // 'overpassServer': 'http://overpass-api.de/api/',
+ 'overpassServer': 'http://overpass.osm.rambler.ru/cgi/',
// 'overpassServer': 'http://api.openstreetmap.fr/oapi/',
'overpassTimeout': 30 * 1000, // Milliseconds
|
39d14512e8bf4791d569fb417e01e82ddfbcfb63 | bin/pwned.js | bin/pwned.js | #!/usr/bin/env node
// Enable source map support
require('source-map-support').install();
// Polyfill Promise if necessary
if (global.Promise === undefined) {
require('es6-promise').polyfill();
}
var program = require('commander');
var pkg = require('../package.json');
var addCommands = require('../lib/commands');
// Begin command-line argument configuration
program
.usage('[option | command]')
.description('Each command has its own -h (--help) option.')
.version(pkg.version, '-v, --version');
// Add all the commands
addCommands(program);
// Display help and exit if unknown arguments are provided
program.on('*', function () {
program.help();
});
// Initiate the parser
program.parse(process.argv);
// Display help and exit if no arguments are provided
if (!process.argv.slice(2).length) {
program.help();
}
| #!/usr/bin/env node
// Polyfill Promise if necessary
if (global.Promise === undefined) {
require('es6-promise').polyfill();
}
var program = require('commander');
var pkg = require('../package.json');
var addCommands = require('../lib/commands');
// Begin command-line argument configuration
program
.usage('[option | command]')
.description('Each command has its own -h (--help) option.')
.version(pkg.version, '-v, --version');
// Add all the commands
addCommands(program);
// Display help and exit if unknown arguments are provided
program.on('*', function () {
program.help();
});
// Initiate the parser
program.parse(process.argv);
// Display help and exit if no arguments are provided
if (!process.argv.slice(2).length) {
program.help();
}
| Remove unnecessary source map support from entry point | Remove unnecessary source map support from entry point
Transpiling the entry point was discontinued in e4c1ed8f.
| JavaScript | mit | wKovacs64/pwned,wKovacs64/pwned | ---
+++
@@ -1,7 +1,4 @@
#!/usr/bin/env node
-
-// Enable source map support
-require('source-map-support').install();
// Polyfill Promise if necessary
if (global.Promise === undefined) { |
eafc8e98d29bd60db63ce1d3ffca5ff28bd8412f | algorithm/sorting/quick/basic/code.js | algorithm/sorting/quick/basic/code.js | tracer._print('original array = [' + D.join(', ') + ']');
tracer._sleep(1000);
tracer._pace(500);
function quicksort(low, high) {
if (low < high) {
var p = partition(low, high);
quicksort(low, p - 1);
quicksort(p + 1, high);
}
}
function partition(low, high) {
var pivot = D[high];
tracer._selectSet([low, high]);
var i = low;
for (var j = low; j < high; j++) {
if (D[j] <= pivot) {
var temp = D[i];
D[i] = D[j];
D[j] = temp;
tracer._notify(i, j);
i++;
}
}
var temp = D[i];
D[i] = D[high];
D[high] = temp;
tracer._notify(i, high);
tracer._deselectSet([low, high]);
return i;
}
quicksort(0, D.length - 1);
tracer._print('sorted array = [' + D.join(', ') + ']'); | tracer._print('original array = [' + D.join(', ') + ']');
tracer._sleep(1000);
tracer._pace(500);
function quicksort(low, high) {
if (low < high) {
var p = partition(low, high);
quicksort(low, p - 1);
quicksort(p + 1, high);
}
}
function partition(low, high) {
var pivot = D[high];
tracer._selectSet([low, high]);
var i = low;
var temp;
for (var j = low; j < high; j++) {
if (D[j] <= pivot) {
temp = D[i];
D[i] = D[j];
D[j] = temp;
tracer._notify(i, j);
i++;
}
}
temp = D[i];
D[i] = D[high];
D[high] = temp;
tracer._notify(i, high);
tracer._deselectSet([low, high]);
return i;
}
quicksort(0, D.length - 1);
tracer._print('sorted array = [' + D.join(', ') + ']');
| Fix define warning in "temp" variable | Fix define warning in "temp" variable | JavaScript | mit | archie94/AlgorithmVisualizer,archie94/AlgorithmVisualizer,makintunde/AlgorithmVisualizer,nem035/AlgorithmVisualizer,makintunde/AlgorithmVisualizer,nem035/AlgorithmVisualizer | ---
+++
@@ -1,6 +1,7 @@
tracer._print('original array = [' + D.join(', ') + ']');
tracer._sleep(1000);
tracer._pace(500);
+
function quicksort(low, high) {
if (low < high) {
var p = partition(low, high);
@@ -8,25 +9,29 @@
quicksort(p + 1, high);
}
}
+
function partition(low, high) {
var pivot = D[high];
tracer._selectSet([low, high]);
var i = low;
+ var temp;
+
for (var j = low; j < high; j++) {
if (D[j] <= pivot) {
- var temp = D[i];
+ temp = D[i];
D[i] = D[j];
D[j] = temp;
tracer._notify(i, j);
i++;
}
}
- var temp = D[i];
+ temp = D[i];
D[i] = D[high];
D[high] = temp;
tracer._notify(i, high);
tracer._deselectSet([low, high]);
return i;
}
+
quicksort(0, D.length - 1);
tracer._print('sorted array = [' + D.join(', ') + ']'); |
cc912b3155cadd5915c26e5e2077c2432b0d346b | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
$(function() {
$(window).on("scroll", function() {
if($(window).scrollTop() > 50) {
$("#nav").addClass("active");
} else {
//remove the background property so it comes transparent again (defined in your css)
$("#nav").removeClass("active");
}
});
}); | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. JavaScript code in this file should be added after the last require_* statement.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
$(function() {
$(window).on("scroll", function() {
if($(window).scrollTop() > 110) {
$("#nav").addClass("active");
} else {
//remove the background property so it comes transparent again (defined in your css)
$("#nav").removeClass("active");
}
});
}); | Update nav background-color change from 50px to 110px trigger | Update nav background-color change from 50px to 110px trigger
| JavaScript | mit | benjaminhyw/rails-online-shop,benjaminhyw/rails-online-shop,benjaminhyw/rails-online-shop | ---
+++
@@ -18,12 +18,12 @@
$(function() {
$(window).on("scroll", function() {
- if($(window).scrollTop() > 50) {
+ if($(window).scrollTop() > 110) {
$("#nav").addClass("active");
} else {
//remove the background property so it comes transparent again (defined in your css)
$("#nav").removeClass("active");
}
});
-
+
}); |
812ac44c9e0e837a44651cd731e06d07b370976a | config/tabs.js | config/tabs.js | export const TABS = [
{
name: 'latest',
title: 'Nåtid',
chartKind: 'bar',
year: 'latest'
},
{
name: 'chronological',
title: 'Over tid',
chartKind: 'stackedArea',
year: 'all'
},
{
name: 'map',
title: 'Kart',
chartKind: 'map',
year: 'latest'
},
{
name: 'benchmark',
title: 'Sammenliknet',
chartKind: 'benchmark',
year: 'latest'
},
{
name: 'table',
title: 'Tabell',
chartKind: 'table',
year: 'latest'
}
]
| export const TABS = [
{
name: 'latest',
title: 'Nåtid',
chartKind: 'bar',
year: 'latest'
},
{
name: 'chronological',
title: 'Over tid',
chartKind: 'line',
year: 'all'
},
{
name: 'map',
title: 'Kart',
chartKind: 'map',
year: 'latest'
},
{
name: 'benchmark',
title: 'Sammenliknet',
chartKind: 'benchmark',
year: 'latest'
},
{
name: 'table',
title: 'Tabell',
chartKind: 'table',
year: 'latest'
}
]
| Change default for chronological tab to line | Change default for chronological tab to line
| JavaScript | mit | bengler/imdikator,bengler/imdikator | ---
+++
@@ -8,7 +8,7 @@
{
name: 'chronological',
title: 'Over tid',
- chartKind: 'stackedArea',
+ chartKind: 'line',
year: 'all'
},
{ |
5bd4af9d7a3ccfee9a347a0e6cdd6641e64fec79 | gh-pages-stub/public/js/process404.js | gh-pages-stub/public/js/process404.js | /*
* Copyright 2014-2016 CyberVision, Inc.
* <p/>
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var PROCESSOR_404 = (function () {
var my = {};
my.process = function process() {
var version = UTILS.replaceIfBlank( UTILS.getVersionFromURL(), UTILS.getLatestVersion());
if (UTILS.getVersionsArray().indexOf(version) === -1 ) {
version = UTILS.getLatestVersion();
}
DOM.getInstance().showMenuForVersion(version);
DOM.getInstance().showSelectedVersion(version);
};
return my;
}());
$(document).ready(function(){
PROCESSOR_404.process();
});
| /*
* Copyright 2014-2016 CyberVision, Inc.
* <p/>
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var PROCESSOR_404 = (function () {
var my = {};
my.process = function process() {
ga('send', 'event', 'User routing', 'Page not found', window.location.pathname);
var version = UTILS.replaceIfBlank( UTILS.getVersionFromURL(), UTILS.getLatestVersion());
if (UTILS.getVersionsArray().indexOf(version) === -1 ) {
version = UTILS.getLatestVersion();
}
DOM.getInstance().showMenuForVersion(version);
DOM.getInstance().showSelectedVersion(version);
};
return my;
}());
$(document).ready(function(){
PROCESSOR_404.process();
});
| Add separate eventCategory for broken links | JEK-8: Add separate eventCategory for broken links
| JavaScript | apache-2.0 | aglne/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,aglne/kaa,sashadidukh/kaa,aglne/kaa,vtkhir/kaa,aglne/kaa,vtkhir/kaa,vtkhir/kaa,vtkhir/kaa,aglne/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,sashadidukh/kaa,aglne/kaa,vtkhir/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,aglne/kaa | ---
+++
@@ -18,6 +18,7 @@
var my = {};
my.process = function process() {
+ ga('send', 'event', 'User routing', 'Page not found', window.location.pathname);
var version = UTILS.replaceIfBlank( UTILS.getVersionFromURL(), UTILS.getLatestVersion());
if (UTILS.getVersionsArray().indexOf(version) === -1 ) {
version = UTILS.getLatestVersion(); |
bce6148287de314127188099c59c82ce79905156 | lib/client.js | lib/client.js | var aws = require('aws-sdk');
module.exports = function() {
aws.config.update({
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
region: 'us-east-1'
});
return new aws.EC2();
} | var aws = require('aws-sdk');
module.exports = function() {
if (!process.env.AWS_ACCESS_KEY_ID || !process.env.AWS_SECRET_ACCESS_KEY) {
throw new Error('Must set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY')
}
aws.config.update({
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
region: 'us-east-1'
});
return new aws.EC2();
} | Add check for env vars | Add check for env vars
| JavaScript | mit | freeman-lab/tinycloud | ---
+++
@@ -1,6 +1,10 @@
var aws = require('aws-sdk');
module.exports = function() {
+
+ if (!process.env.AWS_ACCESS_KEY_ID || !process.env.AWS_SECRET_ACCESS_KEY) {
+ throw new Error('Must set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY')
+ }
aws.config.update({
accessKeyId: process.env.AWS_ACCESS_KEY_ID, |
27c8e704ab182ae6e2d6dfb39a64b8417c809680 | lib/concat.js | lib/concat.js | (function(){
module.exports = concat
var fs = require('fs')
function concat(files, target, done){
validateInputs(files, target, done)
var writeStream = fs.createWriteStream(target, {flags: 'a'})
writeFiles(files.reverse(), writeStream, done)
}
function writeFiles(files, writeStream, callback){
if(files.length){
var currentFile = files.pop()
var readStream = fs.createReadStream(currentFile)
readStream.pipe(writeStream, { end: false })
readStream.on('error', onError)
readStream.on('end', function onReadEnd(){
writeFiles(files, writeStream, callback)
})
} else {
writeStream.end();
callback()
}
}
function validateInputs(files, target, done){
if(!(files instanceof Array)){
throw new Error('Expected array but got:', files)
}
files.forEach(function(f){
if(f && f.constructor !== String){
throw new Error('Unexpected input file path:', f)
}
})
if(target.constructor !== String || target.length === 0){
throw new Error('Expected string destination but got:', target)
}
if(typeof done !== 'function'){
throw new Error('Expected callback to bea function but got:', done)
}
}
function onError(err) {
throw err
}
})()
| (function(){
module.exports = concat
var fs = require('fs')
function concat(files, target, done, errFunction){
validateInputs(files, target, done, errFunction)
var writeStream = fs.createWriteStream(target, {flags: 'a'})
writeFiles(files.reverse(), writeStream, done, errFunction)
}
function writeFiles(files, writeStream, callback, errFunction){
if(files.length){
var currentFile = files.pop()
var readStream = fs.createReadStream(currentFile)
readStream.pipe(writeStream, { end: false })
readStream.on('error', errFunction)
readStream.on('end', function onReadEnd(){
writeFiles(files, writeStream, callback, errFunction)
})
} else {
writeStream.end();
callback()
}
}
function validateInputs(files, target, done, errFunction){
if(!(files instanceof Array)){
throw new Error('Expected array but got:', files)
}
files.forEach(function(f){
if(f && f.constructor !== String){
throw new Error('Unexpected input file path:', f)
}
})
if(target.constructor !== String || target.length === 0){
throw new Error('Expected string destination but got:', target)
}
if(typeof done !== 'function' && typeof errFunction !== 'function'){
throw new Error('Expected callback and errFunction to be functions!')
}
}
})()
| Allow for error handler to be passed as parameter | Allow for error handler to be passed as parameter
So that errors can be properly handled in cases like Promises etc. | JavaScript | mit | andreicioban/file-concat-stream | ---
+++
@@ -2,20 +2,20 @@
module.exports = concat
var fs = require('fs')
- function concat(files, target, done){
- validateInputs(files, target, done)
+ function concat(files, target, done, errFunction){
+ validateInputs(files, target, done, errFunction)
var writeStream = fs.createWriteStream(target, {flags: 'a'})
- writeFiles(files.reverse(), writeStream, done)
+ writeFiles(files.reverse(), writeStream, done, errFunction)
}
- function writeFiles(files, writeStream, callback){
+ function writeFiles(files, writeStream, callback, errFunction){
if(files.length){
var currentFile = files.pop()
var readStream = fs.createReadStream(currentFile)
readStream.pipe(writeStream, { end: false })
- readStream.on('error', onError)
+ readStream.on('error', errFunction)
readStream.on('end', function onReadEnd(){
- writeFiles(files, writeStream, callback)
+ writeFiles(files, writeStream, callback, errFunction)
})
} else {
writeStream.end();
@@ -23,7 +23,7 @@
}
}
- function validateInputs(files, target, done){
+ function validateInputs(files, target, done, errFunction){
if(!(files instanceof Array)){
throw new Error('Expected array but got:', files)
}
@@ -35,11 +35,8 @@
if(target.constructor !== String || target.length === 0){
throw new Error('Expected string destination but got:', target)
}
- if(typeof done !== 'function'){
- throw new Error('Expected callback to bea function but got:', done)
+ if(typeof done !== 'function' && typeof errFunction !== 'function'){
+ throw new Error('Expected callback and errFunction to be functions!')
}
}
- function onError(err) {
- throw err
- }
})() |
06e38be848b204b60db34fac3f7adb50fa3d1e7a | packages/stylus/package.js | packages/stylus/package.js | Package.describe({
summary: 'Expressive, dynamic, robust CSS',
version: "2.0.0_511"
});
Package.registerBuildPlugin({
name: 'compileStylusBatch',
use: ['ecmascript', 'caching-compiler'],
sources: [
'plugin/compile-stylus.js'
],
npmDependencies: {
stylus: "https://github.com/meteor/stylus/tarball/d4352c9cb4056faf238e6bd9f9f2172472b67c5b", // fork of 0.51.1
nib: "1.1.0",
"lru-cache": "2.6.4"
}
});
Package.onUse(function (api) {
api.use('isobuild:compiler-plugin@1.0.0');
});
Package.onTest(function (api) {
api.use(['tinytest', 'stylus', 'test-helpers', 'templating']);
api.addFiles([
'stylus_tests.html',
'stylus_tests.styl',
'stylus_tests.import.styl',
'stylus_tests.js'
],'client');
});
| Package.describe({
summary: 'Expressive, dynamic, robust CSS',
version: "2.0.0_511"
});
Package.registerBuildPlugin({
name: 'compileStylusBatch',
use: ['ecmascript', 'caching-compiler'],
sources: [
'plugin/compile-stylus.js'
],
npmDependencies: {
stylus: "https://github.com/meteor/stylus/tarball/d4352c9cb4056faf238e6bd9f9f2172472b67c5b", // fork of 0.51.1
nib: "1.1.0"
}
});
Package.onUse(function (api) {
api.use('isobuild:compiler-plugin@1.0.0');
});
Package.onTest(function (api) {
api.use(['tinytest', 'stylus', 'test-helpers', 'templating']);
api.addFiles([
'stylus_tests.html',
'stylus_tests.styl',
'stylus_tests.import.styl',
'stylus_tests.js'
],'client');
});
| Remove lru-cache dependency from stylus | Remove lru-cache dependency from stylus | JavaScript | mit | joannekoong/meteor,msavin/meteor,lpinto93/meteor,meteor-velocity/meteor,DCKT/meteor,Theviajerock/meteor,deanius/meteor,SeanOceanHu/meteor,chasertech/meteor,Prithvi-A/meteor,mubassirhayat/meteor,yinhe007/meteor,udhayam/meteor,Theviajerock/meteor,hristaki/meteor,chiefninew/meteor,hristaki/meteor,aldeed/meteor,alexbeletsky/meteor,ashwathgovind/meteor,steedos/meteor,jdivy/meteor,mirstan/meteor,whip112/meteor,eluck/meteor,chmac/meteor,EduShareOntario/meteor,ericterpstra/meteor,aldeed/meteor,juansgaitan/meteor,TechplexEngineer/meteor,fashionsun/meteor,esteedqueen/meteor,henrypan/meteor,paul-barry-kenzan/meteor,sitexa/meteor,papimomi/meteor,baysao/meteor,dboyliao/meteor,brettle/meteor,yonglehou/meteor,evilemon/meteor,D1no/meteor,devgrok/meteor,AlexR1712/meteor,cog-64/meteor,h200863057/meteor,brettle/meteor,EduShareOntario/meteor,Hansoft/meteor,shmiko/meteor,Urigo/meteor,4commerce-technologies-AG/meteor,karlito40/meteor,dboyliao/meteor,yalexx/meteor,Jeremy017/meteor,rozzzly/meteor,joannekoong/meteor,yanisIk/meteor,dev-bobsong/meteor,brdtrpp/meteor,Hansoft/meteor,chengxiaole/meteor,juansgaitan/meteor,kencheung/meteor,chasertech/meteor,baiyunping333/meteor,codingang/meteor,shadedprofit/meteor,yiliaofan/meteor,cherbst/meteor,yonas/meteor-freebsd,ndarilek/meteor,AnthonyAstige/meteor,brettle/meteor,Quicksteve/meteor,yonas/meteor-freebsd,Prithvi-A/meteor,nuvipannu/meteor,Jonekee/meteor,lassombra/meteor,hristaki/meteor,lorensr/meteor,eluck/meteor,zdd910/meteor,sitexa/meteor,PatrickMcGuinness/meteor,oceanzou123/meteor,vacjaliu/meteor,rabbyalone/meteor,sdeveloper/meteor,shrop/meteor,lawrenceAIO/meteor,SeanOceanHu/meteor,jeblister/meteor,allanalexandre/meteor,alexbeletsky/meteor,4commerce-technologies-AG/meteor,servel333/meteor,williambr/meteor,brdtrpp/meteor,codedogfish/meteor,yyx990803/meteor,msavin/meteor,baiyunping333/meteor,juansgaitan/meteor,yanisIk/meteor,modulexcite/meteor,dandv/meteor,modulexcite/meteor,yalexx/meteor,kengchau/meteor,oceanzou123/meteor,yyx990803/meteor,mubassirhayat/meteor,modulexcite/meteor,yiliaofan/meteor,juansgaitan/meteor,dandv/meteor,Jonekee/meteor,zdd910/meteor,brettle/meteor,Profab/meteor,baiyunping333/meteor,shrop/meteor,tdamsma/meteor,shmiko/meteor,katopz/meteor,HugoRLopes/meteor,ndarilek/meteor,qscripter/meteor,mauricionr/meteor,h200863057/meteor,lawrenceAIO/meteor,Puena/meteor,Paulyoufu/meteor-1,AnthonyAstige/meteor,newswim/meteor,D1no/meteor,whip112/meteor,codedogfish/meteor,ljack/meteor,DAB0mB/meteor,dfischer/meteor,servel333/meteor,mjmasn/meteor,Ken-Liu/meteor,luohuazju/meteor,jdivy/meteor,sclausen/meteor,yonas/meteor-freebsd,youprofit/meteor,daslicht/meteor,Paulyoufu/meteor-1,ashwathgovind/meteor,bhargav175/meteor,Paulyoufu/meteor-1,msavin/meteor,lorensr/meteor,Prithvi-A/meteor,shrop/meteor,michielvanoeffelen/meteor,Quicksteve/meteor,tdamsma/meteor,paul-barry-kenzan/meteor,lpinto93/meteor,yonglehou/meteor,meteor-velocity/meteor,codedogfish/meteor,yalexx/meteor,oceanzou123/meteor,HugoRLopes/meteor,benstoltz/meteor,Urigo/meteor,Urigo/meteor,elkingtonmcb/meteor,johnthepink/meteor,yanisIk/meteor,vacjaliu/meteor,somallg/meteor,johnthepink/meteor,modulexcite/meteor,dboyliao/meteor,lawrenceAIO/meteor,Eynaliyev/meteor,h200863057/meteor,katopz/meteor,planet-training/meteor,Jeremy017/meteor,imanmafi/meteor,michielvanoeffelen/meteor,yonglehou/meteor,yalexx/meteor,ljack/meteor,neotim/meteor,ndarilek/meteor,yanisIk/meteor,Eynaliyev/meteor,chengxiaole/meteor,imanmafi/meteor,yonas/meteor-freebsd,cherbst/meteor,hristaki/meteor,judsonbsilva/meteor,dboyliao/meteor,chmac/meteor,modulexcite/meteor,chiefninew/meteor,vjau/meteor,namho102/meteor,baysao/meteor,baysao/meteor,michielvanoeffelen/meteor,aldeed/meteor,zdd910/meteor,IveWong/meteor,lorensr/meteor,jdivy/meteor,deanius/meteor,alexbeletsky/meteor,mauricionr/meteor,karlito40/meteor,Ken-Liu/meteor,benstoltz/meteor,lawrenceAIO/meteor,mirstan/meteor,brettle/meteor,qscripter/meteor,AnthonyAstige/meteor,mjmasn/meteor,Hansoft/meteor,sclausen/meteor,fashionsun/meteor,sunny-g/meteor,h200863057/meteor,colinligertwood/meteor,judsonbsilva/meteor,Paulyoufu/meteor-1,codedogfish/meteor,steedos/meteor,akintoey/meteor,calvintychan/meteor,luohuazju/meteor,katopz/meteor,dev-bobsong/meteor,dfischer/meteor,jdivy/meteor,shmiko/meteor,mauricionr/meteor,colinligertwood/meteor,kengchau/meteor,eluck/meteor,allanalexandre/meteor,meteor-velocity/meteor,calvintychan/meteor,Prithvi-A/meteor,aramk/meteor,PatrickMcGuinness/meteor,bhargav175/meteor,SeanOceanHu/meteor,fashionsun/meteor,AlexR1712/meteor,calvintychan/meteor,framewr/meteor,neotim/meteor,yanisIk/meteor,ljack/meteor,youprofit/meteor,Eynaliyev/meteor,Paulyoufu/meteor-1,eluck/meteor,ericterpstra/meteor,brdtrpp/meteor,IveWong/meteor,justintung/meteor,yanisIk/meteor,SeanOceanHu/meteor,lassombra/meteor,Puena/meteor,sclausen/meteor,Paulyoufu/meteor-1,arunoda/meteor,codedogfish/meteor,esteedqueen/meteor,Puena/meteor,ljack/meteor,mubassirhayat/meteor,planet-training/meteor,wmkcc/meteor,justintung/meteor,rabbyalone/meteor,tdamsma/meteor,Puena/meteor,guazipi/meteor,Puena/meteor,cherbst/meteor,steedos/meteor,joannekoong/meteor,somallg/meteor,lawrenceAIO/meteor,williambr/meteor,baysao/meteor,dev-bobsong/meteor,mjmasn/meteor,rozzzly/meteor,alexbeletsky/meteor,joannekoong/meteor,kidaa/meteor,DCKT/meteor,neotim/meteor,qscripter/meteor,sdeveloper/meteor,allanalexandre/meteor,qscripter/meteor,cog-64/meteor,cbonami/meteor,youprofit/meteor,Ken-Liu/meteor,colinligertwood/meteor,chasertech/meteor,eluck/meteor,newswim/meteor,imanmafi/meteor,Quicksteve/meteor,EduShareOntario/meteor,juansgaitan/meteor,udhayam/meteor,luohuazju/meteor,Jeremy017/meteor,Ken-Liu/meteor,dev-bobsong/meteor,mubassirhayat/meteor,Hansoft/meteor,deanius/meteor,papimomi/meteor,daltonrenaldo/meteor,devgrok/meteor,evilemon/meteor,sunny-g/meteor,cbonami/meteor,baiyunping333/meteor,iman-mafi/meteor,papimomi/meteor,chmac/meteor,Prithvi-A/meteor,wmkcc/meteor,michielvanoeffelen/meteor,udhayam/meteor,imanmafi/meteor,paul-barry-kenzan/meteor,michielvanoeffelen/meteor,framewr/meteor,DAB0mB/meteor,Eynaliyev/meteor,ndarilek/meteor,brdtrpp/meteor,meonkeys/meteor,steedos/meteor,Quicksteve/meteor,4commerce-technologies-AG/meteor,oceanzou123/meteor,yyx990803/meteor,henrypan/meteor,hristaki/meteor,chengxiaole/meteor,guazipi/meteor,emmerge/meteor,neotim/meteor,PatrickMcGuinness/meteor,cbonami/meteor,vacjaliu/meteor,framewr/meteor,dboyliao/meteor,kencheung/meteor,mirstan/meteor,sclausen/meteor,mauricionr/meteor,rabbyalone/meteor,aramk/meteor,bhargav175/meteor,kencheung/meteor,justintung/meteor,paul-barry-kenzan/meteor,justintung/meteor,brdtrpp/meteor,devgrok/meteor,rabbyalone/meteor,vjau/meteor,nuvipannu/meteor,4commerce-technologies-AG/meteor,yinhe007/meteor,williambr/meteor,emmerge/meteor,Urigo/meteor,luohuazju/meteor,cbonami/meteor,lorensr/meteor,johnthepink/meteor,sunny-g/meteor,chengxiaole/meteor,aramk/meteor,joannekoong/meteor,aramk/meteor,kencheung/meteor,rozzzly/meteor,DAB0mB/meteor,aldeed/meteor,meonkeys/meteor,namho102/meteor,jdivy/meteor,saisai/meteor,chiefninew/meteor,AnthonyAstige/meteor,servel333/meteor,udhayam/meteor,ericterpstra/meteor,aramk/meteor,yanisIk/meteor,kengchau/meteor,ljack/meteor,johnthepink/meteor,ndarilek/meteor,benstoltz/meteor,mirstan/meteor,Jeremy017/meteor,esteedqueen/meteor,deanius/meteor,DCKT/meteor,sunny-g/meteor,kencheung/meteor,wmkcc/meteor,shmiko/meteor,dfischer/meteor,IveWong/meteor,chiefninew/meteor,rozzzly/meteor,somallg/meteor,paul-barry-kenzan/meteor,yyx990803/meteor,somallg/meteor,shadedprofit/meteor,wmkcc/meteor,yyx990803/meteor,allanalexandre/meteor,jg3526/meteor,michielvanoeffelen/meteor,lawrenceAIO/meteor,kidaa/meteor,IveWong/meteor,qscripter/meteor,chiefninew/meteor,codingang/meteor,chiefninew/meteor,benstoltz/meteor,qscripter/meteor,devgrok/meteor,whip112/meteor,ashwathgovind/meteor,rozzzly/meteor,PatrickMcGuinness/meteor,yonas/meteor-freebsd,ashwathgovind/meteor,ericterpstra/meteor,planet-training/meteor,evilemon/meteor,ashwathgovind/meteor,yinhe007/meteor,jg3526/meteor,lassombra/meteor,sdeveloper/meteor,zdd910/meteor,shrop/meteor,akintoey/meteor,namho102/meteor,DAB0mB/meteor,neotim/meteor,h200863057/meteor,tdamsma/meteor,whip112/meteor,lassombra/meteor,tdamsma/meteor,tdamsma/meteor,ljack/meteor,yinhe007/meteor,HugoRLopes/meteor,aleclarson/meteor,saisai/meteor,jeblister/meteor,evilemon/meteor,mjmasn/meteor,servel333/meteor,iman-mafi/meteor,baysao/meteor,D1no/meteor,meteor-velocity/meteor,dfischer/meteor,yiliaofan/meteor,rozzzly/meteor,meteor-velocity/meteor,williambr/meteor,esteedqueen/meteor,dandv/meteor,nuvipannu/meteor,DAB0mB/meteor,arunoda/meteor,iman-mafi/meteor,rozzzly/meteor,alexbeletsky/meteor,youprofit/meteor,chasertech/meteor,somallg/meteor,shadedprofit/meteor,guazipi/meteor,joannekoong/meteor,sitexa/meteor,DAB0mB/meteor,vjau/meteor,daslicht/meteor,wmkcc/meteor,Ken-Liu/meteor,newswim/meteor,vacjaliu/meteor,SeanOceanHu/meteor,fashionsun/meteor,Prithvi-A/meteor,D1no/meteor,shadedprofit/meteor,mauricionr/meteor,IveWong/meteor,modulexcite/meteor,katopz/meteor,youprofit/meteor,oceanzou123/meteor,mauricionr/meteor,DCKT/meteor,kidaa/meteor,servel333/meteor,jeblister/meteor,karlito40/meteor,planet-training/meteor,kidaa/meteor,shrop/meteor,EduShareOntario/meteor,Jonekee/meteor,dboyliao/meteor,sdeveloper/meteor,lpinto93/meteor,elkingtonmcb/meteor,cherbst/meteor,DCKT/meteor,deanius/meteor,vacjaliu/meteor,Puena/meteor,TechplexEngineer/meteor,shmiko/meteor,daltonrenaldo/meteor,elkingtonmcb/meteor,emmerge/meteor,katopz/meteor,papimomi/meteor,msavin/meteor,lpinto93/meteor,sitexa/meteor,jeblister/meteor,cherbst/meteor,Profab/meteor,cog-64/meteor,PatrickMcGuinness/meteor,AlexR1712/meteor,bhargav175/meteor,codedogfish/meteor,shrop/meteor,aramk/meteor,udhayam/meteor,framewr/meteor,AnthonyAstige/meteor,Quicksteve/meteor,lpinto93/meteor,ashwathgovind/meteor,guazipi/meteor,ashwathgovind/meteor,ndarilek/meteor,hristaki/meteor,codingang/meteor,Eynaliyev/meteor,kengchau/meteor,sdeveloper/meteor,akintoey/meteor,HugoRLopes/meteor,shmiko/meteor,tdamsma/meteor,4commerce-technologies-AG/meteor,arunoda/meteor,sclausen/meteor,Jonekee/meteor,kengchau/meteor,Eynaliyev/meteor,evilemon/meteor,Puena/meteor,Hansoft/meteor,AlexR1712/meteor,akintoey/meteor,esteedqueen/meteor,dfischer/meteor,Paulyoufu/meteor-1,SeanOceanHu/meteor,kengchau/meteor,lassombra/meteor,chiefninew/meteor,bhargav175/meteor,arunoda/meteor,saisai/meteor,servel333/meteor,Theviajerock/meteor,Jeremy017/meteor,nuvipannu/meteor,AlexR1712/meteor,juansgaitan/meteor,lorensr/meteor,colinligertwood/meteor,chmac/meteor,ericterpstra/meteor,Profab/meteor,daltonrenaldo/meteor,steedos/meteor,whip112/meteor,HugoRLopes/meteor,arunoda/meteor,chmac/meteor,karlito40/meteor,Ken-Liu/meteor,elkingtonmcb/meteor,meonkeys/meteor,aldeed/meteor,neotim/meteor,eluck/meteor,framewr/meteor,paul-barry-kenzan/meteor,oceanzou123/meteor,EduShareOntario/meteor,chengxiaole/meteor,sclausen/meteor,yonas/meteor-freebsd,yiliaofan/meteor,dev-bobsong/meteor,cbonami/meteor,newswim/meteor,rabbyalone/meteor,ndarilek/meteor,alexbeletsky/meteor,justintung/meteor,meonkeys/meteor,chmac/meteor,daslicht/meteor,h200863057/meteor,ndarilek/meteor,yalexx/meteor,guazipi/meteor,imanmafi/meteor,sitexa/meteor,shrop/meteor,mubassirhayat/meteor,chiefninew/meteor,msavin/meteor,devgrok/meteor,dboyliao/meteor,jeblister/meteor,mauricionr/meteor,mjmasn/meteor,dev-bobsong/meteor,cog-64/meteor,rabbyalone/meteor,D1no/meteor,vacjaliu/meteor,fashionsun/meteor,paul-barry-kenzan/meteor,daltonrenaldo/meteor,judsonbsilva/meteor,dandv/meteor,williambr/meteor,fashionsun/meteor,yiliaofan/meteor,dandv/meteor,rabbyalone/meteor,jdivy/meteor,udhayam/meteor,michielvanoeffelen/meteor,D1no/meteor,emmerge/meteor,nuvipannu/meteor,yinhe007/meteor,imanmafi/meteor,juansgaitan/meteor,Theviajerock/meteor,karlito40/meteor,Profab/meteor,namho102/meteor,vjau/meteor,D1no/meteor,planet-training/meteor,meonkeys/meteor,Eynaliyev/meteor,chmac/meteor,emmerge/meteor,zdd910/meteor,servel333/meteor,daslicht/meteor,msavin/meteor,EduShareOntario/meteor,whip112/meteor,Theviajerock/meteor,jdivy/meteor,aleclarson/meteor,emmerge/meteor,kidaa/meteor,framewr/meteor,h200863057/meteor,vacjaliu/meteor,meteor-velocity/meteor,imanmafi/meteor,judsonbsilva/meteor,Profab/meteor,judsonbsilva/meteor,johnthepink/meteor,yonglehou/meteor,benstoltz/meteor,luohuazju/meteor,chengxiaole/meteor,yinhe007/meteor,Hansoft/meteor,framewr/meteor,aleclarson/meteor,luohuazju/meteor,SeanOceanHu/meteor,yonglehou/meteor,Jonekee/meteor,mjmasn/meteor,calvintychan/meteor,brettle/meteor,TechplexEngineer/meteor,saisai/meteor,mirstan/meteor,codingang/meteor,fashionsun/meteor,esteedqueen/meteor,kidaa/meteor,sunny-g/meteor,mirstan/meteor,newswim/meteor,ericterpstra/meteor,judsonbsilva/meteor,dandv/meteor,akintoey/meteor,daslicht/meteor,henrypan/meteor,dfischer/meteor,daslicht/meteor,mubassirhayat/meteor,deanius/meteor,daslicht/meteor,4commerce-technologies-AG/meteor,newswim/meteor,ljack/meteor,brdtrpp/meteor,daltonrenaldo/meteor,whip112/meteor,justintung/meteor,Profab/meteor,zdd910/meteor,devgrok/meteor,HugoRLopes/meteor,AlexR1712/meteor,ljack/meteor,baiyunping333/meteor,SeanOceanHu/meteor,Jeremy017/meteor,papimomi/meteor,ericterpstra/meteor,mjmasn/meteor,chasertech/meteor,karlito40/meteor,judsonbsilva/meteor,cog-64/meteor,codingang/meteor,yiliaofan/meteor,sitexa/meteor,katopz/meteor,henrypan/meteor,shadedprofit/meteor,steedos/meteor,kencheung/meteor,allanalexandre/meteor,kencheung/meteor,elkingtonmcb/meteor,Profab/meteor,msavin/meteor,sunny-g/meteor,Quicksteve/meteor,elkingtonmcb/meteor,emmerge/meteor,karlito40/meteor,aldeed/meteor,calvintychan/meteor,codedogfish/meteor,sclausen/meteor,dandv/meteor,Urigo/meteor,tdamsma/meteor,shadedprofit/meteor,cbonami/meteor,lpinto93/meteor,DAB0mB/meteor,vjau/meteor,jeblister/meteor,udhayam/meteor,meonkeys/meteor,sunny-g/meteor,lawrenceAIO/meteor,oceanzou123/meteor,eluck/meteor,arunoda/meteor,sdeveloper/meteor,yyx990803/meteor,jg3526/meteor,planet-training/meteor,kidaa/meteor,saisai/meteor,Ken-Liu/meteor,servel333/meteor,cherbst/meteor,yalexx/meteor,yyx990803/meteor,bhargav175/meteor,dboyliao/meteor,lassombra/meteor,baiyunping333/meteor,johnthepink/meteor,Eynaliyev/meteor,guazipi/meteor,kengchau/meteor,benstoltz/meteor,namho102/meteor,jg3526/meteor,daltonrenaldo/meteor,newswim/meteor,katopz/meteor,Jonekee/meteor,DCKT/meteor,johnthepink/meteor,allanalexandre/meteor,DCKT/meteor,yinhe007/meteor,williambr/meteor,allanalexandre/meteor,PatrickMcGuinness/meteor,somallg/meteor,yalexx/meteor,colinligertwood/meteor,HugoRLopes/meteor,jg3526/meteor,bhargav175/meteor,youprofit/meteor,TechplexEngineer/meteor,EduShareOntario/meteor,iman-mafi/meteor,yonas/meteor-freebsd,IveWong/meteor,iman-mafi/meteor,mubassirhayat/meteor,namho102/meteor,akintoey/meteor,yanisIk/meteor,nuvipannu/meteor,henrypan/meteor,baysao/meteor,Urigo/meteor,brdtrpp/meteor,cog-64/meteor,jg3526/meteor,eluck/meteor,planet-training/meteor,colinligertwood/meteor,alexbeletsky/meteor,saisai/meteor,youprofit/meteor,lassombra/meteor,lorensr/meteor,Theviajerock/meteor,chasertech/meteor,cherbst/meteor,TechplexEngineer/meteor,evilemon/meteor,iman-mafi/meteor,vjau/meteor,brettle/meteor,namho102/meteor,brdtrpp/meteor,chengxiaole/meteor,mirstan/meteor,chasertech/meteor,baysao/meteor,codingang/meteor,elkingtonmcb/meteor,justintung/meteor,daltonrenaldo/meteor,Quicksteve/meteor,PatrickMcGuinness/meteor,IveWong/meteor,aldeed/meteor,benstoltz/meteor,calvintychan/meteor,shadedprofit/meteor,planet-training/meteor,saisai/meteor,aramk/meteor,Jonekee/meteor,dev-bobsong/meteor,arunoda/meteor,HugoRLopes/meteor,alexbeletsky/meteor,colinligertwood/meteor,AnthonyAstige/meteor,joannekoong/meteor,lorensr/meteor,akintoey/meteor,karlito40/meteor,wmkcc/meteor,codingang/meteor,mubassirhayat/meteor,meteor-velocity/meteor,yonglehou/meteor,wmkcc/meteor,williambr/meteor,yiliaofan/meteor,Theviajerock/meteor,meonkeys/meteor,Jeremy017/meteor,shmiko/meteor,devgrok/meteor,cog-64/meteor,lpinto93/meteor,steedos/meteor,henrypan/meteor,AlexR1712/meteor,calvintychan/meteor,yonglehou/meteor,TechplexEngineer/meteor,AnthonyAstige/meteor,sunny-g/meteor,henrypan/meteor,luohuazju/meteor,dfischer/meteor,nuvipannu/meteor,daltonrenaldo/meteor,zdd910/meteor,jg3526/meteor,Prithvi-A/meteor,vjau/meteor,somallg/meteor,Urigo/meteor,AnthonyAstige/meteor,papimomi/meteor,neotim/meteor,4commerce-technologies-AG/meteor,hristaki/meteor,sitexa/meteor,allanalexandre/meteor,evilemon/meteor,papimomi/meteor,D1no/meteor,sdeveloper/meteor,modulexcite/meteor,Hansoft/meteor,cbonami/meteor,qscripter/meteor,guazipi/meteor,TechplexEngineer/meteor,esteedqueen/meteor,iman-mafi/meteor,deanius/meteor,baiyunping333/meteor,somallg/meteor,jeblister/meteor | ---
+++
@@ -11,8 +11,7 @@
],
npmDependencies: {
stylus: "https://github.com/meteor/stylus/tarball/d4352c9cb4056faf238e6bd9f9f2172472b67c5b", // fork of 0.51.1
- nib: "1.1.0",
- "lru-cache": "2.6.4"
+ nib: "1.1.0"
}
});
|
856382581b137c3b2a9a0ed0efcc4fe60db5f1b5 | test/ui-testing/test.js | test/ui-testing/test.js | const new_user = require('./new_user.js');
const patron_group = require('./patron_group.js');
module.exports.test = function(uitestctx) {
patron_group.test(uitestctx);
new_user.test(uitestctx);
} | const new_user = require('./new_user.js');
const patron_group = require('./patron_group.js');
module.exports.test = function(uitestctx) {
patron_group.test(uitestctx);
new_user.test(uitestctx);
}
| Add missing final newline FOLIO-351 | Add missing final newline FOLIO-351
| JavaScript | apache-2.0 | folio-org/ui-users,folio-org/ui-users | |
b5ea8b96c1ae114220f45635c6e4bf783881964c | plugins/dropkick.jquery.js | plugins/dropkick.jquery.js | jQuery.fn.dropkick = function ( opts, args ) {
return $( this ).each(function() {
if ( !opts || typeof opts === 'object' ) {
new Dropkick( this, opts || {} );
} else if ( typeof opts === 'string' ) {
new Dropkick( this )[ opts ]( args );
}
});
}; | jQuery.fn.dropkick = function ( opts ) {
return $( this ).each(function() {
var dk;
if ( !opts || typeof opts === 'object' ) {
new Dropkick( this, opts || {} );
} else if ( typeof opts === 'string' ) {
dk = new Dropkick( this );
dk[ opts ].apply( dk, arguments.slice(1) );
}
});
};
| Allow multiple args for jQuery extension | Allow multiple args for jQuery extension | JavaScript | mit | Robdel12/DropKick,GerHobbelt/DropKick,alex-riabenko/DropKick,Robdel12/DropKick,chrismoulton/DropKick,alexgleason/DropKick,acebalajadia/DropKick,chrismoulton/DropKick,spoonben/DropKick,alexgleason/DropKick,GerHobbelt/DropKick,acebalajadia/DropKick,alex-riabenko/DropKick | ---
+++
@@ -1,9 +1,12 @@
-jQuery.fn.dropkick = function ( opts, args ) {
+jQuery.fn.dropkick = function ( opts ) {
return $( this ).each(function() {
+ var dk;
+
if ( !opts || typeof opts === 'object' ) {
new Dropkick( this, opts || {} );
} else if ( typeof opts === 'string' ) {
- new Dropkick( this )[ opts ]( args );
+ dk = new Dropkick( this );
+ dk[ opts ].apply( dk, arguments.slice(1) );
}
});
}; |
2c1b02b96e19905bd21712e9ce4e1983a3a0e5b0 | renanbrg/dropstory/js/Main.js | renanbrg/dropstory/js/Main.js | var game = new Phaser.Game(Config.global.screen.width,
Config.global.screen.height, Phaser.Auto, 'game');
game.state.add('ludus-state', State.LudusSplash);
game.state.add('sponsor-state', State.SponsorSplash);
game.state.add('pause-state', State.Pause);
game.state.add('gameover-state', State.GameOver);
game.state.add('level1preloader-state', State.Level1Preloader);
game.state.add('level1-state', State.Level1);
game.state.add('menu-state', State.Menu);
game.state.add('howtoplay-state', State.HowToPlay);
game.state.add('credits-state', State.Credits);
game.state.add('boot-state', State.Boot);
game.state.start('boot-state');
| var game = new Phaser.Game(Config.global.screen.width,
Config.global.screen.height, Phaser.CANVAS, 'game');
game.state.add('ludus-state', State.LudusSplash);
game.state.add('sponsor-state', State.SponsorSplash);
game.state.add('pause-state', State.Pause);
game.state.add('gameover-state', State.GameOver);
game.state.add('level1preloader-state', State.Level1Preloader);
game.state.add('level1-state', State.Level1);
game.state.add('menu-state', State.Menu);
game.state.add('howtoplay-state', State.HowToPlay);
game.state.add('credits-state', State.Credits);
game.state.add('boot-state', State.Boot);
game.state.start('boot-state');
| Change the renderer of the game | Change the renderer of the game
Change the renderer of the game from Phaser.AUTO to Phaser.CANVAS.
For some reason, using canvas improves the performance significantly,
in comparison with WebGL (which is the one chosen by Phaser.AUTO).
| JavaScript | mit | jucimarjr/posueagames,jucimarjr/posueagames | ---
+++
@@ -1,5 +1,5 @@
var game = new Phaser.Game(Config.global.screen.width,
- Config.global.screen.height, Phaser.Auto, 'game');
+ Config.global.screen.height, Phaser.CANVAS, 'game');
game.state.add('ludus-state', State.LudusSplash);
game.state.add('sponsor-state', State.SponsorSplash); |
040d5d1f6ef2f582a0c5c2b8fe6263bb0c1b7c4d | packages/plug-auth-server/test/authenticator.js | packages/plug-auth-server/test/authenticator.js | import test from 'ava'
import authenticator from '../src/authenticator'
import testUsers from './util/testUsers'
function localUsersRepository () {
return {
getUser(id) {
const result = testUsers.find((user) => user.id === id)
if (!result) {
return Promise.reject(new Error('User not found'))
}
return Promise.resolve(result)
}
}
}
function make () {
return authenticator({
secret: 'TEST',
users: localUsersRepository()
})
}
test('getAuthBlurb promises a string', async (t) => {
const auth = make()
const user = testUsers[0]
const promise = auth.getAuthBlurb(user.id)
t.true(promise instanceof Promise)
const result = await promise
t.is(typeof result, 'object')
t.is(typeof result.blurb, 'string')
})
| import test from 'ava'
import authenticator from '../src/authenticator'
import testUsers from './util/testUsers'
function localUsersRepository () {
return {
getUser(id) {
const result = testUsers.find((user) => user.id === id)
if (!result) {
return Promise.reject(new Error('User not found'))
}
return Promise.resolve(result)
}
}
}
function make () {
return authenticator({
secret: 'TEST',
users: localUsersRepository()
})
}
test('getAuthBlurb promises a string', async (t) => {
const auth = make()
const user = testUsers[0]
const promise = auth.getAuthBlurb(user.id)
t.is(typeof promise.then, 'function')
const result = await promise
t.is(typeof result, 'object')
t.is(typeof result.blurb, 'string')
})
| Fix test for getAuthBlurb() result | Fix test for getAuthBlurb() result
| JavaScript | mit | goto-bus-stop/plug-auth | ---
+++
@@ -26,7 +26,7 @@
const auth = make()
const user = testUsers[0]
const promise = auth.getAuthBlurb(user.id)
- t.true(promise instanceof Promise)
+ t.is(typeof promise.then, 'function')
const result = await promise
t.is(typeof result, 'object')
t.is(typeof result.blurb, 'string') |
86ee32602f9257790c2da7b4e84e2070ace5bfb7 | client/constants/NavigateConstants.js | client/constants/NavigateConstants.js | import constantCreator from '../lib/constantCreator'
const NavigateConstants = constantCreator('NAVIGATE', {
START: null,
FAILURE: null,
SUCCESS: null
})
export default NavigateConstants
| import constantCreator from '../lib/constantCreator'
const NavigateConstants = constantCreator('NAVIGATE', {
START: null,
FAILURE: null,
SUCCESS: null,
TRANSITION_TO: null
})
export default NavigateConstants
| Add transition constant for navigation | Add transition constant for navigation
| JavaScript | apache-2.0 | cesarandreu/bshed,cesarandreu/bshed | ---
+++
@@ -3,7 +3,8 @@
const NavigateConstants = constantCreator('NAVIGATE', {
START: null,
FAILURE: null,
- SUCCESS: null
+ SUCCESS: null,
+ TRANSITION_TO: null
})
export default NavigateConstants |
8c86d8945458031b6164f110a3a59899f638ad37 | closure/goog/structs/priorityqueue.js | closure/goog/structs/priorityqueue.js | /**
* @license
* Copyright The Closure Library Authors.
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Datastructure: Priority Queue.
*
*
* This file provides the implementation of a Priority Queue. Smaller priorities
* move to the front of the queue. If two values have the same priority,
* it is arbitrary which value will come to the front of the queue first.
*/
// TODO(user): Should this rely on natural ordering via some Comparable
// interface?
goog.provide('goog.structs.PriorityQueue');
goog.require('goog.structs.Heap');
/**
* Class for Priority Queue datastructure.
*
* @constructor
* @extends {goog.structs.Heap<number, VALUE>}
* @template VALUE
* @final
*/
goog.structs.PriorityQueue = function() {
'use strict';
goog.structs.Heap.call(this);
};
goog.inherits(goog.structs.PriorityQueue, goog.structs.Heap);
/**
* Puts the specified value in the queue.
* @param {number} priority The priority of the value. A smaller value here
* means a higher priority.
* @param {VALUE} value The value.
*/
goog.structs.PriorityQueue.prototype.enqueue = function(priority, value) {
'use strict';
this.insert(priority, value);
};
/**
* Retrieves and removes the head of this queue.
* @return {VALUE} The element at the head of this queue. Returns undefined if
* the queue is empty.
*/
goog.structs.PriorityQueue.prototype.dequeue = function() {
'use strict';
return this.remove();
};
| /**
* @license
* Copyright The Closure Library Authors.
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Datastructure: Priority Queue.
*
*
* This file provides the implementation of a Priority Queue. Smaller priorities
* move to the front of the queue. If two values have the same priority,
* it is arbitrary which value will come to the front of the queue first.
*/
// TODO(user): Should this rely on natural ordering via some Comparable
// interface?
goog.module('goog.structs.PriorityQueue');
goog.module.declareLegacyNamespace();
const Heap = goog.require('goog.structs.Heap');
/**
* Class for Priority Queue datastructure.
*
* @extends {Heap<number, VALUE>}
* @template VALUE
* @final
*/
class PriorityQueue extends Heap {
/**
* Puts the specified value in the queue.
* @param {number} priority The priority of the value. A smaller value here
* means a higher priority.
* @param {VALUE} value The value.
*/
enqueue(priority, value) {
this.insert(priority, value);
}
/**
* Retrieves and removes the head of this queue.
* @return {VALUE} The element at the head of this queue. Returns undefined if
* the queue is empty.
*/
dequeue() {
return this.remove();
}
}
exports = PriorityQueue;
| Convert goog.structs.PriorityQueue to goog.module and ES6 class | Convert goog.structs.PriorityQueue to goog.module and ES6 class
RELNOTES: n/a
PiperOrigin-RevId: 442836111
Change-Id: I24f217f529862670ff383d92bd4095f17bf980ff
| JavaScript | apache-2.0 | google/closure-library,google/closure-library,google/closure-library,google/closure-library,google/closure-library | ---
+++
@@ -17,45 +17,37 @@
// interface?
-goog.provide('goog.structs.PriorityQueue');
+goog.module('goog.structs.PriorityQueue');
+goog.module.declareLegacyNamespace();
-goog.require('goog.structs.Heap');
-
+const Heap = goog.require('goog.structs.Heap');
/**
* Class for Priority Queue datastructure.
*
- * @constructor
- * @extends {goog.structs.Heap<number, VALUE>}
+ * @extends {Heap<number, VALUE>}
* @template VALUE
* @final
*/
-goog.structs.PriorityQueue = function() {
- 'use strict';
- goog.structs.Heap.call(this);
-};
-goog.inherits(goog.structs.PriorityQueue, goog.structs.Heap);
+class PriorityQueue extends Heap {
+ /**
+ * Puts the specified value in the queue.
+ * @param {number} priority The priority of the value. A smaller value here
+ * means a higher priority.
+ * @param {VALUE} value The value.
+ */
+ enqueue(priority, value) {
+ this.insert(priority, value);
+ }
-
-/**
- * Puts the specified value in the queue.
- * @param {number} priority The priority of the value. A smaller value here
- * means a higher priority.
- * @param {VALUE} value The value.
- */
-goog.structs.PriorityQueue.prototype.enqueue = function(priority, value) {
- 'use strict';
- this.insert(priority, value);
-};
-
-
-/**
- * Retrieves and removes the head of this queue.
- * @return {VALUE} The element at the head of this queue. Returns undefined if
- * the queue is empty.
- */
-goog.structs.PriorityQueue.prototype.dequeue = function() {
- 'use strict';
- return this.remove();
-};
+ /**
+ * Retrieves and removes the head of this queue.
+ * @return {VALUE} The element at the head of this queue. Returns undefined if
+ * the queue is empty.
+ */
+ dequeue() {
+ return this.remove();
+ }
+}
+exports = PriorityQueue; |
d9497da46e647f2ca9d6a2ad2f3fcf4d8c56c90d | assets/src/edit-story/elements/video/display.js | assets/src/edit-story/elements/video/display.js | /**
* External dependencies
*/
import PropTypes from 'prop-types';
import styled from 'styled-components';
/**
* Internal dependencies
*/
import { ElementWithPosition, ElementWithSize, ElementWithRotation } from '../shared';
const Element = styled.video`
${ ElementWithPosition }
${ ElementWithSize }
${ ElementWithRotation }
`;
function VideoDisplay( { src, width, height, x, y, rotationAngle, controls, mimeType } ) {
const props = {
width,
height,
x,
y,
rotationAngle,
controls,
};
return (
<Element { ...props }>
<source src={ src } type={ mimeType } />
</Element>
);
}
VideoDisplay.propTypes = {
rotationAngle: PropTypes.number.isRequired,
controls: PropTypes.bool,
mimeType: PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
x: PropTypes.number.isRequired,
y: PropTypes.number.isRequired,
};
export default VideoDisplay;
| /**
* External dependencies
*/
import PropTypes from 'prop-types';
import styled from 'styled-components';
/**
* Internal dependencies
*/
import { ElementWithPosition, ElementWithSize, ElementWithRotation } from '../shared';
const Element = styled.video`
${ ElementWithPosition }
${ ElementWithSize }
${ ElementWithRotation }
`;
function VideoDisplay( props ) {
const {
mimeType,
src,
id,
} = props;
return (
<Element { ...props } >
<source src={ src } type={ mimeType } />
</Element>
);
}
VideoDisplay.propTypes = {
rotationAngle: PropTypes.number.isRequired,
controls: PropTypes.bool,
autoPlay: PropTypes.bool,
loop: PropTypes.bool,
mimeType: PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
x: PropTypes.number.isRequired,
y: PropTypes.number.isRequired,
};
export default VideoDisplay;
| Add some basic video element. | Add some basic video element.
| JavaScript | apache-2.0 | GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp | ---
+++
@@ -15,17 +15,15 @@
${ ElementWithRotation }
`;
-function VideoDisplay( { src, width, height, x, y, rotationAngle, controls, mimeType } ) {
- const props = {
- width,
- height,
- x,
- y,
- rotationAngle,
- controls,
- };
+function VideoDisplay( props ) {
+ const {
+ mimeType,
+ src,
+ id,
+ } = props;
+
return (
- <Element { ...props }>
+ <Element { ...props } >
<source src={ src } type={ mimeType } />
</Element>
);
@@ -34,6 +32,8 @@
VideoDisplay.propTypes = {
rotationAngle: PropTypes.number.isRequired,
controls: PropTypes.bool,
+ autoPlay: PropTypes.bool,
+ loop: PropTypes.bool,
mimeType: PropTypes.string.isRequired,
src: PropTypes.string.isRequired,
width: PropTypes.number.isRequired, |
bfac9b3caa74208d63b55a3f2dd0c364e8656e8a | test/src/mocha/browser.js | test/src/mocha/browser.js | var windowTest = require('./windowTest');
var elmTest = require('./elmTest');
var locationTest = require('./locationTest');
var storageTest = require('./storageTest');
module.exports = function (browser) {
var title =
browser.desiredCapabilities.browserName + "-" +
browser.desiredCapabilities.version + "-" +
browser.desiredCapabilities.platform + " "
browser.desiredCapabilities.build;
describe(title, function () {
this.timeout(600000);
this.slow(4000);
var allPassed = true;
// Before any tests run, initialize the browser.
before(function (done) {
browser.init(function (err) {
if (err) throw err;
done();
});
});
elmTest(browser);
windowTest(browser);
locationTest(browser);
storageTest(browser);
afterEach(function() {
allPassed = allPassed && (this.currentTest.state === 'passed');
});
after(function (done) {
console.log(title + (allPassed ? " PASSED" : " FAILED"));
browser.passed(allPassed, done);
});
});
};
| var windowTest = require('./windowTest');
var elmTest = require('./elmTest');
var locationTest = require('./locationTest');
var storageTest = require('./storageTest');
module.exports = function (browser) {
var title =
browser.desiredCapabilities.browserName + "-" +
browser.desiredCapabilities.version + "-" +
browser.desiredCapabilities.platform + " "
browser.desiredCapabilities.build;
describe(title, function () {
this.timeout(900000);
this.slow(4000);
var allPassed = true;
// Before any tests run, initialize the browser.
before(function (done) {
browser.init(function (err) {
if (err) throw err;
done();
});
});
elmTest(browser);
windowTest(browser);
locationTest(browser);
storageTest(browser);
afterEach(function() {
allPassed = allPassed && (this.currentTest.state === 'passed');
});
after(function (done) {
console.log(title + (allPassed ? " PASSED" : " FAILED"));
browser.passed(allPassed, done);
});
});
};
| Increase timeout for the sake of iPhone tests. | Increase timeout for the sake of iPhone tests.
| JavaScript | mit | rgrempel/elm-web-api,rgrempel/elm-web-api | ---
+++
@@ -11,7 +11,7 @@
browser.desiredCapabilities.build;
describe(title, function () {
- this.timeout(600000);
+ this.timeout(900000);
this.slow(4000);
var allPassed = true; |
6336e7cd56c760d90ef63694ecea0eee529705a7 | test/stores/Store.spec.js | test/stores/Store.spec.js | import store from "src/stores/Store.js";
import app from "src/reducers/App.js";
describe("store", () => {
it("should exist", () => {
store.should.exist;
});
it("should have all API methods", () => {
store.dispatch.should.be.a.function;
store.getState.should.be.a.function;
store.replaceReducer.should.be.a.function;
store.subscribe.should.be.a.function;
});
it("should use app reducer", () => {
var storeState = store.dispath({type: "bla-bla-bla"});
var defaultState = app(undefined, {type: "bla-bla-bla"});
storeState.should.be.eql(defaultState);
})
});
| import store from "src/stores/Store.js";
import app from "src/reducers/App.js";
describe("store", () => {
it("should exist", () => {
store.should.exist;
});
it("should have all API methods", () => {
store.dispatch.should.be.a.function;
store.getState.should.be.a.function;
store.replaceReducer.should.be.a.function;
store.subscribe.should.be.a.function;
});
it("should use app reducer", () => {
store.dispatch({type: "bla-bla-bla"});
var storeState = store.getState();
var defaultState = app(undefined, {type: "bla-bla-bla"});
storeState.should.be.eql(defaultState);
})
});
| Fix Store: fix broken test whether store use app reducer or not | Fix Store: fix broken test whether store use app reducer or not
| JavaScript | mit | Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React | ---
+++
@@ -15,7 +15,8 @@
});
it("should use app reducer", () => {
- var storeState = store.dispath({type: "bla-bla-bla"});
+ store.dispatch({type: "bla-bla-bla"});
+ var storeState = store.getState();
var defaultState = app(undefined, {type: "bla-bla-bla"});
storeState.should.be.eql(defaultState);
}) |
00d96d49e368313190aad149d5f3de0f9a226149 | examples/expected_invocation_test.js | examples/expected_invocation_test.js | var Ajax = {
get: function(uri) { }
};
var Updater = Class.create({
initialize: function(bookId) {
this.bookId = bookId;
setSample('<div id="title"></div>');
},
run: function() {
var book = Ajax.get('http://example.com/books/'+this.bookId+'.json');
var title = book.title;
$('title').innerHTML = book.title;
}
});
Moksi.describe('Updater', {
setup: function() {
this.suite.updater = new Updater(12);
},
'fetches book information from the correct URL': function() {
expects(Ajax).receives('get', {
withArguments: ['http://example.com/books/12.json'],
returns: { title: 'The Haunter of the Dark' }
});
this.suite.updater.run();
}
}); | var Ajax = {
get: function(uri) { }
};
var Updater = Class.create({
initialize: function(bookId) {
this.bookId = bookId;
},
run: function() {
var book = Ajax.get('http://example.com/books/'+this.bookId+'.json');
var title = book.title;
$('title').innerHTML = book.title;
}
});
Moksi.describe('Updater', {
setup: function() {
setSample('<div id="title"></div>');
this.suite.updater = new Updater(12);
},
'fetches book information from the correct URL': function() {
expects(Ajax).receives('get', {
withArguments: ['http://example.com/books/12.json'],
returns: { title: 'The Haunter of the Dark' }
});
this.suite.updater.run();
}
}); | Fix something in the the expected invocation example. | Fix something in the the expected invocation example.
| JavaScript | mit | Manfred/moksi | ---
+++
@@ -5,7 +5,6 @@
var Updater = Class.create({
initialize: function(bookId) {
this.bookId = bookId;
- setSample('<div id="title"></div>');
},
run: function() {
@@ -17,6 +16,7 @@
Moksi.describe('Updater', {
setup: function() {
+ setSample('<div id="title"></div>');
this.suite.updater = new Updater(12);
},
|
0c1dc88e462e55ca7bae7afd085941abe5400ed1 | listings/intro/first-project/index.js | listings/intro/first-project/index.js | var CountStream = require('./countstream'); //<co id="callout-intro-countstream-index-1" />
var countStream = new CountStream('book'); //<co id="callout-intro-countstream-index-2" />
var http = require('http');
http.get('http://www.manning.com', function(res) { //<co id="callout-intro-countstream-index-3" />
res.pipe(countStream); //<co id="callout-intro-countstream-index-4" />
});
countStream.on('total', function(count) {
console.log('Total matches:', count);
});
| var CountStream = require('./countstream'); //<co id="callout-intro-countstream-index-1" />
var countStream = new CountStream('book'); //<co id="callout-intro-countstream-index-2" />
var https = require('https');
https.get('https://www.manning.com', function(res) { //<co id="callout-intro-countstream-index-3" />
res.pipe(countStream); //<co id="callout-intro-countstream-index-4" />
});
countStream.on('total', function(count) {
console.log('Total matches:', count);
});
| Update example to use https rather than http. (looks like manning.com switched to https protocol.) | Update example to use https rather than http. (looks like manning.com
switched to https protocol.)
| JavaScript | mit | alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice,alexyoung/nodeinpractice | ---
+++
@@ -1,8 +1,8 @@
var CountStream = require('./countstream'); //<co id="callout-intro-countstream-index-1" />
var countStream = new CountStream('book'); //<co id="callout-intro-countstream-index-2" />
-var http = require('http');
+var https = require('https');
-http.get('http://www.manning.com', function(res) { //<co id="callout-intro-countstream-index-3" />
+https.get('https://www.manning.com', function(res) { //<co id="callout-intro-countstream-index-3" />
res.pipe(countStream); //<co id="callout-intro-countstream-index-4" />
});
|
19d3b4ee7b416b219903ec2b2f42aedfc665c3b3 | server.js | server.js | var http = require('http');
var r = require('request');
var config = require('./config.json');
var doneUrl;
var userUrl;
http.createServer(function(request, response) {
if (!isEvent(request)) return;
r.post({
url: doneUrl
}, function(error, response, body) {
if (error !== null) {
throw error;
}
r.post({
url: doneUrl,
form: {
authUrl: userUrl
}
}, function(error, response, body) {
if (error !== null) {
throw error;
}
});
});
}).listen(config.port);
var isEvent = function(request) {
return request.url === config.eventsUrl && request.method === 'POST';
};
var helperUrl = config.helper.host + config.helper.endpoint;
r.post({
url: helperUrl,
body: {
media: {
type: "url",
content: config.sampleImageUrl
},
eventsURL: config.eventsUrl
},
json: true
}, function(error, response, body) {
if (error !== null) {
throw error;
}
var bodyInJson = JSON.parse(body);
doneUrl = bodyInJson.doneUrl;
userUrl = bodyInJson.userUrl;
});
| var http = require('http');
var r = require('request');
var config = require('./config.json');
var doneUrl;
var userUrl;
http.createServer(function(request, response) {
if (!isEvent(request)) return;
r.post({
url: doneUrl
}, function(error, response, body) {
if (error !== null) {
throw error;
}
r.post({
url: doneUrl,
form: {
authUrl: userUrl
}
}, function(error, response, body) {
if (error !== null) {
throw error;
}
});
});
}).listen(config.port);
var isEvent = function(request) {
return request.url === config.eventsUrl && request.method === 'POST';
};
var helperUrl = config.helper.host + config.helper.endpoint;
r.post({
url: helperUrl,
body: {
media: {
type: "url",
content: config.sampleImageUrl
},
eventsURL: config.eventsUrl
},
json: true
}, function(error, response, body) {
if (error !== null) {
throw error;
}
doneUrl = body.doneUrl;
userUrl = body.userUrl;
});
| Remove unnecessary parsing of body -- it's already an object. | Remove unnecessary parsing of body -- it's already an object.
| JavaScript | mit | RemoteHelper/client-mock-node | ---
+++
@@ -57,7 +57,6 @@
throw error;
}
- var bodyInJson = JSON.parse(body);
- doneUrl = bodyInJson.doneUrl;
- userUrl = bodyInJson.userUrl;
+ doneUrl = body.doneUrl;
+ userUrl = body.userUrl;
}); |
8805437d1b1c1e37f29223bbe2ef74920a719fc2 | packages/app/source/client/components/appeals-editor/appeal-form.js | packages/app/source/client/components/appeals-editor/appeal-form.js | Space.flux.BlazeComponent.extend(Donations, 'AppealForm', {
events() {
return [{
'keyup .appeal.form input': this._onInputChange,
'keyup .appeal.form .description': this._onInputChange,
'click .appeal.form .submit': this._onSubmit
}];
},
_onInputChange() {},
_onSubmit() {},
_getValues() {
return {
title: this.$('.title').val(),
quantity: new Quantity(parseInt(this.$('.quantity').val(), 10)),
description: this.$('.description').val()
};
}
});
| Space.flux.BlazeComponent.extend(Donations, 'AppealForm', {
ENTER: 13,
events() {
return [{
'keyup .appeal.form input': this._onInputChange,
'keyup .appeal.form .description': this._onInputChange,
'click .appeal.form .submit': this._onSubmit
}];
},
_onInputChange() {
if (event.keyCode === this.ENTER) {
this._onSubmit()
}
},
_onSubmit() {},
_getValues() {
return {
title: this.$('.title').val(),
quantity: new Quantity(parseInt(this.$('.quantity').val(), 10)),
description: this.$('.description').val()
};
}
});
| Add enter keymap to Appeals editor | Add enter keymap to Appeals editor
Note that there’s some fuzzy UI logic that is linking the isEditing
state to the submit being clicked.
| JavaScript | mit | meteor-space/donations,meteor-space/donations,meteor-space/donations | ---
+++
@@ -1,4 +1,6 @@
Space.flux.BlazeComponent.extend(Donations, 'AppealForm', {
+
+ ENTER: 13,
events() {
return [{
@@ -8,7 +10,11 @@
}];
},
- _onInputChange() {},
+ _onInputChange() {
+ if (event.keyCode === this.ENTER) {
+ this._onSubmit()
+ }
+ },
_onSubmit() {},
_getValues() { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.