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
0d56522d9ae59d9d62c6787421cfcc4daf489a92
src/util/define-properties.js
src/util/define-properties.js
export default function (obj, props) { Object.keys(props).forEach(function (name) { const desc = Object.getOwnPropertyDescriptor(obj, name); if (!desc || desc.configurable) { Object.defineProperty(obj, name, props[name]); } }); }
export default function (obj, props) { Object.keys(props).forEach(function (name) { const prop = props[name]; const descrptor = Object.getOwnPropertyDescriptor(obj, name); const isDinosaurBrowser = name !== 'arguments' && name !== 'caller' && 'value' in prop; const isConfigurable = !descrptor || descr...
Make defining properties more robust for opera 12 or any browser that thinks things are non-configurable.
Make defining properties more robust for opera 12 or any browser that thinks things are non-configurable.
JavaScript
mit
chrisdarroch/skatejs,skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs
--- +++ @@ -1,8 +1,14 @@ export default function (obj, props) { Object.keys(props).forEach(function (name) { - const desc = Object.getOwnPropertyDescriptor(obj, name); - if (!desc || desc.configurable) { - Object.defineProperty(obj, name, props[name]); + const prop = props[name]; + const descrpto...
117802c072678f1eab4fd12474b22e3d12226678
GitEventChecker/routes/index.js
GitEventChecker/routes/index.js
var express = require('express'), router = express.Router(), net = require('net'), fs = require('fs'), socketPath = '/tmp/haproxy'; /* GET home page. */ router.post('/', function(req, res) { // console.log(req.body); // you can get commit information from request body var client = net.createConnection(socketP...
var express = require('express'), router = express.Router(), net = require('net'), fs = require('fs'), socketPath = '/tmp/haproxy'; /* GET home page. */ router.post('/', function(req, res) { // console.log(req.body); // you can get commit information from request body var client = net.createConnection(socketP...
Change command result receive part
Change command result receive part
JavaScript
mit
PontoServerSide/LiveUpdater
--- +++ @@ -14,12 +14,13 @@ client.on('connect', function () { client.write('show health'); + + client.on('data', function (data) { + winston.debug('DATA: '+data); + }); }); - client.on('data', function (data) { - winston.debug('DATA: '+data); - - }); + /* fs.stat(socketPath, function (err) {
65b9ec6e02399db66b51a4a15f3c52fe2ee04b9a
src/app/main/main.controller.js
src/app/main/main.controller.js
class MainController { constructor(_, $scope, $state, $log, SocketService) { 'ngInject'; this._ = _; this.$log = $log; this.$state = $state; this.$scope = $scope; this.SocketService = SocketService; this.name = ''; this.password = ''; this.errorMessage = ''; this.processing = ...
class MainController { constructor(_, $scope, $state, $log, SocketService) { 'ngInject'; this._ = _; this.$log = $log; this.$state = $state; this.$scope = $scope; this.SocketService = SocketService; this.name = ''; this.password = ''; this.errorMessage = ''; this.processing = ...
Save game_id when joining game
Save game_id when joining game
JavaScript
mit
hendryl/Famous-Places-Mobile,hendryl/Famous-Places-Mobile
--- +++ @@ -33,6 +33,7 @@ this.$log.log('join room message'); if (message.result === true) { + this.SocketService.game_id = message.game_id; this.$state.go('lobby', {roomName: this.password}); } else {
b42d2aa652b987865d3a6f55f601b98f21a76137
lib/assets/javascripts/builder/editor/layers/layer-content-views/legend/size/legend-size-types.js
lib/assets/javascripts/builder/editor/layers/layer-content-views/legend/size/legend-size-types.js
var _ = require('underscore'); var LegendTypes = require('builder/editor/layers/layer-content-views/legend/legend-types'); module.exports = [ { value: LegendTypes.NONE, tooltipTranslationKey: 'editor.legend.tooltips.style.none', legendIcon: require('builder/editor/layers/layer-content-views/legend/carous...
var _ = require('underscore'); var LegendTypes = require('builder/editor/layers/layer-content-views/legend/legend-types'); var styleHelper = require('builder/helpers/style'); module.exports = [ { value: LegendTypes.NONE, tooltipTranslationKey: 'editor.legend.tooltips.style.none', legendIcon: require('bui...
Refactor bubble legend compatibility rules with styles for clarity
Refactor bubble legend compatibility rules with styles for clarity
JavaScript
bsd-3-clause
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
--- +++ @@ -1,5 +1,6 @@ var _ = require('underscore'); var LegendTypes = require('builder/editor/layers/layer-content-views/legend/legend-types'); +var styleHelper = require('builder/helpers/style'); module.exports = [ { @@ -13,13 +14,9 @@ legendIcon: require('builder/editor/layers/layer-content-views/le...
86e0ecae9697c9a7a10eddff320fb3679f5b22a2
lib/api/search.js
lib/api/search.js
function select(database, options, callback) { var results = []; database.command('select', options, function(error, data) { if (error) { callback(error); } else { var columnNames = []; var i, j; for (j = 0; j < data[0][1].length; j++) { columnNames[j] = data[0][1][j][0]; ...
var resolver = require('../resolver'); function select(database, options, callback) { var results = []; database.command('select', options, function(error, data) { if (error) { callback(error); } else { var columnNames = []; var i, j; for (j = 0; j < data[0][1].length; j++) { ...
Use resolver to resolve the table name
Use resolver to resolve the table name
JavaScript
mit
groonga/gcs,groonga/gcs
--- +++ @@ -1,3 +1,5 @@ +var resolver = require('../resolver'); + function select(database, options, callback) { var results = []; database.command('select', options, function(error, data) { @@ -29,7 +31,7 @@ var domain = request.query.DomainName || ''; var expr = request.query.q; var options = ...
52c04555ff2c5c7e4f41eaa3cd422e9d386dfdee
lib/index.js
lib/index.js
var math = require('mathjs'); var ERROR_RESPONSE = 'I can\'t calculate that!'; module.exports = function(argv, response) { var respBody; try { var expression = argv.slice(1).join(''); respBody = math.eval(expression).toString(); } catch(e) { console.error(e); respBody = ERROR_RESPONSE; } ...
var math = require('mathjs'); var ERROR_RESPONSE = 'I can\'t calculate that!'; module.exports = function(argv, response) { var respBody = ERROR_RESPONSE; try { var expression = argv.slice(1).join(''); var result = math.eval(expression); if (typeof result === 'function') { console.error('Someh...
Check for weird function results
Check for weird function results
JavaScript
mit
elvinyung/scalk
--- +++ @@ -4,14 +4,20 @@ var ERROR_RESPONSE = 'I can\'t calculate that!'; module.exports = function(argv, response) { - var respBody; + var respBody = ERROR_RESPONSE; try { var expression = argv.slice(1).join(''); - respBody = math.eval(expression).toString(); + var result = math.eval(expressio...
e2ede78fcf2076a40835909e9c5e01a76fdf1424
js/markdown-toc.js
js/markdown-toc.js
/** * User: powerumc * Date: 2014. 5. 18. */ $(function() { $(function () { $.ajax({ url: "Requirements.md", type: "GET", success: function (data) { var html = marked(data); $("#preview").html(html); var toc = $("#toc").tocify({ context: "#preview", selectors: "h1, h2, h3, h4, h5...
/** * User: powerumc * Date: 2014. 5. 18. */ $(function() { $(function () { $.ajax({ url: "Requirements.md", type: "GET", success: function (data) { var html = marked(data); $("#preview").html(html); var toc = $("#toc").tocify({ context: "#preview", selectors: "h1, h2, h3, h4", ...
Remove h5, h6 from tocify configuration parameters
Remove h5, h6 from tocify configuration parameters
JavaScript
mit
ernstki/TeamMachine-Docs,ernstki/TeamMachine-Docs,ernstki/TeamMachine-Docs
--- +++ @@ -15,7 +15,7 @@ var toc = $("#toc").tocify({ context: "#preview", - selectors: "h1, h2, h3, h4, h5, h6", + selectors: "h1, h2, h3, h4", showEffect: "slideDown", hideEffect: "slideUp", scrollTo: 55,
71b158d08ea4ba715d3054da430c93e91dfcedbf
lib/index.js
lib/index.js
"use strict"; // Dependencies const readJson = require("r-json") , writeJson = require("w-json") , mapO = require("map-o") , ul = require("ul") , findValue = require("find-value") ; /** * packy * Sets the default fields in the package.json file. * * @name packy * @function * @param {String} ...
"use strict"; // Dependencies const readJson = require("r-json") , writeJson = require("w-json") , mapO = require("map-o") , ul = require("ul") , findValue = require("find-value") ; /** * packy * Sets the default fields in the package.json file. * * @name packy * @function * @param {String} ...
Send the data in the functions
Send the data in the functions
JavaScript
mit
IonicaBizau/packy
--- +++ @@ -29,7 +29,7 @@ return merge(v, p); } if (typeof v === "function") { - return v(findValue(data, p.join("."))); + return v(findValue(data, p.join(".")), data); } return v; ...
3b53fc0ff2a2ecb022f35926d37a1a0f140ae640
lib/utils.js
lib/utils.js
'use strict'; module.exports = { getAuthorizedAclMethods, }; function getAuthorizedAclMethods(Model) { let authorizedMethods = []; let acls = Model.definition.settings.acls || []; acls.forEach((acl) => { if (acl.permission === 'ALLOW' && acl.property) { if (!Array.isArray(acl.property)) { a...
'use strict'; module.exports = { getAuthorizedAclMethods, }; function getAuthorizedAclMethods(Model) { let authorizedMethods = []; let acls = Model.settings.acls || []; acls.forEach((acl) => { if (acl.permission === 'ALLOW' && acl.property) { if (!Array.isArray(acl.property)) { acl.property...
Use Model.settings.acls to get the acls
Use Model.settings.acls to get the acls Use `Model.settings.acls` to get the acls instead of `Model.definition.settings.acl`. `Model.definition` is an artifact created by datasource-juggler, but it wouldn't exists if you just use `loopback.createModel()`.
JavaScript
mit
devsu/loopback-setup-remote-methods-mixin
--- +++ @@ -6,7 +6,7 @@ function getAuthorizedAclMethods(Model) { let authorizedMethods = []; - let acls = Model.definition.settings.acls || []; + let acls = Model.settings.acls || []; acls.forEach((acl) => { if (acl.permission === 'ALLOW' && acl.property) {
ff5f0558be982d50aa74991051b676ec4c263482
src/main/webapp/resources/js/pages/samples/edit.js
src/main/webapp/resources/js/pages/samples/edit.js
$(document).ready(function(){ /** * Serialize metadata to json for submission */ $("#edit-form").submit(function(){ var metadata = {}; $("#other-metadata").find(".metadata-entry").each(function(){ var entry = $(this); var key = entry.find(".metadata-key").val();...
$(document).ready(function(){ /** * Serialize metadata to json for submission */ $("#edit-form").submit(function(){ var metadata = {}; $("#other-metadata").find(".metadata-entry").each(function(){ var entry = $(this); var key = entry.find(".metadata-key").val();...
Check to see if there is actually metadata to add.
Check to see if there is actually metadata to add.
JavaScript
apache-2.0
phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida
--- +++ @@ -12,7 +12,9 @@ }); // paste the json into a hidden text field for submission + if (Object.keys(metadata).length > 0) { $("#metadata").val(JSON.stringify(metadata)); + } }); /**
494ecc627106cb7f9532f88db97b5d2f45fa23dc
src/main/webapp/components/BuilderDataTable.js
src/main/webapp/components/BuilderDataTable.js
import * as React from 'react'; const HEADERS = ['no', 'text', 'log']; /** * Table responsible for storing the data for a builder. * * @param {Object[]} props.buildSteps - The build steps for a given builder. * @param {string} props.buildSteps[].step_number - The relative order of the build step. * @param {strin...
import * as React from 'react'; import {getFields} from './utils/getFields'; // The target fields to be extracted from each build step // and displayed on each row. const BUILD_STEP_FIELDS = ['step_number', 'text', 'logs']; // Headers to display at the top of the table. const HEADERS = ['no.', 'text', 'log']; /** *...
Read build step fields from array, Update comments
Read build step fields from array, Update comments
JavaScript
apache-2.0
googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020
--- +++ @@ -1,6 +1,12 @@ import * as React from 'react'; +import {getFields} from './utils/getFields'; -const HEADERS = ['no', 'text', 'log']; +// The target fields to be extracted from each build step +// and displayed on each row. +const BUILD_STEP_FIELDS = ['step_number', 'text', 'logs']; + +// Headers to displ...
a658a63b42244b826fbe2daee2b7509749681623
src/dialog-action-directives.js
src/dialog-action-directives.js
function dialogClose() { return { restrict: 'EA', require: '^dialog', scope: { returnValue: '=?return' }, link(scope, element, attrs, dialog) { element.on('click', function() { scope.$apply(() => { dialog.close(scope...
function dialogClose() { return { restrict: 'EA', require: '^dialog', scope: { returnValue: '=?return' }, link(scope, element, attrs, dialog) { element.on('click', function() { scope.$apply(() => { dialog.close(scope...
Fix injection in show dialog button directive
Fix injection in show dialog button directive
JavaScript
mit
olympicsoftware/oly-dialog,olympicsoftware/oly-dialog
--- +++ @@ -15,7 +15,7 @@ }; } -function showDialogButton() { +function showDialogButton(dialogRegistry) { return { restrict: 'EA', scope: {
5bbc62fe150789c63b557fab36b56781ba329f0b
app/components/Feed/context.js
app/components/Feed/context.js
// @flow import React from 'react'; import { Link } from 'react-router'; import type { AggregatedActivity } from './types'; export function lookupContext( aggregatedActivity: AggregatedActivity, key: string ) { return aggregatedActivity.context[key]; } export const contextRender = { 'users.user': (context: Ob...
// @flow import React from 'react'; import { Link } from 'react-router'; import type { AggregatedActivity } from './types'; export function lookupContext( aggregatedActivity: AggregatedActivity, key: string ) { return aggregatedActivity.context[key]; } export const contextRender = { 'users.user': (context: Ob...
Add support for notifications on gallery.gallerypicture
Add support for notifications on gallery.gallerypicture
JavaScript
mit
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
--- +++ @@ -25,5 +25,10 @@ 'articles.article': (context: Object) => ( <Link to={`/articles/${context.id}/`}>{context.title}</Link> ), - 'notifications.announcement': (context: Object) => <p>{context.message}</p> + 'notifications.announcement': (context: Object) => <p>{context.message}</p>, + 'gallery.ga...
c0002c7f3a62e90b62e9f821b4f13c80bdbae324
chat.js
chat.js
var chat = angular.module('chat', ['btford.socket-io']); var channel = new Channel('hellas'); var me = null; chat.factory('chatServer', function (socketFactory) { var url = '/'; if (location.port != '') { url = ':' + location.port + '/'; } return socketFactory({ioSocket: io.connect(url)}) });...
var chat = angular.module('chat', ['btford.socket-io']); var channel = new Channel('hellas'); var me = null; chat.factory('chatServer', function (socketFactory) { var url = '/'; if (location.port != '') { url = ':' + location.port + '/'; } return socketFactory({ioSocket: io.connect(url)}) });...
Join channel and register on reconnect
Join channel and register on reconnect
JavaScript
mit
gtklocker/ting,odyvarv/ting-1,odyvarv/ting-1,sirodoht/ting,gtklocker/ting,odyvarv/ting-1,dionyziz/ting,dionyziz/ting,mbalamat/ting,sirodoht/ting,sirodoht/ting,mbalamat/ting,mbalamat/ting,dionyziz/ting,gtklocker/ting,VitSalis/ting,gtklocker/ting,dionyziz/ting,sirodoht/ting,VitSalis/ting,VitSalis/ting,odyvarv/ting-1,VitS...
--- +++ @@ -30,6 +30,8 @@ $('#chat').show(); - chatServer.emit('register', me); - chatServer.emit('join', channel); + chatServer.on('connect', function() { + chatServer.emit('register', me); + chatServer.emit('join', channel); + }); });
3f855c3b1e7b0a6ce546fa9e422fd478a5eb1f1c
modules/recent-activity/server/controllers/recent-activity.controller.js
modules/recent-activity/server/controllers/recent-activity.controller.js
'use strict'; // ========================================================================= // // Controller for orgs // // ========================================================================= var path = require('path'); var DBModel = require (path.resolve('./modules/core/server/controllers/core.dbmodel....
'use strict'; // ========================================================================= // // Controller for orgs // // ========================================================================= var path = require('path'); var DBModel = require (path.resolve('./modules/core/server/controllers/core.dbmodel....
Fix news & announcements to be reverse sorted.
Fix news & announcements to be reverse sorted.
JavaScript
apache-2.0
logancodes/esm-server,logancodes/esm-server,logancodes/esm-server
--- +++ @@ -22,7 +22,7 @@ getRecentActivityActive: function () { var p = Model.find ({active:true}, {}, - {}).limit(10); // Quick hack to limit the front page loads. + {}).sort({dateUpdated: -1}).limit(10); // Quick hack ...
9d1ce946bb52111a738fac77d1512f0c4127f4c3
src/pages/page-2.js
src/pages/page-2.js
import React from "react" import Link from "gatsby-link" import Helmet from "react-helmet" export default class Index extends React.Component { render() { return ( <div> <h1>Hi people</h1> <p>Welcome to page 2</p> <Link to="/">Go back to the homepage</Link> </div> ) } }
import React from "react" import Link from "gatsby-link" import Helmet from "react-helmet" export default class Page2 extends React.Component { render() { return ( <div> <h1>Hi people</h1> <p>Welcome to page 2</p> <Link to="/">Go back to the homepage</Link> </div> ) } }
Use more sensible class name
Use more sensible class name
JavaScript
mit
TasGuerciMaia/tasguercimaia.github.io,benruehl/gatsby-kruemelkiste
--- +++ @@ -2,7 +2,7 @@ import Link from "gatsby-link" import Helmet from "react-helmet" -export default class Index extends React.Component { +export default class Page2 extends React.Component { render() { return ( <div>
b2a119f8d4685e96a2bf338ab1a933b9bba13b27
unit/poller/index.js
unit/poller/index.js
var mqtt = require('mqtt'); var SensorTag = require('sensortag'); var client = mqtt.connect('mqtt://tree:tree@m11.cloudmqtt.com:19539'); client.on('connect', function () { client.publish('sensor', "foo"); SensorTag.discoverAll(function (sensorTag) { console.log('Sensor found: ' + sensorTag); sensorTag.connectAn...
var mqtt = require('mqtt'); var SensorTag = require('sensortag'); var client = mqtt.connect('mqtt://tree:tree@m11.cloudmqtt.com:19539'); client.on('connect', function () { SensorTag.discoverAll(function (sensorTag) { console.log('Sensor found: ' + sensorTag); sensorTag.connectAndSetUp(function (error) { if (e...
Send temperature, humidity to server
Send temperature, humidity to server
JavaScript
mit
jphacks/KB_12,jphacks/KB_12,jphacks/KB_12,jphacks/KB_12,mikoim/mori,mikoim/mori,jphacks/KB_12,mikoim/mori,mikoim/mori,mikoim/mori
--- +++ @@ -4,22 +4,31 @@ var client = mqtt.connect('mqtt://tree:tree@m11.cloudmqtt.com:19539'); client.on('connect', function () { - client.publish('sensor', "foo"); SensorTag.discoverAll(function (sensorTag) { console.log('Sensor found: ' + sensorTag); sensorTag.connectAndSetUp(function (error) { if...
da5e854055509992103561f5134dea0ef094bec9
test/components/Posts.spec.js
test/components/Posts.spec.js
import { expect } from 'chai'; import { shallow } from 'enzyme'; import React from 'react'; import Posts from '../../src/js/components/Posts'; import PostPreview from '../../src/js/components/PostPreview'; describe('<Posts/>', () => { const posts = [ { id: 0, title: 'First Post' }, { id: 1, title: 'Second Po...
import { expect } from 'chai'; import { shallow, mount } from 'enzyme'; import React from 'react'; import { MemoryRouter as Router } from 'react-router-dom'; import Posts from '../../src/js/components/Posts'; import PostPreview from '../../src/js/components/PostPreview'; describe('<Posts/>', () => { const posts = [ ...
Test passing tag to <Posts>
Test passing tag to <Posts>
JavaScript
mit
slavapavlutin/pavlutin-node,slavapavlutin/pavlutin-node
--- +++ @@ -1,12 +1,13 @@ import { expect } from 'chai'; -import { shallow } from 'enzyme'; +import { shallow, mount } from 'enzyme'; import React from 'react'; +import { MemoryRouter as Router } from 'react-router-dom'; import Posts from '../../src/js/components/Posts'; import PostPreview from '../../src/js/comp...
37eae0ebce6e466319ac991a2b810b7a260ffb7d
src/views/Browse.js
src/views/Browse.js
import React from 'react'; import { connect } from 'react-redux'; import { fetchRecipes, setSearchTerm } from '../actions/'; import Header from '../components/Header'; import SearchHeader from '../components/SearchHeader'; import Card from '../components/Card'; class Browse extends React.Component { constructor(prop...
import React from 'react'; import { connect } from 'react-redux'; import { fetchRecipes, setSearchTerm } from '../actions/'; import Header from '../components/Header'; import SearchHeader from '../components/SearchHeader'; import Card from '../components/Card'; class Browse extends React.Component { constructor(prop...
Change the browse page layout temporarily
Change the browse page layout temporarily
JavaScript
mit
hihuz/meny,hihuz/meny
--- +++ @@ -29,15 +29,13 @@ /> </Header> <div className="container"> - <div className="row"> - {this.props.recipes.map(recipe => <Card - key={recipe.id} - name={recipe.name} - desc={recipe.desc} - img={recipe.img} - ...
930326fafe7a14b472fece345572c184de542a6e
lib/auths/index.js
lib/auths/index.js
const gatherResources = require('../utils/gatherResources') const auth = [ 'options', 'token' ] module.exports = gatherResources(auth, __dirname)
const gatherResources = require('../utils/gatherResources') const auth = [ 'options', 'token', 'oauth2', 'couchdb' ] module.exports = gatherResources(auth, __dirname)
Include oauth2 and couchdb auth in `integreat.auths()`
Include oauth2 and couchdb auth in `integreat.auths()`
JavaScript
isc
kjellmorten/integreat
--- +++ @@ -2,7 +2,9 @@ const auth = [ 'options', - 'token' + 'token', + 'oauth2', + 'couchdb' ] module.exports = gatherResources(auth, __dirname)
1563437daf745c6ba5dcc3b732241c7a9b9c523b
transformers/lib/child_proc.js
transformers/lib/child_proc.js
var spawn = require('child_process').spawn; var which = require('which'); module.exports.transformer = childProcTransformer; module.exports.transform = childProcTransform; function childProcTransformer(prog, transformer) { var cmd = which.sync(prog); if (!cmd) return noopTransformer; return subTransformer...
var spawn = require('child_process').spawn; var _which = require('which'); function which (prog) { try { return _which.sync(prog); } catch (err) { if (err.message === 'not found: ' + prog) { return null; } else { throw err; } } } module.exports.trans...
Correct which to not through...
Correct which to not through... ...this was the whole point of it.
JavaScript
mit
jcorbin/lesspipe.js
--- +++ @@ -1,11 +1,23 @@ var spawn = require('child_process').spawn; -var which = require('which'); +var _which = require('which'); + +function which (prog) { + try { + return _which.sync(prog); + } catch (err) { + if (err.message === 'not found: ' + prog) { + return null; + } ...
098185af723d83e2ace531d0644b1cda414d8bcd
lib/tasks/serve.js
lib/tasks/serve.js
'use strict'; module.exports = function(gulp, $, config, _) { var proxyTarget = _.get(config, 'proxy.url', config.consts.proxy.url); var proxyPrefixes = _.get(config, 'proxy.prefixes', config.consts.proxy.prefixes); var proxy = $.httpProxy.createProxyServer({ target: proxyTarget }); function isProxiedPrefix...
'use strict'; module.exports = function(gulp, $, config, _) { var proxyTarget = _.get(config, 'proxy.url', config.consts.proxy.url); var proxyPrefixes = _.get(config, 'proxy.prefixes', config.consts.proxy.prefixes); var proxy = $.httpProxy.createProxyServer({ target: proxyTarget }); function isProxiedPrefix...
Set middleware function to be definable
Set middleware function to be definable
JavaScript
mit
akullpp/akGulp,akullpp/myGulp
--- +++ @@ -29,7 +29,7 @@ notify: false, server: { baseDir: filesToServe, - middleware: proxyMiddleware + middleware: config.consts.browserSync.middleware || proxyMiddlewares } }); }
2223e83d7ea673bad92f89df32da4ee72bdac360
backend/src/routes/users/index.js
backend/src/routes/users/index.js
const express = require('express') const ERRORS = require('../../errors') const User = require('../../models/User') const utils = require('../../utils') const router = express.Router() router.post('/', register) function register(req, res, next) { const { body: { username, password } } = req if (!username || !...
const express = require('express') const ERRORS = require('../../errors') const User = require('../../models/User') const utils = require('../../utils') const router = express.Router() /* * Endpoint: [POST] /users * Header: * <None> * Body: {username, password} * Response: * 201 (JSON) The created user with...
Add meta-comments + backbone of authenticate method
Add meta-comments + backbone of authenticate method
JavaScript
mit
14Plumes/Hexode,KtorZ/Hexode,KtorZ/Hexode,14Plumes/Hexode,KtorZ/Hexode,14Plumes/Hexode
--- +++ @@ -4,6 +4,16 @@ const utils = require('../../utils') const router = express.Router() + +/* + * Endpoint: [POST] /users + * Header: + * <None> + * Body: {username, password} + * Response: + * 201 (JSON) The created user with a valid auth token + * 400 Bad Request: invalid parameters + */ router.pos...
3b3f61946d2c8bc79fbccc171035612293209c58
functions/strings/hex2bin.js
functions/strings/hex2bin.js
function hex2bin(s) { // discuss at: http://phpjs.org/functions/hex2bin/ // original by: Dumitru Uzun (http://duzun.me) // example 1: bin2hex('44696d61'); // returns 1: 'Dima' // example 2: bin2hex('00'); // returns 2: '\x00' var ret = [], i = 0, l; s += ''; for ( l = s.length ; i < l; i+=...
function hex2bin(s) { // discuss at: http://phpjs.org/functions/hex2bin/ // original by: Dumitru Uzun (http://duzun.me) // example 1: bin2hex('44696d61'); // returns 1: 'Dima' // example 2: bin2hex('00'); // returns 2: '\x00' // example 3: bin2hex('2f1q') // returns 3: false var ret = []...
Return FALSE if non-hex char detected
Return FALSE if non-hex char detected Return FALSE if non-hex char detected - same behaviour as PHP version of hex2bin().
JavaScript
mit
revanthpobala/phpjs,praveenscience/phpjs,strrife/phpjs,davidgruebl/phpjs,w35l3y/phpjs,VicAMMON/phpjs,Mazbaul/phpjs,J2TeaM/phpjs,cigraphics/phpjs,praveenscience/phpjs,janschoenherr/phpjs,VicAMMON/phpjs,ajenkul/phpjs,cigraphics/phpjs,VicAMMON/phpjs,ajenkul/phpjs,mojaray2k/phpjs,imshibaji/phpjs,Mazbaul/phpjs,FlorinDragota...
--- +++ @@ -5,13 +5,18 @@ // returns 1: 'Dima' // example 2: bin2hex('00'); // returns 2: '\x00' + // example 3: bin2hex('2f1q') + // returns 3: false var ret = [], i = 0, l; s += ''; for ( l = s.length ; i < l; i+=2 ) { - ret.push(parseInt(s.substr(i, 2), 16)); + var c = par...
805a979307583490d89197c8a82e7ba9fcae27ce
client/common/actions/index.js
client/common/actions/index.js
import types from '../constants/ActionTypes' import utils from '../../shared/utils' function replaceUserInfo(userInfo) { return { type: types.REPLACE_USER_INFO, userInfo } } function clearUserInfo() { return {type: types.CLEAR_USER_INFO} } function fetchUserInfo() { return dispatch =>...
import types from '../constants/ActionTypes' import utils from '../../shared/utils' function replaceUserInfo(userInfo) { return { type: types.REPLACE_USER_INFO, userInfo } } function clearUserInfo() { return {type: types.CLEAR_USER_INFO} } function fetchUserInfo() { return dispatch =>...
Update action fetchUserInfo ajax type to get
Update action fetchUserInfo ajax type to get
JavaScript
mit
qiuye1027/screenInteraction,qiuye1027/screenInteraction,chikara-chan/react-isomorphic-boilerplate,chikara-chan/react-isomorphic-boilerplate
--- +++ @@ -14,7 +14,10 @@ function fetchUserInfo() { return dispatch => { - utils.ajax({url: '/api/user/getUserInfo'}).then(res => { + utils.ajax({ + url: '/api/user/getUserInfo', + type: 'get' + }).then(res => { dispatch(replaceUserInfo(res)) ...
3480bf8a6de2c0dd46b7b5e0a1e2a968ae4e603c
client/js/util/eventemitter.js
client/js/util/eventemitter.js
'use strict'; /** * @constructor */ function EventEmitter() { this.eventHandlers = {}; } EventEmitter.prototype.emit = function(event) { if (!this.eventHandlers[event]) { return; } var argsOut = []; for (var i = 1; i < arguments.length; ++i) { argsOut.push(arguments[i]); } for (var j = 0; j < ...
'use strict'; /** * @constructor */ function EventEmitter() { this.eventHandlers = {}; } EventEmitter.prototype.emit = function(event) { if (!this.eventHandlers[event]) { return; } var argsOut = []; for (var i = 1; i < arguments.length; ++i) { argsOut.push(arguments[i]); } for (var j = 0; j ...
Make addEventListener return this for function chaining.
Make addEventListener return this for function chaining.
JavaScript
agpl-3.0
exjam/rosebrowser,exjam/rosebrowser,brett19/rosebrowser,brett19/rosebrowser
--- +++ @@ -11,10 +11,12 @@ if (!this.eventHandlers[event]) { return; } + var argsOut = []; for (var i = 1; i < arguments.length; ++i) { argsOut.push(arguments[i]); } + for (var j = 0; j < this.eventHandlers[event].length; ++j) { this.eventHandlers[event][j].apply(this, argsOut); }...
b7d6033ada80ac9979c084cc357e2c541a05ee62
server/config/config.units.js
server/config/config.units.js
var units = { datacenter: { unitName: 'adminsys', unitStats: { attack: 10, security: 50, power: 5 } }, personal_computer: { unitName: 'zombie_computer', unitStats: { attack: 50, security: 0, power...
var units = { datacenter: { unitStats: { name: 'SysAdmin', attack: 0, security: 25, power: 500, price: 2000 } }, personal_computer: { unitStats: { name: 'Zombie computer', attack: 10, secu...
Change unit object format (server side)
Change unit object format (server side)
JavaScript
mit
romain-grelet/HackersWars,romain-grelet/HackersWars
--- +++ @@ -1,26 +1,29 @@ var units = { datacenter: { - unitName: 'adminsys', unitStats: { - attack: 10, - security: 50, - power: 5 + name: 'SysAdmin', + attack: 0, + security: 25, + power: 500, + price: 2000...
0fc62a076bf8d9afb215c386688ef35cc4b8e559
server/res/strings/english.js
server/res/strings/english.js
module.exports = { 'responses': { 'GREET': 'Hello! How are you doing today :\)', 'HELP': 'I can help you with a bunch of things around your house.\n\n' + 'You can check in on your security cameras, ask me the temperature, and much more!\n' + 'I will also notify you during events such as a visitor ...
module.exports = { 'responses': { 'GREET': 'Hello! How are you doing today :\)', 'HELP': 'I can help you with a bunch of things around your house.\n\n' + 'You can check in on your security cameras, ask me the temperature, and much more!\n' + 'I will also notify you during events such as a visitor ...
Add "is it" as option to ask for temperature
Add "is it" as option to ask for temperature
JavaScript
mit
Eaton-Software/messenger-home
--- +++ @@ -7,7 +7,7 @@ 'TFLUK': 'Okay. Thanks for letting me know.' }, 'words': { - 'DISPLAY': ['tell', 'give', 'show', 'what', 'what\'s', 'display', 'how'], + 'DISPLAY': ['tell', 'give', 'show', 'what', 'what\'s', 'display', 'how', 'is it'], 'TEMPERATURE': ['temperature', 'temp', 'heat', 'hot'...
1d7da8b90ffc9d685a247e426c696d85b38201c4
assets/js/racer.js
assets/js/racer.js
function Game(){ this.$track = $('#racetrack'); this.finishLine = this.$track.width() - 54; } function Player(id){ this.player = $('.player')[id - 1]; this.position = 10; } Player.prototype.move = function(){ this.position += 20; }; Player.prototype.updatePosition = function(){ $player = $(this.player); ...
function Game(){ this.$track = $('#racetrack'); this.finishLine = this.$track.width() - 54; } function Player(id){ this.player = $('.player')[id - 1]; this.position = 10; } Player.prototype.move = function(){ this.position += 20; }; Player.prototype.updatePosition = function(){ $player = $(this.player); ...
Create checkWinner Function that alerts when a player has reached the finish line
Create checkWinner Function that alerts when a player has reached the finish line
JavaScript
mit
SputterPuttRedux/basic-javascript-racer,SputterPuttRedux/basic-javascript-racer
--- +++ @@ -17,9 +17,11 @@ $player.css('margin-left', this.position); }; -Player.prototype.checkWinner = function(){ - -}; +function checkWinner(player, game){ + if( player.position > game.finishLine ){ + alert("somebody won!"); + } +} $(document).ready(function() {
0c467864aa4bac65bae58116b150020a074d091f
admin/client/App/sagas/index.js
admin/client/App/sagas/index.js
import { takeLatest, delay } from 'redux-saga'; import { fork, select, put, take } from 'redux-saga/effects'; import * as actions from '../screens/List/constants'; import updateParams from './updateParams'; import { loadItems } from '../screens/List/actions'; /** * Load the items */ function * loadTheItems () { yi...
import { takeLatest, delay } from 'redux-saga'; import { fork, select, put, take } from 'redux-saga/effects'; import * as actions from '../screens/List/constants'; import updateParams from './updateParams'; import { loadItems } from '../screens/List/actions'; /** * Load the items */ function * loadTheItems () { yi...
Fix list not loading on second open
Fix list not loading on second open Closes #3369
JavaScript
mit
danielmahon/keystone,benkroeger/keystone,linhanyang/keystone,naustudio/keystone,Pop-Code/keystone,naustudio/keystone,danielmahon/keystone,trentmillar/keystone,jstockwin/keystone,matthewstyers/keystone,ONode/keystone,w01fgang/keystone,alobodig/keystone,frontyard/keystone,jstockwin/keystone,trentmillar/keystone,vokal/key...
--- +++ @@ -24,11 +24,15 @@ } function * rootSaga () { + // Block loading on all items until the first load comes in yield take(actions.INITIAL_LIST_LOAD); yield put(loadItems()); + // Search debounced yield fork(takeLatest, actions.SET_ACTIVE_SEARCH, debouncedSearch); + // If one of the other active proper...
6c4bab22ae449af235ea33499061113a140b7595
src/eorzea-time.js
src/eorzea-time.js
import padStart from './polyfill/padStart'; const THREE_MINUTES = 3 * 60 * 1000; const privateDateProperty = typeof Symbol !== 'function' ? Symbol('privateDateProperty') : '_privateDateProperty'; function computeEorzeaDate(date) { const eorzeaTime = new Date(); const unixTime = Math.floor(date.getTime() * 1440 ...
import padStart from './polyfill/padStart'; const THREE_MINUTES = 3 * 60 * 1000; const privateDateProperty = typeof Symbol === 'function' ? Symbol('privateDateProperty') : '_privateDateProperty'; function computeEorzeaDate(date) { const eorzeaTime = new Date(); const unixTime = Math.floor(date.getTime() * 1440 ...
Fix a presence check of Symbol function
:bug: Fix a presence check of Symbol function
JavaScript
mit
flowercartelet/eorzea-time
--- +++ @@ -1,7 +1,7 @@ import padStart from './polyfill/padStart'; const THREE_MINUTES = 3 * 60 * 1000; -const privateDateProperty = typeof Symbol !== 'function' ? +const privateDateProperty = typeof Symbol === 'function' ? Symbol('privateDateProperty') : '_privateDateProperty'; function computeEorzeaDate(...
3934fbf1024d52b8b8429a5d073b7b8526521d25
src/hello-world.js
src/hello-world.js
// ./src/hello-world.js var console = require('gulp-messenger'); console.success('Hello World!');
// ./src/hello-world.js var console = require('gulp-messenger'); console.success('Hello World!'); console.log('This is added in master branch')
Create merge conflict in master branch
Create merge conflict in master branch
JavaScript
mit
mikeerickson/gitflow
--- +++ @@ -3,3 +3,5 @@ var console = require('gulp-messenger'); console.success('Hello World!'); + +console.log('This is added in master branch')
f658e382b0974c53edc828efac5d4f182fbd3c08
app/assets/javascripts/users.js
app/assets/javascripts/users.js
$( ".users-show, .users-sample" ).ready( function() { $( "#stats-area" ).tabs({ // Ajax request stuff, mostly pulled from jQuery UI's docs. beforeLoad: function( event, ui ) { // There's no need to do a fresh Ajax request each time the tab // is clicked. If the tab has been loaded already, skip t...
$( ".users-show, .users-sample" ).ready( function() { $( "#stats-area" ).tabs({ // Ajax request stuff, mostly pulled from jQuery UI's docs. beforeLoad: function( event, ui ) { // There's no need to do a fresh Ajax request each time the tab // is clicked. If the tab has been loaded already (or is ...
Load Topics in background when stats page opens
Load Topics in background when stats page opens
JavaScript
mit
steve-mcclellan/j-scorer,steve-mcclellan/j-scorer,steve-mcclellan/j-scorer
--- +++ @@ -4,20 +4,24 @@ beforeLoad: function( event, ui ) { // There's no need to do a fresh Ajax request each time the tab - // is clicked. If the tab has been loaded already, skip the request - // and display the pre-existing data. - if ( ui.tab.data( "loaded" ) ) { + // is click...
3a4aae6cfb1f664afd8943a1a49d3de0062eb2b9
app/js/helpers.js
app/js/helpers.js
function filter(arr) { var filteredArray = [], prev; arr.sort(); for (var i = 0; i < arr.length; i++) { if (arr[i] !== prev) { filteredArray.push(arr[i]); } prev = arr[i]; } return filteredArray } function rarefy(pattern) { arr = []; matches = []; merged = []; str = text.doc; elem...
function filter(arr) { var filteredArray = [], prev; arr.sort(); for (var i = 0; i < arr.length; i++) { if (arr[i] !== prev) { filteredArray.push(arr[i]); } prev = arr[i]; } return filteredArray } function rarefyXMLTextContent(pattern) { arr = []; matches = []; merged = []; str = te...
Rename helper methods for clarity
Rename helper methods for clarity
JavaScript
mit
bdfinlayson/annotation-tool,bdfinlayson/annotation-tool
--- +++ @@ -10,7 +10,7 @@ return filteredArray } -function rarefy(pattern) { +function rarefyXMLTextContent(pattern) { arr = []; matches = []; merged = []; @@ -24,7 +24,7 @@ } function countMatches(pattern) { - filteredArray = rarefy(pattern); + filteredArray = rarefyXMLTextContent(pattern); f...
bcb666e596c694f432340e780aff05530b0df40a
src/series/line.js
src/series/line.js
(function(d3, fc) { 'use strict'; fc.series.line = function() { // convenience functions that return the x & y screen coords for a given point var x = function(d) { return line.xScale.value(line.xValue.value(d)); }; var y = function(d) { return line.yScale.value(line.yValue.value(d)); ...
(function(d3, fc) { 'use strict'; fc.series.line = function() { // convenience functions that return the x & y screen coords for a given point var x = function(d) { return line.xScale.value(line.xValue.value(d)); }; var y = function(d) { return line.yScale.value(line.yValue.value(d)); ...
Add interpolation support to the Line series component
Add interpolation support to the Line series component
JavaScript
mit
alisd23/d3fc-d3v4,bjedrzejewski/d3fc,fxcebx/d3fc,djmiley/d3fc,fxcebx/d3fc,janakerman/d3-financial-components,alisd23/d3fc-d3v4,djmiley/d3fc,fxcebx/d3fc,bjedrzejewski/d3fc,janakerman/d3-financial-components,djmiley/d3fc,bjedrzejewski/d3fc,alisd23/d3fc-d3v4
--- +++ @@ -38,6 +38,6 @@ line.yValue = fc.utilities.property(function(d) { return d.close; }); line.xValue = fc.utilities.property(function(d) { return d.date; }); - return line; + return d3.rebind(line, lineData, 'interpolate'); }; }(d3, fc));
f54167b6ce911acd2a4ecd05db25f11558ed870f
IoradWebWidget/scripts/app.js
IoradWebWidget/scripts/app.js
if (ioradWebWidget.util.common.isFreshdeskKnowledgebase()) { ioradWebWidget.freshdesk.runApp(jQuery, window); } if (ioradWebWidget.util.common.isDeskKnowledgebase()) { ioradWebWidget.desk.runApp(jQuery, window); }
//if (ioradWebWidget.util.common.isFreshdeskKnowledgebase()) { // ioradWebWidget.freshdesk.runApp(jQuery, window); //} ioradWebWidget.freshdesk.runApp(jQuery, window);
Make freshdesk widget run on customized domain support portals.
Make freshdesk widget run on customized domain support portals.
JavaScript
mit
iorad/integrations,iorad/integrations,iorad/integrations
--- +++ @@ -1,7 +1,5 @@ -if (ioradWebWidget.util.common.isFreshdeskKnowledgebase()) { - ioradWebWidget.freshdesk.runApp(jQuery, window); -} +//if (ioradWebWidget.util.common.isFreshdeskKnowledgebase()) { +// ioradWebWidget.freshdesk.runApp(jQuery, window); +//} -if (ioradWebWidget.util.common.isDeskKnowledgebas...
2aecea32c53f551069b43ac6e2e9da3831a9b667
client/packages/settings-dashboard-extension-worona/src/dashboard/reducers/index.js
client/packages/settings-dashboard-extension-worona/src/dashboard/reducers/index.js
import { isDev, getDevelopmentPackages } from 'worona-deps'; import { map } from 'lodash'; import { combineReducers } from 'redux'; import * as deps from '../deps'; const env = isDev ? 'dev' : 'prod'; const mapPkg = pkg => ({ ...pkg, main: pkg.cdn && pkg.cdn.dashboard[env].main.file }); const create = collection => c...
import { isDev, getDevelopmentPackages } from 'worona-deps'; import { map } from 'lodash'; import { combineReducers } from 'redux'; import * as deps from '../deps'; const env = isDev ? 'dev' : 'prod'; const mapPkg = pkg => ({ ...pkg, main: pkg.cdn && pkg.cdn.dashboard[env].main.file }); const createSetting = collecti...
Remove mapPkg from settings collections.
Remove mapPkg from settings collections.
JavaScript
mit
worona/worona-dashboard,worona/worona-dashboard,worona/worona,worona/worona,worona/worona-core,worona/worona,worona/worona-core
--- +++ @@ -6,7 +6,12 @@ const env = isDev ? 'dev' : 'prod'; const mapPkg = pkg => ({ ...pkg, main: pkg.cdn && pkg.cdn.dashboard[env].main.file }); -const create = collection => combineReducers({ +const createSetting = collection => combineReducers({ + collection: deps.reducerCreators.collectionCreator(collectio...
d0e3a74be246e9b43189d1c2d3a39fce357a146d
src/states/Game.js
src/states/Game.js
/* globals __DEV__ */ import Phaser from 'phaser' import Mushroom from '../sprites/Ship' export default class extends Phaser.State { init () {} preload () {} create () { game.physics.startSystem(Phaser.Physics.ARCADE) // Set up game input. game.cursors = game.input.keyboard.createCursorKeys() g...
/* globals __DEV__ */ import Phaser from 'phaser' import Ship from '../sprites/Ship' export default class extends Phaser.State { init () {} preload () {} create () { game.physics.startSystem(Phaser.Physics.ARCADE) // Set up game input. game.cursors = game.input.keyboard.createCursorKeys() game....
Rename mushroom to ship / player
Rename mushroom to ship / player
JavaScript
mit
killer-robots/killer-robots,killer-robots/killer-robots
--- +++ @@ -1,6 +1,6 @@ /* globals __DEV__ */ import Phaser from 'phaser' -import Mushroom from '../sprites/Ship' +import Ship from '../sprites/Ship' export default class extends Phaser.State { init () {} @@ -13,19 +13,19 @@ game.cursors = game.input.keyboard.createCursorKeys() game.input.keyboard.a...
f1aa082977ee0679cfa1e96d3fa3a2e3fdefa8fe
src/actions/sessionActions.js
src/actions/sessionActions.js
import fetch from 'isomorphic-fetch' export function signUpUser(register, history) { return(dispatch) => { const options = { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ user: { first_name: register.name, email: register.em...
import fetch from 'isomorphic-fetch' export function signUpUser(register, history) { return(dispatch) => { const options = { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ user: { first_name: register.name, email: register.em...
Change jwt storage from session to local
Change jwt storage from session to local
JavaScript
mit
snsavage/timer-react,snsavage/timer-react
--- +++ @@ -19,7 +19,7 @@ return fetch('api/v1/register', options) .then(response => response.json()) .then(token => { - sessionStorage.setItem('jwt', token.jwt); + localStorage.setItem('jwt', token.jwt); history.push("/"); dispatch({ type: 'SIGN_UP_SUCCESS' }); ...
b3f449dace39b99aca7046b4eddc9dd7ae81c141
bin/generators/scopes/create.js
bin/generators/scopes/create.js
const eg = require('../../eg'); module.exports = class extends eg.Generator { constructor (args, opts) { super(args, opts); this.configureCommand({ command: 'create [options] <scope..>', desc: 'Create a scope', builder: yargs => yargs .usage(`Usage: $0 ${process.argv[2]} c...
const eg = require('../../eg'); module.exports = class extends eg.Generator { constructor (args, opts) { super(args, opts); this.configureCommand({ command: 'create [options] <scope..>', desc: 'Create a scope', builder: yargs => yargs .usage(`Usage: $0 ${process.argv[2]} c...
Print the returned error message.
Print the returned error message.
JavaScript
apache-2.0
ExpressGateway/express-gateway
--- +++ @@ -28,7 +28,7 @@ } }) .catch(err => { - this.log.error(err.message); + this.log.error(err.response.text); }); }; };
943282e096fe7a36e035fccd069eb8f843b686b0
src/animate.js
src/animate.js
// A bit of pseudo-code // // tickModel // var dt // for each canvas // canvasParticles = canvasParticles.filterOut(particlesOutsideOrTimeout) // // for each particle in canvasParticles // tick(particle) // // for each startOptions // var newParticles = createParticles(imageUrls, startOptions, dt) // ...
// Animate: call model update and view render at each animation frame. // var tickState = require('./tickState') var render = require('./view/render') // To indicate if started. // Maybe to pause the animation in the future. var running = false // number, unix timestamp milliseconds of most recent frame. var past = n...
Replace pseudo-code sketch with accurate comment
Replace pseudo-code sketch with accurate comment
JavaScript
mit
axelpale/sprinkler
--- +++ @@ -1,19 +1,4 @@ -// A bit of pseudo-code -// -// tickModel -// var dt -// for each canvas -// canvasParticles = canvasParticles.filterOut(particlesOutsideOrTimeout) -// -// for each particle in canvasParticles -// tick(particle) -// -// for each startOptions -// var newParticles = createPar...
6e1b30ca8028d016fc2a566141f6cabbe1acaaa4
.stylelintrc.js
.stylelintrc.js
const declarationBlockPropertiesOrder = require(`./.csscomb.json`)[`sort-order`][0]; module.exports = { extends: `stylelint-config-modularis`, rules: { 'declaration-block-properties-order': declarationBlockPropertiesOrder, 'no-indistinguishable-colors': [true, { threshold: 1 }], 'string-no-newline': fa...
const declarationBlockPropertiesOrder = require(`./.csscomb.json`)[`sort-order`][0]; module.exports = { extends: `stylelint-config-modularis`, rules: { 'declaration-block-properties-order': declarationBlockPropertiesOrder, 'no-indistinguishable-colors': [true, { threshold: 1 }], 'string-no-newline': nu...
Use null instead of false to override the string-no-newline setting from the modularis stylelint config.
Use null instead of false to override the string-no-newline setting from the modularis stylelint config.
JavaScript
mit
avalanchesass/avalanche-website,avalanchesass/avalanche-website
--- +++ @@ -5,6 +5,6 @@ rules: { 'declaration-block-properties-order': declarationBlockPropertiesOrder, 'no-indistinguishable-colors': [true, { threshold: 1 }], - 'string-no-newline': false, + 'string-no-newline': null, }, };
88f0989207c048b60a72cca136bc5d912c77ebd3
src/App.js
src/App.js
import DicewareOptions from './DicewareOptions' import React, { PureComponent } from 'react' export default class App extends PureComponent { state = { length: 6 } handleLengthChange = event => this.setState({ length: parseInt(event.target.value, 10) }) handlePossibleItemsChange = possibleItems => this.se...
import DicewareOptions from './DicewareOptions' import React, { PureComponent } from 'react' export default class App extends PureComponent { state = { length: 6 } handleLengthChange = event => this.setState({ length: parseInt(event.target.value, 10) }) handlePossibleItemsChange = possibleItems => this.se...
Clean up result math and notation
Clean up result math and notation
JavaScript
isc
nickmccurdy/password-entropy,nickmccurdy/password-entropy
--- +++ @@ -11,6 +11,7 @@ render () { const possiblePasswords = this.state.possibleItems ** this.state.length + const approximatePrefix = possiblePasswords > Number.MAX_SAFE_INTEGER && '~ ' return ( <form> @@ -25,7 +26,7 @@ <DicewareOptions onChange={this.handlePossibleItemsChange}...
962dd6226d16428acf12993eb35c6b90d29bc109
js/bitazza.js
js/bitazza.js
'use strict'; // Bitazza uses Alphapoint, also used by ndax // In order to use private endpoints, the following are required: // - 'apiKey' // - 'secret', // - 'uid' (userId in the api info) // - 'login' (the email address used to log into the UI) const ndax = require ('./ndax.js'); // -----------------------------...
'use strict'; // Bitazza uses Alphapoint, also used by ndax // In order to use private endpoints, the following are required: // - 'apiKey' // - 'secret', // - 'uid' (userId in the api info) // - 'login' (the email address used to log into the UI) // - 'password' (the password used to log into the UI) const ndax = re...
Add 'password' to comment on required credentials
Add 'password' to comment on required credentials
JavaScript
mit
ccxt/ccxt,ccxt/ccxt,ccxt/ccxt,ccxt/ccxt,ccxt/ccxt
--- +++ @@ -6,6 +6,7 @@ // - 'secret', // - 'uid' (userId in the api info) // - 'login' (the email address used to log into the UI) +// - 'password' (the password used to log into the UI) const ndax = require ('./ndax.js');
2b65809bc9b134d281a5552387e385fda7b63b84
src/app.js
src/app.js
import React from 'react' import ReactDOM from 'react-dom' class App extends React.Component { // eslint-disable-line no-unused-vars render () { return ( <div className="container-fluid"> <div className="row"> <div className="jumbotron text-center"> <h1>Login Screen</h1> ...
import React from 'react' import ReactDOM from 'react-dom' class App extends React.Component { // eslint-disable-line no-unused-vars render () { return ( <div className="container-fluid"> <div className="row"> <div className="jumbotron text-center"> <h1>Login Screen</h1> ...
Refactor TODO to be below the jumbotron
Refactor TODO to be below the jumbotron
JavaScript
mit
cpwilkerson/login-server,cpwilkerson/login-server
--- +++ @@ -8,8 +8,10 @@ <div className="row"> <div className="jumbotron text-center"> <h1>Login Screen</h1> - <h3>TODO: Add login screen components here</h3> </div> + </div> + <div className="row"> + <h3 className="text-center">TODO: Add l...
dbaaef857da2f402700e254f0ee0d63bb56b6870
karma.conf.js
karma.conf.js
module.exports = function (config) { config.set({ basePath: '', frameworks: ['mocha', 'sinon-chrome', 'karma-typescript'], files: [ 'src/ts/**/*.ts' ], exclude: [ 'src/ts/constants.ts' ], preprocessors: { 'src/ts/**/*.ts': ['karma-typescript'] }, client: { c...
module.exports = function (config) { config.set({ basePath: '', frameworks: ['mocha', 'sinon-chrome', 'karma-typescript'], files: [ 'src/ts/**/*.ts' ], exclude: [ 'src/ts/constants.ts' ], preprocessors: { 'src/ts/**/*.ts': ['karma-typescript'] }, client: { c...
Use common ts compiler options in karma test and webpack build
chore(test): Use common ts compiler options in karma test and webpack build
JavaScript
mit
xtangle/ZoundCloud,xtangle/ZoundCloud
--- +++ @@ -20,11 +20,9 @@ reporters: ['mocha'], karmaTypescriptConfig: { bundlerOptions: { - entrypoints: /\.spec\.ts$/, + entrypoints: /\.spec\.ts$/ }, - compilerOptions: { - target: 'es2015' - }, + compilerOptions: require('./tsconfig').compilerOptions, ...
a7591058f6fe14412ea645703695b2ebad987083
test/index.spec.js
test/index.spec.js
import expect from 'expect.js'; import constantMirror from '../src'; describe('constantMirror', () => { it('exports a function', () => { expect(constantMirror).to.be.a('function'); }); it('creates a mirrored hash from a list of strings', () => { expect(constantMirror('HELLO', 'WORLD')).to.eql({ H...
import expect from 'expect.js'; import constantMirror from '..'; describe('constantMirror', () => { it('exports a function', () => { expect(constantMirror).to.be.a('function'); }); it('creates a mirrored hash from a list of strings', () => { expect(constantMirror('HELLO', 'WORLD')).to.eql({ HELLO...
Test compiled JS, not ES6 source
Test compiled JS, not ES6 source
JavaScript
mit
tough-griff/constant-mirror
--- +++ @@ -1,6 +1,6 @@ import expect from 'expect.js'; -import constantMirror from '../src'; +import constantMirror from '..'; describe('constantMirror', () => { it('exports a function', () => {
6e6a449ddda27c2471a72b436fb7074ac5ae7403
lib/loaders/utils/to-code.js
lib/loaders/utils/to-code.js
/* eslint-disable no-use-before-define */ function toCodeArray(array) { return `[${array.map(item => toCode(item)).join(",")}]` } function toCodeObject(object) { return `{${Object.keys(object).map(key => `"${key}": ${toCode(object[key])}`).join(",")}}` } function toCode(values) { if (Array.isArray(values)) { ...
/* eslint-disable no-use-before-define */ function toCodeArray(array) { return `[${array.map(item => toCode(item)).join(",")}]` } function toCodeObject(object) { return `{${Object.keys(object).map(key => `"${key}": ${toCode(object[key])}`).join(",")}}` } // Convert an arbitrary object, array, or primitive into a...
Add comment our `toCode` function
Add comment our `toCode` function
JavaScript
mit
mavenlink/mavenlink-ui-concept,ahuth/mavenlink-ui-concept
--- +++ @@ -8,6 +8,9 @@ return `{${Object.keys(object).map(key => `"${key}": ${toCode(object[key])}`).join(",")}}` } +// Convert an arbitrary object, array, or primitive into a string representation. Special +// consideration is given to `require` statements, which are inserted into the string _without_ +// bei...
2d839b07c96bbfc38588bb3e32aece3e6d9be6d6
js/js-engine.js
js/js-engine.js
$(document).ready(function() { // Add class to all inputs (input's type attribute value) $('input').each(function() {$(this).addClass(this.type)}); // put all your jQuery code here });
$(document).ready(function() { // Add class to all inputs (input's type attribute value) $('input').each(function() {$(this).addClass(this.type)}); // put all your jQuery code here });
Add class to all inputs
Add class to all inputs
JavaScript
mit
maciejsmolinski/html-go
--- +++ @@ -2,6 +2,7 @@ // Add class to all inputs (input's type attribute value) $('input').each(function() {$(this).addClass(this.type)}); - + // put all your jQuery code here + });
f4489c9b6cc45d41bd0ee41c7988af369dc249d9
src/majesty.js
src/majesty.js
(function($) { $.fn.majesty = function() { var findDependents = function(rootElement) { return rootElement.find('[data-depends-on]'); }; var findMatches = function(searchValue, elements) { searchValue = $.trim(searchValue); if(searchValue === '') { return $([]); } ...
(function($) { var findDependents = function(rootElement) { return rootElement.find('[data-depends-on]'); }; var findMatches = function(searchValue, elements) { searchValue = $.trim(searchValue); if(searchValue === '') { return $([]); } // Hack for now. Probably use regex later ...
Move functions outside of plugin block
Move functions outside of plugin block
JavaScript
mit
craigerm/majesty-js
--- +++ @@ -1,38 +1,38 @@ (function($) { - $.fn.majesty = function() { + var findDependents = function(rootElement) { + return rootElement.find('[data-depends-on]'); + }; - var findDependents = function(rootElement) { - return rootElement.find('[data-depends-on]'); - }; + var findMatches = func...
7106e052ff1e92dd7792908798c595b4bc4f6410
lib/server.js
lib/server.js
var connections = {}; var expire = function(id) { Presences.remove(id); delete connections[id]; }; var tick = function(id) { connections[id].lastSeen = Date.now(); }; Meteor.startup(function() { Presences.remove({}); }); Meteor.onConnection(function(connection) { // console.log('connectionId: ' + connecti...
var connections = {}; var presenceExpiration = 10000; var expire = function(id) { Presences.remove(id); delete connections[id]; }; var tick = function(id) { connections[id].lastSeen = Date.now(); }; Meteor.startup(function() { Presences.remove({}); }); Meteor.onConnection(function(connection) { // conso...
Set presenceExpiration outside of package
Set presenceExpiration outside of package
JavaScript
mit
minden/meteor-presence
--- +++ @@ -1,4 +1,6 @@ var connections = {}; + +var presenceExpiration = 10000; var expire = function(id) { Presences.remove(id); @@ -34,9 +36,15 @@ } }); +Meteor.methods({ + setPresenceExpiration: function(time) { + presenceExpiration = time; + } +}); + Meteor.setInterval(function() { _.each(...
9b9a73c31eddf1c7e70bb89352c3cf84edededea
client/intercom-shim.js
client/intercom-shim.js
(function() { /* globals define */ 'use strict'; function l(config) { var i = function() { i.c(arguments); }; i.q = []; i.c = function(args) { i.q.push(args); }; window.Intercom = i; var d = document; var s = d.createElement('script'); s.type = 'text/javascript';...
(function() { /* globals define */ 'use strict'; function l(config) { var i = function() { i.c(arguments); }; i.q = []; i.c = function(args) { i.q.push(args); }; window.Intercom = i; var d = document; var s = d.createElement('script'); s.type = 'text/javascript';...
Make sure we are checking that apply exists
Make sure we are checking that apply exists
JavaScript
mit
mike-north/ember-intercom-io,levanto-financial/ember-intercom-io,seawatts/ember-intercom-io,seawatts/ember-intercom-io,levanto-financial/ember-intercom-io,mike-north/ember-intercom-io
--- +++ @@ -38,7 +38,7 @@ generateModule('intercom', { default: function() { - if (window.Intercom && typeof window.Intercom === 'function') { + if (window.Intercom && typeof window.Intercom.apply === 'function') { return window.Intercom.apply(null, arguments); } },
649509ca76845e45825ee75f6841d1cb894ff1e4
scripts/transform/comments.js
scripts/transform/comments.js
'use strict'; function makeFrontMatter(ast, dependencies) { var value = [ 'es6id: ', 'description: >' ]; var includes; if (dependencies.length) { includes = dependencies.map(function(file) { return file + '.js'; }).join(', '); value.push('includes: [' + includes + ']'); } value = '---\n' + value.jo...
'use strict'; var licenseYearPattern = /\bcopyright (\d{4})\b/i; function makeFrontMatter(ast, dependencies) { var value = [ 'es6id: ', 'description: >' ]; var includes; if (dependencies.length) { includes = dependencies.map(function(file) { return file + '.js'; }).join(', '); value.push('includes: ...
Include license in transformed file
Include license in transformed file Infer the year from the source file's code comments.
JavaScript
mit
bocoup/test262-v8-machinery,bocoup/test262-v8-machinery
--- +++ @@ -1,4 +1,6 @@ 'use strict'; + +var licenseYearPattern = /\bcopyright (\d{4})\b/i; function makeFrontMatter(ast, dependencies) { var value = [ @@ -23,6 +25,39 @@ }; } +function makeLicense(ast) { + var commentText = ast.program.comments.map(function(node) { + return node.value; + }).join(' '); + ...
986faef86b65b9ab7471077da321020ee5164cf8
src/set-env.js
src/set-env.js
const {webpack} = require('@webpack-blocks/webpack2'); /** * Sets environment variables with all possible ways. */ module.exports = (options = {}) => { const { nodeEnv = 'development', babelEnv = 'development', } = options; process.env.NODE_ENV = nodeEnv; process.env.BABEL_ENV = bab...
const {webpack} = require('@webpack-blocks/webpack2'); /** * Sets environment variables with all possible ways. */ module.exports = (options = {}) => { const { nodeEnv, babelEnv, } = options; process.env.NODE_ENV = nodeEnv; process.env.BABEL_ENV = babelEnv; return () => ({ ...
Set setEnv defaults to undefined
Set setEnv defaults to undefined
JavaScript
mit
fugr-ru/webpack-custom-blocks
--- +++ @@ -6,8 +6,8 @@ */ module.exports = (options = {}) => { const { - nodeEnv = 'development', - babelEnv = 'development', + nodeEnv, + babelEnv, } = options; process.env.NODE_ENV = nodeEnv;
9df8d7dca7a9f881eca551551b856f8cdf5ae6a4
simul/app/components/login.js
simul/app/components/login.js
import React, { Component } from 'react'; import { StyleSheet, Text, View, TextInput, TouchableHighlight, } from 'react-native'; class Login extends Component{ constructor(){ super(); this.state = { name: "", username: "", password_digest: "", location: "", bio: "", ...
import React, { Component } from 'react'; import { StyleSheet, Text, View, TextInput, TouchableHighlight, } from 'react-native'; class Login extends Component{ constructor(){ super(); this.state = { name: "", username: "", password_digest: "", location: "", bio: "", ...
Create onLoginPressed function and add to render function
Create onLoginPressed function and add to render function
JavaScript
mit
sf-red-pandas-2016/simul-react-native,sf-red-pandas-2016/simul-react-native,sf-red-pandas-2016/simul-react-native
--- +++ @@ -25,6 +25,11 @@ } } + async onLoginPressed(){ + + + } + render() { return ( @@ -43,6 +48,13 @@ onChangeText={ (val)=> this.setState({password_digest: val}) } style={styles.input} placeholder="Password" /> + + <TouchableHighlight onPress={this....
94a9cefb34e1adcdae67a9402e8a6745f9e85496
klets-server/routes/messages/messages-controller.js
klets-server/routes/messages/messages-controller.js
var HttpError = require('../../lib/http-error'); var messageRepo = require('../../repository/message-repo'); module.exports.create = function (req, res, next) { var message = req.body.message; checkDefined(message, 'message'); checkDefined(message._id, 'message._id'); checkDefined(message.userName, 'me...
var HttpError = require('../../lib/http-error'); var messageRepo = require('../../repository/message-repo'); module.exports.create = function (req, res, next) { var message = req.body.message; checkDefined(message, 'message'); checkDefined(message._id, 'message._id'); checkDefined(message.userName, 'me...
Allow Cross Origin requests on create message endpoint
Allow Cross Origin requests on create message endpoint
JavaScript
mit
rhmeeuwisse/KletsApp,rhmeeuwisse/KletsApp
--- +++ @@ -11,7 +11,7 @@ messageRepo.save(message); - res.sendStatus(201); + res.set('Access-Control-Allow-Origin', '*').sendStatus(201); }; function checkDefined(value, fieldName) {
4c2067c2609ad7af84e0384c39b0452341fb0358
config/configuration.js
config/configuration.js
/** * @file Defines the provider settings. * * Will set the path to Mongo, and applications id * Most of the configuration can be done using system environment variables. */ // Load environment variables from .env file var dotenv = require('dotenv'); dotenv.load(); // node_env can either be "development" or "pro...
/** * @file Defines the provider settings. * * Will set the path to Mongo, and applications id * Most of the configuration can be done using system environment variables. */ // Load environment variables from .env file var dotenv = require('dotenv'); dotenv.load(); // node_env can either be "development" or "pro...
Add redis and mongo URL in config
Add redis and mongo URL in config
JavaScript
mit
AnyFetch/gcontacts-provider.anyfetch.com
--- +++ @@ -24,7 +24,8 @@ module.exports = { env: node_env, port: process.env.PORT || default_port, - workers: process.env.WORKERS || 1, + mongoUrl: process.env.MONGOLAB_URI, + redisUrl: process.env.REDISCLOUD_URL, googleId: process.env.GCONTACTS_ID, googleSecret: process.env.GCONTACTS_SECRET,
d47521a1d9281c2a89cf78bd8902c112ae16e38e
live-examples/js-examples/classes/classes-static.js
live-examples/js-examples/classes/classes-static.js
class ClassWithStaticMethod { static staticMethod() { return 'static method has been called.'; } } console.log(ClassWithStaticMethod.staticMethod()); // expected output: "static method has been called."
class ClassWithStaticMethod { static staticProperty = "someValue"; static staticMethod() { return 'static method has been called.'; } } console.log(ClassWithStaticMethod.staticProperty); // output: "someValue" console.log(ClassWithStaticMethod.staticMethod()); // output: "static method has been called."
Update example to include static property
Update example to include static property
JavaScript
cc0-1.0
mdn/interactive-examples,mdn/interactive-examples,mdn/interactive-examples
--- +++ @@ -1,8 +1,13 @@ class ClassWithStaticMethod { + + static staticProperty = "someValue"; static staticMethod() { return 'static method has been called.'; } + } +console.log(ClassWithStaticMethod.staticProperty); +// output: "someValue" console.log(ClassWithStaticMethod.staticMethod()); -// exp...
287c5ef21117352df8cde5eaa4592ce15c01031c
client/src/reducers/sourcesReducer.js
client/src/reducers/sourcesReducer.js
import initialState from './initialState' export default function sourcesReducer(state = initialState.sources, action) { switch (action.type) { case 'GET_SOURCES': return action.payload.map (source => ( {...source, selected: true} )) default: return state; } }
import initialState from './initialState' export default function sourcesReducer(state = initialState.sources, action) { switch (action.type) { case 'GET_SOURCES': return action.payload.map (source => ( {...source, selected: false} )) default: return state; } }
Change GET_SOURCES action to default to selected:false
Change GET_SOURCES action to default to selected:false
JavaScript
mit
kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed
--- +++ @@ -4,7 +4,7 @@ switch (action.type) { case 'GET_SOURCES': return action.payload.map (source => ( - {...source, selected: true} + {...source, selected: false} )) default: return state;
8dc31229b164225e2aa8d84f499b7bc0ef9be9f2
ui/main.js
ui/main.js
// Blank the document so the 404 page doesn't show up visibly. document.documentElement.style.display = 'none'; // Can't use DOMContentLoaded, calling document.write or document.close inside it from // inside an extension causes a crash. onload = function() { document.write( "<!DOCTYPE html>" + "<...
// Blank the document so the 404 page doesn't show up visibly. document.documentElement.style.display = 'none'; // Can't use DOMContentLoaded, calling document.write or document.close inside it from // inside an extension causes a crash. onload = function() { document.write( "<!DOCTYPE html>" + "<...
Add a <title>. We should make it dynamic eventually so history works.
Add a <title>. We should make it dynamic eventually so history works.
JavaScript
bsd-3-clause
esprehn/chromium-codereview,esprehn/chromium-codereview
--- +++ @@ -8,6 +8,7 @@ document.write( "<!DOCTYPE html>" + "<meta name=viewport content='width=device-width, user-scalable=no'>" + + "<title>Chromium Code Review</title>" + "<script src='" + resolveUrl("bower_components/platform/platform.js") + "'></script>" + "<cr-app...
22c91010c17691aceb15523cfa052b60cdc47d23
app.js
app.js
var pg = require('pg'); var Hapi = require('hapi'); var server = new Hapi.Server(); server.connection({ port: 3000 }); server.start(function () { console.log('Server running at:', server.info.uri); }); server.route({ method: 'GET', path: '/', handler: function (request, reply) { re...
var pg = require('pg'); var Hapi = require('hapi'); var server = new Hapi.Server(); server.connection({ port: 3000 }); server.start(function () { console.log('Server running at:', server.info.uri); }); server.route({ method: 'GET', path: '/', handler: function (request, reply) { re...
Remove duplicate route for /
Remove duplicate route for /
JavaScript
bsd-2-clause
SpotScore/spotscore
--- +++ @@ -19,13 +19,6 @@ } }); -server.route({ - method: 'GET', - path: '/', - handler: function (request, reply) { - reply('Hello from SpotScore API!'); - } -}); server.route({ method: 'GET',
e76026335f7d999168fa377bc6b9f76295f4c7f1
cli.js
cli.js
#!/usr/bin/env node 'use strict'; var chalk = require('chalk'); var meow = require('meow'); var process = require('process'); var allPrograms = [ 'atom', 'bash', 'bin', 'git', 'gnome-terminal', 'vim', 'vscode' ]; var cli = meow({ help: [ 'Usage: dotfiles install [<program>]', '', 'where <program...
#!/usr/bin/env node 'use strict'; var chalk = require('chalk'); var meow = require('meow'); var process = require('process'); var allPrograms = [ 'atom', 'bash', 'bin', 'git', 'gnome-terminal', 'vim', 'vscode' ]; var cli = meow({ help: [ 'Usage: dotfiles install [<program>...]', '', 'where <prog...
Allow install of multiple programs
Allow install of multiple programs Fixes #26
JavaScript
mit
Tyriar/dotfiles,Tyriar/tyr-tools,Tyriar/tyr-tools,Tyriar/dotfiles,Tyriar/dotfiles
--- +++ @@ -17,9 +17,9 @@ var cli = meow({ help: [ - 'Usage: dotfiles install [<program>]', + 'Usage: dotfiles install [<program>...]', '', - 'where <program> is one of:', + 'where <program> is one or more of of:', ' ' + allPrograms.join(', '), '', 'Specify no <program> to install everythi...
581b9393ac0e0c6a505bedaaf6cbb7d30c0e4f4f
app/components/application/emoji-react-demo.js
app/components/application/emoji-react-demo.js
const script = String.raw`<script type="text/javascript"> var emojis = "tada, fire, grinning" var selector = "body" var url = window.location.href.replace(/(http:\/\/|https:\/\/)/gi, '').replace(/^\/|\/$/g, ''); var iframe = document.createElement("iframe") iframe.src = "https://emojireact.com/embed?emojis="...
import autosize from "autosize" const script = String.raw`<script type="text/javascript"> var emojis = "tada, fire, grinning" var selector = "body" var url = window.location.href.replace(/(http:\/\/|https:\/\/)/gi, '').replace(/^\/|\/$/g, ''); var iframe = document.createElement("iframe") iframe.src = "http...
Fix issue where demo text does not autosize textarea.
Fix issue where demo text does not autosize textarea. Closes #8
JavaScript
mit
EagerIO/InstantPlugin,EagerIO/InstantPlugin
--- +++ @@ -1,3 +1,5 @@ +import autosize from "autosize" + const script = String.raw`<script type="text/javascript"> var emojis = "tada, fire, grinning" var selector = "body" @@ -19,6 +21,7 @@ embedCodeInput.autofocus = false embedCodeInput.value = script + autosize.update(embedCodeInput) app.parse...
41aece86398d40e173f6ed14a633a66b90f804b2
test/specs/server_spec.js
test/specs/server_spec.js
import test from 'tape'; import { Database, Router, Server } from '../../src'; // // TODO: Check the same with XHR // export const serverSpec = () => { // @TODO Test Server's config test('Server # use database', (assert) => { const myDB = new Database(); const router = new Router(); const server = n...
// @TODO Test Server's config import test from 'tape'; import { Database, Router, Server } from '../../src'; const xhrRequest = (url) => { const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.send(); } export const serverSpec = () => { test('Server # use database', (assert) => { assert.plan...
Check that scenarios works with xhr
Check that scenarios works with xhr
JavaScript
mit
devlucky/Kakapo.js,devlucky/Kakapo.js
--- +++ @@ -1,27 +1,31 @@ +// @TODO Test Server's config import test from 'tape'; import { Database, Router, Server } from '../../src'; -// -// TODO: Check the same with XHR -// +const xhrRequest = (url) => { + const xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.send(); +} export const ...
9702cf0a66e26860102b2a091bc1d1600d200e57
app/instance-initializers/in-app-livereload.js
app/instance-initializers/in-app-livereload.js
import Ember from 'ember'; const { run } = Ember; export function initialize(app) { let config = app.container.lookupFactory('config:environment'); let env = config.environment; if (config.cordova && config.cordova.reloadUrl && (env === 'development' || env === 'test')) { let url = config.cordova.rel...
import Ember from 'ember'; const { run } = Ember; export function initialize(app) { let config = app.resolveRegistration('config:environment'); let env = config.environment; if (config.cordova && config.cordova.reloadUrl && (env === 'development' || env === 'test')) { let url = config.cordova.reloadU...
Use resolveRegistration rather than container.lookupFactory to lookup the environment.
Use resolveRegistration rather than container.lookupFactory to lookup the environment.
JavaScript
mit
isleofcode/ember-cordova,isleofcode/corber,isleofcode/ember-cordova,isleofcode/corber
--- +++ @@ -3,7 +3,7 @@ const { run } = Ember; export function initialize(app) { - let config = app.container.lookupFactory('config:environment'); + let config = app.resolveRegistration('config:environment'); let env = config.environment; if (config.cordova && config.cordova.reloadUrl &&
e3adf790c0b87f32b83f9b1199268ab8374c9eb8
src/components/DeviceChart.js
src/components/DeviceChart.js
import React, { PropTypes } from 'react'; import rd3 from 'rd3'; const BarChart = rd3.BarChart; const barData = [ { name: 'Series A', values: [ { x: 1, y: 91 }, { x: 2, y: 290 }, { x: 3, y: 30 }, { x: 4, y: 50 }, { x: 5, y: 90 }, { x: 6, y: 100 }, ], }, ]; export cl...
import React, { PropTypes } from 'react'; import rd3 from 'rd3'; const BarChart = rd3.BarChart; export class DeviceChart extends React.Component { constructor(props) { super(props); this.state = { barData: [ { values: [ { x: 1, y: 91 }, { x: 2, y: 290 }, ...
Add data to bar chart
Add data to bar chart
JavaScript
mit
Bucko13/kinects-it,brnewby602/kinects-it,brnewby602/kinects-it,Kinectsit/kinects-it,Bucko13/kinects-it,Kinectsit/kinects-it
--- +++ @@ -2,31 +2,47 @@ import rd3 from 'rd3'; const BarChart = rd3.BarChart; -const barData = [ - { - name: 'Series A', - values: [ - { x: 1, y: 91 }, - { x: 2, y: 290 }, - { x: 3, y: 30 }, - { x: 4, y: 50 }, - { x: 5, y: 90 }, - { x: 6, y: 100 }, - ], - }, -]; expor...
d0eace4d14f980d2afd1d8967b0cc9a9cd9a4468
lib/core/config.js
lib/core/config.js
var async = require('async'); var _ = require('lodash'); var readTOML = require('./utils').readTOML; var fileExists = require('./utils').fileExists; var defaults = { account: { username: 'admin', password: 'password', channel: '#riotgames' }, irc: { address: '199.9.253.199' }, server: { ...
var async = require('async'); var _ = require('lodash'); var readTOML = require('./utils').readTOML; var fileExists = require('./utils').fileExists; var defaults = { account: { username: 'admin', password: 'password', channel: '#riotgames' }, irc: { address: '199.9.253.199' }, server: { ...
Fix incorrect use of `_.defaults`
Fix incorrect use of `_.defaults`
JavaScript
mit
KenanY/nwitch
--- +++ @@ -19,9 +19,9 @@ }; function Config(options) { - this['account'] = _.defaults(defaults['account'], options['account']); - this['irc'] = _.defaults(defaults['irc'], options['irc']); - this['server'] = _.defaults(defaults['server'], options['server']); + this['account'] = _.defaults(options['account'],...
2b86f1e677ff9630159f264d4d89ca73b9fbfd9f
apps/federatedfilesharing/js/settings-admin.js
apps/federatedfilesharing/js/settings-admin.js
$(document).ready(function() { $('#fileSharingSettings input').change(function() { var value = 'no'; if (this.checked) { value = 'yes'; } OC.AppConfig.setValue('files_sharing', $(this).attr('name'), value); }); $('.section .icon-info').tipsy({gravity: 'w'}); });
$(document).ready(function() { $('#fileSharingSettings input').change(function() { var value = 'no'; if (this.checked) { value = 'yes'; } OC.AppConfig.setValue('files_sharing', $(this).attr('name'), value); }); });
Remove unneeded usage of tipsy
Remove unneeded usage of tipsy * tooltip is already initialized
JavaScript
agpl-3.0
jbicha/server,endsguy/server,Ardinis/server,pmattern/server,pixelipo/server,andreas-p/nextcloud-server,pmattern/server,endsguy/server,pixelipo/server,Ardinis/server,michaelletzgus/nextcloud-server,nextcloud/server,xx621998xx/server,whitekiba/server,Ardinis/server,nextcloud/server,jbicha/server,xx621998xx/server,pmatter...
--- +++ @@ -8,5 +8,4 @@ OC.AppConfig.setValue('files_sharing', $(this).attr('name'), value); }); - $('.section .icon-info').tipsy({gravity: 'w'}); });
566b86d0c11e8def2e018c0bfcae1ca8c7efb4f4
lib/getGeoFiles.js
lib/getGeoFiles.js
'use strict'; var fs = require('fs'); var path = require('path'); var nodedir = require('node-dir'); var unzipGeoStream = require('./unzipGeoStream'); function discover(input, counter, callback, silent, afterProcessingCb){ var ext = path.extname(input); if(ext){ if(ext === '.zip') return unzipGeoStream(inpu...
'use strict'; var fs = require('fs'); var path = require('path'); var nodedir = require('node-dir'); var unzipGeoStream = require('./unzipGeoStream'); function discover(input, counter, callback, silent, afterProcessingCb){ var ext = path.extname(input); if(ext){ if(ext === '.zip') return unzipGeoStream(inpu...
Allow .csvs to be processed
Allow .csvs to be processed
JavaScript
cc0-1.0
awolfe76/grasshopper-loader,awolfe76/grasshopper-loader,cfpb/grasshopper-loader,cfpb/grasshopper-loader
--- +++ @@ -12,7 +12,7 @@ if(ext){ if(ext === '.zip') return unzipGeoStream(input, fs.createReadStream(input), counter, discover, callback); - if(ext === '.gdb'|| ext === '.shp'|| ext === '.json'){ + if(ext === '.json'|| ext === '.csv' || ext === '.gdb' || ext === '.shp'){ counter.incr(); ...
952b351d8a7be859c22f79ea5d2225acf87b3ccb
rng.js
rng.js
function get(i){ return document.getElementById(i) } function random_number(){ if(value('repeat')<1){ get('repeat').value=1 } i=value('repeat')-1; range=parseInt(value('range'))+1; do{ result+=Math.floor(Math.random()*range+value('base'))+' ' }while(i--); get('result').innerHTML=result; result='' } functio...
function random_number(){ save(); i=value('repeat')-1; range=parseInt(value('range'))+1; do{ result+=Math.floor(Math.random()*range+value('base'))+' ' }while(i--); get('result').innerHTML=result; result='' } function reset(){ if(confirm('Reset settings?')){ get('base').value=0; get('range').value=10; ge...
Save input values to localStorage
Save input values to localStorage
JavaScript
cc0-1.0
iterami/RNG.htm,iterami/RNG.htm
--- +++ @@ -1,10 +1,5 @@ -function get(i){ - return document.getElementById(i) -} function random_number(){ - if(value('repeat')<1){ - get('repeat').value=1 - } + save(); i=value('repeat')-1; range=parseInt(value('range'))+1; do{ @@ -18,14 +13,41 @@ get('base').value=0; get('range').value=10; get('re...
79adb264ac417a93ca252e66750076fd937142f1
lib/request-jwt.js
lib/request-jwt.js
var TokenCache = require('./token-cache'), tokens = new TokenCache(); /** * Returns a JWT-enabled request module. * @param request The request instance to modify to enable JWT. * @returns {Function} The JWT-enabled request module. */ exports.requestWithJWT = function (request) { if (!request) { // use the req...
var TokenCache = require('./token-cache'), tokens = new TokenCache(); /** * Returns a JWT-enabled request module. * @param request The request instance to modify to enable JWT. * @returns {Function} The JWT-enabled request module. */ exports.requestWithJWT = function (request) { if (!request) { // use the req...
Use the Authorization request header field to send the token.
Use the Authorization request header field to send the token. Per http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-14#section-2.1 this is the recommended approach which must be supported by all servers.
JavaScript
mit
extrabacon/google-oauth-jwt,0xPIT/google-oauth-jwt
--- +++ @@ -32,9 +32,8 @@ if (err) return callback(err); - // TODO: for now the token is only passed using the query string - options.qs = options.qs || {}; - options.qs.access_token = token; + options.headers = options.headers || {}; + options.headers.authorization = 'Bearer ' + token; r...
1634fe192df5994ce9ce4b323de89f5351fbfffb
htdocs/components/00_jquery_togglebutton.js
htdocs/components/00_jquery_togglebutton.js
/* * Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute * * 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.o...
/* * Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute * * 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.o...
Send button state for toggle buttons.
Send button state for toggle buttons.
JavaScript
apache-2.0
Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode
--- +++ @@ -28,7 +28,10 @@ type: 'POST', traditional: true, cache: false, - context: this + context: this, + data: { + state: $this.hasClass('off')?0:1 + } }).fail(function() { $...
7e894bf4593a3ce542ae8bfd9af05835712497e7
src/Our.Umbraco.Nexu.Web/App_Plugins/Nexu/controllers/related-links-app-controller.js
src/Our.Umbraco.Nexu.Web/App_Plugins/Nexu/controllers/related-links-app-controller.js
(function () { 'use strict'; function RelatedLinksAppController($scope) { var vm = this; vm.relations = $scope.model.viewModel; var currentVariant = _.find($scope.content.variants, function(v) { return v.active }); vm.culture = currentVariant.language.culture; ...
(function () { 'use strict'; function RelatedLinksAppController($scope) { var vm = this; vm.relations = $scope.model.viewModel; var currentVariant = _.find($scope.content.variants, function (v) { return v.active }); if (currentVariant.language) { vm.culture =...
Make sure content app works when there are no variants
Make sure content app works when there are no variants
JavaScript
mit
dawoe/umbraco-nexu,dawoe/umbraco-nexu,dawoe/umbraco-nexu
--- +++ @@ -5,9 +5,17 @@ var vm = this; vm.relations = $scope.model.viewModel; - var currentVariant = _.find($scope.content.variants, function(v) { return v.active }); - vm.culture = currentVariant.language.culture; - vm.cultureRelations = _.filter(vm.relations, fun...
89a9146eb112386279c5bfb54845e93a571b62a7
www/mobitorSecure.js
www/mobitorSecure.js
module.exports = { isSecure: function (successCallback, errorCallback) { cordova.exec(successCallback, errorCallback, "MobitorSecure", "isSecure", [null]); } };
module.exports = { isSecure: function (successCallback, errorCallback) { cordova.exec(successCallback, errorCallback, "MobitorSecure", "isSecured", [null]); } };
Fix method and add d to isSecure
Fix method and add d to isSecure
JavaScript
mit
jmoore6364/mobitor-cordova-secure,jmoore6364/mobitor-cordova-secure
--- +++ @@ -1,5 +1,5 @@ module.exports = { isSecure: function (successCallback, errorCallback) { - cordova.exec(successCallback, errorCallback, "MobitorSecure", "isSecure", [null]); + cordova.exec(successCallback, errorCallback, "MobitorSecure", "isSecured", [null]); } };
f95cf530a32f0637536e606d864139d0cde80372
test/compressJavaScript-test.js
test/compressJavaScript-test.js
var vows = require('vows'), assert = require('assert'), AssetGraph = require('../lib/AssetGraph'); vows.describe('transforms.compressJavaScript').addBatch(function () { var test = {}; [undefined, 'uglifyJs', 'yuicompressor', 'closurecompiler'].forEach(function (compressorName) { test[String(com...
var vows = require('vows'), assert = require('assert'), AssetGraph = require('../lib/AssetGraph'); vows.describe('transforms.compressJavaScript').addBatch(function () { var test = {}; // The YUICompressor and ClosureCompiler tests fail intermittently on Travis [undefined, 'uglifyJs'/*, 'yuicompress...
Disable the YUICompressor and closure compiler tests
Disable the YUICompressor and closure compiler tests They're annoying because the fail on Travis half of the time.
JavaScript
bsd-3-clause
jscinoz/assetgraph,jscinoz/assetgraph,papandreou/assetgraph,papandreou/assetgraph,assetgraph/assetgraph,jscinoz/assetgraph,papandreou/assetgraph
--- +++ @@ -4,7 +4,8 @@ vows.describe('transforms.compressJavaScript').addBatch(function () { var test = {}; - [undefined, 'uglifyJs', 'yuicompressor', 'closurecompiler'].forEach(function (compressorName) { + // The YUICompressor and ClosureCompiler tests fail intermittently on Travis + [undefined, '...
801e990ae4b3433ab1800bbdfd6d8c9921fc2029
controllers/api.js
controllers/api.js
'use strict'; /** * GET /api/challenges * List of challenges. */ exports.getChallenges = function getChallenges(req, res) { res.json({ challenges: [] }); }; /** * POST /api/challenges * Create new challenges. */ exports.postChallenges = function postChallenges(req, res) { res.status(201).send("Created n...
'use strict'; /** * GET /api/challenges * List of challenges. */ exports.getChallenges = function get(req, res) { res.json({ challenges: [] }); }; /** * POST /api/challenges/:challengeId * Created a new challenge. */ exports.postChallenge = function post(req, res) { res.status(201).send("Created new challenge...
Update API controller with team and challenge routes
Update API controller with team and challenge routes
JavaScript
mit
lostatseajoshua/Challenger
--- +++ @@ -1,17 +1,65 @@ 'use strict'; /** - * GET /api/challenges - * List of challenges. - */ -exports.getChallenges = function getChallenges(req, res) { +* GET /api/challenges +* List of challenges. +*/ +exports.getChallenges = function get(req, res) { res.json({ challenges: [] }); }; /** - * POST /a...
015f87577e6296419fcf3747629cf095681a2e8f
app/javascript/app/components/compare/compare-ndc-content-overview/compare-ndc-content-overview-selectors.js
app/javascript/app/components/compare/compare-ndc-content-overview/compare-ndc-content-overview-selectors.js
import { createSelector } from 'reselect'; import isEmpty from 'lodash/isEmpty'; import { parseSelectedLocations, getSelectedLocationsFilter, addSelectedNameToLocations } from 'selectors/compare'; // values from search const getSelectedLocations = state => state.selectedLocations || null; const getContentOvervie...
import { createSelector } from 'reselect'; import isEmpty from 'lodash/isEmpty'; import { parseSelectedLocations, getSelectedLocationsFilter, addSelectedNameToLocations } from 'selectors/compare'; // values from search const getSelectedLocations = state => state.selectedLocations || null; const getContentOvervie...
Fix crashing bug: Compare Libya
Fix crashing bug: Compare Libya
JavaScript
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
--- +++ @@ -27,8 +27,8 @@ return selectedLocations.map(l => { const d = data[l.iso_code3]; const text = - d && d.values && d.values.find(v => v.slug === 'indc_summary').value; - return { ...l, text }; + d && d.values && d.values.find(v => v.slug === 'indc_summary'); + return...
c554a2b89f64b9f522a16d3080d8c81990b09d82
app.js
app.js
/** * App Dependencies. */ var loopback = require('loopback') , app = module.exports = loopback() , fs = require('fs') , path = require('path') , request = require('request') , TaskEmitter = require('sl-task-emitter'); // expose a rest api app.use(loopback.rest()); // Add static files app.use(loopback.st...
/** * App Dependencies. */ var loopback = require('loopback') , app = module.exports = loopback() , fs = require('fs') , path = require('path') , request = require('request') , TaskEmitter = require('sl-task-emitter'); // expose a rest api app.use(loopback.rest()); // Add static files app.use(loopback.st...
Make it working directory independent
Make it working directory independent
JavaScript
mit
strongloop-bluemix/loopback-example-app,svennam92/loopback-example-app,hacksparrow/loopback-example-app,sam-github/sls-sample-app,jewelsjacobs/loopback-example-app,jewelsjacobs/loopback-example-app,rvennam/loopback-example-app,svennam92/loopback-example-app,rvennam/loopback-example-app,Joddsson/loopback-example-app,rve...
--- +++ @@ -17,7 +17,7 @@ // require models fs - .readdirSync('./models') + .readdirSync(path.join(__dirname, './models')) .filter(function (m) { return path.extname(m) === '.js'; })
6a1d280e8a0f576b4129b7fe5ca71ba93a1095b6
components/Fork.js
components/Fork.js
import React from 'react' import { makeStyles } from '@material-ui/core/styles' import Fab from '@material-ui/core/Fab' import Badge from '@material-ui/core/Badge' const useStyles = makeStyles(() => ({ fork: { position: 'absolute', right: 30, top: 30 } })) const Fork = ({ stars }) => { const classes = useSty...
import React from 'react' import { makeStyles } from '@material-ui/core/styles' import Fab from '@material-ui/core/Fab' import Badge from '@material-ui/core/Badge' const useStyles = makeStyles(() => ({ fork: { position: 'absolute', right: 30, top: 30 } })) const Fork = ({ stars }) => { const classes = useSty...
Add rel on fork link
Add rel on fork link
JavaScript
mit
ooade/NextSimpleStarter
--- +++ @@ -17,9 +17,10 @@ <div className={classes.fork}> <Badge badgeContent={stars || 0} max={999} color="primary"> <Fab + target="_blank" variant="extended" + rel="noreferrer noopener" href="https://github.com/ooade/NextSimpleStarter" - target="_blank" > Fork me ...
2d94f56750717d4a6479b8eed940b103b53a0f61
rollup.config.js
rollup.config.js
import sourcemaps from 'rollup-plugin-sourcemaps'; export const globals = { // Apollo 'apollo-client': 'apollo.core', 'apollo-link': 'apolloLink.core', 'apollo-link-batch': 'apolloLink.batch', 'apollo-utilities': 'apollo.utilities', 'zen-observable-ts': 'apolloLink.zenObservable', //GraphQL 'graphql/l...
import sourcemaps from 'rollup-plugin-sourcemaps'; export const globals = { // Apollo 'apollo-client': 'apollo.core', 'apollo-link': 'apolloLink.core', 'apollo-link-batch': 'apolloLink.batch', 'apollo-utilities': 'apollo.utilities', 'apollo-link-http-common': 'apolloLink.utilities', 'zen-observable-ts': ...
Add missing global Rollup alias for apollo-link-http-common
Add missing global Rollup alias for apollo-link-http-common This fixes #521, making it so that the apollo-link-http bundle resolves apollo-link-http-common to global.apolloLink.utilities instead of global.apolloLinkHttpCommon (which does not exist).
JavaScript
mit
apollographql/apollo-link,apollographql/apollo-link
--- +++ @@ -6,6 +6,7 @@ 'apollo-link': 'apolloLink.core', 'apollo-link-batch': 'apolloLink.batch', 'apollo-utilities': 'apollo.utilities', + 'apollo-link-http-common': 'apolloLink.utilities', 'zen-observable-ts': 'apolloLink.zenObservable', //GraphQL
b52476d5f5c59cc2f0d5df2270b4f35b86b166c0
core/src/action.js
core/src/action.js
const elements = document.querySelectorAll('bracket-less'); function doAction(e) { if (e.target.tagName !== 'BRACKET-LESS') return; e.target.classList.toggle('bracket-less'); e.stopPropagation(); } document.body.addEventListener('click', doAction); function toggleCollapse(state) { if (state.collapse) { // pl...
const elements = document.querySelectorAll('bracket-less'); function doAction(e) { e.stopPropagation(); if (e.target.tagName !== 'BRACKET-LESS') return; e.target.classList.toggle('bracket-less'); } document.body.addEventListener('click', doAction); function toggleCollapse(state) { if (state.collapse) { // ...
Stop propogation in any case
Stop propogation in any case
JavaScript
isc
mrv1k/bracketless,mrv1k/bracketless
--- +++ @@ -1,9 +1,11 @@ const elements = document.querySelectorAll('bracket-less'); function doAction(e) { + e.stopPropagation(); + if (e.target.tagName !== 'BRACKET-LESS') return; + e.target.classList.toggle('bracket-less'); - e.stopPropagation(); } document.body.addEventListener('click', doAction);
dd1fa20110373e12ac2b9a67ace0d6cf4dabea0c
pages/_document.js
pages/_document.js
import React from 'react' import Document, { Head, Main, NextScript } from 'next/document' import stylesheet from 'pages/styles.scss' export default class MyDocument extends Document { render () { return ( <html> <Head> <meta charSet='utf-8' /> <meta name='viewport' content='wid...
import React from 'react' import Document, { Head, Main, NextScript } from 'next/document' import stylesheet from './styles.scss' export default class MyDocument extends Document { render () { return ( <html> <Head> <meta charSet='utf-8' /> <meta name='viewport' content='width=d...
Move base style in the header
Move base style in the header
JavaScript
mit
bmagic/acdh-client
--- +++ @@ -1,6 +1,6 @@ import React from 'react' import Document, { Head, Main, NextScript } from 'next/document' -import stylesheet from 'pages/styles.scss' +import stylesheet from './styles.scss' export default class MyDocument extends Document { render () { @@ -9,10 +9,9 @@ <Head> <met...
a5429590312ce43effd710e22d8892c33b571d85
app/lib/main.js
app/lib/main.js
'use strict'; /*jshint unused:false, newcap:false*/ /** * Enable dubug mode * This allow to console.log in a firefox default configuration */ require('sdk/preferences/service').set('extensions.sdk.console.logLevel', 'debug'); var data = require('sdk/self').data; var { PageMod } = require('sdk/page-mod'); // Creat...
'use strict'; /*jshint unused:false, newcap:false*/ /** * Enable dubug mode * This allow to console.log in a firefox default configuration */ require('sdk/preferences/service').set('extensions.sdk.console.logLevel', 'debug'); var data = require('sdk/self').data; var { PageMod } = require('sdk/page-mod'); // Work ...
Load the style file in Firefox version as well.
Load the style file in Firefox version as well.
JavaScript
mpl-2.0
musically-ut/github-forks-addon,musically-ut/lovely-forks,musically-ut/lovely-forks
--- +++ @@ -10,9 +10,19 @@ var data = require('sdk/self').data; var { PageMod } = require('sdk/page-mod'); +// Work only on Github URLs +var matchPatterns = [ '*.github.com' ]; + // Create a content script -var pageMod = PageMod({ - include: ['*.github.com'], // Work only on Github URLs - contentScriptFile...
0b49d0bb7a4dc577c0664775f2c53d86c3c6f486
greasemonkey-endomondo-design.user.js
greasemonkey-endomondo-design.user.js
// ==UserScript== // @name Greasemonkey EndomondoDesign // @namespace https://github.com/JanisE // @include *www.endomondo.com/* // @version 1 // @grant none // ==/UserScript== var css = document.createElement('style'); css.type = 'text/css'; css.innerHTML = ".feedItem-footer .eoAvatar-image {visibility: hidden} .eoFe...
// ==UserScript== // @name Greasemonkey EndomondoDesign // @namespace https://github.com/JanisE // @description Project URL: https://github.com/JanisE/greasemonkey-endomondo-design // @include *www.endomondo.com/* // @version 1 // @grant none // ==/UserScript== var css = document.createElement('style'); css.type = 'te...
Add a back-reference to the repository.
Add a back-reference to the repository.
JavaScript
mit
JanisE/greasemonkey-endomondo-design
--- +++ @@ -1,6 +1,7 @@ // ==UserScript== // @name Greasemonkey EndomondoDesign // @namespace https://github.com/JanisE +// @description Project URL: https://github.com/JanisE/greasemonkey-endomondo-design // @include *www.endomondo.com/* // @version 1 // @grant none
01526d30ab470b2872ac98f62d6a8712d78eddbc
tools/main-transpile-wrapper.js
tools/main-transpile-wrapper.js
// This file exists because it is the file in the tool that is not automatically // transpiled by Babel function babelRegister() { require("meteor-babel/register")({ babelOptions: require("meteor-babel").getDefaultOptions( require("./babel-features.js") ) }); } babelRegister(); // #RemoveInProd this...
// This file exists because it is the file in the tool that is not automatically // transpiled by Babel function babelRegister() { require("meteor-babel/register")({ babelOptions: require("meteor-babel").getDefaultOptions( require("./babel-features.js") ) }); } babelRegister(); // #RemoveInProd this...
Install ES2015 String polyfills in tool code, too.
Install ES2015 String polyfills in tool code, too.
JavaScript
mit
cherbst/meteor,jeblister/meteor,kengchau/meteor,cherbst/meteor,deanius/meteor,karlito40/meteor,h200863057/meteor,Jonekee/meteor,guazipi/meteor,Puena/meteor,planet-training/meteor,deanius/meteor,namho102/meteor,chiefninew/meteor,TechplexEngineer/meteor,allanalexandre/meteor,baiyunping333/meteor,jeblister/meteor,katopz/m...
--- +++ @@ -15,11 +15,12 @@ // run all its callbacks in Fibers. global.Promise = require("meteor-promise"); -// Globally install ES2015-complaint Symbol, Map, and Set, patching the -// native implementations if they are available. +// Install ES2015-complaint polyfills for Symbol, Map, Set, and String, +// patchi...
76f211a93cba95050f5fcbcdada228f9e3c42936
d3/test/spec/test_wgaPipeline.js
d3/test/spec/test_wgaPipeline.js
describe('The constructor is supposed a proper WgaPipeline object', function(){ it('Constructor wgaPipeline exists', function(){ expect(WgaPipeline).toBeDefined(); }); var svg = $('<svg></svg>'); var wga = new WgaPipeline(svg); it('WgaPipelie object is not null', function(){ expect(wga).not.toBeNull(); }); i...
describe('The constructor is supposed a proper WgaPipeline object', function(){ it('Constructor wgaPipeline exists', function(){ expect(WgaPipeline).toBeDefined(); }); var svg = $('<svg></svg>'); var wga = new WgaPipeline(svg); it('WgaPipelie object is not null', function(){ expect(wga).not.toBeNull(); }); i...
Test for functionality of setData method fails
Test for functionality of setData method fails
JavaScript
mit
AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV,AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV
--- +++ @@ -21,4 +21,23 @@ it('setData method is supposed to be a function', function(){ expect(typeof wga.setData).toEqual('function'); }); + var karyo = { + 'order': ['c1', 'c2'], + 'chromosomes': { + 'c1': {'genome_id': 0, 'length': 2000, 'rc': false, 'seq': null}, + 'c2': {'genome_id': 1, 'length': 100...
4b956b5e7fb6206f17fdaf9f770afe6734827455
packages/idyll-editor/src/renderer.js
packages/idyll-editor/src/renderer.js
const components = require('idyll-components'); const IdyllDocument = require('idyll-document'); const React = require('react'); class Renderer extends React.PureComponent { render() { const { idyllMarkup, ast, idyllHash } = this.props; return ( <div className={"renderer"}> <div className={"ren...
const components = require('idyll-components'); const IdyllDocument = require('../../idyll-document/src'); const React = require('react'); class Renderer extends React.PureComponent { render() { const { idyllMarkup, ast, idyllHash } = this.props; return ( <div className={"renderer"}> <div class...
Use relative path until published
Use relative path until published
JavaScript
mit
idyll-lang/idyll,idyll-lang/idyll
--- +++ @@ -1,5 +1,5 @@ const components = require('idyll-components'); -const IdyllDocument = require('idyll-document'); +const IdyllDocument = require('../../idyll-document/src'); const React = require('react'); class Renderer extends React.PureComponent {
b9f34201ddb64378f10320b7a0f9e4ef1d29bb5e
packages/mobile-status-bar/package.js
packages/mobile-status-bar/package.js
Package.describe({ summary: "Good defaults for the mobile status bar", version: "1.0.14" }); Cordova.depends({ 'cordova-plugin-statusbar': '2.3.0' });
Package.describe({ summary: "Good defaults for the mobile status bar", version: "1.0.14" }); Cordova.depends({ 'cordova-plugin-statusbar': '2.4.3' });
Update cordova-plugin-statusbar from 2.3.0 to 2.4.3.
Update cordova-plugin-statusbar from 2.3.0 to 2.4.3. Included by mobile-experience > mobile-status-bar.
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
--- +++ @@ -4,5 +4,5 @@ }); Cordova.depends({ - 'cordova-plugin-statusbar': '2.3.0' + 'cordova-plugin-statusbar': '2.4.3' });
8b96e99cb55204088d239e2ec63e5af535068786
server/routes.js
server/routes.js
var f = "MMM Do YYYY"; function calcWidth(name) { return 250 + name.length * 6.305555555555555; } WebApp.connectHandlers.use("/package", function(request, response) { if(request.url.split('/')[1] != ''){ var url = `https://atmospherejs.com/a/packages/findByNames\ ?names=${request.url.split('/')[1]}`; HTTP.get...
function calcWidth(name) { return 250 + name.length * 6.305555555555555; } WebApp.connectHandlers.use("/package", function(request, response) { if(request.url.split('/')[1] != ''){ var url = `https://atmospherejs.com/a/packages/findByNames\ ?names=${request.url.split('/')[1]}`; HTTP.get(url, {headers: {'Accept...
Fix undefined name and scope variables
Fix undefined name and scope variables
JavaScript
mit
sungwoncho/meteor-icon,sungwoncho/meteor-icon
--- +++ @@ -1,5 +1,3 @@ -var f = "MMM Do YYYY"; - function calcWidth(name) { return 250 + name.length * 6.305555555555555; } @@ -9,13 +7,16 @@ var url = `https://atmospherejs.com/a/packages/findByNames\ ?names=${request.url.split('/')[1]}`; HTTP.get(url, {headers: {'Accept': 'application/json'}}, function...
fb3508a81f101d1c376deff610d7f93af5d426ba
ghpages/js/stationary-track.js
ghpages/js/stationary-track.js
var playlist = WaveformPlaylist.init({ samplesPerPixel: 3000, mono: true, waveHeight: 100, container: document.getElementById("playlist"), state: 'cursor', waveOutlineColor: '#E0EFF1', colors: { waveOutlineColor: '#E0EFF1', timeColor: 'grey', fadeColor: 'black' }, controls: { sho...
var playlist = WaveformPlaylist.init({ samplesPerPixel: 3000, zoomLevels: [500, 1000, 3000, 5000], mono: true, waveHeight: 100, container: document.getElementById("playlist"), state: 'cursor', waveOutlineColor: '#E0EFF1', colors: { waveOutlineColor: '#E0EFF1', timeColor: 'grey', fadeCo...
Fix zoom levels for example.
Fix zoom levels for example.
JavaScript
mit
naomiaro/waveform-playlist,naomiaro/waveform-playlist
--- +++ @@ -1,5 +1,6 @@ var playlist = WaveformPlaylist.init({ samplesPerPixel: 3000, + zoomLevels: [500, 1000, 3000, 5000], mono: true, waveHeight: 100, container: document.getElementById("playlist"),
18b70b1dfc2e258215596e561cf37369fc467a9d
stories/Interactions.story.js
stories/Interactions.story.js
import React from 'react' import {withInfo} from '@storybook/addon-info' import {storiesOf} from '@storybook/react' import Board from '../src' const data = { lanes: [ { id: 'lane1', title: 'Planned Tasks', cards: [ {id: 'Card1', title: 'Card1', description: 'foo card', metadata: {id: '...
import React from 'react' import {withInfo} from '@storybook/addon-info' import {storiesOf} from '@storybook/react' import Board from '../src' const data = { lanes: [ { id: 'lane1', title: 'Planned Tasks', cards: [ {id: 'Card1', title: 'Card1', description: 'foo card', metadata: {id: '...
Allow laneId to be passed as param to onCardClick handler
fix: Allow laneId to be passed as param to onCardClick handler https://github.com/rcdexta/react-trello/issues/34
JavaScript
mit
rcdexta/react-trello,rcdexta/react-trello
--- +++ @@ -17,7 +17,9 @@ { id: 'lane2', title: 'Executing', - cards: [] + cards: [ + {id: 'Card3', title: 'Card3', description: 'foobar card', metadata: {id: 'Card3'}} + ] } ] }
0605be68fa516a167f6519c238952a23e005bc4d
templates/app/routes/index.js
templates/app/routes/index.js
var path = require('path'), fs = require('fs'); var routes = function (app) { fs.readdirSync(__dirname).filter(function (file) { return path.join(__dirname, file) != __filename; }).forEach(function (file) { require('./' + path.basename(file))(app); }); } module.exports = routes;
var path = require('path'), fs = require('fs'); var routes = function(app) { fs.readdirSync(__dirname).filter(function(file) { return path.join(__dirname, file) != __filename; }).forEach(function(file) { require('./' + path.basename(file))(app); }); } module.exports = routes;
Indent by 4 spaces instead of 2
Indent by 4 spaces instead of 2
JavaScript
mit
saintedlama/bumm,saintedlama/bumm,the-diamond-dogs-group-oss/bumm
--- +++ @@ -1,11 +1,11 @@ var path = require('path'), - fs = require('fs'); + fs = require('fs'); -var routes = function (app) { - fs.readdirSync(__dirname).filter(function (file) { - return path.join(__dirname, file) != __filename; - }).forEach(function (file) { - require('./' + path.basename(file))...
bc1ab08e8f40fd8586cfb91e18e2c28868700a21
src/configureRefreshFetch.js
src/configureRefreshFetch.js
// @flow type Configuration = { refreshToken: () => Promise<void>, shouldRefreshToken: (error: any) => boolean, fetch: (url: any, options: Object) => Promise<any> } function configureRefreshFetch (configuration: Configuration) { const { refreshToken, shouldRefreshToken, fetch } = configuration let refreshi...
// @flow type Configuration = { refreshToken: () => Promise<void>, shouldRefreshToken: (error: any) => boolean, fetch: (url: any, options: Object) => Promise<any> } function configureRefreshFetch (configuration: Configuration) { const { refreshToken, shouldRefreshToken, fetch } = configuration let refreshi...
Throw the right error from failing second request
Throw the right error from failing second request Fixes #4.
JavaScript
mit
vlki/refresh-fetch
--- +++ @@ -39,11 +39,11 @@ } return refreshingTokenPromise - .then(() => fetch(url, options)) .catch(() => { // If refreshing fails, continue with original error throw error }) + .then(() => fetch(url, options)) } else { ...
025bc068d8e681661b740d206db87fbb2da1afeb
src/es6/Machete.js
src/es6/Machete.js
export class Machete { // TODO: Implement polyfills }
export class Machete { // TODO: Implement polyfills /** * Utility function to get an element from the DOM. * It is needed because everytime we get an element from the DOM, * we reset its style to make sure code works as needed. * @param string selector CSS selector * @return Elem...
Add function for retrieving DOM elements
core: Add function for retrieving DOM elements
JavaScript
mpl-2.0
Technohacker/machete
--- +++ @@ -1,3 +1,20 @@ export class Machete { // TODO: Implement polyfills + + /** + * Utility function to get an element from the DOM. + * It is needed because everytime we get an element from the DOM, + * we reset its style to make sure code works as needed. + * @param string selector ...
fd626a11bcb51fd499cab6aa24ba3c1ac1f4603a
src/js/settings.js
src/js/settings.js
this.mmooc = this.mmooc || {}; // Course ID for selected course, which frontend page // will be swapped with All Courses list const allCoursesFrontpageCourseID = 14; this.mmooc.settings = { CanvaBadgeProtocolAndHost: 'https://canvabadges-beta-iktsenteret.bibsys.no', useCanvaBadge: false, defaultNumberOfReviews:...
this.mmooc = this.mmooc || {}; // Course ID for selected course, which frontend page // will be swapped with All Courses list const allCoursesFrontpageCourseID = 1; this.mmooc.settings = { CanvaBadgeProtocolAndHost: 'https://canvabadges-beta-iktsenteret.bibsys.no', useCanvaBadge: false, defaultNumberOfReviews: ...
Set allCoursesFrontpageCourseID to 1 as default.
Set allCoursesFrontpageCourseID to 1 as default.
JavaScript
mit
matematikk-mooc/frontend,matematikk-mooc/frontend
--- +++ @@ -2,7 +2,7 @@ // Course ID for selected course, which frontend page // will be swapped with All Courses list -const allCoursesFrontpageCourseID = 14; +const allCoursesFrontpageCourseID = 1; this.mmooc.settings = { CanvaBadgeProtocolAndHost: 'https://canvabadges-beta-iktsenteret.bibsys.no',
626ce2749810d9386c1ae8454796c0ee7cafc23c
src/link_engine.js
src/link_engine.js
var performImage = function() { var t=[]; function prepareString(withUrl) { return '<a href="' + withUrl + '"><img title="'+ withUrl +'" src="' + withUrl + '"></a>'; } // Image tags are the easiest to do. Loop thru the set, and pull up the images out Array.prototype.slice.call(document.getE...
var performImage = function() { var t=[]; function prepareString(withUrl) { return '<a href="' + withUrl + '"><img title="'+ withUrl +'" src="' + withUrl + '"></a>'; } // Image tags are the easiest to do. Loop thru the set, and pull up the images out Array.prototype.slice.call(document.getE...
Fix handling of image tag sources
Fix handling of image tag sources
JavaScript
mit
booc0mtaco/image-sourcer,booc0mtaco/image-sourcer,booc0mtaco/image-sourcer
--- +++ @@ -6,7 +6,7 @@ // Image tags are the easiest to do. Loop thru the set, and pull up the images out Array.prototype.slice.call(document.getElementsByTagName('img')).forEach(function(imgTag) { - t.push(prepareString(imgTag)); + t.push(prepareString(imgTag.src)); }); // now ...
871c29ed5273a08ca0f4a3413a62ac513c574974
client/test/reducer.spec.js
client/test/reducer.spec.js
import React from 'react'; import { expect } from 'chai'; import { List as ImmutableList, Map } from 'immutable'; import reducer from '../src/reducer'; describe('reducer', () => { it('should return the initial state', () => { const actual = reducer(undefined, {}); const expected = ImmutableList.of(); ex...
import React from 'react'; import { expect } from 'chai'; import { List as ImmutableList, Map } from 'immutable'; import reducer from '../src/reducer'; describe('reducer', () => { it('should return the initial state', () => { const actual = reducer(undefined, {}); const expected = ImmutableList.of(); ex...
Add missing test for reducer action CLEAR_CUSTOMIZATION
Add missing test for reducer action CLEAR_CUSTOMIZATION
JavaScript
mit
marlonbernardes/coding-stickers,marlonbernardes/coding-stickers
--- +++ @@ -18,4 +18,18 @@ expect(actual).to.eql(expected); }); + describe('CLEAR_CUSTOMIZATION', () => { + it('should return an empty list', () => { + const sticker = new Map({ id: 100, image: 'foo.png' }); + const actual = reducer( + ImmutableList.of(sticker, sticker), + { type...
bb5b1ebe76361ccf064f96d4c0036e29017946e9
frontend/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js
frontend/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js
//= require spree/frontend/viewport Spree.fetchProductCarousel = function (taxonId, htmlContainer) { return $.ajax({ url: Spree.routes.product_carousel(taxonId) }).done(function (data) { htmlContainer.html(data); htmlContainer.find('.carousel').carouselBootstrap4() }) } Spree.loadCarousel = function...
//= require spree/frontend/viewport Spree.fetchProductCarousel = function (taxonId, htmlContainer) { return $.ajax({ url: Spree.routes.product_carousel(taxonId) }).done(function (data) { htmlContainer.html(data); htmlContainer.find('.carousel').carouselBootstrap4() }) } Spree.loadCarousel = function...
Fix homepage carousels on iOS
[SD-770] Fix homepage carousels on iOS
JavaScript
bsd-3-clause
imella/spree,imella/spree,ayb/spree,imella/spree,ayb/spree,ayb/spree,ayb/spree
--- +++ @@ -23,7 +23,7 @@ } Spree.loadsCarouselElements = function () { - $('div[data-product-carousel').each(function (_index, element) { Spree.loadCarousel(element, this) }) + $('div[data-product-carousel]').each(function (_index, element) { Spree.loadCarousel(element, this) }) } document.addEventListener...
1b5f10b9c975b8a055d830e8ac5e112dd059c7d5
electron/index.js
electron/index.js
var menubar = require('menubar'); var ipc = require('ipc'); var shell = require('shell') var mb = menubar({ dir: __dirname, width: 280, height: 87 }); mb.on('ready', function ready () { require('../server'); }) ipc.on('browser', function browser (ev) { shell.openExternal('http://localhost:3000') }) i...
var menubar = require('menubar'); var ipc = require('ipc'); var shell = require('shell') var mb = menubar({ dir: __dirname, width: 280, height: 87, icon: __dirname + '/Icon.png' }); mb.on('ready', function ready () { require('../server'); }) ipc.on('browser', function browser (ev) { shell.openExte...
Fix for updated default icon name
Fix for updated default icon name
JavaScript
mit
origingod/lightning,karissa/lightning,lightning-viz/lightning,cournape/lightning,cournape/lightning,lightning-viz/lightning,origingod/lightning,karissa/lightning
--- +++ @@ -5,7 +5,8 @@ var mb = menubar({ dir: __dirname, width: 280, - height: 87 + height: 87, + icon: __dirname + '/Icon.png' }); mb.on('ready', function ready () {
c8f91cf8b2d5b1d0c59e80b3c0fb9f25a49d935e
src/api/index.js
src/api/index.js
import moment from 'moment'; import { maxPages } from '../../data/config'; // Prevent webpack window problem const isBrowser = () => typeof window !== 'undefined'; const isPage = () => (isBrowser() ? window.location.pathname.indexOf('page') === -1 : false); const getCurrentPage = () => { if (isBrowser() === true) ...
import moment from 'moment'; import { maxPages } from '../../data/config'; // Prevent webpack window problem const isBrowser = () => typeof window !== 'undefined'; const isPage = () => (isBrowser() ? window.location.pathname.indexOf('page') === -1 : false); const getCurrentPage = () => { if (isBrowser() === true) ...
Fix date bug in moment.js
Fix date bug in moment.js
JavaScript
mit
calpa/blog
--- +++ @@ -26,7 +26,7 @@ const parseDate = date => moment(date).locale('zh-hk').format('YYYY/MM/DD'); -const parseChineseDate = date => moment(date).locale('zh-hk').format('L'); +const parseChineseDate = date => moment(date).locale('zh-hk').format('DD/MM/YYYY'); const isFirstPage = () => (isBrowser() ? isPag...