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 |
|---|---|---|---|---|---|---|---|---|---|---|
d38ffbb8e604b3cd23eece42137ed2925bbda3c2 | src/helpers/createTypeAlias.js | src/helpers/createTypeAlias.js | export default function createTypeAlias(j, flowTypes, { name, export } = { name: 'Props', export: false }) {
const typeAlias = j.typeAlias(
j.identifier(name), null, j.objectTypeAnnotation(flowTypes)
);
if (export) {
return j.exportNamedDeclaration(typeAlias);
}
return typeAlias;
}
| export default function createTypeAlias(j, flowTypes, { name='Props', shouldExport=false } = {}) {
const typeAlias = j.typeAlias(
j.identifier(name), null, j.objectTypeAnnotation(flowTypes)
);
if (shouldExport) {
return j.exportNamedDeclaration(typeAlias);
}
return typeAlias;
}
| Fix defaults, fix `export` arg name | Fix defaults, fix `export` arg name
| JavaScript | mit | billyvg/codemod-proptypes-to-flow | ---
+++
@@ -1,9 +1,9 @@
-export default function createTypeAlias(j, flowTypes, { name, export } = { name: 'Props', export: false }) {
+export default function createTypeAlias(j, flowTypes, { name='Props', shouldExport=false } = {}) {
const typeAlias = j.typeAlias(
j.identifier(name), null, j.objectTypeAnnotat... |
cb5b6c72bffc569c2511af72c309b91dbd308c64 | tests/acceptance/simple-relationships-test.js | tests/acceptance/simple-relationships-test.js | import Ember from 'ember';
import { test } from 'qunit';
import moduleForAcceptance from '../../tests/helpers/module-for-acceptance';
const { get } = Ember;
moduleForAcceptance('Acceptance | simple relationships', {
beforeEach() {
this.author = server.create('author');
this.post = server.create('post', {
... | import Ember from 'ember';
import { test } from 'qunit';
import moduleForAcceptance from '../../tests/helpers/module-for-acceptance';
const { get } = Ember;
moduleForAcceptance('Acceptance | simple relationships', {
beforeEach() {
this.author = server.create('author');
this.post = server.create('post', {
... | Clarify the role of each test in the simple relationships acceptance tests | Clarify the role of each test in the simple relationships acceptance tests
| JavaScript | mit | amiel/ember-data-url-templates,amiel/ember-data-url-templates | ---
+++
@@ -25,15 +25,23 @@
});
test('it can use a belongsTo id from the snapshot when generating a url', function(assert) {
- // Comments are loaded with data and ids
+ // The comments relationship comes with with data and ids. Therefore it uses
+ // the findRecord adapter hook in the comment adapter and the ... |
1c00703a3ac96f44da886596dbb1db50ab79069f | cli/run.js | cli/run.js | /**
* @file
* Run validation by CLI
*/
var Q = require('q');
var getOptions = require('../actions/cli/get-options');
var suppressMessages = require('../actions/suppress');
var validateByW3c = require('../actions/validate-by-w3c');
var getReporter = require('../reporter');
function main() {
getOptions()
... | /**
* @file
* Run validation by CLI
*/
var Q = require('q');
var getOptions = require('../actions/cli/get-options');
var suppressMessages = require('../actions/suppress');
var validateByW3c = require('../actions/validate-by-w3c');
var getReporter = require('../reporter');
function main() {
getOptions()
... | Implement positive exit code if feed is not valid | Implement positive exit code if feed is not valid
| JavaScript | mit | andre487/feed-validator,Andre-487/feed-validator,andre487/feed-validator,Andre-487/feed-validator | ---
+++
@@ -24,6 +24,8 @@
var reporter = getReporter(ctx.options.reporter);
console.log(reporter(validationData, ctx.options));
+
+ process.exit(validationData.isValid ? 0 : 1);
})
.done();
} |
1af1c4e115cc9f806241ad589f497cd43b7fdad2 | modules/who.js | modules/who.js | module.exports = function(ircbot, config) {
var request = require('request');
ircbot.addListener('message', function (from, to, message) {
if (to !== config.irc.announceChannel || message !== '!who') {
return;
}
request({
url: 'https://fauna.initlab.org/api/users/present.json',
json: true
}, fun... | module.exports = function(ircbot, config) {
var request = require('request');
ircbot.addListener('message', function (from, to, message) {
if (to !== config.irc.announceChannel || message !== '!who') {
return;
}
request({
url: 'https://fauna.initlab.org/api/users/present.json',
json: true
}, fun... | Send a different message when no one is in the Lab | Send a different message when no one is in the Lab
| JavaScript | mit | initLab/irc-notifier | ---
+++
@@ -15,9 +15,16 @@
return;
}
- ircbot.say(to, 'People in init Lab: ' + body.map(function(user) {
+ var people = body.map(function(user) {
return user.name + ' (' + user.username + ')';
- }).join(', '));
+ });
+
+ if (people.length === 0) {
+ ircbot.say(to, 'No one in init La... |
d230d002bf02fb1063b887a0b67d336c31f45b99 | js/jquery-sidebar.js | js/jquery-sidebar.js | $.fn.sidebar = function() {
var $sidebar = this;
var $tabs = $sidebar.children('.sidebar-tabs').first();
var $container = $sidebar.children('.sidebar-content').first();
$sidebar.find('.sidebar-tabs > li > a').on('click', function() {
var $tab = $(this).closest('li');
if ($tab.hasClass(... | $.fn.sidebar = function() {
var $sidebar = this;
var $tabs = $sidebar.children('.sidebar-tabs').first();
var $container = $sidebar.children('.sidebar-content').first();
$sidebar.find('.sidebar-tabs > li > a').on('click', function() {
var $tab = $(this).closest('li');
if ($tab.hasClass(... | Make open() methods tab parameter optional | js/jquery: Make open() methods tab parameter optional
The last three commits are closing #3
| JavaScript | mit | wsignor/wsignor.github.io,noerw/sidebar-v2,noerw/sidebar-v2,Turbo87/sidebar-v2,andrewmartini/sidebar-v2,wsignor/wsignor.github.io,MuellerMatthew/sidebar-v2,andrewmartini/sidebar-v2,projectbid7/sidebar-v2 | ---
+++
@@ -13,6 +13,9 @@
});
$sidebar.open = function(id, $tab) {
+ if (typeof $tab === 'undefined')
+ $tab = $tabs.find('li > a[href="#' + id + '"]').parent();
+
// hide old active contents
$container.children('.sidebar-pane.active').removeClass('active');
|
593b14d0eb07f9b0c9698da3758df51922825ffa | app/views/room.js | app/views/room.js | const h = require('virtual-dom/h');
module.exports = function (data) {
const {gameID, game} = data;
return h('div', {className: 'room'}, [
game.playing ? null : h('a', {href: '/new-player/' + gameID}, 'Wanna play along?'),
game.playing ? null : h('form', {id: 'setup', method: 'post', action: `/${gameID}`},... | const h = require('virtual-dom/h');
module.exports = function (data) {
const {gameID, game} = data;
return h('div', {className: 'room'}, [
game.playing ? null : h('a', {href: '/new-player/' + gameID}, 'Wanna play along?'),
game.playing ? null : h('form', {id: 'setup', method: 'post', action: `/${gameID}`},... | Fix typo win -> won | Fix typo win -> won
| JavaScript | mit | rijkvanzanten/luaus | ---
+++
@@ -15,7 +15,7 @@
style: {
backgroundColor: `rgb(${player.color[1]}, ${player.color[0]}, ${player.color[2]})`
},
- className: game.ended ? game.winner === playerID ? 'win' : 'lost' : ''
+ className: game.ended ? game.winner === playerID ? 'won' : 'lost' : '... |
0deb09921fd17a6dac967a47ed2dee31fa85028e | js/reducers/index.js | js/reducers/index.js | import account from './account';
import person from './person';
import languages from './languages';
import jobTypes from './jobTypes';
import creditCards from './creditCards';
const { combineReducers } = require('redux');
export default combineReducers({ person, languages, account, jobTypes, creditCards });
| import account from './account';
import person from './person';
import languages from './languages';
import jobTypes from './jobTypes';
import ownedJobs from './ownedJobs';
import creditCards from './creditCards';
const { combineReducers } = require('redux');
export default combineReducers({ person, languages, accoun... | Add ownedJobs reducer in combineReducers | Add ownedJobs reducer in combineReducers
| JavaScript | mit | justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client | ---
+++
@@ -2,8 +2,9 @@
import person from './person';
import languages from './languages';
import jobTypes from './jobTypes';
+import ownedJobs from './ownedJobs';
import creditCards from './creditCards';
const { combineReducers } = require('redux');
-export default combineReducers({ person, languages, acco... |
ec1a3d52a358958b27c3648299f96bf53de07e92 | server/initViewEngine.js | server/initViewEngine.js | var path = require('path');
module.exports = function initViewEngine (keystone, app) {
// Allow usage of custom view engines
if (keystone.get('custom engine')) {
app.engine(keystone.get('view engine'), keystone.get('custom engine'));
}
// Set location of view templates and view engine
app.set('views', keystone... | var path = require('path');
module.exports = function initViewEngine (keystone, app) {
// Allow usage of custom view engines
if (keystone.get('custom engine')) {
app.engine(keystone.get('view engine'), keystone.get('custom engine'));
}
// Set location of view templates and view engine
app.set('views', keystone... | Update default views folder so it's relative to the current project, instead of being `/views` at the root of the filesystem. | Update default views folder so it's relative to the current project, instead of being `/views` at the root of the filesystem.
| JavaScript | mit | trentmillar/keystone,frontyard/keystone,danielmahon/keystone,matthewstyers/keystone,trentmillar/keystone,vokal/keystone,benkroeger/keystone,benkroeger/keystone,andrewlinfoot/keystone,frontyard/keystone,frontyard/keystone,naustudio/keystone,Pop-Code/keystone,matthewstyers/keystone,trentmillar/keystone,vokal/keystone,vok... | ---
+++
@@ -7,7 +7,7 @@
}
// Set location of view templates and view engine
- app.set('views', keystone.getPath('views') || path.sep + 'views');
+ app.set('views', keystone.getPath('views') || 'views');
app.set('view engine', keystone.get('view engine'));
var customView = keystone.get('view'); |
fb90564f3e93db090f1cf622a22b0ec1fc9f2461 | app/initializers/ember-cli-bem.js | app/initializers/ember-cli-bem.js | import Ember from 'ember';
import NamingStrategyFactory from 'ember-cli-bem/naming-strategies/factory';
const {
Component,
} = Ember;
export default {
name: 'ember-cli-bem',
initialize(owner) {
const config = owner.lookup('config:environment');
const addonConfig = config['ember-cli-bem'];
const fa... | import Ember from 'ember';
import NamingStrategyFactory from 'ember-cli-bem/naming-strategies/factory';
const {
Component,
} = Ember;
export default {
name: 'ember-cli-bem',
initialize(owner) {
const config = owner.registry.resolve('config:environment');
const addonConfig = config['ember-cli-bem'];
... | Fix a bug in the initializer | Fix a bug in the initializer
| JavaScript | mit | nikityy/ember-cli-bem,nikityy/ember-cli-bem | ---
+++
@@ -10,7 +10,7 @@
name: 'ember-cli-bem',
initialize(owner) {
- const config = owner.lookup('config:environment');
+ const config = owner.registry.resolve('config:environment');
const addonConfig = config['ember-cli-bem'];
const factory = new NamingStrategyFactory();
const strategy... |
1dac18d5d0184d382513c34cc1ee2666b924ca35 | plugins/queue/discard.js | plugins/queue/discard.js | // discard
exports.register = function () {
this.register_hook('queue','discard');
}
exports.discard = function (next, connection) {
var transaction = connection.transaction;
if (connection.notes.discard ||
transaction.notes.discard)
{
connection.loginfo(this, 'discarding message');
... | // discard
exports.register = function () {
this.register_hook('queue','discard');
this.register_hook('queue_outbound', 'discard');
}
exports.discard = function (next, connection) {
var transaction = connection.transaction;
if (connection.notes.discard ||
transaction.notes.discard)
{
... | Discard plugin should run on queue_outbound as well | Discard plugin should run on queue_outbound as well
| JavaScript | mit | Synchro/Haraka,armored/Haraka,Dexus/Haraka,MignonCornet/Haraka,bsmr-x-script/Haraka,jjz/Haraka,julian-maughan/Haraka,AbhilashSrivastava/haraka_sniffer,alessioalex/Haraka,dweekly/Haraka,hatsebutz/Haraka,typingArtist/Haraka,DarkSorrow/Haraka,pedroaxl/Haraka,hiteshjoshi/my-haraka-config,hayesgm/Haraka,msimerson/Haraka,har... | ---
+++
@@ -2,6 +2,7 @@
exports.register = function () {
this.register_hook('queue','discard');
+ this.register_hook('queue_outbound', 'discard');
}
exports.discard = function (next, connection) { |
41eea1ab82ce70a24874cd51498fffcfd3797541 | eloquent_js_exercises/chapter09/chapter09_ex01.js | eloquent_js_exercises/chapter09/chapter09_ex01.js | verify(/ca[rt]/,
["my car", "bad cats"],
["camper", "high art"]);
verify(/pr?op/,
["pop culture", "mad props"],
["plop"]);
verify(/ferr[et|y|ari]/,
["ferret", "ferry", "ferrari"],
["ferrum", "transfer A"]);
verify(/ious\b/,
["how delicious", "spacious room"],
... | // Fill in the regular expressions
verify(/ca[rt]/,
["my car", "bad cats"],
["camper", "high art"]);
verify(/pr?op/,
["pop culture", "mad props"],
["plop"]);
verify(/ferr(et|y|ari)/,
["ferret", "ferry", "ferrari"],
["ferrum", "transfer A"]);
verify(/ious\b/,
["how de... | Add Chapter 09, exercise 1 | Add Chapter 09, exercise 1
| JavaScript | mit | bewuethr/ctci | ---
+++
@@ -1,27 +1,29 @@
+// Fill in the regular expressions
+
verify(/ca[rt]/,
- ["my car", "bad cats"],
- ["camper", "high art"]);
+ ["my car", "bad cats"],
+ ["camper", "high art"]);
verify(/pr?op/,
- ["pop culture", "mad props"],
- ["plop"]);
+ ["pop culture", "m... |
062ebb5ecf53c778c2e1e67e5f070927cedeb78d | meanrecipes/static/js/script.js | meanrecipes/static/js/script.js | $('#suggestions').typed({
strings: ["chocolate chip cookies", "brownies", "pancakes"],
typeSpeed: 50,
backSpeed: 15,
backDelay: 1500,
loop: true,
});
$('#recipe-form').submit(function() {
get_recipe($('#recipe-title').val());
return false;
});
function get_recipe(title) {
var url = '/recipe/sea... | $('#suggestions').typed({
strings: ["chocolate chip cookies", "brownies", "pancakes"],
typeSpeed: 50,
backSpeed: 15,
backDelay: 1500,
loop: true
});
$('#recipe-form').submit(function() {
get_recipe($('#recipe-title').val());
return false;
});
function get_recipe(title) {
var url = '/re... | Fix JSON parsing bug, ingredients displayed correctly again. | Fix JSON parsing bug, ingredients displayed correctly again.
| JavaScript | bsd-2-clause | kkelk/MeanRecipes,kkelk/MeanRecipes,kkelk/MeanRecipes,kkelk/MeanRecipes | ---
+++
@@ -3,29 +3,28 @@
typeSpeed: 50,
backSpeed: 15,
backDelay: 1500,
- loop: true,
+ loop: true
});
$('#recipe-form').submit(function() {
- get_recipe($('#recipe-title').val());
- return false;
+ get_recipe($('#recipe-title').val());
+ return false;
});
function get_recipe(title... |
c3aeab3192ceb5dc32333453ae35d21878ed4a84 | demo/server.js | demo/server.js | 'use strict';
var path = require('path');
var bigrest = require('../index');
var http = bigrest.listen(18080, {
debug: true,
basepath: __dirname,
static: {
urlpath: '/files',
filepath: path.join(__dirname, 'files')
},
compression: {
threshold: 16 * 1024
}
});
| 'use strict';
var path = require('path');
var bigrest = require('../index');
var http = bigrest.listen(18080, {
debug: true,
basepath: __dirname,
static: {
urlpath: '/files',
filepath: path.join(__dirname, 'files')
},
compression: {
threshold: 16 * 1024
},
rootwork:... | Add demo for options r404work | Add demo for options r404work
| JavaScript | mit | vietor/bigrest,vietor/bigrest | ---
+++
@@ -12,5 +12,14 @@
},
compression: {
threshold: 16 * 1024
+ },
+ rootwork: function(req, res) {
+ res.send('It works...');
+ },
+ r404work: function(req, res, next) {
+ if(req.path !== '/404')
+ next();
+ else
+ res.redirect('/');
... |
c0c389b65c3eb323d76e75c005e2383b6ebfbe84 | src/content_scripts/utilities/next_friday_provider.js | src/content_scripts/utilities/next_friday_provider.js | import moment from 'moment'
export default class NextFridayProvider {
static formattedDate() {
return momentNextFriday().format('M/D');
}
static millisecondsDate() {
return momentNextFriday().toDate().valueOf();
}
}
const momentNextFriday = () => {
let nextFriday = moment()
... | import moment from 'moment'
export default class NextFridayProvider {
static formattedDate() {
return momentNextFriday().format('M/D');
}
static millisecondsDate() {
return momentNextFriday().toDate().valueOf();
}
}
const momentNextFriday = () => {
let nextFriday = moment()
... | Make alarm go off at 3pm instead of 4pm | Make alarm go off at 3pm instead of 4pm
- Moment dates are 0 indexed
| JavaScript | isc | oliverswitzer/wwltw-for-pivotal-tracker,oliverswitzer/wwltw-for-pivotal-tracker | ---
+++
@@ -14,7 +14,7 @@
let nextFriday = moment()
.endOf('week')
.subtract(1, 'day')
- .hour(15)
+ .hour(14)
.minutes(0)
.seconds(0)
.milliseconds(0); |
05825cb8ab1d4554153e1d327917665b5547792c | src/nodes/local-node-device-stats/device-stats.es6.js | src/nodes/local-node-device-stats/device-stats.es6.js | 'use strict';
import { StatsCollector } from './lib/stats';
export default function(RED) {
class DeviceStatsNode {
constructor(n) {
RED.nodes.createNode(this, n);
this.name = n.name;
this.mem = n.mem;
this.nw = n.nw;
this.load = n.load;
this.hostname = n.hostname;
this... | 'use strict';
import { StatsCollector } from './lib/stats';
export default function(RED) {
class DeviceStatsNode {
constructor(n) {
RED.nodes.createNode(this, n);
this.name = n.name;
this.mem = n.mem;
this.nw = n.nw;
this.load = n.load;
this.hostname = n.hostname;
this... | Clear the status only when the timeout is valid | Clear the status only when the timeout is valid
| JavaScript | unknown | CANDY-LINE/candy-red,dbaba/candy-red,CANDY-LINE/candy-red,dbaba/candy-red,dbaba/candy-red,CANDY-LINE/candy-red | ---
+++
@@ -18,6 +18,7 @@
this.on('input', msg => {
clearTimeout(this.timeout);
+ delete this.timeout;
this.status({ fill: 'red', shape: 'dot', text: 'device-stats.status.heartbeat' });
let opts = msg ? msg.payload : null;
this.collector.collect(opts).then(stats => ... |
ddfd3f09e5d0efefbe88eafe6ebfe64d2ee19d2c | test/index.test.js | test/index.test.js | const assert = require('assert');
const configMergeLoader = require('../index.js');
describe('Config Merge Loader', function() {
it('should return a function', function() {
assert.equal(typeof configMergeLoader, 'function');
});
describe('when called', function() {
const loaderInput = 'Loader Content';
... | const assert = require('assert');
const configMergeLoader = require('../index.js');
describe('Config Merge Loader', function() {
it('should return a function', function() {
assert.equal(typeof configMergeLoader, 'function');
});
describe('when called', function() {
const loaderInput = 'Loader Content';
... | Test that it returns the same string it is given | Test that it returns the same string it is given
| JavaScript | mit | bitfyre/config-merge-loader | ---
+++
@@ -13,5 +13,10 @@
const loaderResult = configMergeLoader(loaderInput);
assert.equal(typeof loaderResult, 'string');
});
+
+ it('should return the same string it is given', function() {
+ const loaderResult = configMergeLoader(loaderInput);
+ assert.equal(loaderResult, loaderIn... |
f4015e8cd71450ddf7b7ebfb96f0957c3e5dea8d | test/plexacious.js | test/plexacious.js | const { expect } = require('chai');
const Plexacious = require('../js/Plexacious');
const plex = new Plexacious();
describe('Plexacious:', () => {
describe('Event attaching:', () => {
it('should attach a callback to an event', () => {
plex.on('test', () => {});
expect(plex._eventEmitter.listenerCoun... | const { expect } = require('chai');
const Plexacious = require('../js/Plexacious');
const plex = new Plexacious();
describe('Plexacious:', () => {
}); | Remove event-related tests since we're now simply extending the EventEmitter class | Remove event-related tests since we're now simply extending the EventEmitter class
| JavaScript | isc | ketsugi/plexacious | ---
+++
@@ -4,19 +4,4 @@
const plex = new Plexacious();
describe('Plexacious:', () => {
- describe('Event attaching:', () => {
- it('should attach a callback to an event', () => {
- plex.on('test', () => {});
- expect(plex._eventEmitter.listenerCount('test')).to.equal(1);
- });
-
- it('should ... |
8d5b8c535cdc6c281f5e3b3613b548322eae4905 | src/scripts/editor/Exporter.js | src/scripts/editor/Exporter.js | export default class Exporter {
constructor(editor) {
this.editor = editor;
}
getData() {
var tweenTime = this.editor.tweenTime;
var domain = this.editor.timeline.x.domain();
var domain_start = domain[0];
var domain_end = domain[1];
return {
settings: {
time: tweenTime.timer... | export default class Exporter {
constructor(editor) {
this.editor = editor;
}
getData() {
var tweenTime = this.editor.tweenTime;
var domain = this.editor.timeline.x.domain();
var domain_start = domain[0];
var domain_end = domain[1];
return {
settings: {
time: tweenTime.timer... | Add ability to add your own data in export (exporter.getJSON) | Add ability to add your own data in export (exporter.getJSON)
| JavaScript | mit | idflood/TweenTime,idflood/TweenTime | ---
+++
@@ -32,6 +32,11 @@
};
var data = this.getData();
+ // Give the possibility to add your own data in the export.
+ // ex: new Editor({getJSON: function(data) {data.test = 42; return data;} })
+ if (typeof this.editor.options.getJSON !== 'undefined') {
+ data = this.editor.options.getJS... |
3375511bc07214da78c36fdd4f87ec7bea8aceed | installed-tests/test/js/test0010basic.js | installed-tests/test/js/test0010basic.js | const JSUnit = imports.jsUnit;
// application/javascript;version=1.8
function testBasic1() {
var foo = 1+1;
JSUnit.assertEquals(2, foo);
}
function testFakeFailure() {
var foo = 1+1;
JSUnit.assertEquals(5, foo);
}
JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown);
| const JSUnit = imports.jsUnit;
// application/javascript;version=1.8
function testBasic1() {
var foo = 1+1;
JSUnit.assertEquals(2, foo);
}
JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown);
| Revert "Add a fake test failure" | Revert "Add a fake test failure"
This reverts commit 564dc61d02b854a278b07e21c65c33859ee82dbc.
| JavaScript | mit | pixunil/cjs,mtwebster/cjs,pixunil/cjs,djdeath/gjs,djdeath/gjs,djdeath/gjs,mtwebster/cjs,djdeath/gjs,mtwebster/cjs,pixunil/cjs,pixunil/cjs,endlessm/gjs,endlessm/gjs,mtwebster/cjs,endlessm/gjs,djdeath/gjs,pixunil/cjs,endlessm/gjs,mtwebster/cjs,endlessm/gjs | ---
+++
@@ -5,9 +5,4 @@
JSUnit.assertEquals(2, foo);
}
-function testFakeFailure() {
- var foo = 1+1;
- JSUnit.assertEquals(5, foo);
-}
-
JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown); |
d688d4bdfa582484669f319b1829bfcbdaaeadae | esm/router.js | esm/router.js | /* global Node */
import { ensureEl } from './util.js';
import { setChildren } from './setchildren.js';
export function router (parent, Views, initData) {
return new Router(parent, Views, initData);
}
export class Router {
constructor (parent, Views, initData) {
this.el = ensureEl(parent);
this.Views = V... | /* global Node */
import { ensureEl } from './util.js';
import { setChildren } from './setchildren.js';
export function router (parent, Views, initData) {
return new Router(parent, Views, initData);
}
export class Router {
constructor (parent, Views, initData) {
this.el = ensureEl(parent);
this.Views = V... | Fix critical bug with Router | Fix critical bug with Router
| JavaScript | mit | redom/redom,pakastin/redom | ---
+++
@@ -20,7 +20,7 @@
this.route = route;
- if (View instanceof Node || View.el instanceof Node) {
+ if (View && (View instanceof Node || View.el instanceof Node)) {
this.view = View;
} else {
this.view = View && new View(this.initData, data); |
370aa543cf79d19ccfbba0b69f442a08db20cf90 | data/fillIn.js | data/fillIn.js | /*
* This Source Code is subject to the terms of the Mozilla Public License
* version 2.0 (the "License"). You can obtain a copy of the License at
* http://mozilla.org/MPL/2.0/.
*/
"use strict";
let {host, password} = self.options;
if (location.hostname != host)
throw new Error("Password is meant for a differen... | /*
* This Source Code is subject to the terms of the Mozilla Public License
* version 2.0 (the "License"). You can obtain a copy of the License at
* http://mozilla.org/MPL/2.0/.
*/
"use strict";
let {host, password} = self.options;
if (location.hostname != host)
throw new Error("Password is meant for a differen... | Make sure to trigger "change" event when filling in passwords, webpage logic might rely on it | Make sure to trigger "change" event when filling in passwords, webpage logic might rely on it
| JavaScript | mpl-2.0 | palant/easypasswords,palant/easypasswords | ---
+++
@@ -15,7 +15,10 @@
if (fields.length > 0)
{
for (let field of fields)
+ {
field.value = password;
+ field.dispatchEvent(new Event("change", {bubbles: true}));
+ }
fields[0].focus();
self.port.emit("success");
} |
5cfc30383756d04c84bf4306a350685185dd4ca4 | couchdb.js | couchdb.js | // Copyright 2011 Iris Couch
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... | // Copyright 2011 Iris Couch
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... | Use an Express app instead | Use an Express app instead
| JavaScript | apache-2.0 | iriscouch/couchjs,iriscouch/couchjs | ---
+++
@@ -12,9 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-module.exports = handle_http
+var express = require('express')
-function handle_http(req, res) {
- res.writeHead(200)
- res.end('Hello, world\n')
+var app = express()
+mod... |
2f70c937c40af5fb88f76f5e7af08800f29a93fc | main/exports.js | main/exports.js | 'use strict';
const {BrowserWindow, app} = require('electron');
const loadRoute = require('./utils/routes');
let exportsWindow = null;
const openExportsWindow = show => {
if (!exportsWindow) {
exportsWindow = new BrowserWindow({
width: 320,
height: 360,
resizable: false,
minimizable: fa... | 'use strict';
const {BrowserWindow, app} = require('electron');
const loadRoute = require('./utils/routes');
let exportsWindow = null;
const openExportsWindow = show => {
if (!exportsWindow) {
exportsWindow = new BrowserWindow({
width: 320,
height: 360,
resizable: false,
maximizable: fa... | Fix the export window options | Fix the export window options
The window should be minimizable but not fullscreenable.
| JavaScript | mit | wulkano/kap | ---
+++
@@ -11,8 +11,8 @@
width: 320,
height: 360,
resizable: false,
- minimizable: false,
maximizable: false,
+ fullscreenable: false,
titleBarStyle: 'hiddenInset',
show
}); |
1ef3f1ce228275c3714a4874163b220c85fe6cce | client/app/controllers/profile.js | client/app/controllers/profile.js | angular.module('bolt.profile', ['bolt.auth'])
.controller('ProfileController', function ($scope, $rootScope, $window, Auth, Profile) {
$scope.newInfo = {};
$scope.session = window.localStorage;
var getUserInfo = function () {
Profile.getUser()
.then(function (currentUser) {
// $window.localStorage... | angular.module('bolt.profile', ['bolt.auth'])
.controller('ProfileController', function ($scope, $rootScope, $window, Auth, Profile) {
$scope.newInfo = {};
$scope.session = window.localStorage;
var getUserInfo = function () {
Profile.getUser()
.catch(function (err) {
console.error(err);
});
... | Remove zombie code, .then for useless promise | Remove zombie code, .then for useless promise
| JavaScript | mit | elliotaplant/Bolt,gm758/Bolt,boisterousSplash/Bolt,thomasRhoffmann/Bolt,gm758/Bolt,boisterousSplash/Bolt,thomasRhoffmann/Bolt,elliotaplant/Bolt | ---
+++
@@ -6,16 +6,6 @@
var getUserInfo = function () {
Profile.getUser()
- .then(function (currentUser) {
- // $window.localStorage.setItem('username', currentUser.username);
- // $window.localStorage.setItem('firstName', currentUser.firstName);
- // $window.localStorage.setItem('lastNam... |
56e908e8f9e4e4758eecbfa1a74e3d4d533dd4d2 | collections/user.js | collections/user.js | Meteor.methods({
userAddVisitedRoom: function(roomId) {
var rooms = Rooms.find({
_id: roomId
}, {
_id: 1
});
if (rooms.count() === 0) {
throw new Meteor.Error(422, 'Room does not exist');
}
var users = Meteor.users.find({
... | Meteor.methods({
userAddVisitedRoom: function(roomId) {
var rooms = Rooms.find({
_id: roomId
}, {
_id: 1
});
if (rooms.count() === 0) {
throw new Meteor.Error(422, 'Room does not exist');
}
var users = Meteor.users.find({
... | Add visit counter for rooms. | Add visit counter for rooms. | JavaScript | mit | eagleoneraptor/confnode,eagleoneraptor/confnode,dnohales/confnode,dnohales/confnode | ---
+++
@@ -34,6 +34,14 @@
}
}
});
+
+ Rooms.update({
+ _id: roomId
+ }, {
+ $inc: {
+ visits: 1
+ }
+ });
}
},
|
9888147ba44dd9a8505f07de40053cf3c71fdd04 | init_chrome.js | init_chrome.js | chrome.app.runtime.onLaunched.addListener(function () {
chrome.app.window.create('app/index.html', {
bounds: {
width: 800,
height: 600,
left: 100,
top: 100
},
minWidth: 800,
minHeight: 600
});
});
| chrome.app.runtime.onLaunched.addListener(function () {
chrome.app.window.create('app/index.html', {
bounds: {
width: 800,
height: 600,
left: 100,
top: 100
},
minWidth: 400,
minHeight: 400,
frame: 'none'
});
});
| Hide frame on Chrome App | Hide frame on Chrome App
| JavaScript | unknown | nitrotasks/nitro,nitrotasks/nitro,CaffeinatedCode/nitro | ---
+++
@@ -7,8 +7,9 @@
left: 100,
top: 100
},
- minWidth: 800,
- minHeight: 600
+ minWidth: 400,
+ minHeight: 400,
+ frame: 'none'
});
}); |
64994f9901bcf3cef537da822e603215fa5b4568 | lib/models/errors.js | lib/models/errors.js |
ErrorModel = function (appId) {
var self = this;
this.appId = appId;
this.errors = {};
this.startTime = Date.now();
}
_.extend(ErrorModel.prototype, KadiraModel.prototype);
ErrorModel.prototype.buildPayload = function() {
var metrics = _.values(this.errors);
this.startTime = Date.now();
this.errors = {... |
ErrorModel = function (appId) {
var self = this;
this.appId = appId;
this.errors = {};
this.startTime = Date.now();
}
_.extend(ErrorModel.prototype, KadiraModel.prototype);
ErrorModel.prototype.buildPayload = function() {
var metrics = _.values(this.errors);
this.startTime = Date.now();
this.errors = {... | Remove redundant data (error time and events) | Remove redundant data (error time and events)
| JavaScript | mit | meteorhacks/kadira,chatr/kadira | ---
+++
@@ -33,7 +33,7 @@
startTime : trace.at,
type : 'server',
trace: trace,
- stack : [{at: trace.at, events: trace.events, stack: ex.stack}],
+ stack : [{stack: ex.stack}],
count: 1,
}
}; |
6a94be934d49b145a877609b2ea37f805ade5910 | src/components/Footer.js | src/components/Footer.js | import React, { Component } from 'react';
class Footer extends Component {
render() {
if (this.props.data) {
var networks = this.props.data.social.map(function (network) {
return (
<span key={network.name} className="m-4">
<a href={network.url}>
<i className={net... | import React, { Component } from 'react';
class Footer extends Component {
render() {
if (this.props.data) {
var networks = this.props.data.social.map(function (network) {
return (
<span key={network.name} className="m-4">
<a href={network.url} target="_blank" rel="noopener no... | Add target blank for footer links | Add target blank for footer links
| JavaScript | mit | enesates/enesates.github.io,enesates/enesates.github.io,NestorPlasencia/NestorPlasencia.github.io,NestorPlasencia/NestorPlasencia.github.io | ---
+++
@@ -6,7 +6,7 @@
var networks = this.props.data.social.map(function (network) {
return (
<span key={network.name} className="m-4">
- <a href={network.url}>
+ <a href={network.url} target="_blank" rel="noopener noreferrer">
<i className={network.cl... |
c9cc4809e687d33cd807268fe9b9e147ebe99687 | web_server.js | web_server.js | const express = require('express');
const http = require('http');
const socketIO = require('socket.io');
const path = require('path');
const app = express();
const server = http.Server(app);
const io = socketIO(server);
// Exposes the folder frontend
app.use(express.static(path.join(__dirname, 'frontend', 'dist')));
... | const express = require('express');
const http = require('http');
const socketIO = require('socket.io');
const path = require('path');
const app = express();
const server = http.Server(app);
const io = socketIO(server);
// Exposes the folder frontend
app.use(express.static(path.join(__dirname, 'frontend', 'dist')));
... | Use port 80 as default | Use port 80 as default
| JavaScript | mit | mbrandau/simple-chat,mbrandau/simple-chat,mbrandau/simple-chat | ---
+++
@@ -17,6 +17,6 @@
});
});
-server.listen(process.env.PORT || 3000, () => {
+server.listen(process.env.PORT || 80, () => {
console.log(`Server is listening on port: ${server.address().port}`);
}); |
8520af084ed87b946256d30319461d14a8832467 | components/Title.js | components/Title.js | export default () =>
<div>
<h1>
react-todo{' '}
<small>by <a href="https://github.com/pmdarrow">pmdarrow</a></small>
</h1>
<style>{`
h1 {
margin: 2rem;
}
`}</style>
</div>;
| export default () =>
<div>
<h1>react-todo</h1>
<p>By <a href="https://github.com/pmdarrow">@pmdarrow</a></p>
<p><a href="https://github.com/pmdarrow/react-todo">View on GitHub</a></p>
</div>;
| Add link to GitHub project | Add link to GitHub project | JavaScript | mit | pmdarrow/react-todo | ---
+++
@@ -1,12 +1,6 @@
export default () =>
<div>
- <h1>
- react-todo{' '}
- <small>by <a href="https://github.com/pmdarrow">pmdarrow</a></small>
- </h1>
- <style>{`
- h1 {
- margin: 2rem;
- }
- `}</style>
+ <h1>react-todo</h1>
+ <p>By <a href="https://github.com/pmd... |
5ad964ba3ed5728d88686d2f5cfc3becac49f667 | Libraries/Animated/src/Animated.js | Libraries/Animated/src/Animated.js | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
import Platform from '../../Utilities/Platform';
const View = require('../../Components/View... | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
import Platform from '../../Utilities/Platform';
const View = require('../../Components/View... | Disable animations in bridgeless mode | Disable animations in bridgeless mode
Summary:
Bridgeless mode requires all native modules to be turbomodules. The iOS animated module was converted to TM, but reverted due to perf issues. RSNara is looking into it, but it may be an involved fix. As a short term workaround, to unblock release mode testing of bridgeles... | JavaScript | mit | facebook/react-native,myntra/react-native,myntra/react-native,exponentjs/react-native,exponentjs/react-native,hoangpham95/react-native,hoangpham95/react-native,exponent/react-native,pandiaraj44/react-native,exponent/react-native,pandiaraj44/react-native,janicduplessis/react-native,exponentjs/react-native,exponentjs/rea... | ---
+++
@@ -18,7 +18,8 @@
const AnimatedMock = require('./AnimatedMock');
const AnimatedImplementation = require('./AnimatedImplementation');
-const Animated = ((Platform.isTesting
+//TODO(T57411659): Remove the bridgeless check when Animated perf regressions are fixed.
+const Animated = ((Platform.isTesting || g... |
80f69f97e1be8d1492ee1708d2e8f41f0fc7926a | config/default.js | config/default.js | 'use strict';
module.exports = {
github: {
username: 'maker-of-life',
repo: 'maker-of-life/game-of-life',
branch: 'game',
localPath: 'tmp',
},
commit: {
name: 'Maker of Life',
message: 'Create life',
},
};
| 'use strict';
module.exports = {
github: {
username: 'maker-of-life',
repo: 'maker-of-life/game-of-life',
branch: 'master',
localPath: 'tmp',
},
commit: {
name: 'Maker of Life',
message: 'Create life',
},
};
| Switch back to the master branch | Switch back to the master branch
| JavaScript | mit | erbridge/life-maker | ---
+++
@@ -4,7 +4,7 @@
github: {
username: 'maker-of-life',
repo: 'maker-of-life/game-of-life',
- branch: 'game',
+ branch: 'master',
localPath: 'tmp',
},
|
e1073a4bf48150c057266a5b0f7e0556f3b4b39a | App/reducers/reducers.js | App/reducers/reducers.js | import { combineReducers } from 'redux'
import {
REQUEST_WORKSPACES, RECEIVE_WORKSPACES,
SELECT_WORKSPACE, REQUEST_RESULTS,
RECEIVE_RESULTS, SELECT_RESULT,
REQUEST_QUERIES, RECEIVE_QUERIES,
SELECT_QUERY
} from '../actions/actions'
import { reducer as form } from 'redux-form'
function selectedQuery(state = 'd... | import { combineReducers } from 'redux'
import {
REQUEST_WORKSPACES, RECEIVE_WORKSPACES,
SELECT_WORKSPACE, REQUEST_RESULTS,
RECEIVE_RESULTS, SELECT_RESULT,
REQUEST_QUERIES, RECEIVE_QUERIES,
SELECT_QUERY
} from '../actions/actions'
import { reducer as form } from 'redux-form'
function selectedQuery(state = 'd... | Fix for missing comma from merging branches | Fix for missing comma from merging branches
| JavaScript | mit | csecapstone485organization/ddf-mobile,csecapstone485organization/ddf-mobile,csecapstone485organization/ddf-mobile | ---
+++
@@ -38,9 +38,9 @@
const rootReducer = combineReducers({
selectedWorkspace,
+ selectedQuery,
+ selectedWorkspace,
form
- selectedQuery,
- selectedWorkspace
})
export default rootReducer |
4d4bd6c4533b2be681752b90a999b1936cc954d4 | middleware/ensure-found.js | middleware/ensure-found.js | /*
* Ensures something has been found during the request. Returns 404 if
* res.template is unset, res.locals is empty and statusCode has not been set
* to 204.
*
* Should be placed at the very end of the middleware pipeline,
* after all project specific routes but before the error handler & responder.
*
* @mod... | /*
* Ensures something has been found during the request. Returns 404 if
* res.template is unset, res.locals is empty and statusCode has not been set
* to 204.
*
* Should be placed at the very end of the middleware pipeline,
* after all project specific routes but before the error handler & responder.
*
* @mod... | Add req.method to error message on not found | Add req.method to error message on not found
| JavaScript | mit | thebitmill/midwest | ---
+++
@@ -21,7 +21,7 @@
} else {
// generates Not Found error if there is no page to render and no truthy
// values in data
- const err = new Error(`Not found: ${req.path}`);
+ const err = new Error(`Not found: ${req.method.toUpperCase()} ${req.path}`);
err.status = 404;
next(err); |
dad76c400c3a9188cb99227fb1725f932e673f34 | www/js/app.js | www/js/app.js | /*global _:true, App:true, Backbone:true */
/*jshint forin:false, plusplus:false, sub:true */
'use strict';
define([
'zepto',
'install',
'datastore',
'collections/episodes',
'collections/podcasts',
'models/episode',
'models/podcast',
'views/app'
], function($, install, DataStore, Episod... | /*global _:true, App:true, Backbone:true */
/*jshint forin:false, plusplus:false, sub:true */
'use strict';
define([
'zepto',
'install',
'datastore',
'collections/episodes',
'collections/podcasts',
'models/episode',
'models/podcast',
'views/app'
], function($, install, DataStore, Episod... | Add audio type checks for MP3 and OGG Vorbis | Add audio type checks for MP3 and OGG Vorbis
| JavaScript | mit | sole/high-fidelity,mozilla/high-fidelity,prateekjadhwani/high-fidelity,lmorchard/high-fidelity,sole/high-fidelity,prateekjadhwani/high-fidelity,lmorchard/high-fidelity,sole/high-fidelity,sole/high-fidelity,mozilla/high-fidelity | ---
+++
@@ -15,6 +15,14 @@
var GLOBALS = {
DATABASE_NAME: 'podcasts',
HAS: {
+ audioSupportMP3: (function() {
+ var a = window.document.createElement('audio');
+ return !!(a.canPlayType && a.canPlayType('audio/mpeg;').replace(/no/, ''));
+ })(... |
11abe0cfb783f73d6b5a281430ef1bb9c99460c6 | examples/todos/lib/router.js | examples/todos/lib/router.js | Router.configure({
// we use the appBody template to define the layout for the entire app
layoutTemplate: 'appBody',
// the appNotFound template is used for unknown routes and missing lists
notFoundTemplate: 'appNotFound',
// show the appLoading template whilst the subscriptions below load their data
loa... | Router.configure({
// we use the appBody template to define the layout for the entire app
layoutTemplate: 'appBody',
// the appNotFound template is used for unknown routes and missing lists
notFoundTemplate: 'appNotFound',
// show the appLoading template whilst the subscriptions below load their data
loa... | Fix usage of new LaunchScreen API in Todos | Fix usage of new LaunchScreen API in Todos
| JavaScript | mit | tdamsma/meteor,lorensr/meteor,rabbyalone/meteor,sclausen/meteor,pjump/meteor,aramk/meteor,devgrok/meteor,guazipi/meteor,EduShareOntario/meteor,AnjirHossain/meteor,mubassirhayat/meteor,joannekoong/meteor,dev-bobsong/meteor,yonas/meteor-freebsd,Quicksteve/meteor,lorensr/meteor,shrop/meteor,dandv/meteor,daltonrenaldo/mete... | ---
+++
@@ -18,8 +18,9 @@
}
});
-if (Meteor.isClient)
- LaunchScreen.hold();
+if (Meteor.isClient) {
+ var launchScreenHandler = LaunchScreen.hold();
+}
Router.map(function() {
this.route('join');
@@ -37,7 +38,7 @@
},
action: function () {
this.render();
- LaunchScreen.release();
+... |
554c6401d5dc68d7609317aa332241eeaa8ceb17 | back/controllers/city/community.ctrl.js | back/controllers/city/community.ctrl.js | /**
* @fileOverview Communities CRUD controller.
*/
// var log = require('logg').getLogger('app.ctrl.city.Dashboard');
var ControllerBase = require('nodeon-base').ControllerBase;
var CrudeEntity = require('crude-entity');
var CommunityEnt = require('../../entities/community.ent');
/**
* Communities CRUD controlle... | /**
* @fileOverview Communities CRUD controller.
*/
// var log = require('logg').getLogger('app.ctrl.city.Dashboard');
var ControllerBase = require('nodeon-base').ControllerBase;
var CrudeEntity = require('crude-entity');
var CommunityEnt = require('../../entities/community.ent');
var CommunityMidd = require('../..... | Add CRUD forms on community controller | Add CRUD forms on community controller
| JavaScript | mpl-2.0 | WeAreRoots/weareroots.org | ---
+++
@@ -7,6 +7,7 @@
var CrudeEntity = require('crude-entity');
var CommunityEnt = require('../../entities/community.ent');
+var CommunityMidd = require('../../middleware/communities.midd');
/**
* Communities CRUD controller.
@@ -14,7 +15,7 @@
* @contructor
* @extends {app.ControllerBase}
*/
-var Da... |
0f789ea82e785d9e06582e892c4ec4ea45f245c8 | httpserver.js | httpserver.js | var http = require('http');
var url = require('url');
var port = 8000;
var server = http.createServer(function (request, response){
try {
//go to http://127.0.0.1:8000/?req=Monty
console.log('Server Pinged'); //Ping the server (will show in the cmd prompt)
//The below will be written to the Web Browser
re... | var http = require('http');
var url = require('url');
var port = 8000;
var server = http.createServer(function (request, response){
try {
//go to http://127.0.0.1:8000/?req=Hello
console.log('Server Pinged');
response.writeHead(200, {"Content-Type": "text/plain"});
var req = checkURL(request);
var resp;
i... | Fix Space and comment issues. | Fix Space and comment issues.
| JavaScript | mit | delpillar/AvengersCC | ---
+++
@@ -3,42 +3,33 @@
var port = 8000;
var server = http.createServer(function (request, response){
-
- try {
- //go to http://127.0.0.1:8000/?req=Monty
- console.log('Server Pinged'); //Ping the server (will show in the cmd prompt)
- //The below will be written to the Web Browser
- response.writeHead(... |
c0ec7d4aa404259b62ee6d077e648d77ff0b08b5 | src/components/Navbar.js | src/components/Navbar.js | /*
* @flow
*/
import React from 'react';
export default function Navbar() {
return (
<nav className="navbar navbar-default navbar-fixed-top navbar-inverse">
<div className="container-fluid">
<div className="navbar-header">
<a className="navbar-brand" href="/">
Bonsai - Trim... | /*
* @flow
*/
import React from 'react';
export default function Navbar() {
return (
<nav className="navbar navbar-default navbar-fixed-top navbar-inverse">
<div className="container-fluid">
<div className="navbar-header">
<a className="navbar-brand" href="/" onClick={(e) => {
... | Set the navbar to reload, no matter the url. | Set the navbar to reload, no matter the url.
| JavaScript | apache-2.0 | pinterest/bonsai,pinterest/bonsai,pinterest/bonsai | ---
+++
@@ -9,7 +9,10 @@
<nav className="navbar navbar-default navbar-fixed-top navbar-inverse">
<div className="container-fluid">
<div className="navbar-header">
- <a className="navbar-brand" href="/">
+ <a className="navbar-brand" href="/" onClick={(e) => {
+ event.... |
d55af7519d0c44b6686d066a29a79ffe478f5789 | app/components/Accounts/accounts.controller.js | app/components/Accounts/accounts.controller.js | ( function() {
"use strict";
angular.module('ACBank')
.controller('AccountsController', AccountsController);
AccountsController.$inject = [ '$scope', '$ionicModal' ];
function AccountsController ($scope, $ionicModal) {
var vm = this;
vm.options = [
{
iconClass: "ion-plus-round",
imageSource: "... | ( function() {
"use strict";
angular.module('ACBank')
.controller('AccountsController', AccountsController);
AccountsController.$inject = [ '$scope', '$ionicModal' ];
function AccountsController ($scope, $ionicModal) {
var vm = this;
vm.options = [
{
iconClass: "ion-plus-round",
imageSource: "... | Create modal for withdraw form | Create modal for withdraw form
| JavaScript | mit | danielzy95/NewLeaf-Bank,danielzy95/NewLeaf-Bank | ---
+++
@@ -19,7 +19,7 @@
{
iconClass: "",
imageSource: "../img/withdraw.png",
- clicked: function () { console.log("Withdraw"); }
+ clicked: function () { $scope.withdrawModal.show(); }
},
{
iconClass: "",
@@ -43,6 +43,13 @@
}).then(function(modal) {
$scope.depositModal =... |
a664da36f0c30e8357198e5db4817ac763254dc0 | packages/truffle-solidity-utils/index.js | packages/truffle-solidity-utils/index.js | var SolidityUtils = {
getCharacterOffsetToLineAndColumnMapping: function(source) {
var mapping = [];
source = source.split("");
var line = 0;
var column = 0;
source.forEach(function(character) {
if (character == "\n") {
line += 1;
column = -1;
mapping.push({
... | var SolidityUtils = {
getCharacterOffsetToLineAndColumnMapping: function(source) {
var mapping = [];
source = source.split("");
var line = 0;
var column = 0;
source.forEach(function(character) {
if (character === "\n") {
line += 1;
column = -1;
mapping.push({
... | Convert Non-strict to strict equality checking Convert non-strict equality checking, using `==`, to the strict version, using `===`. | Convert Non-strict to strict equality checking
Convert non-strict equality checking, using `==`, to the strict version, using `===`. | JavaScript | mit | ConsenSys/truffle | ---
+++
@@ -9,7 +9,7 @@
var column = 0;
source.forEach(function(character) {
- if (character == "\n") {
+ if (character === "\n") {
line += 1;
column = -1;
|
ab82d0455847ebcec2bf7e57fe795f3924ff001b | tasks/dist.js | tasks/dist.js | import gulpLoadPlugins from 'gulp-load-plugins';
import runSequence from 'run-sequence';
import * as paths from './paths';
import gulp from './_gulp';
import jspmBuild from './utils';
const $ = gulpLoadPlugins();
gulp.task('dist:jspm', ['compile:styles'], () =>
jspmBuild({
minify: true,
mangle: true,
... | import gulpLoadPlugins from 'gulp-load-plugins';
import runSequence from 'run-sequence';
import * as paths from './paths';
import gulp from './_gulp';
import jspmBuild from './utils';
const $ = gulpLoadPlugins();
gulp.task('dist:jspm', ['compile:styles'], () =>
jspmBuild({
minify: true,
mangle: true,
... | Make sure we gzip our assets for deployment | Make sure we gzip our assets for deployment
| JavaScript | unlicense | gsong/es6-jspm-gulp-starter,gsong/es6-jspm-gulp-starter | ---
+++
@@ -32,13 +32,15 @@
gulp.task('dist:copy', () => {
- const htmlFilter = $.filter("**/*.!(html)", {restore: true});
+ const htmlFilter = $.filter('**/*.!(html)', {restore: true});
return gulp.src(paths.BUILD_ALL)
.pipe(htmlFilter)
.pipe($.rev())
.pipe(htmlFilter.restore)
.pipe($.revRepl... |
5733e5c5ef6467b7e74d0129201411651cde5ec1 | client/src/safari-audio-bandaid.js | client/src/safari-audio-bandaid.js | 'use strict';
const
RELOAD_KEY = 'safari-reload-193289123',
WAIT_TIME = 100; // Does it matter how long to wait?
/**
* Safari desktop audio is being dumb and won't play until a second page loads an audio file within a session.
* Uses browser detection: http://stackoverflow.com/a/23522755
*/
exports.check =... | 'use strict';
const
RELOAD_KEY = 'safari-reload-193289123',
WAIT_TIME = 100; // Does it matter how long to wait?
/**
* Safari desktop audio is being dumb and won't play until a second page loads an audio file within a session.
* Uses browser detection: http://stackoverflow.com/a/23522755
*
* This still, d... | Fix error message logging in Safari bandaid | Fix error message logging in Safari bandaid
| JavaScript | mit | hiddenwaffle/mazing,hiddenwaffle/mazing | ---
+++
@@ -7,6 +7,8 @@
/**
* Safari desktop audio is being dumb and won't play until a second page loads an audio file within a session.
* Uses browser detection: http://stackoverflow.com/a/23522755
+ *
+ * This still, doesn't always work.
*/
exports.check = function () {
let isSafari = /^((?!chrome|and... |
15da64f080c5003a3cd62d6d51647d5a88c7069d | client/users/auth/register/exec.js | client/users/auth/register/exec.js | 'use strict';
/**
* client
**/
/**
* client.common
**/
/**
* client.common.auth
**/
/**
* client.common.auth.register
**/
/*global $, _, nodeca, window*/
/**
* client.common.auth.register.exec($form, event)
*
* send registration data on server
**/
module.exports = function ($form, event) {
... | 'use strict';
/**
* client
**/
/**
* client.common
**/
/**
* client.common.auth
**/
/**
* client.common.auth.register
**/
/*global $, _, nodeca, window*/
/**
* client.common.auth.register.exec($form, event)
*
* send registration data on server
**/
module.exports = function ($form, event) {
... | Use render.page for full-page reload | Use render.page for full-page reload
| JavaScript | mit | nodeca/nodeca.users | ---
+++
@@ -38,9 +38,7 @@
params.pass = '';
// add errors
params.errors = err.message;
- $form.replaceWith(
- nodeca.client.common.render('users.auth.register.view', params)
- ).fadeIn();
+ nodeca.client.common.render.page('users.auth.register.view', params);
... |
eca75545e94bfeb2842992fb5e28b2f10946c6a8 | agir/carte/components/map/index.js | agir/carte/components/map/index.js | import "ol/ol.css";
import "./style.css";
import listMap from "./listMap";
import itemMap from "./itemMap";
export default {
listMap,
itemMap,
};
| import "ol/ol.css";
import "./style.css";
export async function listMap() {
const listMapModule = (await import("./listMap")).default;
listMapModule.apply(null, arguments);
}
export async function itemMap() {
const itemMapModule = (await import("./itemMap")).default;
itemMapModule.apply(null, arguments);
}
| Revert "fix: chunk load errors on legacy map" | Revert "fix: chunk load errors on legacy map"
This reverts commit 8f3220c2a95d1ec9ed6d1cbb742d579a019b7e36.
| JavaScript | agpl-3.0 | lafranceinsoumise/api-django,lafranceinsoumise/api-django,lafranceinsoumise/api-django,lafranceinsoumise/api-django | ---
+++
@@ -1,9 +1,14 @@
import "ol/ol.css";
import "./style.css";
-import listMap from "./listMap";
-import itemMap from "./itemMap";
-export default {
- listMap,
- itemMap,
-};
+export async function listMap() {
+ const listMapModule = (await import("./listMap")).default;
+
+ listMapModule.apply(null, argum... |
a2fda0c397b32f60c6bd8fccbd3e55ccaee381ed | src/battle/index.js | src/battle/index.js | import loop from 'loop';
import StatusBar from 'statusBar';
import BattleMap from 'map';
import state from 'state';
import { subtractSet } from 'pura/vector/tuple';
import { canvasOffsetLeft, canvasOffsetTop, scaleX, scaleY } from 'dom';
import { render as renderUI, uiElements, clearUi } from 'ui';
import { calcWorldPo... | import loop from 'loop';
import StatusBar from 'statusBar';
import BattleMap from 'map';
import state from 'state';
import { inputs } from 'controls';
import { subtractSet } from 'pura/vector/tuple';
import { canvasOffsetLeft, canvasOffsetTop, scaleX, scaleY } from 'dom';
import { render as renderUI, uiElements, clearU... | Update battle map with input handling | Update battle map with input handling
| JavaScript | mit | HyphnKnight/js13k-2017,HyphnKnight/js13k-2017 | ---
+++
@@ -2,35 +2,21 @@
import StatusBar from 'statusBar';
import BattleMap from 'map';
import state from 'state';
+import { inputs } from 'controls';
import { subtractSet } from 'pura/vector/tuple';
import { canvasOffsetLeft, canvasOffsetTop, scaleX, scaleY } from 'dom';
import { render as renderUI, uiElemen... |
5556cdf8a84ee8b1201f5e861395fafd784eab09 | gevents.js | gevents.js | 'use strict';
var request = require('request');
var opts = {
uri: 'https://api.github.com' + '/users/jm-janzen/events',
json: true,
method: 'GET',
headers: {
'User-Agent': 'nodejs script'
}
}
request(opts, function (err, res, body) {
if (err) throw new Error(err);
var format = '[... | 'use strict';
var request = require('request');
var opts = {
uri: 'https://api.github.com' + '/users/' + process.argv[2] + '/events',
json: true,
method: 'GET',
headers: {
'User-Agent': 'nodejs script'
}
}
request(opts, function (err, res, body) {
if (err) throw new Error(err);
v... | Add user-name as parameter, rather than hardcoding | Add user-name as parameter, rather than hardcoding
TODO check for user-name before attempting to issue request
| JavaScript | mit | jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts | ---
+++
@@ -3,7 +3,7 @@
var request = require('request');
var opts = {
- uri: 'https://api.github.com' + '/users/jm-janzen/events',
+ uri: 'https://api.github.com' + '/users/' + process.argv[2] + '/events',
json: true,
method: 'GET',
headers: { |
d24c5ea29e999b3b1ed1c20fd4d19b27c54b302a | app/assets/javascripts/models/mixer.js | app/assets/javascripts/models/mixer.js | Mixer = function () {
this.mix = []
}
//Adds a track to the mix. Takes args = {url: sound.aws.com, divId: 1}
Mixer.prototype.addTrack = function (args) {
var newTrack = new Howl({
url : [args['url']]
});
this.mix[args['divId']] = newTrack
}
Mixer.prototype.removeTrack = function (arrayPosition) {
this.mix[arr... | Mixer = function () {
this.mix = []
}
//Adds a track to the mix. Takes args = {url: sound.aws.com, divId: 1}
Mixer.prototype.addTrack = function (args) {
var newTrack = new Howl({
url : [args['url']]
});
this.mix[args['divId']] = newTrack;
}
Mixer.prototype.removeTrack = function (arrayPosition) {
this.mix[ar... | Write globalPause and globalPlay methods for Mixer model | Write globalPause and globalPlay methods for Mixer model
| JavaScript | mit | chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord | ---
+++
@@ -7,9 +7,21 @@
var newTrack = new Howl({
url : [args['url']]
});
- this.mix[args['divId']] = newTrack
+ this.mix[args['divId']] = newTrack;
}
Mixer.prototype.removeTrack = function (arrayPosition) {
- this.mix[arrayPosition] = null
+ this.mix[arrayPosition] = null;
}
+
+Mixer.prototype.globalPl... |
518fac5020c9055cda2e72b91319df340641d1c9 | app/users/pwd-activation.controller.js | app/users/pwd-activation.controller.js | 'use strict';
angular.module('arachne.controllers')
/**
* Set new password.
*
* @author: Daniel M. de Oliveira
*/
.controller('PwdActivationController',
['$scope', '$stateParams', '$filter', '$location', 'PwdActivation', 'messageService',
function ($scope, $stateParams, $filter, $location,... | 'use strict';
angular.module('arachne.controllers')
/**
* Set new password.
*
* @author: Daniel M. de Oliveira
*/
.controller('PwdActivationController',
['$scope', '$stateParams', '$filter', '$location', 'PwdActivation', 'messageService',
function ($scope, $stateParams, $filter, $location,... | Change password reset error message | Change password reset error message
| JavaScript | apache-2.0 | dainst/arachnefrontend,dainst/arachnefrontend,codarchlab/arachnefrontend,codarchlab/arachnefrontend | ---
+++
@@ -38,7 +38,7 @@
var handleActivationError = function (data) {
console.log(data);
- messages.add('default', 'danger');
+ messages.add('ui.register.passwordsDontMatch', 'danger');
};
$scope.submit... |
a3c7fef9a49f938aa9426b38a2d6e9652c21ae39 | src/components/Felony.js | src/components/Felony.js | 'use strict';
import React, { Component } from 'react';
import ReactCSS from 'reactcss';
import colors from '../styles/variables/colors';
import 'normalize.css';
import '../fonts/work-sans/WorkSans.css!';
import '../styles/felony.css!';
import Header from './header/Header';
import EncryptKeyList from './encrypt/Encr... | 'use strict'
import 'normalize.css'
import React, { Component } from 'react'
import ReactCSS from 'reactcss'
import '../fonts/work-sans/WorkSans.css!'
import '../styles/felony.css!'
import colors from '../styles/variables/colors'
import EncryptKeyListContainer from '../containers/EncryptKeyListContainer'
import F... | Use react key list container | Use react key list container
| JavaScript | mit | henryboldi/felony,tobycyanide/felony,tobycyanide/felony,henryboldi/felony | ---
+++
@@ -1,23 +1,23 @@
-'use strict';
+'use strict'
-import React, { Component } from 'react';
-import ReactCSS from 'reactcss';
+import 'normalize.css'
+import React, { Component } from 'react'
+import ReactCSS from 'reactcss'
-import colors from '../styles/variables/colors';
-import 'normalize.css';
-import... |
d67f181f7adaf5e15529cab3b0e950821784c125 | lib/commands/bench.js | lib/commands/bench.js | module.exports = function() {
return this
.title('Benchmarks')
.helpful()
.arg()
.name('treeish-list')
.title('List of revisions to compare (git treeish)')
.arr()
.end()
.opt()
.name('ben... | module.exports = function() {
return this
.title('Benchmarks')
.helpful()
.arg()
.name('treeish-list')
.title('List of revisions to compare (git treeish)')
.arr()
.end()
.opt()
.name('ben... | Change a title of the option | Change a title of the option
| JavaScript | mit | bem-archive/bem-tools,bem/bem-tools,bem-archive/bem-tools,bem/bem-tools | ---
+++
@@ -30,7 +30,7 @@
.name('techs')
.long('techs')
.short('t')
- .title('Tech to run testing')
+ .title('Techs to run tests for')
.arr()
.end()
.opt() |
ed49dda7b558b023170222c8e3c6cdbb661dd98e | karma.conf.js | karma.conf.js | // Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-... | // Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
configuration = {
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-ch... | Configure custom karma browser launcher for travis | Configure custom karma browser launcher for travis
| JavaScript | mit | briggySmalls/late-train-mate,briggySmalls/late-train-mate,briggySmalls/late-train-mate | ---
+++
@@ -2,7 +2,7 @@
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
- config.set({
+ configuration = {
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
@@ -39,6 +39,20 @@
logLevel: config.LOG_INFO,
autoWatch... |
edfb85e8ccb1986c33c2752ea5ddb42f153ce8f2 | examples/rolesWithAccountsUI/server/startup.js | examples/rolesWithAccountsUI/server/startup.js | Meteor.startup(function () {
console.log('Running server startup code...');
Accounts.onCreateUser(function (options, user) {
Roles.addRolesToUserObj(user, ['admin','view-secrets']);
if (options.profile) {
// include the user profile
user.profile = options.profile
}
// other user obje... | Meteor.startup(function () {
console.log('Running server startup code...');
Accounts.onCreateUser(function (options, user) {
Roles.setRolesOnUserObj(user, ['admin','view-secrets']);
if (options.profile) {
// include the user profile
user.profile = options.profile
}
// other user obje... | Change example method to properly reflect action taken | Change example method to properly reflect action taken
| JavaScript | mit | sumanla13a/moleReteor,dandv/meteor-roles,zoey4lee/meteor-roles,alanning/meteor-roles,dropfen/meteor-roles,sumanla13a/moleReteor,dandv/meteor-roles,challett/meteor-roles | ---
+++
@@ -3,7 +3,7 @@
console.log('Running server startup code...');
Accounts.onCreateUser(function (options, user) {
- Roles.addRolesToUserObj(user, ['admin','view-secrets']);
+ Roles.setRolesOnUserObj(user, ['admin','view-secrets']);
if (options.profile) {
// include the user profile |
0008264bcabddf8d2b6b19fde7aa41b0de7a5b77 | src/templates/Compact.js | src/templates/Compact.js | // Simple, slimline template based on https://github.com/rackt/react-router/blob/master/CHANGES.md
import Default from './Default'
export default class Compact extends Default {
mergesTitle = null
fixesTitle = null
commitsTitle = null
fixPrefix = 'Fixed '
mergePrefix = 'Merged '
listSpacing = '\n'
re... | // Simple, slimline template based on https://github.com/rackt/react-router/blob/master/CHANGES.md
import Default from './Default'
const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
export default class Compact extends Default {
... | Replace toLocaleString usage with months array | Replace toLocaleString usage with months array
Not supported in node 0.10
| JavaScript | mit | CookPete/auto-changelog,CookPete/auto-changelog | ---
+++
@@ -1,6 +1,8 @@
// Simple, slimline template based on https://github.com/rackt/react-router/blob/master/CHANGES.md
import Default from './Default'
+
+const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
export default ... |
d76659cde113f54aa724bf2554f9dc84bb2d8e8e | lib/cb.events.socketio/main.js | lib/cb.events.socketio/main.js | // Requires
var wireFriendly = require('../utils').wireFriendly;
function setup(options, imports, register) {
// Import
var events = imports.events;
var io = imports.socket_io.io;
// Send events to user
io.of('/events').on('connection', function(socket) {
// Send to client
var han... | // Requires
var wireFriendly = require('../utils').wireFriendly;
function setup(options, imports, register) {
// Import
var events = imports.events;
var io = imports.socket_io.io;
// Send events to user
io.of('/events').on('connection', function(socket) {
// Send to client
var han... | Change event propagation in socket.io | Change event propagation in socket.io
| JavaScript | apache-2.0 | kustomzone/codebox,code-box/codebox,ronoaldo/codebox,smallbal/codebox,ahmadassaf/Codebox,rajthilakmca/codebox,nobutakaoshiro/codebox,fly19890211/codebox,nobutakaoshiro/codebox,Ckai1991/codebox,listepo/codebox,rajthilakmca/codebox,LogeshEswar/codebox,listepo/codebox,rodrigues-daniel/codebox,smallbal/codebox,indykish/cod... | ---
+++
@@ -11,7 +11,10 @@
io.of('/events').on('connection', function(socket) {
// Send to client
var handler = function(data) {
- socket.emit(this.event, wireFriendly(data));
+ socket.emit("event", {
+ "event": this.event,
+ "data": wireFrie... |
c9e4245ef6893d9981e7f3cd18c9beb3d20b172a | core/components/com_content/admin/assets/js/content.js | core/components/com_content/admin/assets/js/content.js |
Hubzero.submitbutton = function(task) {
$(document).trigger('editorSave');
var frm = document.getElementById('item-form');
if (frm) {
if (task == 'cancel' || document.formvalidator.isValid(frm)) {
Hubzero.submitform(task, frm);
} else {
alert(frm.getAttribute('data-invalid-msg'));
}
}
}
jQuery(docum... |
Hubzero.submitbutton = function(task) {
var frm = document.getElementById('adminForm');
if (frm) {
return Hubzero.submitform(task, frm);
}
$(document).trigger('editorSave');
var frm = document.getElementById('item-form');
if (frm) {
if (task == 'cancel' || document.formvalidator.isValid(frm)) {
Hubzer... | Add support for submitbutton on listing page | [fix] Add support for submitbutton on listing page
Fixes: https://qubeshub.org/support/ticket/1409
| JavaScript | mit | zooley/hubzero-cms,zooley/hubzero-cms,anthonyfuentes/hubzero-cms,zooley/hubzero-cms,zweidner/hubzero-cms,zweidner/hubzero-cms,zweidner/hubzero-cms,anthonyfuentes/hubzero-cms,zweidner/hubzero-cms,anthonyfuentes/hubzero-cms,anthonyfuentes/hubzero-cms,zooley/hubzero-cms | ---
+++
@@ -1,5 +1,11 @@
Hubzero.submitbutton = function(task) {
+ var frm = document.getElementById('adminForm');
+
+ if (frm) {
+ return Hubzero.submitform(task, frm);
+ }
+
$(document).trigger('editorSave');
var frm = document.getElementById('item-form'); |
04f24422e4567ed015db973a5d28f867f984e151 | app/containers/settings/ProfileSettingsPage.js | app/containers/settings/ProfileSettingsPage.js | // @flow
import React, { Component, PropTypes } from 'react';
import { observer, PropTypes as MobxPropTypes } from 'mobx-react';
import Settings from '../../components/settings/Settings';
import ProfileSettings from '../../components/settings/categories/ProfileSettings';
@observer(['state', 'controller'])
export defau... | // @flow
import React, { Component, PropTypes } from 'react';
import { observer, PropTypes as MobxPropTypes } from 'mobx-react';
import Settings from '../../components/settings/Settings';
import ProfileSettings from '../../components/settings/categories/ProfileSettings';
@observer(['state', 'controller'])
export defau... | Fix profile settings page props type checking | Fix profile settings page props type checking
| JavaScript | apache-2.0 | input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus | ---
+++
@@ -18,7 +18,7 @@
}).isRequired,
controller: PropTypes.shape({
account: PropTypes.shape({
- updateName: PropTypes.func.isRequired
+ updateField: PropTypes.func.isRequired
}).isRequired
}).isRequired
}; |
bbae408dae6e4a10488f85ae5180ed62ba033406 | javascript/irg-constants-config.js | javascript/irg-constants-config.js | IRG.constants = (function(){
var approvedDomains = function(){
return ["imgur.com", "flickr.com", "cdn.diycozyhome.com", "pbs.twimg.com", "msnbc.com",
"fbcdn-sphotos-f-a.akamaihd.net", "flic.kr", "instagram.com", "deviantart.com",
"s-media-cache-ak0.pinimg.com", "gfycat.com", "g... | IRG.constants = (function(){
var approvedDomains = function(){
return ["imgur.com", "flickr.com", "cdn.diycozyhome.com", "pbs.twimg.com", "msnbc.com",
"fbcdn-sphotos-f-a.akamaihd.net", "flic.kr", "instagram.com", "deviantart.com",
"s-media-cache-ak0.pinimg.com", "gfycat.com", "g... | Add a URL to the whitelist | Add a URL to the whitelist
| JavaScript | mit | CharlieCorner/InfiniteRedditGallery,CharlieCorner/InfiniteRedditGallery | ---
+++
@@ -5,7 +5,7 @@
"fbcdn-sphotos-f-a.akamaihd.net", "flic.kr", "instagram.com", "deviantart.com",
"s-media-cache-ak0.pinimg.com", "gfycat.com", "gifbeam.com", "staticflickr.com", "imgflip.com",
"upload.wikimedia.org", "livememe.com", "tumblr.com", "wikipedia.org", "archive... |
8ef3e64a4724f1a5ba59d785535c777888497793 | javascript/irg-constants-config.js | javascript/irg-constants-config.js | IRG.constants = (function(){
var approvedDomains = function(){
return ["imgur.com", "flickr.com", "cdn.diycozyhome.com", "pbs.twimg.com", "msnbc.com",
"fbcdn-sphotos-f-a.akamaihd.net", "flic.kr", "instagram.com", "deviantart.com",
"s-media-cache-ak0.pinimg.com", "gfycat.com", "g... | IRG.constants = (function(){
var approvedDomains = function(){
return ["imgur.com", "flickr.com", "cdn.diycozyhome.com", "pbs.twimg.com", "msnbc.com",
"fbcdn-sphotos-f-a.akamaihd.net", "flic.kr", "instagram.com", "deviantart.com",
"s-media-cache-ak0.pinimg.com", "gfycat.com", "g... | Add a new domain to the whitelist | Add a new domain to the whitelist
| JavaScript | mit | CharlieCorner/InfiniteRedditGallery,CharlieCorner/InfiniteRedditGallery | ---
+++
@@ -4,7 +4,8 @@
return ["imgur.com", "flickr.com", "cdn.diycozyhome.com", "pbs.twimg.com", "msnbc.com",
"fbcdn-sphotos-f-a.akamaihd.net", "flic.kr", "instagram.com", "deviantart.com",
"s-media-cache-ak0.pinimg.com", "gfycat.com", "gifbeam.com", "staticflickr.com", "imgflip.c... |
e3f7d5db84e5f24f7647e03c5b1f15a5e24b2d21 | src/main/web/florence/js/functions/__init.js | src/main/web/florence/js/functions/__init.js | setupFlorence();
//forms field styling markup injection
//$('select:not(.small)').wrap('<span class="selectbg"></span>');
//$('select.small').wrap('<span class="selectbg selectbg--small"></span>');
//$('.selectbg--small:eq(1)').addClass('selectbg--small--margin');
//$('.selectbg--small:eq(3)').addClass('float-right')... | setupFlorence(); | Remove commented code not used. | Remove commented code not used.
| JavaScript | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | ---
+++
@@ -1,8 +1 @@
setupFlorence();
-
-
-//forms field styling markup injection
-//$('select:not(.small)').wrap('<span class="selectbg"></span>');
-//$('select.small').wrap('<span class="selectbg selectbg--small"></span>');
-//$('.selectbg--small:eq(1)').addClass('selectbg--small--margin');
-//$('.selectbg--small... |
cc4030c1901365a14360c581521bece5037b140f | mockingjays.js | mockingjays.js | Server = require('./src/server');
Mockingjay = require('./src/mockingjay');
DefaultOptions = require('./src/default_options');
var Mockingjays = function() {}
/**
* Start creates a Mockingjays Server and starts proxying
* or mocking responses based on previous training.
*
* @param options - An {Object} with optio... | Server = require('./src/server');
Mockingjay = require('./src/mockingjay');
DefaultOptions = require('./src/default_options');
var Mockingjays = function() {}
/**
* Start creates a Mockingjays Server and starts proxying
* or mocking responses based on previous training.
*
* @param options - An {Object} with optio... | Update Option Parsing for Mockingjays | Update Option Parsing for Mockingjays
| JavaScript | apache-2.0 | blad/mockingjays | ---
+++
@@ -14,8 +14,9 @@
* :serverBaseUrl - Base URL for the source server.
*/
Mockingjays.prototype.start = function(options) {
- var finalOptions = DefaultOptions.merge(options);
- var mockingjay = new Mockingjay();
+ var defaultOptions = new DefaultOptions();
+ var finalOptions = defaultOptions.... |
5f54a6c59f4011b1a0027c9b92cbf532f4f457ad | points/index.js | points/index.js |
var pointTable = {};
module.exports = function(match, response) {
var points = Number(match[1]),
multiplier = ('to' === match[2]) - ('from' === match[2]),
target = match[3];
pointTable[target] = (pointTable[target] || 0) + (points * multiplier);
response.end(target + ': ' + pointTable[target] + ' poin... |
var math = require('mathjs');
var pointTable = {};
var renderPoints = function renderPoints(points) {
if (typeof points !== 'number' || points !== points) {
return 'wat';
}
if (points === Infinity) {
return 'way too many points';
}
return points.toString + ' points';
};
var points = function poi... | Make point parsing and rendering less crappy | Make point parsing and rendering less crappy
| JavaScript | mit | elvinyung/strapbots | ---
+++
@@ -1,12 +1,28 @@
+
+var math = require('mathjs');
var pointTable = {};
-module.exports = function(match, response) {
- var points = Number(match[1]),
- multiplier = ('to' === match[2]) - ('from' === match[2]),
- target = match[3];
+var renderPoints = function renderPoints(points) {
+ if (typeof ... |
7f6546b97f62020c2f5b7aeedd7e1f06f823137c | forwarder.js | forwarder.js | var follow = require('follow');
var request = require('request');
module.exports = function(db_url, handler_url) {
function isSuccessCode(code) {
return code >= 200 && code < 300;
}
function forwardHook(doc) {
request({
url: handler_url,
method: doc.req.method,
body: doc.req.body,
... | var follow = require('follow');
var request = require('request');
module.exports = function(db_url, handler_url) {
function isSuccessCode(code) {
return code >= 200 && code < 300;
}
function forwardHook(doc) {
var url = doc.req.query.handler_url || handler_url;
if (!url) {
console.log("No h... | Enable passing in handler_url via capture url querystring variable | Enable passing in handler_url via capture url querystring variable
Allows use with providers that require you pass in notify url with each request
| JavaScript | mit | gbuesing/hookforward | ---
+++
@@ -9,8 +9,15 @@
}
function forwardHook(doc) {
+ var url = doc.req.query.handler_url || handler_url;
+
+ if (!url) {
+ console.log("No handler_url defined for webhook id: " + doc._id);
+ return;
+ }
+
request({
- url: handler_url,
+ url: url,
method: doc.req.me... |
ce3ea9318e1236e44c3da1aac95a8370debe7af7 | framework.js | framework.js | 'use strict';
// TODO: use traditional way or ?
let Framework = {
inject: function (coreName) {
console.log(`framework inject ${coreName}`);
// checkCore();
this.coreName = coreName;
return this;
},
start: function () { console.log(`server start with ${this.coreName}`); },
... | 'use strict';
const net = require('net');
const socket = net.Socket;
// TODO: use traditional way or ?
let Framework = {
inject: function (coreName) {
this.core = getCore(coreName);
console.log(`framework inject ${coreName}`);
return this;
},
start: function () {
const serv... | Add draft for core structure. | Add draft for core structure.
| JavaScript | mit | Kevin-Xi/dududu | ---
+++
@@ -1,20 +1,37 @@
'use strict';
+const net = require('net');
+const socket = net.Socket;
+
// TODO: use traditional way or ?
let Framework = {
inject: function (coreName) {
+ this.core = getCore(coreName);
console.log(`framework inject ${coreName}`);
- // checkCore();
- t... |
ee5ca8c1679e482746ee89c7df85073319fec595 | lib/client.js | lib/client.js | 'use strict';
/* lib/client.js
* The Client object.
* * */
module.exports = Client;
function Client(socket){
if (typeof socket !== 'object')
throw new Error('Clients can only bind to Sockets');
this._socket = socket;
this.state = 'start';
}
Client.prototype = require('events').EventEmitter;
Client.pro... | 'use strict';
const EventEmitter = require('events');
/* lib/client.js
* The Client object.
* * */
module.exports = Client;
function Client(socket){
if (typeof socket !== 'object')
throw new Error('Clients can only bind to Sockets');
this._socket = socket;
this.state = 'start';
}
Client.prototype = ne... | Fix events on Client objects | Fix events on Client objects
| JavaScript | mit | jamen/rela | ---
+++
@@ -1,4 +1,6 @@
'use strict';
+
+const EventEmitter = require('events');
/* lib/client.js
* The Client object.
@@ -14,7 +16,7 @@
this.state = 'start';
}
-Client.prototype = require('events').EventEmitter;
+Client.prototype = new EventEmitter();
Client.prototype.send = function(data){
if (typ... |
892a68d4185882a21ad92084ba45c114a2462440 | lib/config.js | lib/config.js | module.exports = {
WS_URL : 'http://www.workshape.io/'
}; | module.exports = {
WS_URL : process.env.WS_URL || 'http://www.workshape.io/'
}; | Read WS_URL from environment variables | Read WS_URL from environment variables
| JavaScript | mit | Workshape/ws-radial-plot-prerender-server | ---
+++
@@ -1,3 +1,3 @@
module.exports = {
- WS_URL : 'http://www.workshape.io/'
+ WS_URL : process.env.WS_URL || 'http://www.workshape.io/'
}; |
e8627295b3a31e7559d9ee3d0200d9ac2d975e05 | priv/ui/app/js/feature_model.js | priv/ui/app/js/feature_model.js | var FeatureModel = function(attrs){
this.id = (attrs && attrs.id) || null;
this.title = (attrs && attrs.title) || null;
this.description = (attrs && attrs.description) || null;
this.master_switch_state = (attrs && attrs.master_switch_state) || null;
this.definition ... | var FeatureModel = function(attrs){
this.id = (attrs && attrs.id) || null;
this.title = (attrs && attrs.title) || null;
this.description = (attrs && attrs.description) || null;
this.master_state = (attrs && attrs.master_state) || null;
this.dynamic_state = (attrs && attrs.dynamic_state) ... | Update the feature model with master_state and dynamic_state props | Update the feature model with master_state and dynamic_state props
| JavaScript | mit | envato/iodized,envato/iodized | ---
+++
@@ -1,16 +1,17 @@
var FeatureModel = function(attrs){
- this.id = (attrs && attrs.id) || null;
- this.title = (attrs && attrs.title) || null;
- this.description = (attrs && attrs.description) || null;
- this.master_switch_state = (attrs && attrs.master_switch_state)... |
d48b2c7b53e67f271118dfb33f44ed44137b52e1 | models/user.js | models/user.js | const bcrypt = require('bcrypt')
module.exports = function (sequelize, DataTypes) {
const User = sequelize.define('User', {
id: {
primaryKey: true,
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4
},
name: {
unique: true,
type: DataTypes.STRING,
allowNull: false,
... | const bcrypt = require('bcrypt')
module.exports = function (sequelize, DataTypes) {
const User = sequelize.define('User', {
id: {
primaryKey: true,
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4
},
name: {
type: DataTypes.STRING,
allowNull: false,
validate: {
... | Remove name unique constraint, move to email | Remove name unique constraint, move to email
| JavaScript | apache-2.0 | cesarandreu/bshed,cesarandreu/bshed | ---
+++
@@ -8,14 +8,15 @@
defaultValue: DataTypes.UUIDV4
},
name: {
- unique: true,
type: DataTypes.STRING,
allowNull: false,
validate: {
+ max: 255,
notEmpty: true
}
},
email: {
+ unique: true,
type: DataTypes.STRING,
allo... |
484232c79b3dd498a72d54ac2786dd57b2740972 | share/spice/xkcd/display/xkcd_display.js | share/spice/xkcd/display/xkcd_display.js | function ddg_spice_xkcd_display(api_result) {
if (!api_result.img || !api_result.alt) return;
//calls our endpoint to get the number of the latest comic
$.getJSON('/js/spice/xkcd/latest/', function(data){
//if we are looking at the latest comic, don't display the 'next' link
api_result.has_next = parseI... | function ddg_spice_xkcd_display(api_result) {
if (!api_result.img || !api_result.alt) return;
//calls our endpoint to get the number of the latest comic
$.getJSON('/js/spice/xkcd/latest/', function(data){
//if we are looking at the latest comic, don't display the 'next' link
api_result.has_next = parseI... | Change name of the template. | xkcd: Change name of the template.
| JavaScript | apache-2.0 | iambibhas/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,deserted/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,lerna/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,ppant/zeroclickinfo-spice,levaly/zeroclickinfo-spice,levaly/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,P71/zeroclickinfo-sp... | ---
+++
@@ -12,9 +12,9 @@
header1 : api_result.safe_title + " (xkcd)",
source_url : 'http://xkcd.com/' + api_result.num,
source_name : 'xkcd',
- template_normal : 'xkcd',
+ template_normal : 'xkcd_display',
force_big_header : true,
- force_no_fold : ... |
cc662f1bfdd92dff3c36c492bc4fee64ca2668f6 | src/hooks/create-user.js | src/hooks/create-user.js | // Use this hook to manipulate incoming or outgoing data.
// For more information on hooks see: http://docs.feathersjs.com/api/hooks.html
module.exports = function (options = {}) {
// eslint-disable-line no-unused-vars
return function (hook) {
const { facebook, facebookId } = hook.data;
return this.find({ ... | // Use this hook to manipulate incoming or outgoing data.
// For more information on hooks see: http://docs.feathersjs.com/api/hooks.html
module.exports = function (options = {}) {
// eslint-disable-line no-unused-vars
return function (hook) {
const { facebook, facebookId } = hook.data;
return this.find({ ... | Fix the params object in the find | Fix the params object in the find
| JavaScript | mit | sscaff1/ccs-feathers,sscaff1/ccs-feathers | ---
+++
@@ -5,7 +5,7 @@
// eslint-disable-line no-unused-vars
return function (hook) {
const { facebook, facebookId } = hook.data;
- return this.find({ facebookId }).then(user => {
+ return this.find({ query: { facebookId } }).then(user => {
if (user.data.length < 1) {
const { profile... |
22a15baa9bac645b1ffb58fa87233143627cf671 | ng-template.js | ng-template.js | /*global System:false, exports:false */
var serverRelativeRegexp = /^\w+:\/\/[^\/]*/;
function santiseSource( source ) {
return source.replace( /(['\\])/g, '\\$1' )
.replace( /[\f]/g, '\\f' )
.replace( /[\b]/g, '\\b' )
.replace( /[\n]/g, '\\n' )
.replace( /[\t]/g, '\\t' )
.replace( /[\r]/g, '\\r... | /*global System:false, exports:false */
function santiseSource( source ) {
return source.replace( /(['\\])/g, '\\$1' )
.replace( /[\f]/g, '\\f' )
.replace( /[\b]/g, '\\b' )
.replace( /[\n]/g, '\\n' )
.replace( /[\t]/g, '\\t' )
.replace( /[\r]/g, '\\r' )
.replace( /[\u2028]/g, '\\u2028' )
... | Fix issues with resolving server relative URLs when bundling with JSPM | Fix issues with resolving server relative URLs when bundling with JSPM
| JavaScript | mit | jamespamplin/plugin-ng-template | ---
+++
@@ -1,6 +1,4 @@
/*global System:false, exports:false */
-
-var serverRelativeRegexp = /^\w+:\/\/[^\/]*/;
function santiseSource( source ) {
return source.replace( /(['\\])/g, '\\$1' )
@@ -13,22 +11,24 @@
.replace( /[\u2029]/g, '\\u2029' );
}
-function resolveUrl( address, baseUrl, useServerRela... |
9235fec23dd1089ee8c4a78d49f68f1b532fed94 | etc/bg.js | etc/bg.js | console.log("Courses+ background page!");
cpal.request.addBeforeSendHeaders(["*://courses2015.dalton.org/*"], function(details) {
if (details.url.indexOf("user/icon/dalton/") > -1) {
details.requestHeaders.push({name: 'X-CoursesPlus-RefererSpoof-Yay', value: "https://courses2015.dalton.org/user/profile.php"});
}
f... | console.log("Courses+ background page!");
cpal.request.addBeforeSendHeaders(["*://courses2015.dalton.org/*"], function(details) {
if (details.url.indexOf("user/icon/dalton/") > -1) {
details.requestHeaders.push({name: 'X-CoursesPlus-RefererSpoof-Yay', value: "https://courses2015.dalton.org/user/profile.php"});
}
i... | Fix coursesnew with no avatar | Fix coursesnew with no avatar
| JavaScript | mit | CoursesPlus/CoursesPlus,CoursesPlus/CoursesPlus | ---
+++
@@ -1,6 +1,9 @@
console.log("Courses+ background page!");
cpal.request.addBeforeSendHeaders(["*://courses2015.dalton.org/*"], function(details) {
if (details.url.indexOf("user/icon/dalton/") > -1) {
+ details.requestHeaders.push({name: 'X-CoursesPlus-RefererSpoof-Yay', value: "https://courses2015.dalton.... |
25883839e7b996d47784c32912c0a9f20abe3cca | development/server/server.spec.js | development/server/server.spec.js | var assert = require('assert');
var request = require('supertest');
var exec = require('child_process').exec;
var application = require(__dirname + '/server.js');
describe('server', function () {
before(function () {
application.listen();
});
after(function () {
application.close();
}... | var assert = require('assert');
var request = require('supertest');
var exec = require('child_process').exec;
var application = require(__dirname + '/server.js');
describe('server', function () {
before(function () {
application.listen();
});
after(function () {
application.close();
}... | Change abao test to use the local installation instead of the global. | Change abao test to use the local installation instead of the global.
| JavaScript | mit | kanbanana/knowledgebase,kanbanana/knowledgebase,kanbanana/knowledgebase | ---
+++
@@ -40,7 +40,8 @@
describe('Run Abao', function() {
it('respond with json', function(done) {
this.timeout(15000);
- exec('abao ./raml/api.raml --server http://localhost:3000/api', function (err) {
+ exec('node node_modules/.bin/abao ./raml/a... |
b250e5508d49ec212ce1fafa3c5fbdbefb31cf3b | src/containers/Pubs/Pubs.js | src/containers/Pubs/Pubs.js | import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import * as pubsActions from 'redux/modules/pubs';
@connect(
state => ({
availablePubs: state.pubs.availablePubs,
selectedPub: state.pubs.selectedPub
}),
pubsActions
)
export default class Pubs extends Component {... | import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import * as pubsActions from 'redux/modules/pubs';
@connect(
state => ({
availablePubs: state.pubs.availablePubs,
selectedPub: state.pubs.selectedPub
}),
pubsActions
)
export default class Pubs extends Component {... | Add initial available pubs load function if the route is accessed without transition | Add initial available pubs load function if the route is accessed without transition
| JavaScript | mit | fuczak/pipsy | ---
+++
@@ -16,6 +16,10 @@
getPubs: PropTypes.func
}
+ componentDidMount() {
+ if (this.props.availablePubs.length === 0) this.props.getPubs();
+ }
+
render() {
return (
<div> |
c0e0c0420c51732d0d8ab574af014d0c09c10192 | test/result-trap.js | test/result-trap.js | var tap = require("../")
tap.test("trap result", function (t0) {
t0.plan(3)
var t1 = new(tap.Harness)(tap.Test).test()
console.log('here')
t1.plan(1)
t1.on("result", function (res) {
if (res.wanted === 4) {
t0.equal(res.found, 3)
t0.equal(res.wanted, 4)
t0.end()
t1.e... | var tap = require("../")
tap.test("trap result #TODO", function (t0) {
console.log("not ok 1 result event trapping #TODO")
return t0.end()
t0.plan(3)
var t1 = new(tap.Harness)(tap.Test).test()
t1.plan(1)
t1.on("result", function (res) {
if (res.wanted === 4) {
t0.equal(res.found, 3)
t0... | Mark this test as todo | Mark this test as todo
| JavaScript | mit | chbrown/node-tap,strongloop-forks/node-tap,strongloop-forks/node-tap,jkrems/node-tap,evanlucas/node-tap,Dignifiedquire/node-tap-core,othiym23/node-tap,isaacs/node-tap,jkrems/node-tap,dominictarr/node-tap,myndzi/node-tap,othiym23/node-tap,chbrown/node-tap,jinivo/marhert,myndzi/node-tap,Raynos/node-tap,iarna/node-tap,tap... | ---
+++
@@ -1,22 +1,25 @@
var tap = require("../")
-tap.test("trap result", function (t0) {
+tap.test("trap result #TODO", function (t0) {
+
+ console.log("not ok 1 result event trapping #TODO")
+ return t0.end()
+
t0.plan(3)
-
+
var t1 = new(tap.Harness)(tap.Test).test()
-
-console.log('here')
+
t1... |
3ced3e98bc7dd9f692728da5244b2dead8203da6 | examples/image-gallery/templates/image-page.js | examples/image-gallery/templates/image-page.js | import React from 'react'
import { rhythm } from 'utils/typography'
const ImagePage = (props) => {
console.log(props)
const {regular, retina} = props.data.image
return (
<div>
<p>{props.data.image.FileName}</p>
<img
src={regular.src}
srcSet={`${retina.src} 2x`}
style={{
... | import React from 'react'
import { rhythm } from 'utils/typography'
class ImagePage extends React.Component {
constructor () {
super()
this.state = {
loaded: false,
}
}
render () {
console.log(this.props)
const {regular, retina, micro} = this.props.data.image
return (
<div>
... | Add progressive image loading example | Add progressive image loading example
| JavaScript | mit | 0x80/gatsby,Khaledgarbaya/gatsby,danielfarrell/gatsby,fk/gatsby,0x80/gatsby,danielfarrell/gatsby,gatsbyjs/gatsby,mingaldrichgan/gatsby,chiedo/gatsby,0x80/gatsby,fk/gatsby,gatsbyjs/gatsby,okcoker/gatsby,mingaldrichgan/gatsby,fk/gatsby,ChristopherBiscardi/gatsby,mickeyreiss/gatsby,chiedo/gatsby,gatsbyjs/gatsby,danielfarr... | ---
+++
@@ -1,24 +1,38 @@
import React from 'react'
import { rhythm } from 'utils/typography'
-const ImagePage = (props) => {
- console.log(props)
- const {regular, retina} = props.data.image
- return (
- <div>
- <p>{props.data.image.FileName}</p>
- <img
- src={regular.src}
- srcSet=... |
4142327d11e8efc2d7de074659a065565245abe1 | flava/server.js | flava/server.js | /**
* Created by Wayne on 16/2/22.
*/
var config = require('./config/config');
var setup = require('./config/setup')();
var express = require('./config/express');
new express().listen(config.port);
console.log('process.env.NODE_ENV', process.env.NODE_ENV);
exports.index = function () {
}
exports.index1 = functi... | /**
* Created by Wayne on 16/2/22.
*/
var config = require('./config/config');
var setup = require('./config/setup')();
var express = require('./config/express');
new express().listen(config.port);
console.log('process.env.NODE_ENV', process.env.NODE_ENV);
exports.index = function () {
}
exports.index1 = functi... | Fix bug about index 6 | Fix bug about index 6
| JavaScript | mit | zwmei/NXQS,zwmei/NXQS | ---
+++
@@ -26,8 +26,8 @@
}
exports.index5 = function () {
- var j = 5;
+ var j = 55;
}
exports.index6 = function () {
- var j = 6;
+ var j = 66;
} |
274c3c63cc0f8376c8d20cf8844768933ad0c11f | client/src/containers/Dashboard.js | client/src/containers/Dashboard.js | import React, { Component } from 'react';
import {observer} from 'mobx-react';
import Services from '../components/Services';
import Tasks from '../components/Tasks';
import FlatButton from 'material-ui/FlatButton';
import { Link } from 'react-router';
const styles = {
button: {
margin: 0.6 + 'rem'
}
};
const... | import React, { Component } from 'react';
import {observer} from 'mobx-react';
import Services from '../components/Services';
import Tasks from '../components/Tasks';
import FlatButton from 'material-ui/FlatButton';
import { Link } from 'react-router';
const styles = {
button: {
margin: 0.6 + 'rem'
}
};
const... | Disable non-functional create service button | Disable non-functional create service button
| JavaScript | mit | jsalonen/swarmist,jsalonen/swarmist | ---
+++
@@ -28,9 +28,7 @@
render() {
const {nodeStore} = this.props.route;
-
- return (
- <div>
+ /*
<FlatButton
label="Create Service"
containerElement={<Link to="/services/create" />}
@@ -38,6 +36,10 @@
style={styles.button}
... |
71e3042184626c37d9cff421743589b3e21a3e29 | test/util/mock-client.js | test/util/mock-client.js | import request from 'request';
function call(endpoint, method, qs, json) {
let options = {
uri: `http://localhost/api/${endpoint}`,
method
};
if (typeof qs !== 'undefined') {
options.qs = qs;
}
if (typeof json !== 'undefined') {
options.json = json;
}
return ... | import request from 'request';
const PROTOCOL = 'http';
const HOST = 'localhost';
const PORT = 8080;
function call(endpoint, method, qs, json) {
let options = {
uri: `${PROTOCOL}://${HOST}:${PORT}/api/${endpoint}`,
method
};
if (typeof qs !== 'undefined') {
options.qs = qs;
}
... | Use port 8080 for testing | Use port 8080 for testing
| JavaScript | unlicense | TheFourFifths/consus,TheFourFifths/consus | ---
+++
@@ -1,8 +1,12 @@
import request from 'request';
+
+const PROTOCOL = 'http';
+const HOST = 'localhost';
+const PORT = 8080;
function call(endpoint, method, qs, json) {
let options = {
- uri: `http://localhost/api/${endpoint}`,
+ uri: `${PROTOCOL}://${HOST}:${PORT}/api/${endpoint}`,
... |
743c72c930d1e5b83492e778d45c3950c2ba397d | src/_reducers/AccountReducer.js | src/_reducers/AccountReducer.js | import { fromJS } from 'immutable';
import {
SERVER_DATA_AUTHORIZE,
SERVER_DATA_BALANCE,
SERVER_DATA_PAYOUT_CURRENCIES,
SERVER_DATA_BUY,
UPDATE_TOKEN,
} from '../_constants/ActionTypes';
const initialState = fromJS({
loginid: '',
fullname: '',
currency: 'USD',
balance: 0,
token:... | import { fromJS } from 'immutable';
import {
SERVER_DATA_AUTHORIZE,
SERVER_DATA_BALANCE,
SERVER_DATA_PAYOUT_CURRENCIES,
SERVER_DATA_BUY,
UPDATE_TOKEN,
} from '../_constants/ActionTypes';
const initialState = fromJS({
loginid: '',
fullname: '',
currency: 'USD',
balance: 0,
token:... | Set default currency to USD if none | Set default currency to USD if none
| JavaScript | mit | nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,qingweibinary/binary-next-gen,nazaninreihani/binary-n... | ---
+++
@@ -20,6 +20,9 @@
switch (action.type) {
case SERVER_DATA_AUTHORIZE: {
const authorize = fromJS(action.serverResponse.authorize);
+ if (!authorize.currency) {
+ return state.merge(authorize).set('currency', 'USD');
+ }
return state.m... |
8b6b07a2e46763b1f42f8f99cfe07ce30517e10d | lib/router.js | lib/router.js | var subscriptions = new SubsManager();
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound'
});
Router.route('/', {
name: 'home',
waitOn: function() {
return subscriptions.subscribe('allMangasCover');
}
});
Router.route('/ownedMangas', ... | var subscriptions = new SubsManager();
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound'
});
Router.route('/', {
name: 'home',
waitOn: function() {
return subscriptions.subscribe('allMangasCover');
},
fastRender: true
});
Router.... | Add fastRender for the home | Add fastRender for the home
| JavaScript | mit | dexterneo/mangas,dexterneo/mangas,dexterneo/mangatek,dexterneo/mangatek | ---
+++
@@ -10,7 +10,8 @@
name: 'home',
waitOn: function() {
return subscriptions.subscribe('allMangasCover');
- }
+ },
+ fastRender: true
});
Router.route('/ownedMangas', { |
b761dcde4504dd02fc8fd54cc499da91efa7a56e | src/app/directives/bodyClass.js | src/app/directives/bodyClass.js | define([
'angular',
'app',
'lodash'
],
function (angular, app, _) {
'use strict';
angular
.module('grafana.directives')
.directive('bodyClass', function() {
return {
link: function($scope, elem) {
var lastPulldownVal;
var lastHideControlsVal;
$scope.$watc... | define([
'angular',
'app',
'lodash'
],
function (angular, app, _) {
'use strict';
angular
.module('grafana.directives')
.directive('bodyClass', function() {
return {
link: function($scope, elem) {
var lastPulldownVal;
var lastHideControlsVal;
$scope.$watc... | Switch from watch to watchCollection for bodyclass directive | Switch from watch to watchCollection for bodyclass directive
| JavaScript | agpl-3.0 | grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana | ---
+++
@@ -15,7 +15,7 @@
var lastPulldownVal;
var lastHideControlsVal;
- $scope.$watch('dashboard.pulldowns', function() {
+ $scope.$watchCollection('dashboard.pulldowns', function() {
if (!$scope.dashboard) {
return;
}
@@ -26,7 +26,7... |
9c3f28abade0f393e2aba5f5960756fb24832a74 | lib/cucumber/support_code/world_constructor.js | lib/cucumber/support_code/world_constructor.js | var WorldConstructor = function() {
return function(callback) { callback(this) };
};
module.exports = WorldConstructor;
| var WorldConstructor = function() {
return function World(callback) { callback() };
};
module.exports = WorldConstructor;
| Simplify default World constructor callback | Simplify default World constructor callback
| JavaScript | mit | AbraaoAlves/cucumber-js,Telogical/CucumberJS,marnen/cucumber-js,MinMat/cucumber-js,richardmcsong/cucumber-js,bluenergy/cucumber-js,AbraaoAlves/cucumber-js,h2non/cucumber-js,MinMat/cucumber-js,Telogical/CucumberJS,h2non/cucumber-js,vilmysj/cucumber-js,mhoyer/cucumber-js,marnen/cucumber-js,richardmcsong/cucumber-js,vilmy... | ---
+++
@@ -1,4 +1,4 @@
var WorldConstructor = function() {
- return function(callback) { callback(this) };
+ return function World(callback) { callback() };
};
module.exports = WorldConstructor; |
9ad051a99797c70c2f806409d342d25aa91431a9 | concrete/js/captcha/recaptchav3.js | concrete/js/captcha/recaptchav3.js | function RecaptchaV3() {
$(".recaptcha-v3").each(function () {
var el = $(this);
var clientId = grecaptcha.render($(el).attr("id"), {
'sitekey': $(el).attr('data-sitekey'),
'badge': $(el).attr('data-badge'),
'theme': $(el).attr('data-theme'),
'size': '... | /* jshint unused:vars, undef:true, browser:true, jquery:true */
/* global grecaptcha */
;(function(global, $) {
'use strict';
function render(element) {
var $element = $(element),
clientId = grecaptcha.render(
$element.attr('id'),
{
sitekey: $element.data('sitekey')... | Configure jshint, simplify javascript structure | Configure jshint, simplify javascript structure
| JavaScript | mit | concrete5/concrete5,jaromirdalecky/concrete5,deek87/concrete5,olsgreen/concrete5,olsgreen/concrete5,jaromirdalecky/concrete5,haeflimi/concrete5,mlocati/concrete5,mlocati/concrete5,rikzuiderlicht/concrete5,mlocati/concrete5,deek87/concrete5,deek87/concrete5,MrKarlDilkington/concrete5,MrKarlDilkington/concrete5,hissy/con... | ---
+++
@@ -1,16 +1,34 @@
-function RecaptchaV3() {
- $(".recaptcha-v3").each(function () {
- var el = $(this);
- var clientId = grecaptcha.render($(el).attr("id"), {
- 'sitekey': $(el).attr('data-sitekey'),
- 'badge': $(el).attr('data-badge'),
- 'theme': $(el).attr('... |
bd84d284e22e663535a1d64060dacbea4eb10b30 | js/locations.js | js/locations.js | $(function () {
var locationList = $("#location-list");
function populateLocations(features) {
locationList.empty();
$.each(features, function(i, v) {
$("<li/>").appendTo(locationList)
.toggleClass("lead", i == 0)
.html(v.properties.details);
});
}
if (locationList.length > 0) ... | $(function () {
var locationList = $("#location-list");
function populateLocations(data) {
locationList.empty();
$.each(data.features, function(i, v) {
$("<li/>").appendTo(locationList)
.toggleClass("lead", i == 0 && data.locationKnown)
.html(v.properties.details);
});
}
if (lo... | Sort by name if location not available | Sort by name if location not available
| JavaScript | apache-2.0 | resbaz/resbaz-2016-02-01,BillMills/resbaz-site,BillMills/resbaz-site,resbaz/resbaz-2016-02-01 | ---
+++
@@ -1,16 +1,19 @@
$(function () {
var locationList = $("#location-list");
- function populateLocations(features) {
+ function populateLocations(data) {
locationList.empty();
- $.each(features, function(i, v) {
+ $.each(data.features, function(i, v) {
$("<li/>").appendTo(locationList)
-... |
9a5b708be7e705acfb87ddaa2117c196621cf616 | src/pages/dataTableUtilities/reducer/getReducer.js | src/pages/dataTableUtilities/reducer/getReducer.js | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
/**
* Method using a factory pattern variant to get a reducer
* for a particular page or page style.
*
* For a new page - create a constant object with the
* methods from reducerMethods which are composed to create
* a reducer. Add to PAGE_REDUCER... | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
/**
* Method using a factory pattern variant to get a reducer
* for a particular page or page style.
*
* For a new page - create a constant object with the
* methods from reducerMethods which are composed to create
* a reducer. Add to PAGE_REDUCER... | Add openBasicModal reducer method to customer invoice | Add openBasicModal reducer method to customer invoice
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile | ---
+++
@@ -25,6 +25,7 @@
deselectAll,
focusCell,
sortData,
+ openBasicModal,
} from './reducerMethods';
/**
@@ -43,6 +44,7 @@
selectRow,
deselectRow,
deselectAll,
+ openBasicModal,
};
const PAGE_REDUCERS = { |
73c4dd83b679457a2d1ff6334fb0bd563e0030d5 | src/i18n.js | src/i18n.js | import React, { Component } from 'react';
import Polyglot from 'node-polyglot';
// Provider root component
export default class I18n extends Component {
constructor(props) {
super(props);
this._polyglot = new Polyglot({
locale: props.locale,
phrases: props.messages,
});
}
getChildContex... | import React, { Component } from 'react';
import Polyglot from 'node-polyglot';
// Provider root component
export default class I18n extends Component {
constructor(props) {
super(props);
this._polyglot = new Polyglot({
locale: props.locale,
phrases: props.messages,
});
}
getChildContex... | Fix update behavior removing shouldComponentUpdate | Fix update behavior removing shouldComponentUpdate
The should component update was not such a good idea as the component did not update when props of other components changed | JavaScript | mit | nayaabkhan/react-polyglot,nayaabkhan/react-polyglot | ---
+++
@@ -24,10 +24,6 @@
})
}
}
-
- shouldComponentUpdate(nextProps) {
- return this.props.locale !== nextProps.locale
- }
render() {
const children = this.props.children; |
476c12381d7364fddb46c158b6e13bfeb940cc02 | src/test/moment/calendar.js | src/test/moment/calendar.js | // These tests are for locale independent features
// locale dependent tests would be in locale test folder
import { module, test } from '../qunit';
import moment from '../../moment';
module('calendar');
test('passing a function', function (assert) {
var a = moment().hours(2).minutes(0).seconds(0);
assert.eq... | // These tests are for locale independent features
// locale dependent tests would be in locale test folder
import { module, test } from '../qunit';
import moment from '../../moment';
module('calendar');
test('passing a function', function (assert) {
var a = moment().hours(13).minutes(0).seconds(0);
assert.e... | Test mid-day to avoid DST issues | Test mid-day to avoid DST issues
| JavaScript | mit | PKRoma/moment,SkReD/moment,Oire/moment,OtkurBiz/moment,moment/moment,monoblaine/moment,xkxx/moment,optimizely/moment,optimizely/moment,xkxx/moment,xkxx/moment,Oire/moment,scriptrdotio/moment,joelmheim/moment,OtkurBiz/moment,ze-pequeno/moment,moment/moment,gabrielmaldi/moment,samuelfullerthomas/moment,maggiepint/moment,... | ---
+++
@@ -6,12 +6,12 @@
module('calendar');
test('passing a function', function (assert) {
- var a = moment().hours(2).minutes(0).seconds(0);
+ var a = moment().hours(13).minutes(0).seconds(0);
assert.equal(moment(a).calendar(null, {
'sameDay': function () {
return 'h:mmA';
... |
620f3cdaab7158d0430dd00c2a8b2adadabb7ea9 | lib/logger.js | lib/logger.js | var util = require('util');
var levels = [
'silly',
'input',
'verbose',
'prompt',
'debug',
'http',
'info',
'data',
'help',
'warn',
'error'
];
levels.forEach(function(level) {
exports[level] = function(msg) {
console.log(
level + ':',
util... | var util = require('util');
var levels = [
'silly',
'input',
'verbose',
'prompt',
'debug',
'http',
'info',
'data',
'help',
'warn',
'error'
];
levels.forEach(function(level) {
exports[level] = function(msg) {
if (!exports.disabled) {
console.log(
... | Allow disabling logging when Winston is not being used | Allow disabling logging when Winston is not being used
| JavaScript | mit | nylen/node-web-template,nylen/node-web-media-player | ---
+++
@@ -16,13 +16,17 @@
levels.forEach(function(level) {
exports[level] = function(msg) {
- console.log(
- level + ':',
- util.format.apply(
- this,
- [msg].concat([].slice.call(arguments, 1))));
+ if (!exports.disabled) {
+ cons... |
80d5eb3fa1d3d4653e5d67f62b8a5d8ed6c7a3ca | js/game.js | js/game.js | // Game Controller
// A checkers board has 64 squares like a chess board but it only uses 32 squares all the same color
// Each player has 12 pieces and pieces that make until the last squares on the enemy side is promoted
// Promoted piece also moves on diagonals with no limit of squares if it is free
// The moves are... | // Game Controller
// A checkers board has 64 squares like a chess board but it only uses 32 squares all the same color
// Each player has 12 pieces and pieces that make until the last squares on the enemy side is promoted
// Promoted piece also moves on diagonals with no limit of squares if it is free
// The moves are... | Create prototype to flatten board | Create prototype to flatten board
| JavaScript | mit | RenanBa/checkers-v1,RenanBa/checkers-v1 | ---
+++
@@ -9,11 +9,15 @@
/* Board.initial generate all elements used to be pieces and empty squares on the
board and return an array of the board initial position*/
this.board = Board.initial();
- this.playingNow = "blue";
}
-Game.prototype.test = function(param){
- console.log(this.board);
+Game.proto... |
4d909497a1c18d05b46cb6b4115dbd6ad5b0656a | src/components/Specimen/Span.js | src/components/Specimen/Span.js | import React, {Component, PropTypes} from 'react';
export default class Span extends Component {
render() {
const {children, span} = this.props;
const style = {
boxSizing: 'border-box',
display: 'flex',
flexBasis: span && window.innerWidth > 640 ?
`calc(${span / 6 * 100}% - 10px)` ... | import React, {Component, PropTypes} from 'react';
export default class Span extends Component {
render() {
const {children, span} = this.props;
const style = {
boxSizing: 'border-box',
display: 'flex',
flexBasis: span && window.innerWidth > 640 ?
`calc(${span / 6 * 100}% - 10px)` ... | Fix max width of overflowing specimens on Firefox | Fix max width of overflowing specimens on Firefox
| JavaScript | bsd-3-clause | interactivethings/catalog,interactivethings/catalog,interactivethings/catalog,interactivethings/catalog | ---
+++
@@ -8,6 +8,10 @@
boxSizing: 'border-box',
display: 'flex',
flexBasis: span && window.innerWidth > 640 ?
+ `calc(${span / 6 * 100}% - 10px)` :
+ 'calc(100% - 10px)',
+ // Bug fix for Firefox; width and flexBasis don't work on horizontally scrolling code blocks
+ max... |
ef08b8e74ece8daafa19e6c788a55f49fb07d15c | source/tab/LoginTracker.js | source/tab/LoginTracker.js | import { getCurrentTitle, getCurrentURL } from "./page.js";
let __sharedTracker = null;
export default class LoginTracker {
username = "";
password = "";
_url = getCurrentTitle();
_title = getCurrentTitle();
get title() {
return this._title;
}
get url() {
return this._url... | import { getCurrentTitle, getCurrentURL } from "./page.js";
let __sharedTracker = null;
export default class LoginTracker {
username = "";
password = "";
_url = getCurrentURL();
_title = getCurrentTitle();
get title() {
return this._title;
}
get url() {
return this._url;
... | Fix URL in login tracking | Fix URL in login tracking
| JavaScript | mit | perry-mitchell/buttercup-chrome,perry-mitchell/buttercup-chrome,buttercup-pw/buttercup-browser-extension,buttercup-pw/buttercup-browser-extension | ---
+++
@@ -5,7 +5,7 @@
export default class LoginTracker {
username = "";
password = "";
- _url = getCurrentTitle();
+ _url = getCurrentURL();
_title = getCurrentTitle();
get title() { |
dd5b51fe036ffa661c847e70d03eb02d6926e21a | src/main.js | src/main.js | import Firebase from 'firebase'
import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './App.vue'
Vue.use(VueRouter)
let router = new VueRouter({
hashboang: false,
history: true,
})
let MEGAKanban = Vue.extend({})
let Redirect = Vue.extend({
ready() {
let boardName = localStorage.getI... | import Firebase from 'firebase'
import Vue from 'vue'
import VueRouter from 'vue-router'
import nonsense from './nonsense'
import App from './App.vue'
window.randomSet = nonsense.randomSet
window.randomNumber = nonsense.randomNumber
Vue.use(VueRouter)
let router = new VueRouter({
hashboang: false,
history: true... | Use nonsense board name, no localStorage | Use nonsense board name, no localStorage
| JavaScript | mit | lunardog/MEGAKanban,lunardog/MEGAKanban | ---
+++
@@ -2,7 +2,11 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
+import nonsense from './nonsense'
import App from './App.vue'
+
+window.randomSet = nonsense.randomSet
+window.randomNumber = nonsense.randomNumber
Vue.use(VueRouter)
@@ -16,20 +20,15 @@
let Redirect = Vue.extend({
read... |
e580b1c8dc4e2a09feaa5b6be00a3e8d1ea31e01 | src/mailgun-transport.js | src/mailgun-transport.js | 'use strict';
var Mailgun = require('mailgun-js');
var packageData = require('../package.json');
module.exports = function(options) {
return new MailgunTransport(options);
};
function MailgunTransport(options) {
this.options = options || {};
this.name = 'Mailgun';
this.version = packageData.version;
}
Mailg... | 'use strict';
var Mailgun = require('mailgun-js');
var packageData = require('../package.json');
module.exports = function(options) {
return new MailgunTransport(options);
};
function MailgunTransport(options) {
this.options = options || {};
this.name = 'Mailgun';
this.version = packageData.version;
}
Mailg... | Add in support for passing through the html param | Add in support for passing through the html param | JavaScript | mit | orliesaurus/nodemailer-mailgun-transport,wmcmurray/nodemailer-mailgun-transport,rasteiner/nodemailer-mailgun-transport | ---
+++
@@ -24,7 +24,8 @@
from: mail.data.from,
to: mail.data.to,
subject: mail.data.subject,
- text: mail.data.text
+ text: mail.data.text,
+ html: mail.data.html
}
mailgun.messages().send(data, |
e28021852e496cbe943f5b2b3bee1fb6353a629d | src/js/factories/chat.js | src/js/factories/chat.js | (function() {
'use strict';
// This is my local Docker IRC server
var defaultHost = '192.168.99.100:6667';
angular.module('app.factories.chat', []).
factory('chat', Chat);
Chat.$inject = ['$websocket', '$rootScope'];
function Chat($websocket, $rootScope) {
var ws = $websocket(... | (function() {
'use strict';
// This is my local Docker IRC server
var defaultHost = '192.168.99.100:6667';
angular.module('app.factories.chat', []).
factory('chat', Chat);
Chat.$inject = ['$websocket', '$rootScope'];
function Chat($websocket, $rootScope) {
var ws = $websocket(... | Add _send function for hacky-ness | Add _send function for hacky-ness
| JavaScript | mit | BigRoom/mystique,BigRoom/mystique | ---
+++
@@ -43,6 +43,9 @@
name: 'NICK',
message: nick
});
+ },
+ _send: function(obj) {
+ ws.send(obj);
}
};
|
1e94858c1498a5cc429aeccdfdd8b2d92615decd | lib/toHTML.js | lib/toHTML.js | 'use strict';
/*eslint no-underscore-dangle: 0*/
var ElementFactory = require('./ElementFactory.js');
var elem = new ElementFactory({});
var stream = require('stream');
var ToHTML = function(options) {
this.options = options;
this.elem = new ElementFactory(options);
stream.Transform.call(this, {
objectMode: ... | 'use strict';
/*eslint no-underscore-dangle: 0*/
var ElementFactory = require('./ElementFactory.js');
var elem = new ElementFactory({});
var stream = require('stream');
var ToHTML = function(options) {
this.options = options;
this.elem = new ElementFactory(options);
stream.Transform.call(this, {
objectMode: ... | Allow strings to pass through the stream | Allow strings to pass through the stream
| JavaScript | isc | ironikart/html-tokeniser,ironikart/html-tokeniser | ---
+++
@@ -42,7 +42,10 @@
ToHTML.prototype._transform = function(token, enc, cb) {
// Ignore invalid tokens
if (typeof token !== 'object' || !token.type) {
- cb(null);
+ if (typeof token === 'string') {
+ this.push(token);
+ }
+ return cb(null);
}
this.push(convertTokenToHTML(token)); |
9f7f601f966b8abb784d28a87703d952ffca5282 | examples/cordova/modules/BarcodeScannerPage.js | examples/cordova/modules/BarcodeScannerPage.js | var PluginPage = require('./PluginPage');
var page = new PluginPage('BarcodeScanner', 'cordova-plugin-barcodescanner', function(parent) {
new tabris.Button({
layoutData: {left: 10, top: 10, right: 10},
text: 'Scan Barcode'
}).on('select', scanBarcode).appendTo(parent);
var resultView = new tabris.TextV... | var PluginPage = require('./PluginPage');
var page = new PluginPage('BarcodeScanner', 'phonegap-plugin-barcodescanner', function(parent) {
new tabris.Button({
layoutData: {left: 10, top: 10, right: 10},
text: 'Scan Barcode'
}).on('select', scanBarcode).appendTo(parent);
var resultView = new tabris.Text... | Update barcode scanner example to reference plugin "phonegap-plugin-barcodescanner" | Update barcode scanner example to reference plugin "phonegap-plugin-barcodescanner"
Previously the incorrect plugin "cordova-plugin-barcodescanner" has been referenced
Change-Id: I2e318fdf66ba8186a135a28d8ddc92a94ee63ea4
| JavaScript | bsd-3-clause | eclipsesource/tabris-js,eclipsesource/tabris-js,eclipsesource/tabris-js | ---
+++
@@ -1,6 +1,6 @@
var PluginPage = require('./PluginPage');
-var page = new PluginPage('BarcodeScanner', 'cordova-plugin-barcodescanner', function(parent) {
+var page = new PluginPage('BarcodeScanner', 'phonegap-plugin-barcodescanner', function(parent) {
new tabris.Button({
layoutData: {left: 10, t... |
65c2c4b7ee3833e8ea30deb701cfcbb337562d7e | lib/settings.js | lib/settings.js | var Settings = {
setUrls: function(urls) {
localStorage.setItem('urls', JSON.stringify(urls));
},
getUrls: function() {
var urls = localStorage.getItem('urls') || '';
return JSON.parse(urls);
}
};
| var Settings = {
setUrls: function(urls) {
localStorage.setItem('urls', JSON.stringify(urls));
},
getUrls: function() {
var urls = localStorage.getItem('urls');
return urls ? JSON.parse(urls) : '';
}
};
| Fix bug when no urls have been set up yet | Fix bug when no urls have been set up yet
| JavaScript | mit | craigerm/unstyled,craigerm/unstyled | ---
+++
@@ -3,7 +3,7 @@
localStorage.setItem('urls', JSON.stringify(urls));
},
getUrls: function() {
- var urls = localStorage.getItem('urls') || '';
- return JSON.parse(urls);
+ var urls = localStorage.getItem('urls');
+ return urls ? JSON.parse(urls) : '';
}
}; |
973d38c62da08d6f19b49f1cbd097694080331aa | app/anol/modules/mouseposition/mouseposition-directive.js | app/anol/modules/mouseposition/mouseposition-directive.js | angular.module('anol.mouseposition', [])
.directive('anolMousePosition', ['MapService', function(MapService) {
return {
restrict: 'A',
require: '?^anolMap',
scope: {},
link: {
pre: function(scope, element, attrs, AnolMapController) {
scope.map = MapServic... | angular.module('anol.mouseposition', [])
.directive('anolMousePosition', ['MapService', function(MapService) {
return {
restrict: 'A',
require: '?^anolMap',
scope: {},
link: {
pre: function(scope, element, attrs) {
scope.map = MapService.getMap();
... | Add coordinateFormat function to controlOptions if present | Add coordinateFormat function to controlOptions if present
| JavaScript | mit | omniscale/orka-app,omniscale/orka-app,hgarnelo/orka-app,hgarnelo/orka-app | ---
+++
@@ -6,10 +6,16 @@
require: '?^anolMap',
scope: {},
link: {
- pre: function(scope, element, attrs, AnolMapController) {
+ pre: function(scope, element, attrs) {
scope.map = MapService.getMap();
+ },
+ post: function(scope, ... |
348197bb61eb41bd9c37295f961084448156d47b | prod-server.js | prod-server.js | const path = require("path");
const ROOT = require("./config/path-helper").ROOT;
const WebpackIsomorphicTools = require("webpack-isomorphic-tools");
function hotReloadTemplate(templatesDir) {
require("marko/hot-reload").enable();
require("chokidar")
.watch(templatesDir)
.on("change", filename => {
re... | const path = require("path");
const ROOT = require("./config/path-helper").ROOT;
const WebpackIsomorphicTools = require("webpack-isomorphic-tools");
require("source-map-support").install({
environment: "node"
});
function hotReloadTemplate(templatesDir) {
require("marko/hot-reload").enable();
require("chokidar"... | Add source-map-support only for node env | Add source-map-support only for node env
| JavaScript | mit | hung-phan/all-hail-the-R,hung-phan/koa-react-isomorphic,hung-phan/koa-react-isomorphic,hung-phan/koa-react-isomorphic,hung-phan/all-hail-the-R | ---
+++
@@ -1,6 +1,10 @@
const path = require("path");
const ROOT = require("./config/path-helper").ROOT;
const WebpackIsomorphicTools = require("webpack-isomorphic-tools");
+
+require("source-map-support").install({
+ environment: "node"
+});
function hotReloadTemplate(templatesDir) {
require("marko/hot-re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.