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 |
|---|---|---|---|---|---|---|---|---|---|---|
2fa1bad5ac36807f47c184c31c36f0ecc050cea9 | draft-js-inline-toolbar-plugin/src/components/Toolbar/__test__/Toolbar.js | draft-js-inline-toolbar-plugin/src/components/Toolbar/__test__/Toolbar.js | import React, { Component } from 'react';
import { expect } from 'chai';
import { mount } from 'enzyme';
import Toolbar from '../index';
describe('Toolbar', () => {
it('allows children to override the content', (done) => {
const structure = [class Child extends Component {
componentDidMount() {
set... | import React, { Component } from 'react';
import { expect } from 'chai';
import { mount } from 'enzyme';
import Toolbar from '../index';
describe('Toolbar', () => {
it('allows children to override the content', (done) => {
const structure = [class Child extends Component {
componentDidMount() {
set... | Fix test for inline toolbar | Fix test for inline toolbar
| JavaScript | mit | draft-js-plugins/draft-js-plugins,dagopert/draft-js-plugins,nikgraf/draft-js-plugin-editor,nikgraf/draft-js-plugin-editor,draft-js-plugins/draft-js-plugins,dagopert/draft-js-plugins,nikgraf/draft-js-plugin-editor,draft-js-plugins/draft-js-plugins,dagopert/draft-js-plugins,draft-js-plugins/draft-js-plugins | ---
+++
@@ -28,7 +28,7 @@
unsubscribeFromItem() {},
getItem: (name) => ({
getEditorState: () => ({
- getSelection: () => ({ isCollapsed: () => true })
+ getSelection: () => ({ isCollapsed: () => true, getHasFocus: () => true })
})
}[name])
}; |
9034a21f2762b6b01d6dc45a9f049e60cf3d7439 | addon/components/course-publicationcheck.js | addon/components/course-publicationcheck.js | /* eslint-disable ember/no-computed-properties-in-native-classes */
import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
export default class CoursePublicationCheckComponent extends Component {
@service router;
get showUnlinkIcon() {
if (!this.args.course.courseObjec... | /* eslint-disable ember/no-computed-properties-in-native-classes */
import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
import { use } from 'ember-could-get-used-to-this';
import ResolveAsyncValue from 'ilios-common/classes/resolve-async-value';
export default class CoursePu... | Resolve objectives in course publication check | Resolve objectives in course publication check
We can also use the length value of the relationship to check if there
are parents which engages auto tracking.
| JavaScript | mit | ilios/common,ilios/common | ---
+++
@@ -1,17 +1,17 @@
/* eslint-disable ember/no-computed-properties-in-native-classes */
import Component from '@glimmer/component';
import { inject as service } from '@ember/service';
+import { use } from 'ember-could-get-used-to-this';
+import ResolveAsyncValue from 'ilios-common/classes/resolve-async-value... |
5d9f0dbd9e287ad320f020238ab6d3e66ffb2f49 | addon/components/floating-mobile-buttons.js | addon/components/floating-mobile-buttons.js | import Ember from 'ember';
import layout from '../templates/components/floating-mobile-buttons';
export default Ember.Component.extend({
layout,
tagName: 'ul',
classNames: ['floating-buttons'],
classNameBindings: ['active:active', 'bottom:bottom', 'top:top', 'left:left', 'right:right'],
active: false,
chil... | import Ember from 'ember';
import layout from '../templates/components/floating-mobile-buttons';
export default Ember.Component.extend({
layout,
tagName: 'ul',
classNames: ['floating-buttons'],
classNameBindings: ['active:active', 'bottom:bottom', 'top:top', 'left:left', 'right:right'],
active: false,
chil... | Use the afterRender run loop to check if has children | Use the afterRender run loop to check if has children
| JavaScript | mit | yontxu/ember-floating-mobile-buttons,yontxu/ember-floating-mobile-buttons | ---
+++
@@ -12,6 +12,9 @@
position: 'bottom right',
didReceiveAttrs(){
this._super(...arguments);
+
+ this.set('active', true);
+
let classes = this.get('position').trim().split(" ");
let vClasses = classes.filter( c => {
if(c.match(/(bottom|top)/i)){
@@ -31,14 +34,12 @@
classes.fo... |
bf5b8c20974dfe7d16dde885aa02ec39471e652a | great/static/js/models/artist.js | great/static/js/models/artist.js | "use strict";
great.Artist = Backbone.Model.extend({
});
great.ArtistsCollection = Backbone.PageableCollection.extend({
model: great.Artist,
comparator: "name",
url: "/great/music/artists/",
mode: "client",
});
| "use strict";
great.Artist = Backbone.Model.extend({
urlRoot: "/great/music/artists/",
});
great.ArtistsCollection = Backbone.PageableCollection.extend({
model: great.Artist,
comparator: "name",
url: "/great/music/artists/",
mode: "client",
});
| Add a urlRoot to allow use outside of a collection. | Add a urlRoot to allow use outside of a collection.
| JavaScript | mit | Julian/Great,Julian/Great,Julian/Great | ---
+++
@@ -2,6 +2,7 @@
great.Artist = Backbone.Model.extend({
+ urlRoot: "/great/music/artists/",
});
|
8f0b0267da395ce2824122496408b4c3ac014a3d | src/camel-case.js | src/camel-case.js | import R from 'ramda';
import uncapitalize from './uncapitalize.js';
import pascalCase from './pascal-case.js';
// a -> a
const camelCase = R.compose(uncapitalize, pascalCase);
export default camelCase;
| import R from 'ramda';
import compose from './util/compose.js';
import uncapitalize from './uncapitalize.js';
import pascalCase from './pascal-case.js';
// a -> a
const camelCase = compose(uncapitalize, pascalCase);
export default camelCase;
| Refactor camelCase function to use custom compose function | Refactor camelCase function to use custom compose function
| JavaScript | mit | restrung/restrung-js | ---
+++
@@ -1,8 +1,9 @@
import R from 'ramda';
+import compose from './util/compose.js';
import uncapitalize from './uncapitalize.js';
import pascalCase from './pascal-case.js';
// a -> a
-const camelCase = R.compose(uncapitalize, pascalCase);
+const camelCase = compose(uncapitalize, pascalCase);
export defa... |
6a5598ed7f1cf85502d58e7a9b774d31419ff79c | js/kamfu.js | js/kamfu.js | $(document).ready(function() {
console.log( "ready!" );
var gameForeground = $('#gameForeground')[0];
var gameFront = $('#gameFront')[0];
var gameBack = $('#gameBack')[0];
var gameText = $('#gameText')[0];
gameCommon.setup(gameForeground, gameFront, gameBack, gameText);
var video = documen... | $(document).ready(function() {
console.log( "ready!" );
var gameForeground = $('#gameForeground')[0];
var gameFront = $('#gameFront')[0];
var gameBack = $('#gameBack')[0];
var gameText = $('#gameText')[0];
gameCommon.setup(gameForeground, gameFront, gameBack, gameText);
var video = documen... | Remove reset camera click event | Remove reset camera click event
| JavaScript | apache-2.0 | pabloalba/kam-fu,pabloalba/kam-fu | ---
+++
@@ -12,17 +12,4 @@
window.setTimeout(gameCommon.mainLoop, 100);
-
-
- $( "body" ).click(function() {
- if (gameCommon.currentGame == gameMenu) {
- var r = confirm("Reset camera?");
- if (r == true) {
- gameCommon.clearup();
- camera.initia... |
0ca2b8e525a81eedb21af53b1ac2213b8efa4dd8 | web/src/store.js | web/src/store.js | import { compose, createStore, applyMiddleware } from 'redux'
import persistState from 'redux-localstorage'
import thunk from 'redux-thunk'
import RootReducer from 'reducers/RootReducer'
export default createStore(
RootReducer,
compose(
applyMiddleware(thunk),
persistState(['user']),
window.__REDUX_DE... | import { compose, createStore, applyMiddleware } from 'redux'
import persistState from 'redux-localstorage'
import thunk from 'redux-thunk'
import RootReducer from 'reducers/RootReducer'
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
export default createStore(
RootReducer,
compo... | Fix Redux DevTools for mobile | Fix Redux DevTools for mobile
| JavaScript | mit | RailsRoading/wissle,RailsRoading/wissle,RailsRoading/wissle | ---
+++
@@ -4,11 +4,12 @@
import RootReducer from 'reducers/RootReducer'
+const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
+
export default createStore(
RootReducer,
- compose(
+ composeEnhancers(
+ persistState(['user']),
applyMiddleware(thunk),
- persistState(['u... |
dc5f805dcea6d0c1dd27a98cadbf2290a323ea87 | javascript/staticsearch.js | javascript/staticsearch.js | jQuery(function($) {
$('#tipue_search_input').tipuesearch({
'mode': 'static',
'contentLocation': '/search_index'
});
$("form.no-pageload input").keypress(function(e){
var k = e.keyCode || e.which;
if(k == 13){
e.preventDefault();
}
});
$("form.button-submit input.submit-button").click(function(e){
... | jQuery(function($) {
//prevent undeclared variable
var tipuesearch = {"pages": [
{"title": "", "text":"", "tags":"", "loc":""}
]};
$('#tipue_search_input').tipuesearch({
'mode': 'static',
'contentLocation': '/search_index'
});
$("form.no-pageload input").keypress(function(e){
var k = e.keyCode || e.wh... | Fix undefined error when no search file found | BUG: Fix undefined error when no search file found
| JavaScript | bsd-3-clause | adrexia/silverstripe-staticsearch,adrexia/silverstripe-staticsearch | ---
+++
@@ -1,4 +1,10 @@
jQuery(function($) {
+
+ //prevent undeclared variable
+ var tipuesearch = {"pages": [
+ {"title": "", "text":"", "tags":"", "loc":""}
+ ]};
+
$('#tipue_search_input').tipuesearch({
'mode': 'static',
'contentLocation': '/search_index' |
5c2e5defbe12f099b627ac83302e1caa818d0093 | lib/Post.js | lib/Post.js | var config = require('../config.json');
var modIDs = config.modIDs;
/**
* A single Facebook post or comment.
* @class
*/
var Post = module.exports = function (id) {
/** @member {string} */
this.id = id;
/** @member {string} */
this.from = '';
/** @member {string} */
this.message = '';
};
/**
* Con... | var config = require('../config.json');
var modIDs = config.modIDs;
/**
* A single Facebook post or comment.
* @class
*/
var Post = module.exports = function (id) {
/** @member {string} */
this.id = id;
/** @member {string} */
this.from = '';
/** @member {string} */
this.message = '';
};
/**
* Con... | Fix message processing for sticker comments. | Fix message processing for sticker comments.
| JavaScript | bsd-3-clause | HHDesign/hackbot,rhallie15/hackbot,kern/hackbot,kern/hackbot,samuelcouch/hackbot,rubinovitz/hackbot | ---
+++
@@ -26,7 +26,7 @@
Post.fromRaw = function (raw) {
var post = new Post(raw.id);
post.from = raw.from ? raw.from.id : '0';
- post.message = raw.message;
+ post.message = raw.message || '';
return post;
};
|
48b850d5ba1cdda06a55b8ae5d2727c5c8b4bde4 | lib/deck.js | lib/deck.js | var _ = require("lodash");
var EventEmitter = require("events").EventEmitter;
var util = require("util");
var ItemCollection = require("./itemcollection");
function Deck(options) {
if (!(this instanceof Deck)) { return new Deck(options); }
EventEmitter.call(this);
this.itemCollection = options.itemCollection ||... | var _ = require("lodash");
var EventEmitter = require("events").EventEmitter;
var util = require("util");
var ItemCollection = require("./itemcollection");
var ItemRenderer = require("./itemrenderer");
function Deck(options) {
if (!(this instanceof Deck)) { return new Deck(options); }
EventEmitter.call(this);
t... | Create ItemRenderer from options passed to Deck | Create ItemRenderer from options passed to Deck
| JavaScript | mit | pellucidanalytics/decks,pellucidanalytics/decks | ---
+++
@@ -2,13 +2,14 @@
var EventEmitter = require("events").EventEmitter;
var util = require("util");
var ItemCollection = require("./itemcollection");
+var ItemRenderer = require("./itemrenderer");
function Deck(options) {
if (!(this instanceof Deck)) { return new Deck(options); }
EventEmitter.call(th... |
0ffa589122d21ab32099ec377ddbab6be15a593a | lib/exec.js | lib/exec.js | 'use strict';
var shell = require('shelljs');
var cmd = require('./cmd');
// Execute msbuild.exe with passed arguments
module.exports = function exec(args) {
process.exit(shell.exec(cmd(args)).code);
}
| 'use strict';
var shell = require('shelljs');
var cmd = require('./cmd');
// Execute nuget.exe with passed arguments
module.exports = function exec(args) {
const result = shell.exec(cmd(args)).code;
if (result !== 0) {
console.log();
console.log(`NuGet failed. ERRORLEVEL '${result}'.'`)
... | Fix handling of NuGet errors | Fix handling of NuGet errors
| JavaScript | mit | TimMurphy/npm-nuget | ---
+++
@@ -3,7 +3,13 @@
var shell = require('shelljs');
var cmd = require('./cmd');
-// Execute msbuild.exe with passed arguments
+// Execute nuget.exe with passed arguments
module.exports = function exec(args) {
- process.exit(shell.exec(cmd(args)).code);
+ const result = shell.exec(cmd(args)).code;
+ ... |
bc80e82a05c0a7b19e538ff3773f8966e1bf28f8 | lib/main.js | lib/main.js | 'use babel'
const FS = require('fs')
const Path = require('path')
const {View} = require('./view')
const callsite = require('callsite')
import {guessName, installPackages, packagesToInstall} from './helpers'
// Renamed for backward compatibility
if (typeof window.__steelbrain_package_deps === 'undefined') {
window._... | 'use babel'
const FS = require('fs')
const Path = require('path')
const {View} = require('./view')
const callsite = require('callsite')
import {guessName, installPackages, packagesToInstall} from './helpers'
// Renamed for backward compatibility
if (typeof window.__steelbrain_package_deps === 'undefined') {
window._... | Handle failure in name guessing | :art: Handle failure in name guessing
| JavaScript | mit | steelbrain/package-deps,openlawlibrary/package-deps,steelbrain/package-deps | ---
+++
@@ -12,7 +12,12 @@
export function install(name = null, enablePackages = false) {
if (!name) {
- name = guessName(require('callsite')()[1].getFileName())
+ const filePath = require('callsite')()[1].getFileName()
+ name = guessName(filePath)
+ if (!name) {
+ console.log(`Unable to get pa... |
763e147ba669365e5f38f5b27c0dc1367087c031 | lib/util.js | lib/util.js | "use strict";
var Class = require("./Class");
var CompileError = exports.CompileError = Class.extend({
initialize: function () {
switch (arguments.length) {
case 2: // token, text
this._filename = arguments[0].filename;
this._pos = arguments[0].pos;
this._message = arguments[1];
break;
case 3: // ... | "use strict";
var Class = require("./Class");
var CompileError = exports.CompileError = Class.extend({
initialize: function () {
switch (arguments.length) {
case 2: // token, text
this._filename = arguments[0].filename;
this._pos = arguments[0].pos;
this._message = arguments[1];
break;
case 3: // ... | Fix error handling in lexer | Fix error handling in lexer
| JavaScript | mit | mattn/JSX,jsx/JSX,jsx/JSX,dj31416/JSX,dj31416/JSX,mattn/JSX,jsx/JSX,jsx/JSX,dj31416/JSX,dj31416/JSX,jsx/JSX,dj31416/JSX | ---
+++
@@ -15,8 +15,9 @@
this._filename = arguments[0];
this._pos = arguments[1];
this._message = arguments[2];
+ break;
default:
- throw new Error();
+ throw new Error("Unrecognized arguments for CompileError: " + JSON.stringify( Array.prototype.slice.call(arguments) ));
}
},
@@ -52,3 +5... |
581b1239c070873fbede643c04b654067d5468a5 | src/redux/__tests__/random.test.js | src/redux/__tests__/random.test.js | import { expect } from 'chai';
import Immutable from 'immutable';
import { createReducer } from 'rook/lib/redux/createStore';
import reducers from '../modules';
const reducer = createReducer(reducers.random);
describe('redux', () => {
describe('reducers', () => {
describe('random', () => {
const initialSta... | import { expect } from 'chai';
import Immutable from 'immutable';
import createReducer from 'rook/lib/redux/createReducer';
import reducers from '../modules';
const reducer = createReducer(reducers.random);
describe('redux', () => {
describe('reducers', () => {
describe('random', () => {
const initialState... | Update path to createReducer function | Update path to createReducer function
| JavaScript | mit | apazzolini/rook-starter | ---
+++
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import Immutable from 'immutable';
-import { createReducer } from 'rook/lib/redux/createStore';
+import createReducer from 'rook/lib/redux/createReducer';
import reducers from '../modules';
const reducer = createReducer(reducers.random);
|
a92dcb2c0c3b6fb4f79de28c18b3b0dd357d139d | app/components/text-search.js | app/components/text-search.js | export default Ember.TextField.extend(Ember.TargetActionSupport, {
change: function() {
this.triggerAction({
action: 'search'
});
},
insertNewline: function() {
this.triggerAction({
action: 'search'
});
}
});
| export default Ember.TextField.extend(Ember.TargetActionSupport, {
change: function() {
this.triggerAction({
action: 'search'
});
}
});
| Fix for search not working when pressing the enter key. | Fix for search not working when pressing the enter key.
| JavaScript | mit | HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend | ---
+++
@@ -3,11 +3,5 @@
this.triggerAction({
action: 'search'
});
- },
-
- insertNewline: function() {
- this.triggerAction({
- action: 'search'
- });
}
}); |
35a6c36ed93b5e45026707925851c1792099aff6 | test/commands/domains/index.js | test/commands/domains/index.js | 'use strict';
let nock = require('nock');
let cmd = require('../../../commands/domains');
let expect = require('chai').expect;
describe('domains', function() {
beforeEach(() => cli.mockConsole());
it('shows the domains', function() {
let api = nock('https://api.heroku.com:443')
.get('/apps/myapp/d... | 'use strict';
let nock = require('nock');
let cmd = require('../../../commands/domains');
let expect = require('chai').expect;
describe('domains', function() {
beforeEach(() => cli.mockConsole());
it('shows the domains', function() {
let api = nock('https://api.heroku.com:443')
.get('/apps/myapp/d... | Fix domains test after pull & npm install | Fix domains test after pull & npm install
| JavaScript | isc | heroku/heroku-apps,heroku/heroku-apps | ---
+++
@@ -21,7 +21,7 @@
=== myapp Custom Domains
Domain Name DNS Target
─────────── ──────────
-myapp.com myapp.com
+myapp.com myapp.com
`))
.then(() => api.done());
}); |
6772db0ad6d5b4733a9101537795f5fb9dfe3fe1 | src/common/core.js | src/common/core.js | var d3 = window.d3;
var previousD3ma = window.d3.ma;
var d3ma = d3.ma = {};
d3ma.noConflict = function() {
window.d3ma= previousD3ma;
return d3ma;
};
d3ma.assert = function(test, message) {
if(test) { return; }
throw new Error('[d3.ma] ' + message);
};
d3ma.assert(d3, 'd3.js is required');
d3ma.assert( typeof... | var d3 = window.d3;
var previousD3ma = window.d3.ma;
var d3ma = d3.ma = {};
d3ma.noConflict = function() {
window.d3ma= previousD3ma;
return d3ma;
};
d3ma.assert = function(test, message) {
if(test) { return; }
throw new Error('[d3.ma] ' + message);
};
d3ma.assert(d3, 'd3.js is required');
d3ma.assert( typeof... | Update the d3ma var, make it more global like d3.ma | Update the d3ma var, make it more global like d3.ma
| JavaScript | mit | mattma/d3.ma.js | ---
+++
@@ -18,7 +18,7 @@
d3ma.assert( typeof d3.version === 'string' && d3.version.match(/^3/), 'd3.js version 3 is required' );
-d3.ma.version = '0.1.0';
+d3ma.version = '0.1.0';
|
0483e4269e66992329f0c451d2188a2230f7b81c | static/js/components/CourseList.js | static/js/components/CourseList.js | import React from 'react';
import { makeCourseStatusDisplay } from '../util/util';
class CourseList extends React.Component {
render() {
const { dashboard, courseList } = this.props;
let dashboardLookup = {};
for (let course of dashboard.courses) {
dashboardLookup[course.id] = course;
}
l... | import React from 'react';
import _ from 'lodash';
import { makeCourseStatusDisplay } from '../util/util';
class CourseList extends React.Component {
render() {
const { dashboard } = this.props;
let sortedCourses = _.sortBy(dashboard.courses, 'position_in_program');
let table = sortedCourses.map(cours... | Use only information from dashboard API for dashboard display. | Use only information from dashboard API for dashboard display.
This fixes a problem with course run ids which may not exist
| JavaScript | bsd-3-clause | mitodl/micromasters,mitodl/micromasters,mitodl/micromasters,mitodl/micromasters | ---
+++
@@ -1,43 +1,37 @@
import React from 'react';
+import _ from 'lodash';
import { makeCourseStatusDisplay } from '../util/util';
class CourseList extends React.Component {
render() {
- const { dashboard, courseList } = this.props;
- let dashboardLookup = {};
- for (let course of dashboard.cour... |
1505e4cae9730677d513c81d4cd66df1017e09e5 | src/elementType.js | src/elementType.js | import React from 'react';
import createChainableTypeChecker from './utils/createChainableTypeChecker';
function elementType(props, propName, componentName, location, propFullName) {
const propValue = props[propName];
const propType = typeof propValue;
if (React.isValidElement(propValue)) {
return new Erro... | import React from 'react';
import createChainableTypeChecker from './utils/createChainableTypeChecker';
function elementType(props, propName, componentName, location, propFullName) {
const propValue = props[propName];
const propType = typeof propValue;
if (React.isValidElement(propValue)) {
return new Er... | Update for new React types, context, forwardRef, etc | Update for new React types, context, forwardRef, etc | JavaScript | mit | react-bootstrap/prop-types-extra | ---
+++
@@ -5,7 +5,7 @@
function elementType(props, propName, componentName, location, propFullName) {
const propValue = props[propName];
const propType = typeof propValue;
-
+
if (React.isValidElement(propValue)) {
return new Error(
`Invalid ${location} \`${propFullName}\` of type ReactElemen... |
bf6234ad7030b45fe2ae70c67d720b6fd1898fe9 | src/lib/Twilio.js | src/lib/Twilio.js | require('dotenv').config();
export const sendSMS = (message) => {
const formData = new FormData()
formData.append('body', encodeURIComponent(message))
formData.append('to', encodeURIComponent(process.env.TO_PHONE))
formData.append('from', encodeURIComponent(process.env.FROM_PHONE))
const options = {
... | require('dotenv').config()
const twilio = require('twilio')
const client = new twilio(process.env.SID, process.env.TOKEN)
const sendSMS = (message) => {
client.api.messages.create({
body: message,
to: process.env.TO_PHONE,
from: process.env.FROM_PHONE
})
.then((mes) => {
console.log(mes.sid)
... | Add sendSMS method and confirm that it works | Add sendSMS method and confirm that it works
| JavaScript | mit | severnsc/brewing-app,severnsc/brewing-app | ---
+++
@@ -1,30 +1,21 @@
-require('dotenv').config();
+require('dotenv').config()
+const twilio = require('twilio')
+const client = new twilio(process.env.SID, process.env.TOKEN)
-export const sendSMS = (message) => {
+const sendSMS = (message) => {
- const formData = new FormData()
-
- formData.append('body... |
5ca0961dbd3c171a248452726e9f283a955babb8 | src/App.js | src/App.js | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... | Add leading to zeros to single digit | Add leading to zeros to single digit
| JavaScript | mit | cauldyclark15/pomodoro,cauldyclark15/pomodoro | ---
+++
@@ -33,7 +33,7 @@
function initializedClock() {
var timeInterval = setInterval(() => {
var timex = getTimeRemaining(1000);
- console.log(timex.minute,' : ',timex.seconds);
+ console.log(timex.minute,' : ',('0' + timex.seconds).slice(-2));
if (timex.t <= 0) {
clearInterval(timeInterv... |
fb083580920b89bda2cbfc0d3be5ad5c2a0ca074 | src/jwt-request.js | src/jwt-request.js | var JWTHelper = require('./jwt-helper');
var JWTConfig = require('./jwt-config');
var JWTRequest = {
setAuthorizationHeader(options, token) {
if (!options.headers) options.headers = {};
options.headers[JWTConfig.authHeader] = `${JWTConfig.authPrefix} ${token}`;
return options;
},
... | var JWTHelper = require('./jwt-helper');
var JWTConfig = require('./jwt-config');
var JWTRequest = {
setAuthorizationHeader(options, token) {
if (!options.headers) options.headers = {};
options.headers[JWTConfig.authHeader] = `${JWTConfig.authPrefix} ${token}`;
return options;
},
... | Add skipAuthorization to options instead of a variable in our method | Add skipAuthorization to options instead of a variable in our method | JavaScript | mit | iDay/react-native-http,iktw/react-native-http | ---
+++
@@ -28,10 +28,10 @@
})
},
- fetch(url, options, skipAuthorization) {
+ fetch(url, options) {
options = options || {};
- if (skipAuthorization) {
+ if (options.skipAuthorization) {
return this.handleUnAuthorizedFetch(url, options);
} else {
... |
bb89d991e9495f15d6fabed5be9441177003b716 | bin/bin-executor.js | bin/bin-executor.js | 'use strict';
const yarpm = require('../lib');
const argv = process.argv.slice(2);
exports.run = function run(options) {
yarpm(argv, Object.assign({stdin: process.stdin, stdout: process.stdout, stderr: process.stderr}, options || {}))
// Not sure why, but sometimes the process never exits on Git Bash (MINGW64)
... | 'use strict';
const yarpm = require('../lib');
const argv = process.argv.slice(2);
exports.run = function run(options) {
yarpm(argv, Object.assign({stdin: process.stdin, stdout: process.stdout, stderr: process.stderr}, options || {}))
// Not sure why, but sometimes the process never exits on Git Bash (MINGW64)
... | Make it work on Node 4 | Make it work on Node 4
Node 4 does not support destructuring. | JavaScript | mit | BendingBender/yarpm,BendingBender/yarpm | ---
+++
@@ -7,7 +7,7 @@
exports.run = function run(options) {
yarpm(argv, Object.assign({stdin: process.stdin, stdout: process.stdout, stderr: process.stderr}, options || {}))
// Not sure why, but sometimes the process never exits on Git Bash (MINGW64)
- .then(({code}) => process.exit(code))
+ .then((res... |
3f7dba1f6063671e1a0ec6f9b547c7aa05b85260 | src/js/directives/textfit.js | src/js/directives/textfit.js | 'use strict';
// Directive for using http://www.jacklmoore.com/autosize/
angular.module('Teem')
.directive('textfit',[
'$timeout',
function($timeout) {
return {
link: function(scope, element, attrs) {
textFit(element);
scope.$watch(attrs.ngBind, function() {
$timeout(() => {
... | 'use strict';
// Directive for using http://www.jacklmoore.com/autosize/
angular.module('Teem')
.directive('textfit',[
'$timeout',
function($timeout) {
return {
link: function(scope, element, attrs) {
scope.$watch(attrs.ngBind, function() {
$timeout(() => {
textFit(element);... | Remove first call to textFit | Remove first call to textFit
| JavaScript | agpl-3.0 | P2Pvalue/teem,P2Pvalue/teem,P2Pvalue/pear2pear,Grasia/teem,P2Pvalue/teem,Grasia/teem,P2Pvalue/pear2pear,Grasia/teem | ---
+++
@@ -7,8 +7,6 @@
function($timeout) {
return {
link: function(scope, element, attrs) {
- textFit(element);
-
scope.$watch(attrs.ngBind, function() {
$timeout(() => {
textFit(element); |
115a2e1b9c0cad8c5a05c13a73569daff11c76a3 | root/test/spec/controllers/action.js | root/test/spec/controllers/action.js | 'use strict';
describe('Controller: ActionCtrl', function () {
// load the controller's module
beforeEach(module('nameApp'));
var ActionCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
ActionCtrl = $con... | 'use strict';
describe('Controller: ActionCtrl', function () {
// load the controller's module
beforeEach(module('geboHai'));
var ActionCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
ActionCtrl = $con... | Correct app name in ActionCtrl tests | Correct app name in ActionCtrl tests
| JavaScript | mit | RaphaelDeLaGhetto/grunt-init-gebo-hai | ---
+++
@@ -3,7 +3,7 @@
describe('Controller: ActionCtrl', function () {
// load the controller's module
- beforeEach(module('nameApp'));
+ beforeEach(module('geboHai'));
var ActionCtrl,
scope; |
1c0597d51a0ff4646bff7ffe895cd7ac8c1e77c2 | client/components/Loading.js | client/components/Loading.js | import React from 'react';
import { CircularProgress } from 'material-ui/Progress';
import Text from './Text';
const Loading = ({ message }) => (
<div className="loading">
<CircularProgress
size={300}
thickness={7}
mode="indeterminate"
/>
<Text>{message}</Text>
<style jsx>{`
.... | import React from 'react';
import { CircularProgress } from 'material-ui/Progress';
import Text from './Text';
const Loading = ({ message }) => (
<div className="loading">
<CircularProgress size={300} mode="indeterminate" />
<Text>{message}</Text>
<style jsx>{`
.loading {
width: 100%;
... | Remove obsolete prop from CircularProgress. | client: Remove obsolete prop from CircularProgress.
| JavaScript | mit | u-wave/hub | ---
+++
@@ -4,11 +4,7 @@
const Loading = ({ message }) => (
<div className="loading">
- <CircularProgress
- size={300}
- thickness={7}
- mode="indeterminate"
- />
+ <CircularProgress size={300} mode="indeterminate" />
<Text>{message}</Text>
<style jsx>{`
.loading { |
ae3c0d72e26ec037aac7290fbb248386e35a04c9 | scripts/get-latest-platform-tests.js | scripts/get-latest-platform-tests.js | "use strict";
if (process.env.NO_UPDATE) {
process.exit(0);
}
const path = require("path");
const fs = require("fs");
const request = require("request");
// Pin to specific version, reflecting the spec version in the readme.
//
// To get the latest commit:
// 1. Go to https://github.com/w3c/web-platform-tests/tree... | "use strict";
if (process.env.NO_UPDATE) {
process.exit(0);
}
const path = require("path");
const fs = require("fs");
const request = require("request");
// Pin to specific version, reflecting the spec version in the readme.
//
// To get the latest commit:
// 1. Go to https://github.com/w3c/web-platform-tests/tree... | Update to include latest web platform tests | Update to include latest web platform tests
Includes https://github.com/w3c/web-platform-tests/pull/5146.
| JavaScript | mit | jsdom/whatwg-url,jsdom/whatwg-url,jsdom/whatwg-url | ---
+++
@@ -14,7 +14,7 @@
// 1. Go to https://github.com/w3c/web-platform-tests/tree/master/url
// 2. Press "y" on your keyboard to get a permalink
// 3. Copy the commit hash
-const commitHash = "5de931eafc9ca8d6de6a138015311812943755ac";
+const commitHash = "634175d64d1f3ec26e2a674b294e71738624c77c";
const sou... |
a2b90b5f99c4b4bf0b9049001b1288cc57128259 | src/routes/index.js | src/routes/index.js | const router = require('express').Router()
const nonUser = require('./non-user')
const user = require('./user-only')
router.use((req, res, next) => {
let loggedIn = false
if (req.session.user) {
loggedIn = true
}
res.locals = {loggedIn}
next()
})
router.use('/', nonUser)
router.use('/', user)
module.ex... | const router = require('express').Router()
const nonUser = require('./non-user')
const user = require('./user-only')
router.use((req, res, next) => {
let loggedIn = false
let userId = null
if (req.session.user) {
loggedIn = true
userId = req.session.user.user_id
}
res.locals = {loggedIn, userId}
co... | Add user id of logged in user to res.locals | Add user id of logged in user to res.locals
| JavaScript | mit | Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge | ---
+++
@@ -4,10 +4,13 @@
router.use((req, res, next) => {
let loggedIn = false
+ let userId = null
if (req.session.user) {
loggedIn = true
+ userId = req.session.user.user_id
}
- res.locals = {loggedIn}
+ res.locals = {loggedIn, userId}
+ console.log(res.locals);
next()
})
|
b23cdded1bd8067bbd6312dc38379bf7f22b5769 | src/scripts/main.js | src/scripts/main.js | /*global jQuery:false*/
(function($) {
function equalize() {
var elements = $('.left, .right');
var max_height = Math.max.apply(
null,
elements.map(function(index, elt) {
return $(elt).height();
})
);
elements.each(function(index, e... | /*global jQuery:false*/
(function($) {
function equalize() {
var elements = $('.left, .right');
var max_height = Math.max.apply(
null,
elements.map(function(index, elt) {
return $(elt).height();
})
);
elements.each(function(index, e... | Disable column equalization before print. | Disable column equalization before print.
| JavaScript | mit | NealRame/CV,NealRame/Blog,NealRame/Blog,NealRame/Blog,NealRame/CV | ---
+++
@@ -21,7 +21,24 @@
$(last_child).height(last_child_bbox.height + d);
});
}
+
+ function before_print() {
+ $('.left, .right').each(function(index, elt) {
+ $(elt).add($('section', elt).last()[0]).removeAttr('style');
+ });
+ }
+
$(window)
... |
0e00766548766aa280a0a5410c4019745e20c46e | lib/transport/browser/websocket.js | lib/transport/browser/websocket.js | 'use strict';
var Driver = global.WebSocket || global.MozWebSocket;
if (Driver) {
module.exports = function WebSocketBrowserDriver(url) {
return new Driver(url);
};
}
| 'use strict';
var Driver = global.WebSocket || global.MozWebSocket;
if (Driver) {
module.exports = function WebSocketBrowserDriver(url) {
return new Driver(url);
};
} else {
module.exports = undefined;
}
| FIX error with webpack when WebSocket not exists | FIX error with webpack when WebSocket not exists
When building with webpack and you didn't define module.exports it will default to an empty object {}
So when transport.enabled test !!WebSocketDriver it returns true instead of false. | JavaScript | mit | sockjs/sockjs-client,sockjs/sockjs-client,sockjs/sockjs-client | ---
+++
@@ -5,4 +5,6 @@
module.exports = function WebSocketBrowserDriver(url) {
return new Driver(url);
};
+} else {
+ module.exports = undefined;
} |
8db5f375995f8b9f77679badab0e03beba9062c7 | config/webpack/development.js | config/webpack/development.js | // Note: You must restart bin/webpack-watcher for changes to take effect
const merge = require('webpack-merge')
const common = require('./common.js')
const { resolve } = require('path')
const { devServer, publicPath, paths } = require('./configuration.js')
module.exports = merge(common, {
devtool: 'sourcemap',
... | // Note: You must restart bin/webpack-watcher for changes to take effect
const merge = require('webpack-merge')
const common = require('./common.js')
const { resolve } = require('path')
const { devServer, publicPath, paths } = require('./configuration.js')
module.exports = merge(common, {
devtool: 'sourcemap',
... | Use webpack dev server as proxy to rails | Use webpack dev server as proxy to rails
| JavaScript | agpl-3.0 | jgraichen/mnemosyne-server,jgraichen/mnemosyne-server,jgraichen/mnemosyne-server | ---
+++
@@ -21,6 +21,7 @@
host: devServer.host,
port: devServer.port,
contentBase: resolve(paths.output, paths.entry),
+ proxy: {'/': 'http://localhost:9000'},
publicPath
}
}) |
94f16a05a78b2bf71c01f47e2bb575cc68db709a | config/webpack/loaders/vue.js | config/webpack/loaders/vue.js | const { dev_server: devServer } = require('@rails/webpacker').config;
const isProduction = process.env.NODE_ENV === 'production';
const inDevServer = process.argv.find(v => v.includes('webpack-dev-server'));
const extractCSS = !(inDevServer && (devServer && devServer.hmr)) || isProduction;
module.exports = {
test: ... | const { dev_server: devServer } = require('@rails/webpacker').config;
const isProduction = process.env.NODE_ENV === 'production';
const inDevServer = process.argv.find(v => v.includes('webpack-dev-server'));
const extractCSS = !(inDevServer && (devServer && devServer.hmr)) || isProduction;
module.exports = {
test: ... | Use new Vue whitespace optimization | Use new Vue whitespace optimization
| JavaScript | agpl-3.0 | harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o | ---
+++
@@ -11,8 +11,6 @@
options: {extractCSS,
// Enabled to prevent annotations from incurring incorrect
// offsets due to extra whitespace in templates
- // TODO - the next Vue release introduces an even more useful
- // type of whitespace trimming: http... |
575d973524bd2d953a9615c66dcf8e409e40bab9 | console/server/node-server.js | console/server/node-server.js | const MONGOOSE_CONSOLE_DEFAULT_PORT = 8080;
const PROMETHEUS_CONFIGURATION_PATH = '/configuration/prometheus.yml';
var express = require('express');
var bodyParser = require('body-parser');
var fs = require('fs');
var app = express();
var path = __dirname + '';
var port = process.env.CONSOLE_PORT || MONGOOSE_CONSOLE... | const MONGOOSE_CONSOLE_DEFAULT_PORT = 8080;
const PROMETHEUS_CONFIGURATION_PATH = '/configuration/prometheus.yml';
var express = require('express');
var bodyParser = require('body-parser');
var fs = require('fs');
var cors = require('cors')
var app = express();
var path = __dirname + '';
var port = process.env.CONSO... | Add CORS to node server. | Add CORS to node server.
| JavaScript | mit | emc-mongoose/console,emc-mongoose/console,emc-mongoose/console | ---
+++
@@ -4,6 +4,7 @@
var express = require('express');
var bodyParser = require('body-parser');
var fs = require('fs');
+var cors = require('cors')
var app = express();
@@ -13,6 +14,9 @@
app.use(express.static(path));
app.use(bodyParser.json()); // NOTE: Supporting JSON-encoded bodies
app.use(express.m... |
b30815c324d90e99bb3fca25eb6d00b5cdfef4e8 | markup/components/header/header.js | markup/components/header/header.js | /* eslint-disable */
$('.nav-toggle').click(function (e) {
$('.nav-menu').slideToggle(500);
});
debounce(function(){
$(window).resize(function(){
if($(window).width() > 720){
$('.nav-menu').removeAttr('style');
}
});
}, 200);
/* eslint-enable */
| /* eslint-disable */
$('.nav-toggle').click(function (e) {
$('.nav-menu').slideToggle(500);
});
$(window).resize(function(){
if($(window).width() > 720){
$('.nav-menu').removeAttr('style');
}
});
/* eslint-enable */
| FIX - поправлен JS для адаптива меню | FIX - поправлен JS для адаптива меню
| JavaScript | mit | agolomazov/bouncy,agolomazov/bouncy | ---
+++
@@ -3,11 +3,9 @@
$('.nav-menu').slideToggle(500);
});
-debounce(function(){
- $(window).resize(function(){
- if($(window).width() > 720){
- $('.nav-menu').removeAttr('style');
- }
- });
-}, 200);
+$(window).resize(function(){
+ if($(window).width() > 720){
+ $(... |
415b7d0250887764ee9836ee823be07d45708173 | api/models/Y.js | api/models/Y.js | var keystone = require('keystone');
var Types = keystone.Field.Types;
/**
* Y Model
* ==========
*/
var Y = new keystone.List('Y');
Y.add({
name: { type: Types.Name, required: true, index: true },
email: { type: Types.Email, initial: true, required: true, index: true },
password: {
type: Types.Password,
i... | var keystone = require('keystone');
var Types = keystone.Field.Types;
/**
* Y Model
* ==========
*/
var Y = new keystone.List('Y');
Y.add({
name: { type: Types.Name, required: true, index: true },
email: { type: Types.Email, initial: true, required: true, index: true },
password: {
type: Types.Password,
ini... | Remove password as hidden field | Remove password as hidden field
| JavaScript | mit | chrisslater/snapperfish | ---
+++
@@ -10,11 +10,10 @@
Y.add({
name: { type: Types.Name, required: true, index: true },
email: { type: Types.Email, initial: true, required: true, index: true },
- password: {
- type: Types.Password,
- initial: true,
+ password: {
+ type: Types.Password,
+ initial: true,
required: true,
- hidden:... |
941c1565dbc89005b99b9302370028cbd5c820c1 | components/LandingPageHero.js | components/LandingPageHero.js | import React from 'react';
import Helmet from 'react-helmet';
import Hero from './Hero';
const LandingPageHero = ({ title, headline }, { modals }) => {
return (
<div>
<Helmet title={title} />
<Hero
headline={headline}
textline={`Increase your productivity, focus on new features, and s... | import React from 'react';
import Helmet from 'react-helmet';
import Hero from './Hero';
const LandingPageHero = ({ title, headline }, { modals }) => {
return (
<div>
<Helmet title={title} />
<Hero
headline={headline}
textline={`Increase your productivity, focus on new features, and s... | Fix typo in "powerful apps" | [WEB-465] Fix typo in "powerful apps" | JavaScript | mit | Syncano/syncano.com,Syncano/syncano.com | ---
+++
@@ -35,7 +35,7 @@
LandingPageHero.defaultProps = {
title: 'Build powerful apps in half the time | Syncano',
- headline: <span>Build powerfulapps<br />in half the time</span>
+ headline: <span>Build powerful apps<br />in half the time</span>
};
LandingPageHero.contextTypes = { |
3fe151d044e6a6f4ea957e3a75105a45a2865314 | build/karma.base.js | build/karma.base.js | const buble = require('rollup-plugin-buble');
const nodeResolve = require('rollup-plugin-node-resolve');
const commonJS = require('rollup-plugin-commonjs');
module.exports = {
frameworks: ['jasmine', 'sinon'],
files: [
{
pattern: '../src/**/*.js',
watched: process.env.CI === 'true',
include... | const buble = require('rollup-plugin-buble');
const nodeResolve = require('rollup-plugin-node-resolve');
const commonJS = require('rollup-plugin-commonjs');
module.exports = {
frameworks: ['jasmine', 'sinon'],
files: [
{
pattern: '../src/**/*.js',
watched: process.env.CI !== 'true',
include... | Fix karma config. Watch files when not CI environment. | Fix karma config. Watch files when not CI environment.
| JavaScript | mit | demiazz/lighty | ---
+++
@@ -9,12 +9,12 @@
files: [
{
pattern: '../src/**/*.js',
- watched: process.env.CI === 'true',
+ watched: process.env.CI !== 'true',
included: false,
},
{
pattern: '../spec/**/*.spec.js',
- watched: process.env.CI === 'true',
+ watched: process.env.CI ... |
7652f2b6ac6e0602d5d3746e9c42173cf3730622 | templates/add-service/web-express-es6/app/index.js | templates/add-service/web-express-es6/app/index.js | // This is the main server file.
//
// It parses the command line and instantiates the two servers for this app:
const async = require('async')
const {cyan, dim, green, red} = require('chalk')
const ExoRelay = require('exorelay');
const N = require('nitroglycerin');
const {name, version} = require('../package.json')
co... | // This is the main server file.
//
// It parses the command line and instantiates the two servers for this app:
const async = require('async')
const {cyan, dim, green, red} = require('chalk')
const ExoRelay = require('exorelay');
const N = require('nitroglycerin');
const {name, version} = require('../package.json')
co... | Make the web port configurable | Make the web port configurable | JavaScript | mit | Originate/exosphere,Originate/exosphere,Originate/exosphere,Originate/exosphere | ---
+++
@@ -6,7 +6,8 @@
const ExoRelay = require('exorelay');
const N = require('nitroglycerin');
const {name, version} = require('../package.json')
-const WebServer = require('./web-server');
+const WebServer = require('./web-server')
+const port = process.env.PORT || 3000
function startExorelay (done) {
@@ ... |
476b864d53a63fd211b2faa6c40f9be4b1454526 | ui/src/shared/middleware/errors.js | ui/src/shared/middleware/errors.js | // import {replace} from 'react-router-redux'
import {authReceived, meReceived} from 'shared/actions/auth'
import {publishNotification as notify} from 'shared/actions/notifications'
import {HTTP_FORBIDDEN} from 'shared/constants'
const errorsMiddleware = store => next => action => {
if (action.type === 'ERROR_THRO... | // import {replace} from 'react-router-redux'
import {authExpired} from 'shared/actions/auth'
import {publishNotification as notify} from 'shared/actions/notifications'
import {HTTP_FORBIDDEN} from 'shared/constants'
const errorsMiddleware = store => next => action => {
if (action.type === 'ERROR_THROWN') {
co... | Use authExpired action; fix session timeout notification logic | Use authExpired action; fix session timeout notification logic
| JavaScript | agpl-3.0 | brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf | ---
+++
@@ -1,6 +1,6 @@
// import {replace} from 'react-router-redux'
-import {authReceived, meReceived} from 'shared/actions/auth'
+import {authExpired} from 'shared/actions/auth'
import {publishNotification as notify} from 'shared/actions/notifications'
import {HTTP_FORBIDDEN} from 'shared/constants'
@@ -13,... |
b5b6d9b04bec0c9e937441a60dcac34f30e0a041 | dataprep-webapp/src/app/components/preparation/creator/datasets-filters/datasets-filters-controller.js | dataprep-webapp/src/app/components/preparation/creator/datasets-filters/datasets-filters-controller.js | /* ============================================================================
Copyright (C) 2006-2016 Talend Inc. - www.talend.com
This source code is available under agreement available at
https://github.com/Talend/data-prep/blob/master/LICENSE
You should have received a copy of the agreement
along with thi... | /* ============================================================================
Copyright (C) 2006-2016 Talend Inc. - www.talend.com
This source code is available under agreement available at
https://github.com/Talend/data-prep/blob/master/LICENSE
You should have received a copy of the agreement
along with thi... | Fix unit test following merge of maintenance/1.2.0 changes. | [Test] Fix unit test following merge of maintenance/1.2.0 changes.
| JavaScript | apache-2.0 | Talend/data-prep,Talend/data-prep,Talend/data-prep | ---
+++
@@ -29,11 +29,6 @@
description: 'FAVORITE_DATASETS_DESCRIPTION'
},
{
- value: 'CERTIFIED_DATASETS',
- imageUrl: '/assets/images/inventory/certified_no_shadow.png',
- description: 'CERTIFIED_DATASETS_DESCRIPTION'
- ... |
0b5f74f9d0a3ab08b742a537e1e900765f8f52d8 | packages/resourceful-redux/src/utils/get-resources.js | packages/resourceful-redux/src/utils/get-resources.js | // Returns a list of resources by IDs or label
export default function(state, resourceName, idsOrLabel) {
const resourceSlice = state[resourceName];
if (!resourceSlice) {
return [];
}
const resources = resourceSlice.resources;
let idsList;
// This conditional handles the situation where `idsOrLabel` i... | // Returns a list of resources by IDs or list name
export default function(state, resourceName, idsOrList) {
const resourceSlice = state[resourceName];
if (!resourceSlice) {
return [];
}
const resources = resourceSlice.resources;
let idsList;
// This conditional handles the situation where `idsOrList`... | Update getResources to support lists, not labels | Update getResources to support lists, not labels
| JavaScript | mit | jmeas/resourceful-redux,jmeas/resourceful-redux | ---
+++
@@ -1,5 +1,5 @@
-// Returns a list of resources by IDs or label
-export default function(state, resourceName, idsOrLabel) {
+// Returns a list of resources by IDs or list name
+export default function(state, resourceName, idsOrList) {
const resourceSlice = state[resourceName];
if (!resourceSlice) {
... |
77749a3cc52eb8ebabbdb0f13a58338fd543b6bd | src/environment-settings-template.js | src/environment-settings-template.js | // Here you can add settings which change per environment. This file will be also used by the buildserver to inject environment specific values.
// Settings are made available through the configService.
var environmentSettings = {
host: 'localhost',
port: 8001
}
// Leave line below untouched. This how gulp file is a... | // Here you can add settings which change per environment. This file will be also used by the buildserver to inject environment specific values.
// Settings are made available through the configService.
var environmentSettings = {
host: 'localhost',
port: 8001
}
// Leave lines below untouched. This how gulp file is ... | Fix for module error in console. | Fix for module error in console.
| JavaScript | mit | robinvanderknaap/SkaeleFrontend,robinvanderknaap/SkaeleFrontend | ---
+++
@@ -5,5 +5,7 @@
port: 8001
}
-// Leave line below untouched. This how gulp file is also able to use this settings file. ('require' needs a module)
-module.exports = environmentSettings;
+// Leave lines below untouched. This how gulp file is also able to use this settings file. ('require' needs a module)
... |
a5bc2b05f6a2d948d596cb562796be98cfbd1d49 | packages/ember-model/lib/adapter.js | packages/ember-model/lib/adapter.js | Ember.Adapter = Ember.Object.extend({
find: function(record, id) {
throw new Error('Ember.Adapter subclasses must implement find');
},
findQuery: function(record, id) {
throw new Error('Ember.Adapter subclasses must implement findQuery');
},
findMany: function(record, id) {
throw new Error('Embe... | Ember.Adapter = Ember.Object.extend({
find: function(record, id) {
throw new Error('Ember.Adapter subclasses must implement find');
},
findQuery: function(klass, records, params) {
throw new Error('Ember.Adapter subclasses must implement findQuery');
},
findMany: function(klass, records, ids) {
... | Update Adapter to match API | Update Adapter to match API
| JavaScript | mit | greyhwndz/ember-model,juggy/ember-model,gmedina/ember-model,sohara/ember-model,ipavelpetrov/ember-model,asquet/ember-model,ebryn/ember-model,GavinJoyce/ember-model,zenefits/ember-model,c0achmcguirk/ember-model,asquet/ember-model,ipavelpetrov/ember-model,CondeNast/ember-model,Swrve/ember-model,ckung/ember-model,julkiewi... | ---
+++
@@ -3,11 +3,11 @@
throw new Error('Ember.Adapter subclasses must implement find');
},
- findQuery: function(record, id) {
+ findQuery: function(klass, records, params) {
throw new Error('Ember.Adapter subclasses must implement findQuery');
},
- findMany: function(record, id) {
+ findMa... |
0ede5818a3dd1d087ef4a01511d83a76390a35e3 | app/scripts/directives/help-icon.js | app/scripts/directives/help-icon.js | 'use strict';
(function() {
angular.module('ncsaas')
.directive('helpicon', ['$document', helpicon]);
function helpicon($document) {
return {
restrict: 'E',
templateUrl: "views/directives/help-icon.html",
replace: true,
scope: {
helpText: '@'
},
link: function (... | 'use strict';
(function() {
angular.module('ncsaas')
.directive('helpicon', ['$document', helpicon]);
function helpicon($document) {
return {
restrict: 'E',
templateUrl: "views/directives/help-icon.html",
replace: true,
scope: {
helpText: '@'
},
link: function (... | Hide help text if click outside element. | Hide help text if click outside element.
– SAAS-457
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -12,11 +12,12 @@
scope: {
helpText: '@'
},
- link: function ($scope, element) {
+ link: function (scope, element) {
var trigger = element;
var text = trigger.find('span');
+
trigger.css('position', 'relative');
- trigger.bind('click', funct... |
266e31e911e1337589aa5134efd194de6b124551 | src/scripts/content/toggl.js | src/scripts/content/toggl.js | 'use strict';
var userData, offlineUser;
offlineUser = localStorage.getItem('offline_users');
if (offlineUser) {
userData = JSON.parse(localStorage.getItem('offline_users-' + offlineUser));
if (userData && userData.offlineData) {
chrome.extension.sendMessage({
type: 'userToken',
apiToken: userData... | 'use strict';
var userData, offlineUser;
offlineUser = localStorage.getItem('offline_users');
if (offlineUser) {
userData = JSON.parse(localStorage.getItem('offline_users-' + offlineUser));
if (userData && userData.offlineData) {
chrome.extension.sendMessage({
type: 'userToken',
apiToken: userData... | Fix process undefined in content script | Fix process undefined in content script
Fixes #1113.
| JavaScript | bsd-3-clause | glensc/toggl-button,glensc/toggl-button,glensc/toggl-button | ---
+++
@@ -14,8 +14,9 @@
}
(function() {
- var version, source, s;
- source = `window.TogglButton = { version: "${process.env.VERSION}" }`;
+ var source, s;
+ const version = chrome.runtime.getManifest().version;
+ source = `window.TogglButton = { version: "${version}" }`;
s = document.createElement('scr... |
94a9e274fa01e834bd88e9b03dcba8a1c643120d | build/tasks/durandal.js | build/tasks/durandal.js | var gulp = require('gulp');
//var gutil = require('gulp-util');
var fs = require('fs');
var durandal = require('gulp-durandal');
var header = require('gulp-header');
var paths = require('../paths');
gulp.task('durandal', function() {
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var banner = ['/... | var gulp = require('gulp');
var fs = require('fs');
var durandal = require('gulp-durandal');
var header = require('gulp-header');
var paths = require('../paths');
gulp.task('durandal', function() {
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
var banner = ['/**',
' * Copyright (c) <%= new Dat... | Add banner to built version | Add banner to built version
| JavaScript | mit | mryellow/durandal-gulp-boilerplate,mryellow/durandal-gulp-boilerplate | ---
+++
@@ -1,5 +1,4 @@
var gulp = require('gulp');
-//var gutil = require('gulp-util');
var fs = require('fs');
var durandal = require('gulp-durandal');
var header = require('gulp-header'); |
ebd672e35424298de480a1e19c7ac57bd0b78e67 | app/utils/socketIO.js | app/utils/socketIO.js | 'use strict';
/*
* Socket.io related things go !
*/
import { log, LOG_TYPES } from './log';
import { decodeJWT } from './JWT';
const EVENT_TYPES = {
DISCONNECT : 'disconnect',
CONNECTION : 'connection',
TOKEN_VALID : 'token_valid',
TOKEN_INVALID : 'token_invalid',
CONTACT_O... | 'use strict';
/*
* Socket.io related things go !
*/
import { log, LOG_TYPES } from './log';
import { decodeJWT } from './JWT';
import models from '../models';
const User = models.User;
const EVENT_TYPES = {
DISCONNECT : 'disconnect',
CONNECTION : 'connection',
TOKEN_VALID ... | Update last seen date when connecting through socket.io | Update last seen date when connecting through socket.io
| JavaScript | mit | learning-layers/sardroid-server,learning-layers/sardroid-server | ---
+++
@@ -6,6 +6,9 @@
import { log, LOG_TYPES } from './log';
import { decodeJWT } from './JWT';
+import models from '../models';
+
+const User = models.User;
const EVENT_TYPES = {
DISCONNECT : 'disconnect',
@@ -35,9 +38,11 @@
.then( results => {
log(`... |
f34ad58342958656ec4b15a828349af931ea2dc3 | firefox/lib/main.js | firefox/lib/main.js | var self = require("sdk/self");
var panel = require("sdk/panel");
var initToolbar = function(freedom) {
// create toolbarbutton
var tbb = require("pathfinder/ui/toolbarbutton").ToolbarButton({
id: "UProxyItem",
label: "UProxy",
image: self.data.url("common/ui/icons/uproxy-19.png"),
panel: initPan... | var self = require("sdk/self");
var panel = require("sdk/panel");
var initToolbar = function(freedom) {
// create toolbarbutton
var tbb = require("pathfinder/ui/toolbarbutton").ToolbarButton({
id: "UProxyItem",
label: "UProxy",
image: self.data.url("common/ui/icons/uproxy-19.png"),
panel: initPan... | Increase delay for loading toolbarbutton so that other components have a chance to load. | Increase delay for loading toolbarbutton so that other components have a
chance to load.
| JavaScript | apache-2.0 | chinarustin/uproxy,jpevarnek/uproxy,jpevarnek/uproxy,uProxy/uproxy,itplanes/uproxy,dhkong88/uproxy,qida/uproxy,jpevarnek/uproxy,itplanes/uproxy,dhkong88/uproxy,chinarustin/uproxy,MinFu/uproxy,chinarustin/uproxy,chinarustin/uproxy,qida/uproxy,jpevarnek/uproxy,jpevarnek/uproxy,roceys/uproxy,IveWong/uproxy,itplanes/uproxy... | ---
+++
@@ -37,5 +37,5 @@
// TODO: Remove when uproxy.js no longer uses setTimeout
// and replace with the line:
// initToolbar(freedomEnvironment);
-require('sdk/timers').setTimeout(initToolbar, 20, freedomEnvironment);
+require('sdk/timers').setTimeout(initToolbar, 500, freedomEnvironment);
|
0717d0940e525eb17831cac42093c6a67fc658f0 | src/space-case.js | src/space-case.js | import R from 'ramda';
// a -> a
const spaceCase = R.compose(
R.trim,
R.replace(/([a-z])([A-Z])/g, '$1 $2'),
R.replace(/(\.|-|_)/g, ' ')
);
export default spaceCase;
| import R from 'ramda';
import compose from './util/compose.js';
// a -> a
const spaceCase = compose(
R.trim,
R.replace(/([a-z])([A-Z])/g, '$1 $2'),
R.replace(/(\.|-|_)/g, ' ')
);
export default spaceCase;
| Refactor spaceCase function to use custom compose function | Refactor spaceCase function to use custom compose function
| JavaScript | mit | restrung/restrung-js | ---
+++
@@ -1,7 +1,8 @@
import R from 'ramda';
+import compose from './util/compose.js';
// a -> a
-const spaceCase = R.compose(
+const spaceCase = compose(
R.trim,
R.replace(/([a-z])([A-Z])/g, '$1 $2'),
R.replace(/(\.|-|_)/g, ' ') |
ddd5cae6fb518d8ea6c073ecbf90a20fc4bec8dd | src/components/box/boxProps.js | src/components/box/boxProps.js | import omit from 'lodash.omit';
import pick from 'lodash.pick';
const boxProps = [
'alignContent',
'alignItems',
'alignSelf',
'borderWidth',
'borderBottomWidth',
'borderColor',
'borderLeftWidth',
'borderRightWidth',
'borderTint',
'borderTopWidth',
'boxSizing',
'className',
'display',
'eleme... | import omit from 'lodash.omit';
import pick from 'lodash.pick';
const boxProps = [
'alignContent',
'alignItems',
'alignSelf',
'borderWidth',
'borderBottomWidth',
'borderColor',
'borderLeftWidth',
'borderRightWidth',
'borderTint',
'borderTopWidth',
'borderRadius',
'boxSizing',
'className',
'... | Add borderRadius to the box prop list | Add borderRadius to the box prop list
| JavaScript | mit | teamleadercrm/teamleader-ui | ---
+++
@@ -12,6 +12,7 @@
'borderRightWidth',
'borderTint',
'borderTopWidth',
+ 'borderRadius',
'boxSizing',
'className',
'display', |
35cabf1fcf225e7d7168f12a52baca7c5728aa4a | frontend/app/js/containers/project/index.js | frontend/app/js/containers/project/index.js | import ServerboardView from 'app/components/project'
import store from 'app/utils/store'
import { projects_update_info } from 'app/actions/project'
var Project=store.connect({
state(state){
if (state.project.current != "/" && localStorage.last_project != state.project.current){
localStorage.last_project = ... | import ServerboardView from 'app/components/project'
import store from 'app/utils/store'
import { projects_update_info } from 'app/actions/project'
var Project=store.connect({
state(state){
if (state.project.current != "/" && localStorage.last_project != state.project.current){
localStorage.last_project = ... | Fix goto simple sections at sidebar | Fix goto simple sections at sidebar
| JavaScript | apache-2.0 | serverboards/serverboards,serverboards/serverboards,serverboards/serverboards,serverboards/serverboards,serverboards/serverboards | ---
+++
@@ -16,7 +16,7 @@
handlers: (dispatch, props) => ({
goto(url){
console.log(url)
- store.goto(url.pathname, url.state)
+ store.goto(url.pathname || url, url.state)
},
onAdd(){ dispatch( store.set_modal("project.add") ) },
onUpdate(){ dispatch( projects_update_info(props.... |
1b565f867fc123d54cb54c96fdb2e188ff71227a | renderer.js | renderer.js | // This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
const {clipboard} = require('electron')
alert(clipboard.readText("String"))
module.exports = function demoClipboard()
{
var text = clipboard.read... | // This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
const {clipboard} = require('electron')
module.exports = function demoClipboard()
{
var text = clipboard.readText("String");
alert(text);
} | Remove alert for testing purpose | Remove alert for testing purpose
| JavaScript | cc0-1.0 | weitalu/awesome-answering-machine,weitalu/awesome-answering-machine | ---
+++
@@ -2,7 +2,6 @@
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
const {clipboard} = require('electron')
-alert(clipboard.readText("String"))
module.exports = function demoClipboard()
{
var text = clipboard.readText("String"); |
466017c706bf782d868c621b4d535047b3a05259 | app/config-debug.js | app/config-debug.js | var juju_config = {
// These are blacklisted config items not passed into subapps mounted into
// the main App.
serverRouting: false,
html5: true,
container: '#main',
viewContainer: '#main',
// FIXME: turn off transitions until they are fixed.
transitions: false,
// These are the main application con... | var juju_config = {
// These are blacklisted config items not passed into subapps mounted into
// the main App.
serverRouting: false,
html5: true,
container: '#main',
viewContainer: '#main',
// FIXME: turn off transitions until they are fixed.
transitions: false,
// These are the main application con... | Revert local change to config. | Revert local change to config. | JavaScript | agpl-3.0 | jrwren/juju-gui,bac/juju-gui,mitechie/juju-gui,mitechie/juju-gui,jrwren/juju-gui,bac/juju-gui,bac/juju-gui,mitechie/juju-gui,CanonicalJS/juju-gui,mitechie/juju-gui,jrwren/juju-gui,CanonicalJS/juju-gui,bac/juju-gui,jrwren/juju-gui,CanonicalJS/juju-gui | ---
+++
@@ -12,7 +12,7 @@
// SubApps.
consoleEnabled: true,
charm_store_url: 'http://jujucharms.com/',
- charmworldURL: 'http://charmworld.local:2464/',
+ charmworldURL: 'http://staging.jujucharms.com/',
// The config has three socket settings. socket_port and socket_protocol
// modify the current a... |
b52cc64da7f2ecf037c5b3226a4c6641fe4c4b73 | eloquent_js_exercises/chapter06/chapter06_ex01.js | eloquent_js_exercises/chapter06/chapter06_ex01.js | function Vector(x, y) {
this.x = x;
this.y = y;
}
Vector.prototype.plus = function(vec) {
return new Vector(this.x + vec.x, this.y + vec.y);
}
Vector.prototype.minus = function(vec) {
return new Vector(this.x - vec.x, this.y - vec.y);
}
Object.defineProperty(Vector.prototype, "length", {
get: fun... | class Vec {
constructor(x, y) {
this.x = x;
this.y = y;
}
plus(v) {
return new Vec(this.x + v.x, this.y + v.y);
}
minus(v) {
return new Vec(this.x - v.x, this.y - v.y);
}
get length() {
return Math.sqrt(this.x**2 + this.y**2);
}
toString() ... | Add Chapter 06, exercise 1 | Add Chapter 06, exercise 1
| JavaScript | mit | bewuethr/ctci | ---
+++
@@ -1,18 +1,22 @@
-function Vector(x, y) {
- this.x = x;
- this.y = y;
+class Vec {
+ constructor(x, y) {
+ this.x = x;
+ this.y = y;
+ }
+
+ plus(v) {
+ return new Vec(this.x + v.x, this.y + v.y);
+ }
+
+ minus(v) {
+ return new Vec(this.x - v.x, this.y - v.y)... |
3073499ecb1147986f6164688a5b8e4e1700ef44 | eloquent_js_exercises/chapter09/chapter09_ex03.js | eloquent_js_exercises/chapter09/chapter09_ex03.js | var number = /^(\+|-)?(\d+(\.\d*)?|\.\d+)([Ee](\+|-)?\d+)?$/;
| let number = /^[+-]?\d*(\d\.|\.\d)?\d*([eE][+-]?\d+)?$/;
| Add Chapter 09, exercise 3 | Add Chapter 09, exercise 3
| JavaScript | mit | bewuethr/ctci | ---
+++
@@ -1 +1 @@
-var number = /^(\+|-)?(\d+(\.\d*)?|\.\d+)([Ee](\+|-)?\d+)?$/;
+let number = /^[+-]?\d*(\d\.|\.\d)?\d*([eE][+-]?\d+)?$/; |
73b4e1dee95f584129f03bad8c5a7448eee31b3a | handlers/awsJobs.js | handlers/awsJobs.js | // dependencies ------------------------------------------------------------
import aws from '../libs/aws';
// handlers ----------------------------------------------------------------
/**
* Jobs
*
* Handlers for job actions.
*/
let handlers = {
/**
* Describe Job Definitions
*/
describeJobDef... | // dependencies ------------------------------------------------------------
import aws from '../libs/aws';
import scitran from '../libs/scitran';
// handlers ----------------------------------------------------------------
/**
* Jobs
*
* Handlers for job actions.
*/
let handlers = {
/**
* Create J... | Add stub for creating job definitions. Add back snapshot uploading prior to job submission | Add stub for creating job definitions. Add back snapshot uploading prior to job submission
| JavaScript | mit | poldracklab/crn_server,poldracklab/crn_server | ---
+++
@@ -1,6 +1,7 @@
// dependencies ------------------------------------------------------------
-import aws from '../libs/aws';
+import aws from '../libs/aws';
+import scitran from '../libs/scitran';
// handlers ----------------------------------------------------------------
@@ -10,6 +11,13 @@
* H... |
bbb6168aef0478fae75da18410a90dd12a9d3fd5 | Gruntfile.js | Gruntfile.js | 'use strict';
module.exports = function (grunt) {
grunt.initConfig({
mochacli: {
options: {
ui: 'bdd',
reporter: 'spec',
require: [ 'espower_loader_helper.js' ]
},
all: ['test/*Test.js']
},
jshint: {
... | 'use strict';
module.exports = function (grunt) {
grunt.initConfig({
mochacli: {
options: {
ui: 'bdd',
reporter: 'spec',
require: [ 'espower_loader_helper.js' ]
},
all: ['test/*Test.js']
},
jshint: {
... | Watch and run tests on lib change too. | Watch and run tests on lib change too.
| JavaScript | mit | takas-ho/tddbc-201411-js,takas-ho/tddbc-201411-js | ---
+++
@@ -32,7 +32,7 @@
},
lib: {
files: '<%= jshint.lib.src %>',
- tasks: ['jshint:lib']
+ tasks: ['jshint:lib', 'test']
},
test: {
files: '<%= jshint.test.src %>',
@@ -43,7 +43,6 @@
grunt.loa... |
d62e85df1a66f6cd6a8d7df237147164f5320190 | Gruntfile.js | Gruntfile.js | 'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: ['src/**/*.js'],
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<... | 'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: ['src/**/*.js'],
dest: 'dist/<%= pkg.name %>.js'
}
},
uglify: {
dist: {
files: {
'dist/<%= pkg.name %>.min.js': ['<... | Fix in publish to example folder | Fix in publish to example folder
| JavaScript | bsd-3-clause | infrabel/gnap-map,infrabel/gnap-map | ---
+++
@@ -26,7 +26,7 @@
expand: true,
flatten: true,
src: ['dist/*'],
- dest: 'examples/node_modules/gnap-map/dist/'
+ dest: 'example/node_modules/gnap-map/dist/'
}
},
cssmin: { |
ff0e9e0c7aee05422b63e9cf5516eb9fbcfdd1d1 | src/mmw/js/src/core/filters.js | src/mmw/js/src/core/filters.js | "use strict";
var nunjucks = require('nunjucks');
var utils = require('./utils');
var _ = require('lodash');
nunjucks.env = new nunjucks.Environment();
var basicFormatter = new Intl.NumberFormat('en');
var specificFormatter = function(sigFig) {
return new Intl.NumberFormat('en',{minimumFractionDigits: sigFig});... | "use strict";
var nunjucks = require('nunjucks');
var utils = require('./utils');
var _ = require('lodash');
nunjucks.env = new nunjucks.Environment();
if (window.hasOwnProperty('Intl')) {
// Intl is available, we should use the faster NumberFormat
var basicFormatter = new Intl.NumberFormat('en'),
mi... | Support older browsers that lack Intl | Support older browsers that lack Intl
While Intl.NumberFormat is a much more performant implementation
(see #1566), and is supported by all modern browsers, there are
still older browsers in the wild that lack support for it. Most
notably, Safari 9 and the Android built-in browser do not support
it, leaving many users... | JavaScript | apache-2.0 | kdeloach/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed | ---
+++
@@ -6,29 +6,44 @@
nunjucks.env = new nunjucks.Environment();
-var basicFormatter = new Intl.NumberFormat('en');
+if (window.hasOwnProperty('Intl')) {
+ // Intl is available, we should use the faster NumberFormat
+ var basicFormatter = new Intl.NumberFormat('en'),
+ minDigitFormatter = functi... |
6f1262a480b7d37093e1367e21a26a41ed95181e | app/assets/javascripts/switch_meter.js | app/assets/javascripts/switch_meter.js | $(document).on("turbolinks:load", function() {
$(".first-date-picker").datepicker(
{
dateFormat: 'DD, d MM yy',
altFormat: 'yy-mm-dd',
altField: "#first_date",
// minDate: -42,
maxDate: -1,
orientation: 'bottom',
changeMonth: true,
changeYear: true... | $(document).on("turbolinks:load", function() {
$(".first-date-picker").datepicker(
{
dateFormat: 'DD, d MM yy',
altFormat: 'yy-mm-dd',
altField: $(".first-date-picker").parents("form:first").find("#first_date"),
// minDate: -42,
maxDate: -1,
orientation: 'bottom',... | Fix issue with switching when there is dual supply | Fix issue with switching when there is dual supply
| JavaScript | mit | BathHacked/energy-sparks,BathHacked/energy-sparks,BathHacked/energy-sparks,BathHacked/energy-sparks | ---
+++
@@ -4,7 +4,7 @@
{
dateFormat: 'DD, d MM yy',
altFormat: 'yy-mm-dd',
- altField: "#first_date",
+ altField: $(".first-date-picker").parents("form:first").find("#first_date"),
// minDate: -42,
maxDate: -1,
orientation: 'bottom',
@@ -16,7 +16,7 @@
... |
7cc81eb68da50a7b505a8669885af646e4a45241 | app/containers/HomePage/Login/index.js | app/containers/HomePage/Login/index.js | import ActionExitToApp from 'material-ui/svg-icons/action/exit-to-app';
import { defaultProps, setDisplayName, setPropTypes } from 'recompose';
import RaisedButton from 'material-ui/RaisedButton';
import React from 'react';
import R from 'ramda';
const Login = () =>
<RaisedButton
label="login with imgur"
fu... | import ActionExitToApp from 'material-ui/svg-icons/action/exit-to-app';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { defaultProps, setDisplayName, setPropTypes } from 'recompose';
import RaisedButton from 'material-ui/RaisedButton';
import React from 'react';
import R from... | Add onClick function to `Login` | Add onClick function to `Login`
Use a suffix for `getImgurToken` to solve the no-shadow linting conflict.
Although the prop types for `getImgurToken` are defined through
a recompose function, the linter indicates a false error.
| JavaScript | mit | romy/personal-imgur-gallery,romy/personal-imgur-gallery | ---
+++
@@ -1,18 +1,28 @@
import ActionExitToApp from 'material-ui/svg-icons/action/exit-to-app';
+import { bindActionCreators } from 'redux';
+import { connect } from 'react-redux';
import { defaultProps, setDisplayName, setPropTypes } from 'recompose';
import RaisedButton from 'material-ui/RaisedButton';
import... |
94ed33ff52d90b3b153f5fd09069e09b29d530d1 | xmlToJson/index.js | xmlToJson/index.js | var fs = rquire('fs');
module.exports = function (context, xmlZipBlob) {
context.log('Node.js blob trigger function processed blob:', xmlZipBlob);
console.log(`typeof xmlZipBlob:`, typeof xmlZipBlob);
fs.writeFile('xmlZip.zip', xmlZipBlob, (err) => {
if (err) {
throw err;
}
... | var fs = require('fs');
module.exports = function (context, xmlZipBlob) {
context.log('Node.js blob trigger function processed blob:', xmlZipBlob);
context.log(`typeof xmlZipBlob:`, typeof xmlZipBlob);
fs.writeFile('xmlZip.zip', xmlZipBlob, (err) => {
if (err) {
throw err;
}
... | Fix typos and use context instead of console | Fix typos and use context instead of console
| JavaScript | mit | mattmazzola/sc2iq-azure-functions | ---
+++
@@ -1,15 +1,15 @@
-var fs = rquire('fs');
+var fs = require('fs');
module.exports = function (context, xmlZipBlob) {
context.log('Node.js blob trigger function processed blob:', xmlZipBlob);
- console.log(`typeof xmlZipBlob:`, typeof xmlZipBlob);
+ context.log(`typeof xmlZipBlob:`, typeof xmlZip... |
d53860ae453ed40e410af32ac5d1b7baa84f5950 | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
'use strict';
grunt.initConfig({
jshint: {
options: grunt.file.readJSON('.jshintrc'),
gruntfile: 'Gruntfile.js',
bin: {
src: [
'bin/*.js',
'bin/yo'
]
},
test: {
options: {
globals: {
... | module.exports = function (grunt) {
'use strict';
grunt.initConfig({
jshint: {
options: grunt.file.readJSON('.jshintrc'),
gruntfile: 'Gruntfile.js',
bin: [ 'cli.js', 'yoyo.js' ],
test: {
options: {
globals: {
describe: true,
it: true,
... | Fix linting paths to match previous refactor | Fix linting paths to match previous refactor
| JavaScript | bsd-2-clause | yeoman/yo | ---
+++
@@ -5,12 +5,7 @@
jshint: {
options: grunt.file.readJSON('.jshintrc'),
gruntfile: 'Gruntfile.js',
- bin: {
- src: [
- 'bin/*.js',
- 'bin/yo'
- ]
- },
+ bin: [ 'cli.js', 'yoyo.js' ],
test: {
options: {
globals: {
@@ -30... |
7efd2e90aa25f7ded66d2c69d78a285825d02f2d | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
run: {
app: {
options: {
wait: false
},
cmd: 'node',
args: ['app.js']
}
},
simplemocha: {
control: { src: ['specs/sandbox-control.spec.js'] },
... | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
run: {
app: {
options: {
wait: false
},
cmd: 'node',
args: ['app.js']
}
},
simplemocha: {
control: { src: ['specs/sandbox-control.spec.js'] },
... | Add grep argument to run tests with a filter | Add grep argument to run tests with a filter
| JavaScript | agpl-3.0 | ether-camp/ethereum-sandbox | ---
+++
@@ -19,9 +19,14 @@
grunt.loadNpmTasks('grunt-run');
grunt.loadNpmTasks('grunt-simple-mocha');
+ grunt.registerTask('simplemochaGrep', function() {
+ grunt.config('simplemocha.options.grep', grunt.option('grep'));
+ grunt.task.run('simplemocha');
+ });
+
grunt.registerTask('test', [
'ru... |
e7e7da9fac092e06d6a234d2be0fc522da5585a5 | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
var attache = {
buildDir: 'dist'
};
// Project configuration.
grunt.initConfig({
appConfig: attache,
pkg: grunt.file.readJSON('package.json'),
jsdoc : {
dist : {
src: ['attache.js', 'attache-jquery.js'],
options: {
... | module.exports = function(grunt) {
var attache = {
buildDir: 'dist'
};
// Project configuration.
grunt.initConfig({
appConfig: attache,
pkg: grunt.file.readJSON('package.json'),
jsdoc : {
dist : {
src: ['attache.js', 'attache-jquery.js'],
options: {
... | Exclude private functions from documentation | Exclude private functions from documentation
| JavaScript | mit | janfoeh/attachejs,janfoeh/attachejs,janfoeh/attachejs | ---
+++
@@ -12,7 +12,8 @@
dist : {
src: ['attache.js', 'attache-jquery.js'],
options: {
- destination: 'doc'
+ destination: 'doc',
+ private: false
}
}
} |
6aa47fbe9e0185398d1dce628a9f7308455c1600 | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower: {
install: {
options: {
targetDir: './lib/ui',
layout: 'byComponent',
install: true,
verbose: false,
cleanTargetDir: true,
cleanBow... | module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower: {
install: {
options: {
targetDir: './lib/ui',
layout: 'byComponent',
install: true,
verbose: false,
cleanTargetDir: true,
cleanBow... | Set dev port back to 3000 | Set dev port back to 3000
| JavaScript | mit | iknowcss/rmd-dashboard | ---
+++
@@ -28,7 +28,7 @@
dev: {
options: {
script: 'src/server/app.js',
- port: 1234
+ port: 3000
}
}
}, |
f9c828be3c1a9c647757565f285a67c5e6d814cb | scopes-chains-closures/scopes.js | scopes-chains-closures/scopes.js | function foo() {
var bar;
function zip() {
var quux;
}
}
| function foo() {
var bar;
quux = 42;
function zip() {
var quux = 42+42;
}
}
| Complete 'Global scope & Shadowing' challenge in 'Scopes chains closures' tutorial | Complete 'Global scope & Shadowing' challenge in 'Scopes chains closures' tutorial
| JavaScript | mit | PaoloLaurenti/nodeschool | ---
+++
@@ -1,6 +1,7 @@
function foo() {
var bar;
+ quux = 42;
function zip() {
- var quux;
+ var quux = 42+42;
}
} |
4447aedd0b2fa88be5ffa8f0d1aef7e0a9289116 | gulpfile.js/tasks/styles.js | gulpfile.js/tasks/styles.js | var gulp = require('gulp');
var browserSync = require('browser-sync');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var handleErrors = require('../util/handleErrors');
var config = require('../config').styles;
var autoprefixer = require('gulp-autoprefixer');
gu... | var gulp = require('gulp');
var browserSync = require('browser-sync');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var handleErrors = require('../util/handleErrors');
var config = require('../config').styles;
var autoprefixer = require('gulp-autoprefixer');
gu... | Include Autoprefixer into sourcemaps process | Include Autoprefixer into sourcemaps process
| JavaScript | mit | Bastly/bastly-tumblr-theme,Bastly/bastly-tumblr-theme | ---
+++
@@ -11,8 +11,8 @@
.pipe(sourcemaps.init())
.pipe(sass(config.settings))
.on('error', handleErrors)
+ .pipe(autoprefixer({ browsers: ['last 2 version'] }))
.pipe(sourcemaps.write())
- .pipe(autoprefixer({ browsers: ['last 2 version'] }))
.pipe(gulp.dest(config.dest))
.pipe(b... |
beea183636b98f0a8119625365e8af37384edc4d | api/db/migrations/20170418114929_remove_login_from_users.js | api/db/migrations/20170418114929_remove_login_from_users.js | const TABLE_NAME = 'users';
exports.up = function(knex, Promise) {
return Promise.all([
knex.schema.table(TABLE_NAME, function (table) {
table.dropColumn('login');
table.boolean('cgu');
})
]);
};
exports.down = function(knex, Promise) {
return Promise.all([
knex.schema.table(TABLE_NAME... | const TABLE_NAME = 'users';
exports.up = function(knex, Promise) {
return Promise.all([
knex.schema.table(TABLE_NAME, function (table) {
table.dropColumn('login');
table.boolean('cgu');
table.unique('email');
})
]);
};
exports.down = function(knex, Promise) {
return Promise.all([
... | Revert "FIX - Removing unique constraint on user.email from migration script" | Revert "FIX - Removing unique constraint on user.email from migration script"
This reverts commit c6cedc7fa613c9f376b5d59938acdaad1e4eae7f.
| JavaScript | agpl-3.0 | sgmap/pix,sgmap/pix,sgmap/pix,sgmap/pix | ---
+++
@@ -6,6 +6,7 @@
knex.schema.table(TABLE_NAME, function (table) {
table.dropColumn('login');
table.boolean('cgu');
+ table.unique('email');
})
]);
|
bc11793c04236270996f506e7bd4b6bceddc9543 | examples/todomvc-flux/js/components/Header.react.js | examples/todomvc-flux/js/components/Header.react.js | /**
* Copyright 2013-2014 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | /**
* Copyright 2013-2014 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Fix code style in TodoMVC Flux example | Fix code style in TodoMVC Flux example
| JavaScript | bsd-3-clause | ms-carterk/react,gregrperkins/react,sejoker/react,BreemsEmporiumMensToiletriesFragrances/react,mohitbhatia1994/react,dmitriiabramov/react,ning-github/react,pyitphyoaung/react,chicoxyzzy/react,bruderstein/server-react,insionng/react,jordanpapaleo/react,Nieralyte/react,liyayun/react,glenjamin/react,magalhas/react,Jyrno42... | ---
+++
@@ -45,10 +45,10 @@
* @param {string} text
*/
_onSave: function(text) {
- if(text.trim()){
+ if (text.trim()){
TodoActions.create(text);
}
-
+
}
}); |
d62ffda36104d6620756a2d083b125d893d07419 | frontend/scripts/controllers/install_update_ctrl.js | frontend/scripts/controllers/install_update_ctrl.js | angular.module("protonet.platform").controller("InstallUpdateCtrl", function($scope, $state, $timeout, API, Notification) {
function toggleDetailedUpdateStatus() {
$scope.showDetailedUpdateStatus = !$scope.showDetailedUpdateStatus;
}
$scope.toggleDetailedUpdateStatus = toggleDetailedUpdateStatus;
function... | angular.module("protonet.platform").controller("InstallUpdateCtrl", function($scope, $state, $timeout, API, Notification) {
function toggleDetailedUpdateStatus() {
$scope.showDetailedUpdateStatus = !$scope.showDetailedUpdateStatus;
}
$scope.toggleDetailedUpdateStatus = toggleDetailedUpdateStatus;
function... | Fix js error after update | Fix js error after update
| JavaScript | apache-2.0 | experimental-platform/platform-frontend,DarkSwoop/platform-frontend,DarkSwoop/platform-frontend,experimental-platform/platform-frontend,DarkSwoop/platform-frontend,experimental-platform/platform-frontend | ---
+++
@@ -24,7 +24,7 @@
$timeout(function() {
API.get("/admin/api/system/update").then(function(data) {
if (data.up_to_date) {
- Notification.notice("Update successfully installed");
+ Notification.success("Update successfully installed");
$state.go("dashboard.index... |
197563cf26894571304abb762aeb192c5f63c21a | src/sanity/inputs/Reference.js | src/sanity/inputs/Reference.js | import {ReferenceInput} from 'role:@sanity/form-builder'
import client from 'client:@sanity/base/client'
import {unprefixType} from '../utils/unprefixType'
function fetchSingle(id) {
return client.fetch('*[.$id == %id]', {id}).then(response => unprefixType(response.result[0]))
}
export default ReferenceInput.create... | import client from 'client:@sanity/base/client'
import {ReferenceInput} from 'role:@sanity/form-builder'
import {unprefixType} from '../utils/unprefixType'
function fetchSingle(id) {
return client.data.getDocument(id).then(doc => unprefixType(doc))
}
export default ReferenceInput.createBrowser({
fetch(field) {
... | Make reference input use new Sanity client syntax | Make reference input use new Sanity client syntax
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -1,18 +1,17 @@
+import client from 'client:@sanity/base/client'
import {ReferenceInput} from 'role:@sanity/form-builder'
-import client from 'client:@sanity/base/client'
import {unprefixType} from '../utils/unprefixType'
function fetchSingle(id) {
- return client.fetch('*[.$id == %id]', {id}).then(re... |
bd3b6698e3cfa10a758aa93441ed36b029fbc3cd | js/source/github.js | js/source/github.js | (function() {
'use strict';
var _ = Timeline.helpers;
Timeline.Stream.source.GitHub = {
icon: 'github',
options: {
response: 'json',
paginate: 10,
url: 'https://api.github.com/',
action: '{stream}/events/public',
},
params: {
page: function(action) {
return (action == 'poll') ? 1 : '{page}';
},
... | (function() {
'use strict';
var _ = Timeline.helpers;
Timeline.Stream.source.GitHub = {
icon: 'github',
options: {
response: 'json',
paginate: 10,
url: 'https://api.github.com/',
action: '{stream}/events/public',
},
params: {
page: function(action) {
return (action == 'poll') ? 1 : '{page}';
},
... | Adjust GitHub source to produce meaningful output | Adjust GitHub source to produce meaningful output
| JavaScript | mpl-2.0 | rummik/zenosphere.js | ---
+++
@@ -36,7 +36,26 @@
},
getEventMessage: function(event) {
- return 'GitHub: ' + event.actor.login + ' ' + event.type;
+ var message = '';
+ var params = {};
+
+ switch (event.type) {
+ case 'PushEvent':
+ message = 'Pushed {commits} commit{s} to <code>{ref}</code> ' +
+ 'on <a href=... |
39c5facffd81d7e768d6519036d0f0f0a7ed3ad2 | migrations/20141022152322_init.js | migrations/20141022152322_init.js | 'use strict';
exports.up = function(knex, Promise) {
return knex.schema.createTable('Transactions', function (table) {
table.increments("id").primary();
table.string("address", 128);
table.integer("amount");
table.string("memo", 512);
table.text("txblob");
table.stri... | 'use strict';
exports.up = function(knex, Promise) {
return knex.schema.createTable('Transactions', function (table) {
table.increments("id").primary();
table.string("address", 128);
table.integer("amount");
table.string("currency", 3);
table.string("issuer", 128);
t... | Change migration to add currency and issuer | Change migration to add currency and issuer
| JavaScript | isc | Payshare/stellar-payments,nybbs2003/stellar-payments,Payshares/payshares-payments | ---
+++
@@ -5,6 +5,8 @@
table.increments("id").primary();
table.string("address", 128);
table.integer("amount");
+ table.string("currency", 3);
+ table.string("issuer", 128);
table.string("memo", 512);
table.text("txblob");
table.string("txhash", 128... |
0562d99c152305c93a6dbb1298549c766018358f | lib/randomstring.js | lib/randomstring.js | "use strict";
var crypto = require('crypto');
var charset = require('./charset.js');
exports.generate = function(length, options) {
var chars;
if (typeof options === 'object') {
if (options.charset) {
chars = charset.generate(options.charset, options.readable);
}
else {
charset.gene... | "use strict";
var crypto = require('crypto');
var charset = require('./charset.js');
exports.generate = function(options) {
var length, chars, string = '';
// Handle options
if (typeof options === 'object') {
length = options.length || 32;
if (options.charset) {
chars = charset.generat... | Move length to options while keeping support for legacy params | Move length to options while keeping support for legacy params
| JavaScript | mit | prashantgupta24/node-randomstring,prashantgupta24/node-randomstring,klughammer/node-randomstring | ---
+++
@@ -3,11 +3,14 @@
var crypto = require('crypto');
var charset = require('./charset.js');
-exports.generate = function(length, options) {
+exports.generate = function(options) {
- var chars;
+ var length, chars, string = '';
+ // Handle options
if (typeof options === 'object') {
+ length ... |
6b691039e6a2a6bcd7e45d291fbc42650c6c1f01 | tests/current_route_tests.js | tests/current_route_tests.js | Tinytest.addAsync('CurrentRoute.name returns the name of the current route', function (test, next) {
Router.go('apple');
setTimeout(function () {
test.equal(CurrentRoute.name, 'apple');
next();
}, 500);
});
Tinytest.addAsync('CurrentRoute.is returns false when routeName is not current route name', functi... | Tinytest.addAsync('CurrentRoute.name returns the name of the current route', function (test, next) {
Router.go('apple');
Meteor.defer(function () {
test.equal(CurrentRoute.name, 'apple');
next();
}, 500);
});
Tinytest.addAsync('CurrentRoute.is returns false when routeName is not current route name', func... | Fix TravisCI issue where the build hangs after starting | Fix TravisCI issue where the build hangs after starting
| JavaScript | mit | sungwoncho/iron-utils | ---
+++
@@ -1,6 +1,6 @@
Tinytest.addAsync('CurrentRoute.name returns the name of the current route', function (test, next) {
Router.go('apple');
- setTimeout(function () {
+ Meteor.defer(function () {
test.equal(CurrentRoute.name, 'apple');
next();
}, 500);
@@ -8,7 +8,7 @@
Tinytest.addAsync('Cur... |
a05a9eb968458117c00de3a196ed8891be52b3a0 | admin/src/components/FormHeading.js | admin/src/components/FormHeading.js | var React = require('react');
function evalDependsOn(dependsOn, values) {
if (!_.isObject(dependsOn)) return true;
var keys = _.keys(dependsOn);
return (keys.length) ? _.every(keys, function(key) {
var matches = _.isArray(dependsOn[key]) ? dependsOn[key] : [dependsOn[key]];
return _.contains(matches, values[key... | var React = require('react');
function evalDependsOn(dependsOn, values) {
if (!_.isObject(dependsOn)) return true;
var keys = _.keys(dependsOn);
return (keys.length) ? _.every(keys, function(key) {
var dependsValue = dependsOn[key];
if(_.isBoolean(dependsValue)) {
return dependsValue !== _.isEmpty(values[key... | Allow boolean evaluation of dependsOn on headings | Allow boolean evaluation of dependsOn on headings | JavaScript | mit | Adam14Four/keystone,sendyhalim/keystone,webteckie/keystone,andrewlinfoot/keystone,MORE-HEALTH/keystone,webteckie/keystone,kidaa/keystone,the1sky/keystone,dryna/keystone-twoje-urodziny,kidaa/keystone,Yaska/keystone,asifiqbal84/keystone,kloudsio/keystone,nickhsine/keystone,Adam14Four/keystone,francesconero/keystone,vokal... | ---
+++
@@ -4,7 +4,11 @@
if (!_.isObject(dependsOn)) return true;
var keys = _.keys(dependsOn);
return (keys.length) ? _.every(keys, function(key) {
- var matches = _.isArray(dependsOn[key]) ? dependsOn[key] : [dependsOn[key]];
+ var dependsValue = dependsOn[key];
+ if(_.isBoolean(dependsValue)) {
+ return... |
b30f6630199cb723a59d5581161c60a742d29c14 | app/assets/javascripts/responses.js | app/assets/javascripts/responses.js | $(document).ready( function () {
$(".upvote").click( function() {
var commentId = $(".upvote").data("id");
event.preventDefault();
$.ajax({
url: '/response/up_vote',
method: 'POST',
data: { id: commentId },
dataType: 'JSON'
}).done( function (voteCount) {
if (voteCount ==... | $(document).ready( function () {
$(".upvote").click( function() {
var commentId = $(".upvote").data("id");
event.preventDefault();
$.ajax({
url: '/response/up_vote',
method: 'POST',
data: { id: commentId },
dataType: 'JSON'
}).done( function (voteCount) {
if (voteCount ==... | Change failure callback to show responding html embedded failure message from Active Record. | Change failure callback to show responding html embedded failure message from Active Record.
| JavaScript | mit | great-horned-owls-2014/dbc-what-is-this,great-horned-owls-2014/dbc-what-is-this | ---
+++
@@ -13,9 +13,9 @@
} else {
$("span[data-id=" + commentId + "]").html(voteCount + " vote");
}
- }).fail( function (voteCount) {
- console.log("Failed. Here is the voteCount:");
- console.log(voteCount);
+ }).fail( function (failureInfo) {
+ console.log("Failed.... |
e5c56ff931be01e97055f47fd05da85d56acca74 | app/scripts/services/offlinemode.js | app/scripts/services/offlinemode.js | 'use strict';
angular.module('offlineMode', [])
.config(function ($httpProvider) {
$httpProvider.interceptors.push('httpInterceptor');
})
.factory('httpInterceptor', function ($q) {
var OFFLINE = location.search.indexOf('offline=true') > -1,
_config = {
OFFLINE_DATA_PATH: '/offline_data',
API_PATH: '/... | 'use strict';
angular.module('offlineMode', [])
.config(function ($httpProvider) {
$httpProvider.interceptors.push('httpInterceptor');
})
.factory('httpInterceptor', function ($q) {
var OFFLINE = location.search.indexOf('offline=true') > -1,
config = {
OFFLINE_DATA_PATH: '/offline_data',
API_PATH: '/a... | Rename _config to config now | Rename _config to config now
| JavaScript | mit | MartinSandstrom/angular-apimock,seriema/angular-apimock,seriema/angular-apimock,MartinSandstrom/angular-apimock | ---
+++
@@ -7,7 +7,7 @@
.factory('httpInterceptor', function ($q) {
var OFFLINE = location.search.indexOf('offline=true') > -1,
- _config = {
+ config = {
OFFLINE_DATA_PATH: '/offline_data',
API_PATH: '/api'
};
@@ -15,15 +15,15 @@
return {
request: function(req) {
if (OFFLINE && req)... |
ce41f4599a9a68c23ccb9569f702ee1c0bb25bd0 | lib/assets/javascripts/cartodb/common/public_footer_view.js | lib/assets/javascripts/cartodb/common/public_footer_view.js | var cdb = require('cartodb.js-v3');
var DEFAULT_LIGHT_ACTIVE = false;
module.exports = cdb.core.View.extend({
initialize: function () {
this._initModels();
this.template = this.isHosted
? cdb.templates.getTemplate('public/views/public_footer')
: cdb.templates.getTemplate('common/views/footer_st... | var cdb = require('cartodb.js-v3');
var DEFAULT_LIGHT_ACTIVE = false;
module.exports = cdb.core.View.extend({
initialize: function () {
this._initModels();
this.template = this.isHosted
? cdb.templates.getTemplate('common/views/footer_static')
: cdb.templates.getTemplate('public/views/public_fo... | Fix the proper footer based on cartodb_com_hosted. | Fix the proper footer based on cartodb_com_hosted.
| JavaScript | bsd-3-clause | CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb | ---
+++
@@ -7,8 +7,8 @@
this._initModels();
this.template = this.isHosted
- ? cdb.templates.getTemplate('public/views/public_footer')
- : cdb.templates.getTemplate('common/views/footer_static');
+ ? cdb.templates.getTemplate('common/views/footer_static')
+ : cdb.templates.getTemplate('... |
856b1f29230acc829d627aa8779f345c71a3ddaa | packages/babel-plugin-transform-react-jsx-self/src/index.js | packages/babel-plugin-transform-react-jsx-self/src/index.js |
/**
* This adds {fileName, lineNumber} annotations to React component definitions
* and to jsx tag literals.
*
*
* == JSX Literals ==
*
* <sometag />
*
* becomes:
*
* <sometag __self={this} />
*/
const TRACE_ID = "__self";
export default function ({ types: t }) {
let visitor = {
JSXOpeningElement(... | /**
* This adds a __self={this} JSX attribute to all JSX elements, which React will use
* to generate some runtime warnings.
*
*
* == JSX Literals ==
*
* <sometag />
*
* becomes:
*
* <sometag __self={this} />
*/
const TRACE_ID = "__self";
export default function ({ types: t }) {
let visitor = {
JSXO... | Fix some mistakes in the jsx-self transform. | Fix some mistakes in the jsx-self transform.
| JavaScript | mit | babel/babel,claudiopro/babel,kaicataldo/babel,tikotzky/babel,hzoo/babel,samwgoldman/babel,kellyselden/babel,shuhei/babel,PolymerLabs/babel,kassens/babel,babel/babel,iamchenxin/babel,samwgoldman/babel,hulkish/babel,tikotzky/babel,garyjN7/babel,hzoo/babel,KunGha/babel,Skillupco/babel,shuhei/babel,jridgewell/babel,jridgew... | ---
+++
@@ -1,7 +1,6 @@
-
- /**
- * This adds {fileName, lineNumber} annotations to React component definitions
- * and to jsx tag literals.
+/**
+ * This adds a __self={this} JSX attribute to all JSX elements, which React will use
+ * to generate some runtime warnings.
*
*
* == JSX Literals ==
@@ -17,10 +16,11... |
977c9fe1b897e8ed3a25eab75c01f60f828319a0 | src/js/app/pagespeed-app.module.js | src/js/app/pagespeed-app.module.js | ;(function() {
'use strict';
angular.module('pagespeedApp', ['pagespeed.templates']).config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'self',
'https://www.googleapis.com/pagespeedonline/v2/runPagespeed' // TODO pull from service instead of hard coded
]);
});
})(); | ;(function() {
'use strict';
angular.module('pagespeedApp', ['pagespeed.templates']).config(['$sceDelegateProvider', function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'self',
'https://www.googleapis.com/pagespeedonline/v2/runPagespeed' // TODO pull from service instead of hard coded... | Use inline annotation in config block | Use inline annotation in config block
Fixes minification issues
| JavaScript | mit | WileESpaghetti/demo-pagespeed,WileESpaghetti/demo-pagespeed | ---
+++
@@ -1,9 +1,9 @@
;(function() {
'use strict';
- angular.module('pagespeedApp', ['pagespeed.templates']).config(function($sceDelegateProvider) {
+ angular.module('pagespeedApp', ['pagespeed.templates']).config(['$sceDelegateProvider', function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitel... |
cc719f1526929d67df889ad2edfbb15f12445fbe | src/Chromabits/Loader/Loader.js | src/Chromabits/Loader/Loader.js | 'use strict';
var ensure = require('ensure.js'),
ClassNotFoundException = require('./Exceptions/ClassNotFoundException.js'),
ClassMap = require('../Mapper/ClassMap.js');
var Loader;
/**
* ClassLoader
*
* Capable of loading a class using multiple class maps. A class will be
* resolved in the order the cla... | 'use strict';
var ensure = require('ensure.js'),
ClassNotFoundException = require('./Exceptions/ClassNotFoundException.js'),
ClassMap = require('../Mapper/ClassMap.js');
var Loader;
/**
* ClassLoader
*
* Capable of loading a class using multiple class maps. A class will be
* resolved in the order the cla... | Fix bug on the class loader | Fix bug on the class loader
| JavaScript | mit | etcinit/enclosure | ---
+++
@@ -39,9 +39,13 @@
* @return {Function} -
*/
Loader.prototype.get = function (fullClassName) {
- for (var map in this.maps) {
- if (map.has(fullClassName)) {
- return map.get(fullClassName);
+ for (var key in this.maps) {
+ if (this.maps.hasOwnProperty(key)) {
+ ... |
1a12317c2c9fa53e0ead42abe63b55ad222f9b49 | test/conf/karma-common.conf.js | test/conf/karma-common.conf.js | /*eslint-env node */
var sourceList = require("../../src/source-list");
var sourceFiles = sourceList.list.map(function(src) {
return "src/" + src;
});
var commonJsSourceFiles = sourceList.commonJsModuleList;
var testFiles = [
"test/util/dom.js",
"test/util/matchers.js",
"test/util/mock/vivliostyle/logg... | /*eslint-env node */
var sourceList = require("../../src/source-list");
var sourceFiles = sourceList.list.map(function(src) {
return "src/" + src;
});
var commonJsSourceFiles = sourceList.commonJsModuleList;
var testFiles = [
"test/util/dom.js",
"test/util/matchers.js",
"test/util/mock/vivliostyle/logg... | Remove karma-commonjs settings for avoiding error. | Remove karma-commonjs settings for avoiding error.
- If you require commonjs modules, Add settings below:
- Add `commonjs` to `frameworks`.
```
frameworks: ["jasmine", 'commonjs'],
```
- Add `preprocessors` and `commonjsPreprocessor` setting.
```
preprocessors: {
"node_modules/dummy/*.j... | JavaScript | agpl-3.0 | vivliostyle/vivliostyle.js,vivliostyle/vivliostyle.js,vivliostyle/vivliostyle.js,vivliostyle/vivliostyle.js | ---
+++
@@ -16,13 +16,15 @@
module.exports = function(config) {
return {
basePath: "../..",
- frameworks: ["jasmine", 'commonjs'],
+ frameworks: ["jasmine"],
files: sourceFiles.concat(testFiles).concat(commonJsSourceFiles),
- preprocessors: {
- },
- commonjsP... |
40ee9312b1d8c6f1d13f737ffc0846bb4c104d8e | test/integration/proxy.test.js | test/integration/proxy.test.js | import {browser} from '../mini-testium-mocha';
import {delay} from 'Bluebird';
describe('proxy', () => {
before(browser.beforeHook);
describe('handles errors', () => {
it('with no content type and preserves status code', () =>
browser
.navigateTo('/').assertStatusCode(200)
.navigateTo('/... | import {browser} from '../mini-testium-mocha';
import {delay} from 'bluebird';
describe('proxy', () => {
before(browser.beforeHook);
describe('handles errors', () => {
it('with no content type and preserves status code', () =>
browser
.navigateTo('/').assertStatusCode(200)
.navigateTo('/... | Fix casing of bluebird import | Fix casing of bluebird import
| JavaScript | bsd-3-clause | testiumjs/testium-driver-wd | ---
+++
@@ -1,5 +1,5 @@
import {browser} from '../mini-testium-mocha';
-import {delay} from 'Bluebird';
+import {delay} from 'bluebird';
describe('proxy', () => {
before(browser.beforeHook); |
a27e54cf245444f6b858ff57549967795e11021b | lib/hydrater-tika/helpers/hydrate.js | lib/hydrater-tika/helpers/hydrate.js | 'use strict';
/**
* @file Hydrate the file from scratch.
* Download it from Cluestr, save it to local storage, run tika and returns the result.
*
* This helper is used in the server queue.
*/
var async = require('async');
var request = require('request');
var crypto = require('crypto');
var fs = require('fs');
... | 'use strict';
/**
* @file Hydrate the file from scratch.
* Download it from Cluestr, save it to local storage, run tika and returns the result.
*
* This helper is used in the server queue.
*/
var async = require('async');
var request = require('request');
var crypto = require('crypto');
var fs = require('fs');
... | Use stream while reading file | Use stream while reading file
| JavaScript | mit | AnyFetch/anyfetch-hydrater.js | ---
+++
@@ -25,16 +25,15 @@
module.exports = function(task, done) {
var serverUrl = require('../../../app.js').url;
- // Download the file
async.waterfall([
function(cb) {
- request.get(task.file_path, cb);
- },
- function(res, body, cb) {
var path = '/tmp/' + crypto.randomBytes(20).t... |
a34b2269c3749a5c014e2fcdd663795f3c8f1731 | lib/auth/token-container.js | lib/auth/token-container.js | var crypto = require('crypto');
var _ = require('underscore');
function TokenContainer() {
this._tokens = {};
this._startGarbageCollecting();
}
TokenContainer._hourMs = 60 * 60 * 1000;
TokenContainer._collectorIntervalMs = 12 * TokenContainer._hourMs;
TokenContainer._oudatedTimeMs = 48 * TokenContainer._hourMs;
... | var crypto = require('crypto');
var _ = require('underscore');
function TokenContainer() {
this._tokens = {};
this._startGarbageCollecting();
}
TokenContainer._hourMs = 60 * 60 * 1000;
TokenContainer._collectorIntervalMs = 12 * TokenContainer._hourMs;
TokenContainer._oudatedTimeMs = 48 * TokenContainer._hourMs;
... | Remove https restriction from cookie setter. | Remove https restriction from cookie setter.
| JavaScript | mit | cargomedia/pulsar-rest-api,njam/pulsar-rest-api,cargomedia/pulsar-rest-api,njam/pulsar-rest-api,cargomedia/pulsar-rest-api,vogdb/pulsar-rest-api,cargomedia/pulsar-rest-api,njam/pulsar-rest-api,vogdb/pulsar-rest-api,njam/pulsar-rest-api,vogdb/pulsar-rest-api | ---
+++
@@ -13,7 +13,7 @@
TokenContainer.prototype.saveToken = function(res, token) {
var cookie = crypto.randomBytes(32).toString('hex');
this._tokens[cookie] = {token: token, lastUsage: Date.now()};
- res.cookies.set('userid', cookie, {path: '/', secure: true, httpOnly: false});
+ res.cookies.set('userid',... |
e5f08ef8be8d7484c963454e84e89e9f28aae810 | tests/e2e/utils/page-wait.js | tests/e2e/utils/page-wait.js | /**
* Utlity to have the page wait for a given length.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.or... | /**
* Utility to have the page wait for a given length.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.o... | Fix spelling error in file header. | Fix spelling error in file header.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | ---
+++
@@ -1,5 +1,5 @@
/**
- * Utlity to have the page wait for a given length.
+ * Utility to have the page wait for a given length.
*
* Site Kit by Google, Copyright 2020 Google LLC
* |
3bc6773ac0ae53037a53dfea0df672ba2fa613f8 | lib/collections/requests.js | lib/collections/requests.js | Requests = new Mongo.Collection('requests');
Meteor.methods({
addRequest: function(requestAttributes) {
check(Meteor.userId(), String);
check(requestAttributes, {
user: Object,
project: Object
});
if (hasRequestPending(requestAttributes.user.userId, requestAttributes.project.projectI... | Requests = new Mongo.Collection('requests');
Meteor.methods({
addRequest: function(requestAttributes) {
check(Meteor.userId(), String);
check(requestAttributes, {
user: Object,
project: Object
});
if (hasRequestPending(requestAttributes.user.userId, requestAttributes.project.projectI... | Add extra field so _id is passed to make notification read | Add extra field so _id is passed to make notification read
| JavaScript | mit | PUMATeam/puma,PUMATeam/puma | ---
+++
@@ -17,7 +17,11 @@
status: 'pending'
});
- Requests.insert(request);
+ var requestId = Requests.insert(request);
+ var request = _.extend(request, {
+ _id: requestId
+ });
+
createRequestNotification(request);
}
}); |
fadf55c806d8339d2aca59fdbc1b1ebcc92de81d | webpack.config.js | webpack.config.js | var path = require('path');
var process = require('process');
var fs = require('fs');
var nodeModules = {};
fs.readdirSync('node_modules')
.filter(function(x) {
return ['.bin'].indexOf(x) === -1;
})
.forEach(function(mod) {
nodeModules[mod] = 'commonjs ' + mod;
});
module.exports = {
context: path.j... | var path = require('path');
var process = require('process');
var fs = require('fs');
module.exports = {
context: path.join(process.env.PWD, 'frontend'),
entry: "./index.js",
target: 'node',
output: {
path: path.join(__dirname, 'dist'),
filename: 'webpack.bundle.js'
},
module: {
loaders: [
... | Remove externals option for import React, ReactDOM, etc... | Remove externals option for import React, ReactDOM, etc...
| JavaScript | mit | mgi166/usi-front,mgi166/usi-front | ---
+++
@@ -1,15 +1,6 @@
var path = require('path');
var process = require('process');
var fs = require('fs');
-
-var nodeModules = {};
-fs.readdirSync('node_modules')
- .filter(function(x) {
- return ['.bin'].indexOf(x) === -1;
- })
- .forEach(function(mod) {
- nodeModules[mod] = 'commonjs ' + mod;
- })... |
df4ec07d287066f89ae9077bbcc622426005ae06 | webpack.config.js | webpack.config.js | /* global __dirname, require, module*/
const webpack = require('webpack');
const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
const path = require('path');
const env = require('yargs').argv.env; // use --env with webpack 2
let libraryName = 'library';
let plugins = [], outputFile;
if (env === 'build') {
plug... | /* global __dirname, require, module*/
const webpack = require('webpack');
const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
const path = require('path');
const env = require('yargs').argv.env; // use --env with webpack 2
const pkg = require('./package.json');
let libraryName = pkg.name;
let plugins = [], outp... | Use name of package.json as build output | Use name of package.json as build output | JavaScript | mit | krasimir/webpack-library-starter | ---
+++
@@ -4,8 +4,9 @@
const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
const path = require('path');
const env = require('yargs').argv.env; // use --env with webpack 2
+const pkg = require('./package.json');
-let libraryName = 'library';
+let libraryName = pkg.name;
let plugins = [], outputFile;
|
dbe77896c2233f3ae06e539a4c3a50cbee778b28 | web/src/main/ng/client/assets/js/context/List.Controller.js | web/src/main/ng/client/assets/js/context/List.Controller.js | angular.module('contextModule').controller('Context.ListController', [
'$scope',
'$http',
'$filter',
'$routeParams',
'FoundationApi',
'Event.Service',
function ($scope, $http, $filter, $routeParams, foundationApi, eventService) {
self = this;
var contexts;
eventService.register('Context.ListControll... | angular.module('contextModule').controller('Context.ListController', [
'$scope',
'$http',
'$filter',
'$routeParams',
'FoundationApi',
'Event.Service',
function ($scope, $http, $filter, $routeParams, foundationApi, eventService) {
self = this;
var contexts;
eventService.register('Context.ListControll... | Add context to list upon start event | Add context to list upon start event
| JavaScript | apache-2.0 | greathouse/tidewater,greathouse/tidewater,greathouse/tidewater | ---
+++
@@ -13,7 +13,16 @@
eventService.register('Context.ListController', processEvent);
function processEvent(event) {
- if (event.type === 'greenmoonsoftware.tidewater.web.context.events.PipelineContextEndedEvent') {
+ if (event.type === 'greenmoonsoftware.tidewater.web.context.events.PipelineCon... |
4ac5daf222c879222677d66049505637a9a7836d | resources/assets/js/app.js | resources/assets/js/app.js |
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
window.Vue = require('vue');
/**
* Next, we will create a fresh Vue a... |
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
window.Vue = require('vue');
/**
* Next, we will create a fresh Vue a... | Add method for limited coin retreival | Add method for limited coin retreival
| JavaScript | mit | vadremix/zealoustools-core,vadremix/zealoustools-core | ---
+++
@@ -28,12 +28,33 @@
coinData: []
},
+ methods: {
+ getPrices: function(coinUids) {
+ return axios.post('/api/coins/prices', {
+ coins: coinUids
+ })
+ .then(function (response) {
+ app.coinData = response.data;
+ ... |
eaad32c88ae888c9e479ec5a7bef08f6d0f4502a | src/scene/scene_depthmaterial.js | src/scene/scene_depthmaterial.js | pc.extend(pc, function () {
/**
* @name pc.DepthMaterial
* @class A Depth material is is for rendering linear depth values to a render target.
* @author Will Eastcott
*/
var DepthMaterial = function () {
};
DepthMaterial = pc.inherits(DepthMaterial, pc.Material);
p... | pc.extend(pc, function () {
/**
* @private
* @name pc.DepthMaterial
* @class A Depth material is is for rendering linear depth values to a render target.
* @author Will Eastcott
*/
var DepthMaterial = function () {
};
DepthMaterial = pc.inherits(DepthMaterial, pc.Ma... | Remove pc.DepthMaterial from API ref. | Remove pc.DepthMaterial from API ref.
| JavaScript | mit | guycalledfrank/engine,aidinabedi/playcanvas-engine,guycalledfrank/engine,sereepap2029/playcanvas,H1Gdev/engine,sereepap2029/playcanvas,H1Gdev/engine,sereepap2029/playcanvas,MicroWorldwide/PlayCanvas,playcanvas/engine,aidinabedi/playcanvas-engine,MicroWorldwide/PlayCanvas,playcanvas/engine | ---
+++
@@ -1,6 +1,7 @@
pc.extend(pc, function () {
/**
+ * @private
* @name pc.DepthMaterial
* @class A Depth material is is for rendering linear depth values to a render target.
* @author Will Eastcott
@@ -12,6 +13,7 @@
pc.extend(DepthMaterial.prototype, {
/**
+ ... |
a54ed8d797aa22cdeefc30c28f18e737fda1265c | src/test/resources/specRunner.js | src/test/resources/specRunner.js | var scanner = require('./scanner');
module.exports = {
run: function(pattern) {
// load jasmine and a terminal reporter into global
load("jasmine-1.3.1/jasmine.js");
load('./terminalReporter.js');
// load the specs
var jasmineEnv = jasmine.getEnv(),
specs = scanner.findSpecs(patter... | var scanner = require('./scanner');
module.exports = {
run: function(pattern) {
// load jasmine and a terminal reporter into global
load("jasmine-1.3.1/jasmine.js");
load('./terminalReporter.js');
color = !process.env.JASMINE_NOCOLOR;
// load the specs
var jasmineEnv = jasmine.getEnv(),
... | Use an env var to determine whether spec output should colorize | Use an env var to determine whether spec output should colorize
| JavaScript | apache-2.0 | dherges/nodyn,tony--/nodyn,tony--/nodyn,tony--/nodyn,dherges/nodyn,nodyn/nodyn,nodyn/nodyn,dherges/nodyn,nodyn/nodyn | ---
+++
@@ -6,11 +6,12 @@
// load jasmine and a terminal reporter into global
load("jasmine-1.3.1/jasmine.js");
load('./terminalReporter.js');
+ color = !process.env.JASMINE_NOCOLOR;
// load the specs
var jasmineEnv = jasmine.getEnv(),
specs = scanner.findSpecs(pattern),
- ... |
58d581984caa03c468f4b5d05d7e2a61cc66374b | src/util/server/requestLogger.js | src/util/server/requestLogger.js | const uuid = require('uuid');
const DEFAULT_HEADER_NAME = 'x-request-id';
/**
* Create a request loging express middleware
* @param {Object} logger - a logger instance
* @param {Object} options
* @param {String?} options.headerName
* @returns {Function}
*/
export default function createRequestLogger(logger... | const uuid = require('uuid');
const DEFAULT_HEADER_NAME = 'x-request-id';
/**
* Create a request loging express middleware
* @param {Object} logger - a logger instance
* @param {Object} options
* @param {String?} options.reqIdHeader
* @returns {Function}
*/
export default function createRequestLogger(logge... | Rename server request logger request id header name option and make the config object optional | Rename server request logger request id header name option and make the config object optional
| JavaScript | mit | wework/we-js-logger | ---
+++
@@ -6,10 +6,10 @@
* Create a request loging express middleware
* @param {Object} logger - a logger instance
* @param {Object} options
- * @param {String?} options.headerName
+ * @param {String?} options.reqIdHeader
* @returns {Function}
*/
-export default function createRequestLogger(logger, o... |
30d95d67c12157692037c015a41d18b352de5a89 | packages/card-picker/addon/components/field-editors/cardstack-cards-editor.js | packages/card-picker/addon/components/field-editors/cardstack-cards-editor.js | import Component from '@ember/component';
import { inject as service } from '@ember/service';
import layout from '../../templates/components/field-editors/cardstack-cards-editor';
export default Component.extend({
tools: service('cardstack-card-picker'),
layout,
actions: {
addCard() {
this.tools.pick... | import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { get, set } from '@ember/object';
import layout from '../../templates/components/field-editors/cardstack-cards-editor';
export default Component.extend({
tools: service('cardstack-card-picker'),
layout,
action... | Use ember-data-relationship-tracker in cards editor | Use ember-data-relationship-tracker in cards editor | JavaScript | mit | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | ---
+++
@@ -1,5 +1,6 @@
import Component from '@ember/component';
import { inject as service } from '@ember/service';
+import { get, set } from '@ember/object';
import layout from '../../templates/components/field-editors/cardstack-cards-editor';
@@ -9,15 +10,32 @@
actions: {
addCard() {
+ let f... |
9fe2c911f946bb05c6883405d24b7f61283f6aa4 | app/index.js | app/index.js | 'use strict';
var Generator = module.exports = function () {
var cb = this.async();
var ignores = [
'.git',
'CHANGELOG.md',
'CONTRIBUTING.md',
'LICENSE.md',
'README.md'
];
this.prompt([{
name: 'docs',
message: 'Would you like docs included?',
default: 'y/N'
}], function (err, props) {
if (err) ... | 'use strict';
var Generator = module.exports = function () {
var cb = this.async();
var ignores = [
'.git',
'CHANGELOG.md',
'CONTRIBUTING.md',
'LICENSE.md',
'README.md'
];
this.prompt([{
type: 'confirm',
name: 'docs',
message: 'Would you like docs included?'
}], function (props) {
if (props.doc... | Prepare for new Yeoman Generator prompt()s. | Prepare for new Yeoman Generator prompt()s.
| JavaScript | mit | h5bp/generator-h5bp | ---
+++
@@ -11,15 +11,11 @@
];
this.prompt([{
+ type: 'confirm',
name: 'docs',
- message: 'Would you like docs included?',
- default: 'y/N'
- }], function (err, props) {
- if (err) {
- return this.emit('error', err);
- }
-
- if (!/n/i.test(props.docs)) {
+ message: 'Would you like docs included?'
+ ... |
c632fde791d79cd58b010189a9995ef9917f0040 | app/store.js | app/store.js | import { createStore, combineReducers } from 'redux'
import Task from './reducers/Task'
export default createStore(
combineReducers(
{
Task
}
)
)
| import { createStore, combineReducers } from 'redux'
import Task from './reducers/Task'
export default createStore(
combineReducers(
{
tasks: Task
}
)
)
| Rename the state from 'Task' to 'tasks'. | Rename the state from 'Task' to 'tasks'.
| JavaScript | mit | rhberro/the-react-client,rhberro/the-react-client | ---
+++
@@ -5,7 +5,7 @@
export default createStore(
combineReducers(
{
- Task
+ tasks: Task
}
)
) |
b4c8c52d3bd293c7067a5a9d16121aa34a4b855e | frontend/app/components/source-code.js | frontend/app/components/source-code.js | var LanguageMap = {
"crystal": "ruby",
"gcc": "c++"
};
export default Ember.Component.extend({
highlightLanguage: function() {
return LanguageMap[this.get('language')] || this.get('language');
}.property('language'),
watchForChanges: function() {
this.rerender();
}.observes('code'),
didInsertElem... | var LanguageMap = {
"crystal": "ruby",
"gcc": "c++"
};
export default Ember.Component.extend({
highlightLanguage: function() {
return LanguageMap[this.get('language')] || this.get('language');
}.property('language'),
watchForChanges: function() {
this.rerender();
}.observes('code'),
didInsertElem... | Revert "Enable line numbers on result view" | Revert "Enable line numbers on result view"
This reverts commit cba57c3ab39796c9ac007d4e26f9c4ad94aa7a3f.
Still broken on FF
| JavaScript | mit | jhass/carc.in,jhass/carc.in | ---
+++
@@ -14,6 +14,6 @@
var code = this.$('pre > code')[0];
code.innerHTML = window.ansi_up.ansi_to_html(code.innerHTML, {use_classes: true});
window.hljs.highlightBlock(this.$('pre > code')[0]);
- window.hljs.lineNumbersBlock(this.$('pre > code')[0]);
+ // window.hljs.lineNumbersBlock(this.$('... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.