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) {
... | "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) {
... | 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 callba... | 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 callba... | 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}>
+... |
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/... |
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')
.... | 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')
.... | 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 Gitt... |
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 = "Pr... | "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 = "Pr... | 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)) {
... |
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.lo... | 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 || {}); // ... | /*
* 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 || {}); // ... | 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(listAction... |
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... | '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... | 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... | /* 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... | 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, --direct... | #!/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, --direct... | 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 [.]', __di... |
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() {
... | 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() {
... | 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 /... | 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]... | '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]... | 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 parsedDa... | #!/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) {
... | 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 com... |
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 ... | /**
* 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(transformDe... | 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 reduc... |
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... | 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... | 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 () {
s... |
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 s... | 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 ind... | 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.st... | '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.st... | 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 ... | '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 ... | 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();... | '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.dirn... | 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();
va... |
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'];
mod... | /*!
* 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', '... | 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', 'F... |
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.va... |
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();
... | 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-... |
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'] !== u... |
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'] !== u... | 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[opt... |
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.createEl... | 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', (... | 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,... |
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' />
<Refine... | 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' />
<Refine... | 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 si... |
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()... | '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()... | 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()... |
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 => erro... | 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'),... | 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\u20... | '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\u20... | 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, { trimRigh... |
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... | '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... | 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} ind... | /**
* @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} inde... | 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 {Ar... |
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... | 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 }) => (
... | 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}
... |
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 < listElemen... | $(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 ... | 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 = [];
- ... |
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(ANNOUNCE... | 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(ANNOUNCE... | 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/webt... | ---
+++
@@ -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: 'W... |
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/controller... | //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/controller... | 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.ge... |
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.b... | const ParserCommon = require('./ParserCommon');
function PropertyValue(xml) {
this.Annotations = {};
this.validElements = {
};
this.validAttributes = {
'Bool': {bool: true},
'String': {},
'Path': {},
'Property': {alreadyHandeled: true},
'EnumMember': {}
};
var init = Pa... | 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.createDecipheri... | 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.createDecipheri... | 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.protot... |
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 onl... | /*
* 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 onl... | 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');
-$('#pj... |
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... | /**
* 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": ... | 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] |... |
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:\/\/w... | 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:\/\/w... | 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/u... | ---
+++
@@ -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... | '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 a... | 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 " +... |
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 mi... | "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 o... | 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"));
... |
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(${st... | 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(${st... | 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.... |
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.NO... | /* 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... | 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
****************... |
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
}
am... | 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
}
am... | 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));
}
... | 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));
}
... | 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... |
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];
hea... | 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';
... | 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.get... |
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.preve... | ( 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 )... | 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 ) {
@@ ... |
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 LayerGro... | 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 Layer... | 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/ope... | ---
+++
@@ -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: 'ma... |
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/m... | ---
+++
@@ -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/acce... | $(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 erf... | 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'));
$.a... |
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: TOGG... |
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
// ======================================... | '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
// ======... | 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(deb... |
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... | 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... | 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... | 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.cal... | 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 incom... |
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: "... | 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... | 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({},... |
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(/\./)) {... | // 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];
- va... |
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',
... | 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',
... | 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': ... |
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 (... | /*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 (... | 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.get... | 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-s... | ---
+++
@@ -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);
+};
+
+C... |
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');
$stateProv... | 'use strict';
module.exports = Config;
Config.$inject = ['$stateProvider', '$urlRouterProvider', '$uiViewScrollProvider'];
function Config($stateProvider, $urlRouterProvider, $uiViewScrollProvider) {
$uiViewScrollProvider.useAnchorScroll();
$urlRouterProvider.otherwise('/dashboard/profile');
$stateProvider
... | 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 Co... |
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'),
... | 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... | 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=... |
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.set... | #!/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('\n... | 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 = functi... | (function (angular){
'use strict';
angular.module('app')
.controller('counterController', counterController)
.controller('todoController', todoController)
counterController.$inject = []
todoController.$inject = []
function counterController(){
this.counter = 0;
this.add = functi... | 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 = ''
... |
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'))
... | // 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/Rom... | 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'))
... |
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.expo... | '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 ... | 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;
+};
+
+... |
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 "pro... | /**
* @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 "pro... | 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_DRI... |
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... | /**
* 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... | 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 ... | 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 ... | 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")[na... | 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("... | 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... |
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': /("|')(\\?.... | 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': /("... | 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-... |
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),... | 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),... | 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, posi... | 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 Pl... |
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': '... |
define([], function () {
'use strict';
return {
'oauthConsumerKey': 'wPfXjdZViPvrRWSlenSWBsAWhYKarmOkOKk5WS4U',
'oauthSecret': 'kaBZXTHZHKSk2jvBUr8vzk7JRI1cryFI08ubv7Du',
// 'overpassServer': 'http://overpass-api.de/api/',
'overpassServer': 'http://overpass.osm.rambler.ru/cgi/',
// 'overpassServer': '... | 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/... |
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');... | #!/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('[opt... | 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._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];
... | 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) {
... |
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 ... | // 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 ... | 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)
$... |
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: 'be... | 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... | 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 applic... | /*
* 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 applic... | 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 ) {
... |
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_S... | 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, ca... | (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)
}
fun... | 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(tar... |
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/... | 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/... | 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,alexbeletsk... | ---
+++
@@ -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 ... |
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.ad... | 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.... | 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'))... | 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'))... | 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 ... | /**
* @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 ... | 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 datastructur... |
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 }
${ Element... | /**
* 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 }
${ Element... | 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,
+ } = ... |
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.versi... | 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.versi... | 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.s... | 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.s... | 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(defaul... |
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').inne... | 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.descri... | 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.... |
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.pip... | 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... | 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(re... |
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) {
... | 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) {
... | 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() {},
_getVa... | 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.k... | 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() {},
_ge... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.