commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
cca37003d0931d4f446eb8c80e18a31fa35fd4e0
src/stringify/anything.js
src/stringify/anything.js
import _ from '../wrap/lodash' import isMatcher from '../matchers/is-matcher' import * as stringifyObject from 'stringify-object-es5' export default (anything) => { if (_.isString(anything)) { return stringifyString(anything) } else if (isMatcher(anything)) { return anything.__name } else { return st...
import _ from '../wrap/lodash' import isMatcher from '../matchers/is-matcher' import * as stringifyObject from 'stringify-object-es5' export default (anything) => { if (_.isString(anything)) { return stringifyString(anything) } else if (isMatcher(anything)) { return anything.__name } else if (anything &&...
Use toString when printing proxy description
Use toString when printing proxy description
JavaScript
mit
testdouble/testdouble.js,testdouble/testdouble.js,testdouble/testdouble.js
a3f1459bbfd7edaad9eefc4c64306a85c85b2f3d
src/script/components/dashcaseFilter.js
src/script/components/dashcaseFilter.js
app.filter('dashcase', function () { return function (input) { input = input.replace(/\s+/g, '-') .toLowerCase() .replace('ä', 'ae') .replace('ö', 'oe') .replace('ü', 'ue') .replace('ß', 'ss') .replace(/[^a-z0-9-]/g, ''); return input; }; });
app.filter('dashcase', function () { return function (input) { return input.toLowerCase() .replace(/\s+/g, '-') .replace(/ä/g, 'ae') .replace(/ö/g, 'oe') .replace(/ü/g, 'ue') .replace(/\u00df/g, 'ss') .replace(/[^a-z0-9-]/g, ''); }; });
Fix bug with German umlauts in dashcase filter
Fix bug with German umlauts in dashcase filter
JavaScript
mit
stekhn/portfolio,stekhn/portfolio,stekhn/portfolio
248c21e5d391ef985b7aab2992f3237234b8054f
frontend/components/modals/promoteModal.js
frontend/components/modals/promoteModal.js
import React, { Component } from 'react'; import Dialog from 'material-ui/lib/dialog'; import FlatButton from 'material-ui/lib/flat-button'; import RaisedButton from 'material-ui/lib/raised-button'; // NOTE: For emit `onTouchTap` event. import injectTapEventPlugin from 'react-tap-event-plugin'; injectTapEventPlugin();...
import React, { Component } from 'react'; import Dialog from 'material-ui/lib/dialog'; import FlatButton from 'material-ui/lib/flat-button'; import RaisedButton from 'material-ui/lib/raised-button'; // NOTE: For emit `onTouchTap` event. import injectTapEventPlugin from 'react-tap-event-plugin'; injectTapEventPlugin();...
Remove handleOpen function. because it is unnecessary.
Remove handleOpen function. because it is unnecessary.
JavaScript
mit
mgi166/usi-front,mgi166/usi-front
80e7eebae4772ee6659330e36f515f70430133a9
test/reducers/example-reducer.test.js
test/reducers/example-reducer.test.js
import * as actionTypes from "../../src/actions/types"; import exampleReducer from "../../src/reducers/example-reducer"; describe("exampleReducer", () => { test("initial state", () => { expect(exampleReducer(undefined, {})).toEqual({example: ""}); }); test ("when action type is EXAMPLE_ACTION", () => { ...
import * as actionTypes from "../../src/actions/types"; import exampleReducer from "../../src/reducers/example-reducer"; describe("exampleReducer", () => { test("initial state", () => { expect(exampleReducer(undefined, {})).toEqual({example: ""}); }); test ("when action type is EXAMPLE_ACTION", () => { ...
Test exampleReducer with prior state
Test exampleReducer with prior state
JavaScript
mit
tiere/react-starter,tiere/react-starter
ffabc205276183238c8d6dc1676724508a035c8d
app/common/views/visualisations/volumetrics/number.js
app/common/views/visualisations/volumetrics/number.js
define([ 'extensions/views/single_stat' ], function (SingleStatView) { var NumberView = SingleStatView.extend({ changeOnSelected: true, labelPrefix: '', formatValue: function(value) { return this.formatNumericLabel(value); }, getValue: function () { return this.formatValue(this.co...
define([ 'extensions/views/single_stat' ], function (SingleStatView) { var NumberView = SingleStatView.extend({ changeOnSelected: true, labelPrefix: '', formatValue: function(value) { return this.formatNumericLabel(value); }, getValue: function () { return this.formatValue(this.co...
Add temporary fix for problem where selected model on hover does not exist
Add temporary fix for problem where selected model on hover does not exist
JavaScript
mit
tijmenb/spotlight,alphagov/spotlight,alphagov/spotlight,keithiopia/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,tijmenb/spotlight,keithiopia/spotlight
d9e6d766e7326f0cf96ad172864caa795cc02fdf
app/modules/deliberation/directives/showDiscussion.js
app/modules/deliberation/directives/showDiscussion.js
angular.module('pcApp.deliberation.directives.showDiscussion', [ 'pcApp.adhocracyEmbedder.services.adhocracy', ]) .directive('showDiscussion', ['Adhocracy', function (Adhocracy) { return { restrict: 'E', scope: { path: '@' }, link: function(scope, element, attrs) { ...
angular.module('pcApp.deliberation.directives.showDiscussion', [ 'pcApp.adhocracyEmbedder.services.adhocracy', ]) .directive('showDiscussion', ['API_CONF', 'Adhocracy', function (API_CONF, Adhocracy) { return { restrict: 'E', scope: { key: '@' }, link: function(scope...
Adjust show-discussion directive to actual functionality
Adjust show-discussion directive to actual functionality This now embeds the adhocracy create-or-show-comment-listing widget, which creates new commentables on the fly. This can be used as the following: <show-discussion ng-if="metric.id" data-key="metric_{{ metric.id }}"></show-discussion>
JavaScript
agpl-3.0
bullz/policycompass-frontend,cbotsikas/policycompass-frontend,policycompass/policycompass-frontend,almey/policycompass-frontend,FabiApfelkern/policycompass-frontend,mmilaprat/policycompass-frontend,policycompass/policycompass-frontend,policycompass/policycompass-frontend,almey/policycompass-frontend,bullz/policycompass...
c2cecbfa182b27d93a4c40a602d97ee77ef5949d
fullcalendar-rightclick.js
fullcalendar-rightclick.js
/*! * fullcalendar-rightclick v1.1 * Docs & License: https://github.com/mherrmann/fullcalendar-rightclick * (c) 2015 Michael Herrmann */ (function($) { var fc = $.fullCalendar; var AgendaView = fc.views.agenda; var originalRender = AgendaView.prototype.render; AgendaView.prototype.render = function() { origi...
/*! * fullcalendar-rightclick v1.2 * Docs & License: https://github.com/mherrmann/fullcalendar-rightclick * (c) 2015 Michael Herrmann */ (function($) { function monkeyPatchViewClass(View, dayCssClass) { var originalRender = View.prototype.render; View.prototype.render = function() { originalRender.call(thi...
Add support for FullCalendar's month view.
Add support for FullCalendar's month view.
JavaScript
mit
mherrmann/fullcalendar-rightclick,mherrmann/fullcalendar-rightclick
5244b12616b2c7546d6d78f7914b22a15961a3e0
modules/contextStorage.js
modules/contextStorage.js
'use strict' var context = {/* user id */}; //TODO: Replace with node-cache /*Example: { command: '/track', stage: 'askForTrack', parameters: [ 'Mike Oldfield' ] } */ context.save = function (userId, command, stage, parameters) { context[userId] = {}; context[userId].command = command...
'use strict' var context = {/* user id */}; //TODO: Replace with node-cache /*Example: { command: '/track', stage: 'askForTrack', parameters: [ 'Mike Oldfield' ] } */ context.save = function (userId, command, stage, parameters) { context[userId] = {}; context[userId].command = command...
Add ability to pop parameters
Add ability to pop parameters
JavaScript
mit
TheBeastOfCaerbannog/last-fm-bot
15df3d995d8177651d0806e26f000b85bebd1ce4
client/js/src/security/authentication.js
client/js/src/security/authentication.js
(function() { 'use strict'; angular.module('pub.security.authentication', []) .factory('authentication', [ '$q', '$http', 'securityContext', function($q, $http, securityContext) { var authentication = { requestSecurityContext: function() { debugger; ...
(function() { 'use strict'; angular.module('pub.security.authentication', []) .factory('authentication', [ '$q', '$http', 'securityContext', function($q, $http, securityContext) { var authentication = { requestSecurityContext: function() { if (securityCon...
Remove dubugger; statement from auth controller.
Remove dubugger; statement from auth controller.
JavaScript
mit
carlospaelinck/publications-js,carlospaelinck/publications-js
968ef346f21ebe8048feb1c725c0c31fd77879c1
src/routers/group_router.js
src/routers/group_router.js
import {validate_request} from '../utils/errors' import express from 'express' function validate_request_body(request, response, next_handler) { request.checkBody({ 'screen_name': { notEmpty: { errorMessage: 'parameter is required', }, }, }) validate_request(request, next_handler) } ...
import {check_authentication, validate_request} from '../utils/errors' import express from 'express' function validate_request_body(request, response, next_handler) { request.checkBody({ 'screen_name': { notEmpty: { errorMessage: 'parameter is required', }, }, }) validate_request(req...
Check an authentication in the group router
Check an authentication in the group router
JavaScript
mit
thewizardplusplus/vk-group-stats,thewizardplusplus/vk-group-stats
625ba111d23a074c638df40b95c21fa9c36a5868
src/recursion/pascalsTriangle.js
src/recursion/pascalsTriangle.js
/** * Pascal's triangle is defined as the rth column of the nth row is n! / ( r! x (n - r)!) * * @param {Integer} n * @return {Array} int array where each value represents a level in the triangle. */ function pascalsTriangle(n) { // Check if n is 0. if (!n) return []; // Start with the first level already m...
/** * Pascal's triangle is defined as the rth column of the nth row is n! / ( r! x (n - r)!) * * @param {Integer} n * @return {Array} int array where each value represents a level in the triangle. */ function pascalsTriangle(n) { // Check if the triangle is empty. if (!n) return []; return pascalsTriangleRe...
Add recursive solution for pascals triangle
Add recursive solution for pascals triangle
JavaScript
mit
vinnyoodles/algorithms,vinnyoodles/algorithms,vinnyoodles/algorithms
a5164cf372f181da57ce972a5de8e3a91e2f4a5d
src/redux/reducer.js
src/redux/reducer.js
import * as actType from './action-types'; const initialState = { loadingApi: undefined, runtimeApi: undefined, }; function loadApi(state = initialState, action) { switch (action.type) { case actType.START_LOAD_RUNTIME: return Object.assign({}, state, {loadingApi: 'started'}); case actType.FINISH_...
import * as actType from './action-types'; const initialState = { loadingApi: undefined, runtimeApi: undefined, error: undefined }; function loadApi(state = initialState, action) { switch (action.type) { case actType.START_LOAD_RUNTIME: return Object.assign({}, state, {loadingApi: 'started'}); c...
Add error state and fail payload
Add error state and fail payload
JavaScript
apache-2.0
pcardune/pyret-ide,pcardune/pyret-ide
66d004e2b1f4fb5a269587519bb4a47b25935648
test/specs/issues.spec.js
test/specs/issues.spec.js
'use strict' const vuedoc = require('../..') /* global describe it expect */ describe('issues', () => { describe('#21 - undefined default value is rendering as a non string', () => { it('undefined default value is rendering as a non string', () => { const filecontent = ` <script> export...
'use strict' const vuedoc = require('../..') /* global describe it expect */ describe('issues', () => { describe('#21 - undefined default value is rendering as a non string', () => { it('undefined default value is rendering as a non string', () => { const filecontent = ` <script> export...
Add a test for Spread Operator
Add a test for Spread Operator This closes #7
JavaScript
mit
vuedoc/md,vuedoc/md
04984d3ca2479e98cdec679d707d129eeb30af60
db/create.js
db/create.js
#!/usr/bin/env node var exec = require('child_process').exec; var dbconfig = require(process.cwd() + '/config/database'); var envconfig = dbconfig[process.env.FP_NODE_ENV]; if (!envconfig) throw('invalid environment variable'); function parse (value) { if (typeof(value) == 'object') { return process.env[valu...
#!/usr/bin/env node var exec = require('child_process').exec; var dbconfig = require(process.cwd() + '/config/database'); var envconfig = dbconfig[process.env.FP_NODE_ENV]; if (!envconfig) throw('invalid environment variable'); function parse (value) { if (typeof(value) == 'object') { return process.env[valu...
Remove space between flag and password
Remove space between flag and password
JavaScript
bsd-3-clause
codeforamerica/fast_pass
14db900ae0d48c8b80f9089bcc6192f229a2ec91
src/engines/json/validationError.js
src/engines/json/validationError.js
/** * Error * * @constructor */ var ValidationError = function() { this.length = 0; }; ValidationError.prototype.push = function(item) { this[this.length] = item; this.length += 1; }; /** * GetProperties */ ValidationError.prototype.getProperties = function() { return pluck(this, 'property'); }; Valida...
/** * Error * * @constructor */ var ValidationError = function() { this.length = 0; }; ValidationError.prototype.push = function(error) { this[this.length] = { property: error.property, propertyValue: error.propertyValue, attributeName: error.attributeName, attributeValue: error.attributeValu...
Add a compatibility layer to the ‘Error’ object
Add a compatibility layer to the ‘Error’ object
JavaScript
mit
Baggz/Amanda,apiaryio/Amanda,apiaryio/Amanda
7e6b7463cb3c6a81d32f8bbb3d4a5af0dad57737
test/apk_test_v24.js
test/apk_test_v24.js
var assert = require("assert"); var parseApk = require(".."); describe("APK V24", function () { var output = null; before(function (done) { parseApk(__dirname + "/samples/test_v24.apk", function (err, out) { if (err) { return done(err); } output = ou...
var assert = require("assert"); var parseApk = require(".."); describe("APK V24", function () { var output = null; before(function (done) { parseApk(__dirname + "/samples/test_v24.apk", function (err, out) { if (err) { return done(err); } output = ou...
Change test_v24 to the correct item.
Change test_v24 to the correct item.
JavaScript
mit
rubenv/node-apk-parser
ac87ce6e6055531f6e33a8def6014be7ad53f44b
test/notSupported.js
test/notSupported.js
/*global describe, it */ /*exported should */ /*jshint -W030 */ var should = require('should'), supertest = require('supertest'), app = require('../app'); describe('notSupported', function() { it('should not support anything', function(done) { supertest(app). get('/api/v1/'). expect(500, fu...
/*global describe, it */ /*exported should */ /*jshint -W030 */ var should = require('should'), supertest = require('supertest'), app = require('../app'); describe('notSupported', function() { it('should not support any resources', function(done) { supertest(app). get('/api/v1/questions'). ...
Test AEP and non-API 404s
Test AEP and non-API 404s Signed-off-by: shaisachs <47bd79f9420edf5d0991d1e2710179d4e040d480@ngpvan.com>
JavaScript
apache-2.0
joshco/osdi-service,NGPVAN/osdi-service
bfe5961922d3b73e1f3dfef126bab4c0064a8afd
client/js/directives/give-focus-directive.js
client/js/directives/give-focus-directive.js
"use strict"; angular.module("hikeio"). directive("giveFocus", ["$timeout", function($timeout) { return { link: function(scope, element, attributes) { scope.$watch(attributes.giveFocus, function(value) { if (value) { $timeout(function() { element.focus(); }); } }); } }; }]);
"use strict"; angular.module("hikeio"). directive("giveFocus", ["$timeout", function($timeout) { return { link: function(scope, element, attributes) { scope.$watch(attributes.giveFocus, function(value) { if (value) { $timeout(function() { element.focus(); // Set focus to the end of the inp...
Set focus to the end of the input when giving focus, matters on the preopulated add dialog.
Set focus to the end of the input when giving focus, matters on the preopulated add dialog.
JavaScript
mit
zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io
57c67f110ddbfcc17ae6ab83170018bd778c0062
web_client/views/layout/HeaderView.js
web_client/views/layout/HeaderView.js
import View from '../View'; import HeaderAnalysesView from './HeaderAnalysesView'; import HeaderUserView from './HeaderUserView'; import HeaderImageView from './HeaderImageView'; import router from '../../router'; import events from '../../events'; import headerTemplate from '../../templates/layout/header.pug'; import...
import View from '../View'; import HeaderAnalysesView from './HeaderAnalysesView'; import HeaderUserView from './HeaderUserView'; import HeaderImageView from './HeaderImageView'; import router from '../../router'; import headerTemplate from '../../templates/layout/header.pug'; import '../../stylesheets/layout/header.s...
Remove _setImageText in image header
Remove _setImageText in image header
JavaScript
apache-2.0
DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK
adb12ea094d1e4b82d45489ff3bccf84b5a7791f
src/styles/PrinterStyles.js
src/styles/PrinterStyles.js
export const printStyles = `<style> div { border-radius: 0px !important; box-shadow: none !important; } @media print { @page { margin: 0; } body { margin: 0 0; } img {visibility: hidden; } } </style>`;
export const printStyles = `<style> div { border-width: 0px ! important; border-radius: 0px !important; box-shadow: none !important;} img { visibility: hidden; } @media print { @page { margin: 0; } body { margin: 0 0; } } </style>`;
Fix pdf image appearing and borders appering
[styling]: Fix pdf image appearing and borders appering
JavaScript
mit
AndrewTHuang/fear-the-repo,sujaypatel16/fear-the-repo,dont-fear-the-repo/fear-the-repo,dont-fear-the-repo/fear-the-repo,AndrewTHuang/fear-the-repo,sujaypatel16/fear-the-repo
514a9f2a5b58adefd596d6551373c48397f12076
chromeapi.js
chromeapi.js
(function() { // Find the parent window, which has its parent set to itself. var parentWindow = window; while (parentWindow.parent !== parentWindow) { parentWindow = parentWindow.parent; } function failFunc(msg) { parentWindow.alert('fail: ' + msg); } var onLaunchedListeners = []; chrome = {};...
(function() { // Find the parent window, which has its parent set to itself. var parentWindow = window; while (parentWindow.parent !== parentWindow) { parentWindow = parentWindow.parent; } var onLaunchedListeners = []; chrome = {}; chrome.app = {}; chrome.app.runtime = {}; chrome.app.runtime.onLa...
Fix XHR failed alerts firing incorrectly.
Fix XHR failed alerts firing incorrectly.
JavaScript
bsd-3-clause
hgl888/mobile-chrome-apps,hgl888/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,guozanhua/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,MobileChromeApps/mobile-chrome-apps,chirilo/mobile-chrome-apps,hgl888/mobile-chrome-apps,wudkj/mobile-chrome-apps,chirilo/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,xiaoyanit/m...
e46fd7eb7d2040145d3aab2fe0e097856c4de20d
tests/test-loader.js
tests/test-loader.js
// TODO: load based on params Ember.keys(requirejs._eak_seen).filter(function(key) { return (/\_test/).test(key); }).forEach(function(moduleName) { require(moduleName, null, null, true); });
// TODO: load based on params Ember.keys(requirejs._eak_seen).filter(function(key) { return (/\-test/).test(key); }).forEach(function(moduleName) { require(moduleName, null, null, true); });
Fix test loader for dasherized file names.
Fix test loader for dasherized file names. Commit 036df2e2c00aee broke the test loader so that no test modules were found or loaded, and no tests run.
JavaScript
mit
tobobo/vice-frontend,mtian/ember-app-kit-azure,stefanpenner/ember-app-kit,digitalplaywright/eak-simple-auth-blog-client,achambers/appkit-hanging-test-example,michaelorionmcmanus/eak-bootstrap,shin1ohno/want-js,grese/miner-app-OLD,grese/miner-app-OLD,lucaspottersky/ember-lab-eak,tomclose/minimal_eak_test_stub_problem,to...
217ad8ea81bc57b3bc9830d83b6798bdd11a03e5
packages/components/containers/domains/AddressesSection.js
packages/components/containers/domains/AddressesSection.js
import React from 'react'; import { c } from 'ttag'; import PropTypes from 'prop-types'; import { Alert, Button, PrimaryButton, Block } from 'react-components'; const AddressesSection = ({ onRedirect }) => { return ( <> <Alert>{c('Info for domain modal') .t`Addresses must be con...
import React from 'react'; import { c } from 'ttag'; import PropTypes from 'prop-types'; import { Alert, PrimaryButton, Block } from 'react-components'; const AddressesSection = ({ onRedirect }) => { return ( <> <Alert>{c('Info for domain modal') .t`If you have a subscription pl...
Update text for addresses section
Update text for addresses section
JavaScript
mit
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
a12ef315f9f8996b7b0a9036f4c82ba168e09c51
test/javascript/public/test/settings.js
test/javascript/public/test/settings.js
QUnit.config.urlConfig.push({ id: "jquery", label: "jQuery version", value: ["3.2.1", "3.2.0", "3.1.1", "3.0.0", "2.2.4", "2.1.4", "2.0.3", "1.12.4", "1.11.3"], tooltip: "What jQuery Core version to test against" }); /* Hijacks normal form submit; lets it submit to an iframe to prevent * navigating away from ...
QUnit.config.urlConfig.push({ id: "jquery", label: "jQuery version", value: ["3.2.1", "3.2.1.slim", "3.1.1", "3.1.1.slim", "3.0.0", "3.0.0.slim", "2.2.4", "2.1.4", "2.0.3", "1.12.4", "1.11.3"], tooltip: "What jQuery Core version to test against" }); /* Hijacks normal form submit; lets it submit to an iframe to...
Test against jQuery slim 3.x
Test against jQuery slim 3.x
JavaScript
mit
DavyJonesLocker/client_side_validations,DavyJonesLocker/client_side_validations,DavyJonesLocker/client_side_validations
70ca3912f97118b3f583eca4299114c8ecc67e52
minivents.js
minivents.js
function Events(target){ var events = {}, i, list, args, A = Array; target = target || this /** * On: listen to events */ target.on = function(type, func, ctx){ events[type] || (events[type] = []) events[type].push({f:func, c:ctx}) } /** * Off: stop listening to event / ...
function Events(target){ var events = {}, i, list, args, A = Array; target = target || this /** * On: listen to events */ target.on = function(type, func, ctx){ events[type] || (events[type] = []) events[type].push({f:func, c:ctx}) } /** * Off: stop listening to event / ...
Remove \!, switch ternary outs
Remove \!, switch ternary outs
JavaScript
mit
allouis/minivents,Aestek/minivents,remy/minivents,callpage/minivents,samlin08/minivents,objectliteral/multivents
76a39b70604d5f5fd31c4bc3c878204026a1c05a
tasks/webpack-dev-server.js
tasks/webpack-dev-server.js
var path = require('path'); module.exports = { 'dev': { 'webpack': require(path.join(process.cwd(), 'tasks/config/webpack.js')), 'publicPath': '/public/', 'keepalive': true, 'port': 3000, 'hot': true, 'historyApiFallback': true } };
var path = require('path'); module.exports = { 'dev': { 'webpack': require(path.join(process.cwd(), 'tasks/config/webpack.js')), 'publicPath': '/public/', 'keepalive': true, 'port': 8080, 'hot': true, 'historyApiFallback': true } };
Set default port to 8080
Set default port to 8080
JavaScript
mit
msikma/react-hot-boilerplate,msikma/react-hot-boilerplate
29c079971ecd241a69ccde5bee41f3a0170ab753
game/Wall.js
game/Wall.js
try { window; } catch(e) { var utility = require('./../game/utility'); } function Wall(start_x, start_y, end_x, end_y) { this.start_x = start_x; this.start_y = start_y; this.end_x = end_x; this.end_y = end_y } Wall.prototype.init = function(){ } Wall.prototype.update = function() { } Wall.prototype.rend...
try { window; } catch(e) { var utility = require('./../game/utility'); } function Wall(start_x, start_y, end_x, end_y) { this.start_x = start_x; this.start_y = start_y; this.end_x = end_x; this.end_y = end_y } Wall.prototype.init = function(){ } Wall.prototype.update = function() { } Wall.prototype.rend...
Add render function to wall.js
Add render function to wall.js
JavaScript
apache-2.0
ninjadev/globalgamejam2016,ninjadev/globalgamejam2016
b0948a2a74242a7b37cbf08880e5fb979d8e85c3
packages/lesswrong/lib/modules/indexes.js
packages/lesswrong/lib/modules/indexes.js
import { Comments, Posts } from 'meteor/example-forum'; // Recent Comments query index\ Comments._ensureIndex({'postedAt': -1, '_id': -1}); // Top Posts query index Posts._ensureIndex({'status': -1, 'draft': -1, 'isFuture': -1, 'sticky': -1, 'score': -1, '_id': -1});
import { Comments, Posts } from 'meteor/example-forum'; import { Votes } from "meteor/vulcan:voting"; // Recent Comments query index\ Comments._ensureIndex({'postedAt': -1, '_id': -1}); // Top Posts query index Posts._ensureIndex({'status': -1, 'draft': -1, 'isFuture': -1, 'sticky': -1, 'score': -1, '_id': -1}); //...
Add a missing index (votes by document)
Add a missing index (votes by document)
JavaScript
mit
Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2
f72ab3d284c2b751263de3847c0b908e86d156bc
javascript/userswitcher.js
javascript/userswitcher.js
(function($){ $.entwine('userswitcher', function($){ $('form.userswitcher select').entwine({ onchange : function(){ this.parents('form:first').submit(); } }); $('form.userswitcher .Actions').entwine({ onmatch : function(){ this.hide(); } }); $('body').entwine({ onmatch : function(){...
(function($){ $.entwine('userswitcher', function($){ $('form.userswitcher select').entwine({ onchange : function(){ this.parents('form:first').submit(); this._super(); } }); $('form.userswitcher .Actions').entwine({ onmatch : function(){ this.hide(); this._super(); } }); $('bod...
Add this._super calls to avoid weird JS breaking behaviour
fix(this._super): Add this._super calls to avoid weird JS breaking behaviour
JavaScript
bsd-3-clause
sheadawson/silverstripe-userswitcher,sheadawson/silverstripe-userswitcher
1bd478df6fe6a2a43871d6914a9cc197353a6a06
any-db-postgres/index.js
any-db-postgres/index.js
var pg = require('pg') , Transaction = require('any-db').Transaction , pgNative = null try { pgNative = pg.native } catch (__e) {} exports.forceJS = false exports.createConnection = function (opts, callback) { var backend = chooseBackend() , conn = new backend.Client(opts) conn.begin = Transaction.createBeg...
var pg = require('pg') , Transaction = require('any-db').Transaction , pgNative = null try { pgNative = pg.native } catch (__e) {} exports.forceJS = false exports.createConnection = function (opts, callback) { var backend = chooseBackend() , conn = new backend.Client(opts) conn.begin = begin if (callback)...
Use a single shared 'begin' function in postgres adapter
Use a single shared 'begin' function in postgres adapter
JavaScript
mit
grncdr/node-any-db,MignonCornet/node-any-db
bbf74b2599b124849c59019e181f22e1801293f6
tests/test-01-instantiation.js
tests/test-01-instantiation.js
describe('Syrup Instantiation', function() { it('should instantiate without throwing an error', function() { require('../index.js'); }); });
describe('Syrup Instantiation', function() { it('should instantiate without throwing an error', function() { require('../index.js'); }); it('should instantiate with a faker object as a property', function() { let assert = require('assert'); assert(typeof require('../index.js').faker ...
Check for instantiation of faker on the Syrup class
Check for instantiation of faker on the Syrup class
JavaScript
mpl-2.0
thejsninja/syrup
8228b123661c6dedf988fe6d5ac2be247f7a6a9f
src/components/Sidebar.js
src/components/Sidebar.js
import React, { Component } from 'react' import { string, oneOfType, arrayOf, node } from 'prop-types' import { Helmet } from 'react-helmet' import pick from '../utils/pick' import commonPropTypes from './commonPropTypes' class Sidebar extends Component { static propTypes = { ...commonPropTypes, id: string....
import React, { Component } from 'react' import { string, oneOfType, arrayOf, node } from 'prop-types' import { Helmet } from 'react-helmet' import pick from '../utils/pick' import commonPropTypes from './commonPropTypes' class Sidebar extends Component { static propTypes = { ...commonPropTypes, id: string....
Use null as default prop so it's not rendered
Use null as default prop so it's not rendered
JavaScript
mit
verkstedt/react-amp-components
686f957171786496adae8426e2112b8e7201acc8
app/components/routes.js
app/components/routes.js
import React from 'react' import { Router, Route, hashHistory, IndexRoute } from 'react-router' import App from './App' import Home from './Home' import NewGameContainer from './containers/NewGameContainer' import Games from './Games' export default ( <Router history={hashHistory}> <Route path='/' component={Ap...
import React from 'react' import { Router, Route, hashHistory, IndexRoute } from 'react-router' import App from './App' import Home from './Home' import NewGameContainer from './containers/NewGameContainer' import GamesContainer from './containers/GamesContainer' export default ( <Router history={hashHistory}> ...
Correct Games route component to GamesContainer
Correct Games route component to GamesContainer
JavaScript
mit
georgeF105/handball-scoring,georgeF105/handball-scoring
e73c97463f71717a42ed2f13d02e2ef42c071267
wagtail/wagtailadmin/static_src/wagtailadmin/js/submenu.js
wagtail/wagtailadmin/static_src/wagtailadmin/js/submenu.js
$(function() { var $explorer = $('#explorer'); $('.nav-main .submenu-trigger').on('click', function() { if ($(this).closest('li').find('.nav-submenu').length) { // Close other active submenus first, if any if ($('.nav-wrapper.submenu-active').length && !$(this).closest('li').ha...
$(function() { $('.nav-main .submenu-trigger').on('click', function() { if ($(this).closest('li').find('.nav-submenu').length) { // Close other active submenus first, if any if ($('.nav-wrapper.submenu-active').length && !$(this).closest('li').hasClass('submenu-active')) { ...
Remove useless JS referencing explorer
Remove useless JS referencing explorer
JavaScript
bsd-3-clause
rsalmaso/wagtail,rsalmaso/wagtail,FlipperPA/wagtail,mixxorz/wagtail,takeflight/wagtail,FlipperPA/wagtail,nimasmi/wagtail,jnns/wagtail,FlipperPA/wagtail,gasman/wagtail,takeflight/wagtail,mikedingjan/wagtail,nimasmi/wagtail,zerolab/wagtail,wagtail/wagtail,kaedroho/wagtail,zerolab/wagtail,takeflight/wagtail,kaedroho/wagta...
7f1f44bd33cb95a5b891abec74682c75c7b9c37e
examples/counter/store/configureStore.js
examples/counter/store/configureStore.js
import { createStore, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk'; import invariant from 'redux-immutable-state-invariant'; import devTools from 'remote-redux-devtools'; import reducer from '../reducers'; export default function configureStore(initialState) { const store = createStore(r...
import { createStore, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk'; import invariant from 'redux-immutable-state-invariant'; import { composeWithDevTools } from 'remote-redux-devtools'; import reducer from '../reducers'; export default function configureStore(initialState) { const store ...
Update counter example to use `composeWithDevTools`
Update counter example to use `composeWithDevTools`
JavaScript
mit
zalmoxisus/redux-remote-monitor,zalmoxisus/remote-redux-devtools
89bb5bd242b1208e4775f93ef9ce82171196b07e
tools/closure_compiler_externs/q.js
tools/closure_compiler_externs/q.js
var Q = {}; /** * @constructor */ function QDeferred () {}; QDeferred.prototype.reject = function (args) {}; QDeferred.prototype.resolve = function (args) {}; /** * @type {string} */ QDeferred.prototype.state; /** * @type {string} */ QDeferred.prototype.reason; /** * @returns {QDeferred} */ Q.defer = func...
var Q = {}; /** * @constructor */ function QDeferred () {}; /** * @param {...*} args */ QDeferred.prototype.reject = function (args) {}; /** * @param {...*} args */ QDeferred.prototype.resolve = function (args) {}; /** * @type {string} */ QDeferred.prototype.state; /** * @type {string} */ QDeferred.proto...
Fix externs definitions for Q
tools: Fix externs definitions for Q Set the method Q.resolve and Q.reject to take an optional variadic parameter of any type.
JavaScript
mit
lgeorgieff/nbuild,lgeorgieff/ccbuild
c0b947f1a4cd59045092ee37a4952c015c7b9418
app/initializers/image-imgix.js
app/initializers/image-imgix.js
import BackgroundImage from 'ember-cli-image/components/background-image'; import ImageContainer from 'ember-cli-image/components/image-container'; import XImg from 'ember-cli-image/components/x-img'; import ImgixMixin from 'ember-cli-image-imgix/mixins/imgix-mixin'; import ImgixStaticMixin from 'ember-cli-image-imgix...
import BackgroundImageComponent from 'ember-cli-image/components/background-image-component'; import ImageContainerComponent from 'ember-cli-image/components/image-container-component'; import ImgComponent from 'ember-cli-image/components/img-component'; import ImgixMixin from 'ember-cli-image-imgix/mixins/imgix-mixin...
Use the updated file names for image components in import statements
Use the updated file names for image components in import statements
JavaScript
mit
bustlelabs/ember-cli-image-imgix,bustlelabs/ember-cli-image-imgix
5b21df123a996655337bbf83c95a3cdca6a8c201
app/js/models/business-model.js
app/js/models/business-model.js
'use strict'; var Backbone = require('backbone'); var BusinessModel = Backbone.Model.extend({ parse: function(data) { this.name = data.name; this.address = data.location.display_address.join(' '); this.rating = data.rating; this.specificCategory = data.categories[0][0]; } }); module.exports = Busines...
'use strict'; var Backbone = require('backbone'); var BusinessModel = Backbone.Model.extend({ parse: function(data) { console.log(data.name); this.name = data.name; this.address = data.location.display_address.join(' '); this.rating = data.rating; // this.specificCategory = data.categories[0][0]; ...
Bring back console.log on new data, and comment out troublesome line
Bring back console.log on new data, and comment out troublesome line
JavaScript
mit
Localhost3000/along-the-way
e68b3527d220cfad180273453f7d90ffadf41e36
web/index.js
web/index.js
let express = require('express'), bodyParser = require('body-parser'), morgan = require('morgan'), mustacheExpress = require('mustache-express'), path = require('path'), db = require('./lib/db'); // load configuration let config = { "mongo": { "host": "192.168.0.128", "port": 27017, "db": "g2x" } } // ...
let express = require('express'), bodyParser = require('body-parser'), morgan = require('morgan'), mustacheExpress = require('mustache-express'), path = require('path'), db = require('./lib/db'); // load configuration let config = { "mongo": { "host": "192.168.0.128", "port": 27017, "db": "g2x" } } // ...
Add imu routes and store db reference on app
Add imu routes and store db reference on app
JavaScript
bsd-3-clause
gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2
22c9e0ab626f0954a23093ec71ea98ea33d139d1
plugins/treeview/web_client/views/index.js
plugins/treeview/web_client/views/index.js
import TreeView from './TreeView'; import TreeDialog from './TreeDialog'; export { TreeView, TreeDialog };
import ConfigView from './ConfigView'; import FileDialog from './FileDialog'; import FolderDialog from './FolderDialog'; import ItemDialog from './ItemDialog'; import TreeDialog from './TreeDialog'; import TreeView from './TreeView'; export { ConfigView, FileDialog, FolderDialog, ItemDialog, TreeDi...
Add all views to the plugin namespace
Add all views to the plugin namespace
JavaScript
apache-2.0
jbeezley/girder,jbeezley/girder,manthey/girder,Kitware/girder,data-exp-lab/girder,Xarthisius/girder,Xarthisius/girder,kotfic/girder,RafaelPalomar/girder,jbeezley/girder,manthey/girder,girder/girder,girder/girder,RafaelPalomar/girder,jbeezley/girder,data-exp-lab/girder,Xarthisius/girder,data-exp-lab/girder,Kitware/girde...
8823993762c66303ac6bebbf0ed4899b3bd1eae2
knockout-bind-html.js
knockout-bind-html.js
(function (root, factory) { if(typeof define === 'function' && define.amd) { define(['knockout'], factory); } else { factory(root.ko); } }(this, function(ko) { ko.bindingHandlers.bindHtml = { update: function(element, valueAccessor, allBindings, viewModel, bindingContext) { ko.unwrap(valueAcce...
(function (root, factory) { if(typeof define === 'function' && define.amd) { define(['knockout'], factory); } else { factory(root.ko); } }(this, function(ko) { ko.bindingHandlers.bindHtml = { update: function(element, valueAccessor, allBindings, viewModel, bindingContext) { ko.unwrap(valueAcce...
Refactor Use preprocess to handle html binding as well. Use descendants function to handle binding instead of looping through children.
Refactor Use preprocess to handle html binding as well. Use descendants function to handle binding instead of looping through children.
JavaScript
mit
calvinwoo/knockout-bind-html
f45dac5a23e23e3120e63e42b777ec971844d55a
lib/DefaultOptions.js
lib/DefaultOptions.js
const path = require('path'), ProjectType = require('./ProjectType'); module.exports = projectType => { projectType = projectType || ProjectType.FRONTEND; return { "projectType": projectType, "port": 5000, "liveReloadPort": 35729, "bundleFilename": "main", "distribut...
const path = require('path'), ProjectType = require('./ProjectType'); module.exports = projectType => { projectType = projectType || ProjectType.FRONTEND; return { "projectType": projectType, "port": 5000, "liveReloadPort": 35729, "bundleFilename": "main", "distribut...
Fix default folder for scripts
Fix default folder for scripts
JavaScript
mit
mtfranchetto/smild,mtfranchetto/smild,mtfranchetto/smild
9c0a7c3d2b0f4de752b2cd8490d2c0a103e03a34
app/vendor/js/scancode.js
app/vendor/js/scancode.js
(function($) { $.fn.scancode = function(options) { var settings = $.extend({ dataAttr : 'scancode-callback-path' }, options); return this.each(function() { $(this).click(function(e) { e.preventDefault(); var callbackUrl = document.location.protocol + "//" + document.location....
(function($) { $.fn.scancode = function(options) { var settings = $.extend({ dataAttr : 'scancode-callback-path' }, options); return this.each(function() { $(this).click(function(e) { e.preventDefault(); var callbackUrl = document.location.protocol + "//" + document.location....
Handle devices without Scan Code
Handle devices without Scan Code
JavaScript
mit
enriquez/coinpocketapp.com,MrBluePotato/Dogepocket,enriquez/coinpocketapp.com,MrBluePotato/Dogepocket,enriquez/coinpocketapp.com
092ec9f8f375233572f207059c537b4dbb397d49
app/views/comment-view.js
app/views/comment-view.js
/* global define */ define([ 'jquery', 'underscore', 'backbone', 'marionette', 'dust', 'dust.helpers', 'dust.marionette', 'views/replyable-view', 'controllers/navigation/navigator', 'content/comments/comment-template' ], function ($, _, Backbone, Marionette, dust, dustHelpers, dustMarionette, Reply...
/* global define */ define([ 'jquery', 'underscore', 'backbone', 'marionette', 'dust', 'dust.helpers', 'dust.marionette', 'views/replyable-view', 'controllers/navigation/navigator', 'content/comments/comment-template' ], function ($, _, Backbone, Marionette, dust, dustHelpers, dustMarionette, Reply...
Extend directly from replyable view
Extend directly from replyable view
JavaScript
mit
B3ST/B3,B3ST/B3,B3ST/B3
709f4ff7be7af964ad7c27378d614f7cab5a5895
app/services/session.js
app/services/session.js
import Ember from 'ember'; export default Ember.Object.extend({ savedTransition: null, isLoggedIn: false, currentUser: null, init: function() { this.set('isLoggedIn', localStorage.getItem('isLoggedIn') === '1'); this.set('currentUser', null); }, loginUser: function(user) { ...
import Ember from 'ember'; export default Ember.Object.extend({ savedTransition: null, isLoggedIn: false, currentUser: null, init: function() { var isLoggedIn; try { isLoggedIn = localStorage.getItem('isLoggedIn') === '1'; } catch (e) { isLoggedIn = fals...
Handle localStorage not being available on page load
Handle localStorage not being available on page load You won't be able to log in, but you'll at least be able to browse the site! Closes #47
JavaScript
apache-2.0
mbrubeck/crates.io,mbrubeck/crates.io,rust-lang/crates.io,mbrubeck/crates.io,steveklabnik/crates.io,Susurrus/crates.io,Gankro/crates.io,BlakeWilliams/crates.io,mbrubeck/crates.io,rust-lang/crates.io,steveklabnik/crates.io,Gankro/crates.io,chenxizhang/crates.io,steveklabnik/crates.io,sfackler/crates.io,Gankro/crates.io,...
713ea52be0ee5bcafd7f683d420c28d85fc7b7bf
src/redux/modules/card.js
src/redux/modules/card.js
import { Record as record } from 'immutable'; export class CardModel extends record({ id: null, name: '', mana: null, attack: null, defense: null, }) { constructor(obj) { super(obj); // TODO: find a way to make this even more unique this.uniqId = this.id + +new Date(); } }
import { Record as record } from 'immutable'; let cardModelCount = 0; export class CardModel extends record({ id: null, name: '', mana: null, attack: null, defense: null, }) { constructor(obj) { super(obj); this.uniqId = cardModelCount++; } }
Add uniqueId for each CardModel instance
Add uniqueId for each CardModel instance
JavaScript
mit
inooid/react-redux-card-game,inooid/react-redux-card-game
6ccb7706359674578f00a3b06aa310b9d94a9af3
config/webpack/configuration.js
config/webpack/configuration.js
// Common configuration for webpacker loaded from config/webpacker.yml const { join, resolve } = require('path') const { env } = require('process') const { safeLoad } = require('js-yaml') const { readFileSync } = require('fs') const configPath = resolve('config', 'webpacker.yml') const loadersDir = join(__dirname, 'l...
// Common configuration for webpacker loaded from config/webpacker.yml const { join, resolve } = require('path') const { env } = require('process') const { load } = require('js-yaml') const { readFileSync } = require('fs') const configPath = resolve('config', 'webpacker.yml') const loadersDir = join(__dirname, 'loade...
Update safeLoad to load to fix errer: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default.
Update safeLoad to load to fix errer: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default.
JavaScript
mit
osu-cascades/ecotone-web,osu-cascades/ecotone-web,osu-cascades/ecotone-web,osu-cascades/ecotone-web
b15892304e25b368f293ae5bca7d3a3f354dcbf1
config/env/development.js
config/env/development.js
'use strict'; var _ = require('lodash'); var base = require('./base'); const development = _.merge({}, base, { env: 'development', auth0: { callbackURL: 'http://localhost:9000/auth/callback', clientID: 'uyTltKDRg1BKu3nzDu6sLpHS44sInwOu' }, cip: { client: { logRequests: true } }, site...
'use strict'; var _ = require('lodash'); var base = require('./base'); const development = _.merge({}, base, { env: 'development', auth0: { callbackURL: 'http://localhost:9000/auth/callback', clientID: 'uyTltKDRg1BKu3nzDu6sLpHS44sInwOu' }, cip: { client: { logRequests: true } }, site...
Fix duplicate keys in dev config
Fix duplicate keys in dev config
JavaScript
mit
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
f4d22437eef8e09fe8d71e095ca637a6b0129a95
app/instance-initializers/raven-setup.js
app/instance-initializers/raven-setup.js
import Ember from 'ember'; import config from '../config/environment'; export function initialize(application) { if (Ember.get(config, 'sentry.development') === true) { return; } if (!config.sentry) { throw new Error('`sentry` should be configured when not in development mode.'); } const { dsn...
import Ember from 'ember'; import config from '../config/environment'; export function initialize(application) { if (Ember.get(config, 'sentry.development') === true) { return; } if (!config.sentry) { throw new Error('`sentry` should be configured when not in development mode.'); } const { dsn...
Read sentry release from service if available
Read sentry release from service if available
JavaScript
mit
dschmidt/ember-cli-sentry,damiencaselli/ember-cli-sentry,damiencaselli/ember-cli-sentry,dschmidt/ember-cli-sentry
b0998709266c2a6687f35da3f0de510e267a360e
app/routers/Play/routes/ClassroomLessons/index.js
app/routers/Play/routes/ClassroomLessons/index.js
import Passthrough from 'components/shared/passthrough.jsx'; import { getParameterByName } from 'libs/getParameterByName'; const playRoute = { path: ':lessonID', getComponent: (nextState, cb) => { System.import(/* webpackChunkName: "teach-classroom-lesson" */'components/classroomLessons/play/container.tsx') ...
import Passthrough from 'components/shared/passthrough.jsx'; import { getParameterByName } from 'libs/getParameterByName'; const playRoute = { path: ':lessonID', onEnter: (nextState, replaceWith) => { document.title = 'Quill Lessons'; }, getComponent: (nextState, cb) => { System.import(/* webpackChunk...
Update page titles on Lessons.
Update page titles on Lessons.
JavaScript
agpl-3.0
empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core
31fdd792b9a32f2f9c1223240867c5e527f71f04
assets/js/components/surveys/SurveyViewTrigger.js
assets/js/components/surveys/SurveyViewTrigger.js
/** * External dependencies */ import { useMount } from 'react-use'; import PropTypes from 'prop-types'; /** * Internal dependencies */ import Data from 'googlesitekit-data'; import { CORE_SITE } from '../../googlesitekit/datastore/site/constants'; import { CORE_USER } from '../../googlesitekit/datastore/user/cons...
/** * SurveyViewTrigger component. * * Site Kit by Google, Copyright 2021 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.org/licenses/LICENSE-2...
Add the appropriate file header.
Add the appropriate file header.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
efbdf07b7889ed7cfc643fa71542b70e2b09d276
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ jshint: { files: ['*.js', 'client/app/*.js', 'server/**/*.js', 'database/**/*.js'], options: { ignores: [ // (TODO: add lib files here) ] } }, uglify: { my_target: { files: { 'client...
module.exports = function(grunt) { grunt.initConfig({ jshint: { files: ['*.js', 'client/app/*.js', 'server/**/*.js', 'database/**/*.js', '*.json'], options: { ignores: [ // (TODO: add lib files here) ] } }, uglify: { my_target: { files: { ...
Add bower.json and package.json to jshint checks
[chore] Add bower.json and package.json to jshint checks
JavaScript
mit
SimonDing87/MKSTream,MAKE-SITY/MKSTream,SimonDing87/MKSTream,MAKE-SITY/MKSTream
ea303509f1759de77759c6a1c9bc3a8628621488
Gruntfile.js
Gruntfile.js
module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.initConfig({ jshint: { all: ['*.js', 'test/*.js'], options: { jshintrc: true } }, qunit: { all: ['test/index.html'] } }); grunt.registerTask('test', ['jshint',...
module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.initConfig({ jshint: { all: ['*.js', 'test/*.js'], options: { jshintrc: true } }, qunit: { all: ['test/index.html'] } }); grunt.re...
Convert tabs to spaces in gruntfile.js
Convert tabs to spaces in gruntfile.js
JavaScript
mit
bgrins/ExpandingTextareas,bgrins/ExpandingTextareas,domchristie/ExpandingTextareas,domchristie/ExpandingTextareas
4c3c39866eb0b07108be2489a5f063d0a318709a
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { var packageFile = grunt.file.readJSON("package.json"); grunt.initConfig({ pkg: packageFile, jshint: { all: ["Gruntfile.js", "app.js", "index.js", "controllers/*.js", "routes/*.js", "test/*.js"], options: packageFile.jshintConfig ...
module.exports = function(grunt) { var packageFile = grunt.file.readJSON("package.json"); grunt.initConfig({ pkg: packageFile, jshint: { all: ["Gruntfile.js", "app.js", "config.js", "index.js", "controllers/*.js", "routes/*.js", "test/*.js"], options: packageFile.jsh...
Fix jshint files in gruntfile
Fix jshint files in gruntfile
JavaScript
mit
shakeelmohamed/egress-bootstrap
8f5a7c13dd0f281066e74b281ba203b6cf6499d6
api/src/application/image/image-service.js
api/src/application/image/image-service.js
const s3 = require('aws-sdk').S3; const s3Bucket = require('../../../config')('/aws/s3Bucket'); const logger = require('../../lib/logger'); module.exports = () => ({ uploadImageStream(stream, key) { const contentType = (stream.hapi && stream.hapi.headers['content-type']) ? stream.hapi.headers['content-type...
const s3 = require('aws-sdk').S3; const s3Bucket = require('../../../config')('/aws/s3Bucket'); const logger = require('../../lib/logger'); module.exports = () => ({ uploadImageStream(stream, key) { const contentType = (stream.hapi && stream.hapi.headers['content-type']) ? stream.hapi.headers['content-type...
Set max-age=0 for CacheControl on profile image S3 uploads
Set max-age=0 for CacheControl on profile image S3 uploads
JavaScript
mit
synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform
e0b1be8a781a58fb17444d4abc80a175a6e088d0
app/javascript/components/update_button.js
app/javascript/components/update_button.js
import React from 'react'; import PropTypes from 'prop-types'; export default class UpdateButton extends React.Component { static propTypes = { label: PropTypes.string.isRequired, login: PropTypes.string.isRequired, path: PropTypes.string.isRequired }; constructor(props) { super(props); this...
import React from 'react'; import PropTypes from 'prop-types'; export default class UpdateButton extends React.Component { static propTypes = { label: PropTypes.string.isRequired, login: PropTypes.string.isRequired, path: PropTypes.string.isRequired }; constructor(props) { super(props); this...
Use GraphQL API to update component
Use GraphQL API to update component
JavaScript
mit
k0kubun/github-ranking,k0kubun/githubranking,k0kubun/github-ranking,k0kubun/github-ranking,k0kubun/github-ranking,k0kubun/githubranking,k0kubun/github-ranking,k0kubun/githubranking,k0kubun/githubranking,k0kubun/githubranking
5e516f2018c8855b3278ab1738c04ecbf0bdf388
app/assets/javascripts/active_admin.js
app/assets/javascripts/active_admin.js
//= require jquery.ui.tabs //= require vendor/select2 //= require vendor/redactor $(document).ready(function(){ if($("select.select2").length) { $("select.select2").select2(); } // In one line for easy removal using sed $('#entry_body').redactor({ focus: false, buttons: ['bold', 'italic', 'link', 'unorder...
//= require jquery.ui.tabs //= require vendor/select2 //= require vendor/redactor // ActiveAdmin //= require jquery.ui.datepicker //= require jquery_ujs //= require active_admin/application $(document).ready(function(){ if($("select.select2").length) { $("select.select2").select2(); } // In one line for ea...
Add missing ActiveAdmin js scripts
Add missing ActiveAdmin js scripts
JavaScript
bsd-3-clause
netkodo/otwartezabytki,netkodo/otwartezabytki,netkodo/otwartezabytki,netkodo/otwartezabytki
3cf9d873984cc9621197b0897cbd51520aab0847
ip_record.js
ip_record.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ module.exports = function (BLOCK_INTERVAL_MS, INVALID_AGENT_INTERVAL_MS) { function IpRecord() {} IpRecord.p...
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ module.exports = function (BLOCK_INTERVAL_MS, INVALID_AGENT_INTERVAL_MS) { function IpRecord() {} IpRecord.p...
Check for blocks against the right interval
Check for blocks against the right interval
JavaScript
mpl-2.0
ReachingOut/fxa-customs-server,mozilla/fxa-customs-server,ofer43211/fxa-customs-server,dannycoates/fxa-customs-server,ReachingOut/fxa-customs-server,chilts/fxa-customs-server,ofer43211/fxa-customs-server,mozilla/fxa-customs-server,dannycoates/fxa-customs-server,chilts/fxa-customs-server
4d402d778a574bf131f5d8c19f7deb04f192a872
lib/tests/modules/user_satisfaction_graph.js
lib/tests/modules/user_satisfaction_graph.js
module.exports = function (browser, module, suite, config) { module.axes = module.axes || {}; module.axes.x = module.axes.x || { label: 'Date' }; module.axes.y = module.axes.y || [ { label: 'User satisfaction' } ]; module.trim = module.trim === undefined ? true : module.trim; require...
module.exports = function (browser, module, suite, config) { module.axes = module.axes || {}; module.axes.x = module.axes.x || { label: 'Date' }; module.axes.y = module.axes.y || [ { label: 'User satisfaction' }, { label: 'Not satisfied' }, { label: 'Dissatisfied' }, { label: 'Neither sati...
Update default axes for user satisfaction tables
Update default axes for user satisfaction tables
JavaScript
mit
alphagov/cheapseats
36f040079ed2eef515bc97a2d0bdfea07afb8218
src/context.js
src/context.js
let defaultOptions = { wait: false, renderNullWhileWaiting: true, withRef: false, bindI18n: 'languageChanged loaded', bindStore: 'added removed', translateFuncName: 't', nsMode: 'default', usePureComponent: false }; let i18n; export function setDefaults(options) { defaultOptions = { ...defaultOption...
let defaultOptions = { wait: false, withRef: false, bindI18n: 'languageChanged loaded', bindStore: 'added removed', translateFuncName: 't', nsMode: 'default', usePureComponent: false }; let i18n; export function setDefaults(options) { defaultOptions = { ...defaultOptions, ...options }; } export funct...
Remove last reference to renderNullWhileWaiting
Remove last reference to renderNullWhileWaiting
JavaScript
mit
i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next
ae245b42cb97532d69a55d90b84bc7ef94222426
app/controllers/application.js
app/controllers/application.js
import Em from 'ember'; import { task, timeout } from 'ember-concurrency'; const { computed } = Em; var applicationController = Em.Controller.extend({ activeNote: null, hideSidePanel: false, init: function() { Em.run.scheduleOnce('afterRender', () => { $('body div').first().addClass('app-container');...
import Em from 'ember'; import { task, timeout } from 'ember-concurrency'; const { computed } = Em; var applicationController = Em.Controller.extend({ activeNote: null, hideSidePanel: false, init: function() { Em.run.scheduleOnce('afterRender', () => { Em.$('body div').first().addClass('app-container...
Use Ember namespace for jquery use
Use Ember namespace for jquery use
JavaScript
mit
ddoria921/Notes,ddoria921/Notes
9436c1a758746b34c07ba0d5c58daff830dbbdc8
src/js/components/service-sub-entities.js
src/js/components/service-sub-entities.js
import React, { PropTypes } from 'react' import { Link } from 'react-router' //TODO make it generic (it's duplicated for gsim inputs and outputs) export default function ServiceSubEntities( { entities, uriName, remove, disabled, noMsg, makeLink }) { if (entities.length === 0) return <span className="form-con...
import React, { PropTypes } from 'react' import { Link } from 'react-router' export default function ServiceSubEntities( { entities, uriName, remove, disabled, noMsg, makeLink }) { if (entities.length === 0) return <span className="form-control">{noMsg}</span> return ( <ul className="list-group" style=...
Fix typo in propTypes which led to invalid prop type error messages
Fix typo in propTypes which led to invalid prop type error messages
JavaScript
mit
UNECE/Model-Explorer,UNECE/Model-Explorer
b5fabe752a9d325fe4f944d76fd15d60a3b86261
resources/frontend/app/authenticators/torii-oauth2.js
resources/frontend/app/authenticators/torii-oauth2.js
import Ember from 'ember'; import OAuth2 from 'simple-auth-oauth2/authenticators/oauth2'; export default OAuth2.extend({ authenticate: function (options) { return this.fetchOauthData(options).then(this.fetchAccessToken.bind(this)); }, fetchAccessToken: function (oauthCredentials) { var _this = this; ...
import Ember from 'ember'; import OAuth2 from 'simple-auth-oauth2/authenticators/oauth2'; export default OAuth2.extend({ authenticate: function (options) { return this.fetchOauthData(options).then(this.fetchAccessToken.bind(this)); }, fetchAccessToken: function (oauthCredentials) { var _this = this; ...
Add ID of current user to simple-auth session
Add ID of current user to simple-auth session
JavaScript
mit
nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf
ae6a1c694d46866c581ca47a07c4d561a4d89437
src/eventer.js
src/eventer.js
;(function(exports) { function Eventer() { var callbacks = {}; this.addListener = function(obj, event, callback) { callbacks[event] = callbacks[event] || []; callbacks[event].push({ obj: obj, callback: callback }); return this; }; this.addListener this.on...
;(function(exports) { function Eventer() { var callbacks = {}; this.addListener = function(obj, event, callback) { callbacks[event] = callbacks[event] || []; callbacks[event].push({ obj: obj, callback: callback }); return this; }; this.addListener this.on...
Make Eventer.removeListener actually, like, remove passed listener.
Make Eventer.removeListener actually, like, remove passed listener.
JavaScript
mit
maryrosecook/codewithisla
093c7b77eac28485e2b3ea10396ffb8c96bd5a2b
client/src/js/account/components/General.js
client/src/js/account/components/General.js
/** * * * @copyright 2017 Government of Canada * @license MIT * @author igboyes * */ import React from "react"; import { capitalize } from "lodash"; import { connect } from "react-redux"; import { Label } from "react-bootstrap"; import { Flex, FlexItem } from "../../base"; import ChangePassword from "./Password...
/** * * * @copyright 2017 Government of Canada * @license MIT * @author igboyes * */ import React from "react"; import { capitalize } from "lodash"; import { connect } from "react-redux"; import { Label } from "react-bootstrap"; import { Flex, FlexItem } from "../../base"; import ChangePassword from "./Password...
Add bottom margin to header in account > general
Add bottom margin to header in account > general
JavaScript
mit
igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool
1ef81de1fc3cc846d86adee9ed401bc233447fe8
classes/PluginManager.js
classes/PluginManager.js
const {app} = require('electron'), fs = require('fs-extra'), Path = require('path'), klaw = require('klaw-sync'); var PluginManager = { loadedPlugins: {}, LoadPlugins: function(mod, appEvents) { const appPath = Path.resolve(app.getAppPath() + '/plugins'); var pluginFolders = fs...
const {app} = require('electron'), fs = require('fs-extra'), Path = require('path'), klaw = require('klaw-sync'); var PluginManager = { loadedPlugins: {}, LoadPlugins: function(mod, appEvents) { const appPath = Path.resolve(app.getAppPath() + '/plugins'); var pluginFolders = fs...
Restructure plugin loading to pass Plugin class to each loaded plugin
Restructure plugin loading to pass Plugin class to each loaded plugin Closes #33
JavaScript
mit
ChiefOfGxBxL/Ice-Sickle,ChiefOfGxBxL/Ice-Sickle
2284bd6aa19c4e8104303ec269b306b629150ef7
app/config.js
app/config.js
import { observable } from 'mobx' import getCookie from './utils/getCookie' const config = observable({ projectName: '', spaceKey: '', requiredExtensions: [], baseURL: getCookie('BACKEND_URL') || __BACKEND_URL__ || window.location.origin, packageDev: getCookie('PACKAGE_DEV') || __PACKAGE_DEV__, packageServ...
import { observable, autorun } from 'mobx' import getCookie from './utils/getCookie' const config = observable({ projectName: '', spaceKey: '', requiredExtensions: [], baseURL: getCookie('BACKEND_URL') || __BACKEND_URL__ || window.location.origin, packageDev: getCookie('PACKAGE_DEV') || __PACKAGE_DEV__, pa...
Change title with project name
Change title with project name
JavaScript
bsd-3-clause
Coding/WebIDE-Frontend,Coding/WebIDE-Frontend
e7fa6a14c96140349a5f1bf3c1a3fd954d812f8d
app/js/constants/specificSituations.js
app/js/constants/specificSituations.js
'use strict'; angular.module('ddsCommon').constant('specificSituations', [ { id: 'demandeur_emploi', label: 'Demandeur·euse d’emploi' }, { id: 'etudiant', label: 'Étudiant·e' }, { id: 'retraite', label: 'Retraité·e' }, { id: 'handicap'...
'use strict'; angular.module('ddsCommon').constant('specificSituations', [ { id: 'demandeur_emploi', label: 'En recherche d’emploi' }, { id: 'etudiant', label: 'Étudiant·e' }, { id: 'retraite', label: 'Retraité·e' }, { id: 'handicap', ...
Make gender neutrality more bearable
Make gender neutrality more bearable
JavaScript
agpl-3.0
sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui
e777490e26317068c46884f080140c9f2bf15804
app/__tests__/app-spec.js
app/__tests__/app-spec.js
const path = require('path') const assert = require('yeoman-assert') const helpers = require('yeoman-test') describe('react-zeal', () => { beforeEach(() => { return helpers.run(path.join(__dirname, '../../app')) .withPrompts({ name: 'apples' }) }) test('creates root level files', () => { assert.fi...
const path = require('path') const assert = require('yeoman-assert') const helpers = require('yeoman-test') describe('react-zeal', () => { beforeEach(() => { return helpers.run(path.join(__dirname, '../../app')) .withPrompts({ name: 'apples' }) }) test('creates root level files', () => { assert.fi...
Adjust test for copying eslint config
Adjust test for copying eslint config
JavaScript
mit
CodingZeal/generator-react-zeal,CodingZeal/generator-react-zeal
0782bebcad92c9f8c2af152e805c167781a3f0a9
app/routes/application.js
app/routes/application.js
import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; import { action } from '@ember/object'; import { isPresent } from '@ember/utils'; export default class ApplicationRoute extends Route { @service('remotestorage') storage; @service localData; @service logger; @service...
import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; import { action } from '@ember/object'; import { isPresent } from '@ember/utils'; export default class ApplicationRoute extends Route { @service('remotestorage') storage; @service localData; @service logger; @service...
Fix redirects causing duplicate setup method calls
Fix redirects causing duplicate setup method calls Triggering a transition from the beforeModel method in the application route will cause the beforeModel method to be called again on the next transition. Moving the transition call to the redirect method fixes this.
JavaScript
mpl-2.0
67P/hyperchannel,67P/hyperchannel
5af1c17b0d1d24a310756ab6ecaa33a10c603da7
client/templates/createdoc/create_doc.js
client/templates/createdoc/create_doc.js
Template.createDoc.events({ "submit .new-doc": function(event) { console.log("test"); event.preventDefault(); var title = event.target.title.value; Documents.insert({ title: title }, function(err, _id) { Router.go('workpane', {_id: _id}) }); } })
Template.createDoc.events({ "submit .new-doc": function(event) { console.log("test"); event.preventDefault(); var title = event.target.title.value; Documents.insert({ title: title, createdAt: new Date(), owner: Meteor.userId(), collaborators: [] }, function(err, _id) { ...
Insert additional fields for documents
Insert additional fields for documents
JavaScript
mit
markdownerds/markdownerds,markdownerds/markdownerds
209a36049698406ce03c14eeeabfe4a7700639bb
app/scripts/help/index.js
app/scripts/help/index.js
'use strict'; var App = require('../app'); var Backbone = require('backbone'); var Marionette = require('backbone.marionette'); var _ = require('underscore'); var keyboardShortcuts = require('./keyboardshortcuts.json'); var marked = require('marked'); var controller = { showHelp: function () { var HelpView = re...
'use strict'; var App = require('../app'); var Backbone = require('backbone'); var Marionette = require('backbone.marionette'); var _ = require('underscore'); var keyboardShortcuts = require('./keyboardShortcuts.json'); var marked = require('marked'); var controller = { showHelp: function () { var HelpView = re...
Fix case of filename keyboardShortcuts.json
Fix case of filename keyboardShortcuts.json
JavaScript
mit
Yunheng/nusmods,mauris/nusmods,nusmodifications/nusmods,chunqi/nusmods,chunqi/nusmods,Yunheng/nusmods,zhouyichen/nusmods,nathanajah/nusmods,mauris/nusmods,nusmodifications/nusmods,chunqi/nusmods,zhouyichen/nusmods,nusmodifications/nusmods,mauris/nusmods,Yunheng/nusmods,Yunheng/nusmods,zhouyichen/nusmods,nathanajah/nusm...
c2e3d74abd8fc64e018d8969bc654ec6c263f084
client/app-bundle/views/StudentProfile.js
client/app-bundle/views/StudentProfile.js
var m = require('mithril'); //Components var StudentInfo = require('../components/StudentInfo.js'); var StudentJob = require('../components/StudentJob.js'); var Messaging = require('../components/Messaging.js'); var NewApp = require('../components/forms/NewApp.js'); var Graph ...
var m = require('mithril'); //Components var StudentInfo = require('../components/StudentInfo.js'); var StudentJob = require('../components/StudentJob.js'); var Messaging = require('../components/Messaging.js'); var NewApp = require('../components/forms/NewApp.js'); var Graph ...
Delete row element to fix spacing
Delete row element to fix spacing
JavaScript
mit
mksq/network,mksq/network,mksq/network
6c5ea6fea94d68125e9a32002a897156f64dbf87
common/predictive-text/unit_tests/in_browser/cases/basic.js
common/predictive-text/unit_tests/in_browser/cases/basic.js
var assert = chai.assert; describe('LMLayerWorkerCode', function() { it('should exist!', function() { assert.isFunction(LMLayerWorkerCode, 'Could not find LMLayerWorkerCode! Does embedded_worker.js exist?' ); }); });
var assert = chai.assert; describe('LMLayerWorker', function () { describe('LMLayerWorkerCode', function() { it('should exist!', function() { assert.isFunction(LMLayerWorkerCode, 'Could not find LMLayerWorkerCode! Does embedded_worker.js exist?' ); }); }); describe('Usage within a Web...
Write integration test for LMLayerWorker code.
Write integration test for LMLayerWorker code.
JavaScript
apache-2.0
tavultesoft/keymanweb,tavultesoft/keymanweb
77471e4143cc7e7bd5592236285d5209dea36496
src/html/behaviors/BaseGeometryBehavior.js
src/html/behaviors/BaseGeometryBehavior.js
import BaseMeshBehavior from './BaseMeshBehavior' // base class for geometry behaviors export default class BaseGeometryBehavior extends BaseMeshBehavior { static get type() { return 'geometry' } static get observedAttributes() { return [ 'size' ] } async attributeChangedCallback( element, a...
import BaseMeshBehavior from './BaseMeshBehavior' // base class for geometry behaviors export default class BaseGeometryBehavior extends BaseMeshBehavior { static get type() { return 'geometry' } async connectedCallback( element ) { if (! ( await super.connectedCallback( element ) ) ) return ...
Make geometry behaviors rely on the element's sizechange event rather than on the size attribute. This ensures that element.calculatedSize is up-to-date when it is used, otherwise the size of the geometry can be the wrong value and rendered at the size of the previous frame rather than the size of the current frame.
Make geometry behaviors rely on the element's sizechange event rather than on the size attribute. This ensures that element.calculatedSize is up-to-date when it is used, otherwise the size of the geometry can be the wrong value and rendered at the size of the previous frame rather than the size of the current frame.
JavaScript
mit
trusktr/infamous,trusktr/infamous,trusktr/infamous
f7583fdf37e3d4730dbab5f1165ea0f9b22da7ef
background.js
background.js
chrome.tabs.executeScript(null, {file: "lib/jquery-3.1.1.min.js"}, function() { chrome.tabs.executeScript(null, {file: "content.js"}); });
chrome.webNavigation.onHistoryStateUpdated.addListener(function(details) { chrome.tabs.executeScript(null, {file: "lib/jquery-3.1.1.min.js"}, function() { chrome.tabs.executeScript(null, {file: "content.js"}); }); });
Fix bug when navigating insite
Fix bug when navigating insite
JavaScript
mit
nschulte/indies-stats,nschulte/indies-stats
c8013d930c6cf4bca9e053907c14d74b7b6ad3e3
libtextsecure/protobufs.js
libtextsecure/protobufs.js
;(function() { 'use strict'; window.textsecure = window.textsecure || {}; window.textsecure.protobuf = {}; function loadProtoBufs(filename) { return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}, function(error, result) { var protos = result.build('textsecure'); ...
;(function() { 'use strict'; window.textsecure = window.textsecure || {}; window.textsecure.protobuf = {}; function loadProtoBufs(filename) { return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}, function(error, result) { if (error) { throw error; ...
Throw if we get an error
Proto-loading: Throw if we get an error
JavaScript
agpl-3.0
nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop
4c7c4be66b0c5c38070bfc0c2827b440bb94bacf
app/components/Window2.js
app/components/Window2.js
// @flow import React, { Component } from 'react'; import { Link } from 'react-router'; import { Text } from 'react-dom'; import _ from 'underscore'; import styles from './Window2.css'; import ALL_DATA from '../fixtures/alldata.js'; const ALL_DATA_BY_ID = _.indexBy(ALL_DATA, 'id'); class Window2 extends Component { ...
// @flow import React, { Component } from 'react'; import { Link } from 'react-router'; import { Text } from 'react-dom'; import _ from 'underscore'; import styles from './Window2.css'; import ALL_DATA from '../fixtures/alldata.js'; const ALL_DATA_BY_ID = _.indexBy(ALL_DATA, 'id'); class Window2 extends Component { ...
Update keys to match warnings
Update keys to match warnings
JavaScript
mit
Fresh-maker/razor-client,Fresh-maker/razor-client
a90b5618409689a6455214cb83129db6a5ab9740
docs/examples/TooltipInCopy.js
docs/examples/TooltipInCopy.js
const LinkWithTooltip = React.createClass({ render() { let tooltip = <Tooltip placement="top">{this.props.tooltip}</Tooltip>; return ( <OverlayTrigger overlay={tooltip} delayShow={300} delayHide={150}> <a href={this.props.href}>{this.props.children}</a> </OverlayTrigger> ); } }); c...
const LinkWithTooltip = React.createClass({ render() { let tooltip = <Tooltip>{this.props.tooltip}</Tooltip>; return ( <OverlayTrigger overlay={tooltip} placement="top" delayShow={300} delayHide={150} > <a href={this.props.href}>{this.props.children}</a> </OverlayTri...
Fix tooltip in copy example
Fix tooltip in copy example
JavaScript
mit
dozoisch/react-bootstrap,jesenko/react-bootstrap,mmarcant/react-bootstrap,Terminux/react-bootstrap,Sipree/react-bootstrap,react-bootstrap/react-bootstrap,glenjamin/react-bootstrap,glenjamin/react-bootstrap,HPate-Riptide/react-bootstrap,react-bootstrap/react-bootstrap,apkiernan/react-bootstrap,Lucifier129/react-bootstra...
aa1d70e586b13327c846841f144b6e71ac043716
forceskip.js
forceskip.js
API.on(API.ADVANCE, callback); function callback () { var a = API.getMedia().cid; setTimeout(function() { var b = API.getMedia().cid; if (a === b) { API.sendChat("Track stuck, force skipping!"); API.moderateForceSkip(); } }, (API.getMedia().duration * 1000) + 5000); } API.chatLog...
API.on(API.ADVANCE, callback); function callback () { var a = API.getMedia().cid; var a_dj = API.getDJ().id; setTimeout(function() { var b = API.getMedia().cid; var b_dj = API.getDJ().id; if ((a.cid === b.cid) && (a_dj === b_dj)) { API.sendChat("Track stuck, force skipping!"); API....
Add check on DJ id as well.
Add check on DJ id as well. To prevent a song being skipped because two different DJs play the same song.
JavaScript
mit
ronaldb/plug-forceskip
050c1061c114e1e1789b333aaf394f1a3e1f8ac2
dev/app/components/main/main.controller.js
dev/app/components/main/main.controller.js
(function(){ "use strict"; angular .module('VinculacionApp') .controller('MainController', MainController); function MainController () { var vm = this; vm.expand = false; vm.navItems = [ { title: "HOME", ref: "dashboard.home", icon: "glyphicon glyphicon-home", active: true }, { title:...
(function(){ "use strict"; angular .module('VinculacionApp') .controller('MainController', MainController); MainController.$inject = [ '$rootScope', '$state' ]; function MainController ($rootScope, $state) { var vm = this; vm.expand = false; vm.navItems = [ { title: "HOME", ref: "dashboard.hom...
Fix navigation active item bug
Fix navigation active item bug
JavaScript
mit
Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC
83bc0dd92d68660b6f17aecc06d9d7b3f8c4d2a3
examples/js/main.js
examples/js/main.js
/*Deal with the contene of the click on the navbar and display the page correctly.*/ $('.navbar a[data-ex]').on('click', function(event) { event.preventDefault(); //Remove the active class; document.querySelector('.navbar li.active').classList.remove('active'); //Set the new active class. event.target.parentNode....
/*Deal with the contene of the click on the navbar and display the page correctly.*/ $('.navbar a[data-ex]').on('click', function(event) { event.preventDefault(); //Remove the active class; document.querySelector('.navbar li.active').classList.remove('active'); //Set the new active class. event.target.parentNode....
Add the module pattern for the code exampl.
Add the module pattern for the code exampl.
JavaScript
mit
pierr/prez-js,pierr/prez-js
2ebb380803ed33d22fe9c94fc876b8a9203af057
client/catalog/index.js
client/catalog/index.js
module.exports = [].concat( require('./biomedical-engineering'), require('./chemical-engineering'), require('./computer-science') );
module.exports = [].concat( require('./accounting'), require('./biomedical-engineering'), require('./chemical-engineering'), require('./computer-science') );
Add accounting courses to catalog
Add accounting courses to catalog
JavaScript
mit
KenanY/course-search,KenanY/course-search
11fce40a9d89ab30133917ccae3c9658c00c69af
app/index.js
app/index.js
import 'babel-polyfill'; import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { browserHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import { configure } from 'redux-auth'; import Relay from 'react-relay'; import config...
import 'babel-polyfill'; import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { browserHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import { configure } from 'redux-auth'; import Relay from 'react-relay'; import config...
Use real auth api instead of local one.
Use real auth api instead of local one.
JavaScript
mit
FuBoTeam/fubo-flea-market,FuBoTeam/fubo-flea-market
ced67a4959d3acc121f5029afd061c0420e8f274
packages/envision-docs/gatsby-browser.js
packages/envision-docs/gatsby-browser.js
/* globals require:false */ require('prismjs/themes/prism-solarizedlight.css'); require('./src/scss/docs.scss'); require('envision'); require('envision/dist/envision.css');
/* globals require:false */ require('prismjs/themes/prism.css'); require('./src/scss/docs.scss'); require('envision'); require('envision/dist/envision.css');
Use prism default theme for better contrast
Use prism default theme for better contrast
JavaScript
mit
albinohrn/envision,sitevision/envision,melineric/envision,albinohrn/envision,melineric/envision,sitevision/envision,melineric/envision,albinohrn/envision
efdb3cab14d1d7f03f08f909f3c93ceffda4cd44
gulpfile.js/tasks/sizereport.js
gulpfile.js/tasks/sizereport.js
/* global TASK_CONFIG */ const gulp = require("gulp"); const sizereport = require("gulp-sizereport"); const projectPath = require("../lib/project-path"); function sizeReportTask() { return gulp .src([ projectPath(TASK_CONFIG.basePaths.dest, "**/*"), "*!rev-manifest.json", ]) .pipe( size...
/* global TASK_CONFIG */ const gulp = require("gulp"); const sizereport = require("gulp-sizereport"); const projectPath = require("../lib/project-path"); function sizeReportTask() { return gulp .src([ projectPath(TASK_CONFIG.basePaths.dest, "**/*"), "!" + projectPath(TASK_CONFIG.basePaths.dest, "**/_...
Exclude underscore files and folders from size report
Exclude underscore files and folders from size report
JavaScript
mit
CosminAnca/fosterkit,CosminAnca/fosterkit,CosminAnca/fosterkit,CosminAnca/fosterkit
bc876d3967e40bfa4a9ef259f597121699c2ea18
examples/data/streamer.js
examples/data/streamer.js
var baseline = { "aapl" : 92, "ibm" : 120, "wmt" : 68, "abx" : 13, "msft" : 35 }; var last = {}; setInterval(function(){ // //Add imaginary ticker // var newTicker = Math.random().toString(36).substring(7); // baseline[newTicker] = Math.random(); // // //Remove a random ticker // var keys = Object.keys(baseli...
var header = ['SYMBOL','LAST'] var baseline = { "aapl" : 92, "ibm" : 120.72, "wmt" : 68.93, "abx" : 13.36, "msft" : 35.26 }; var last = {}; setInterval(function(){ // //Add imaginary ticker // var newTicker = Math.random().toString(36).substring(7); // baseline[newTicker] = Math.random(); // // //Re...
Add header values, currency sign
Add header values, currency sign
JavaScript
mit
tecfu/tty-table
d363345909fd366ceba507bfb38a9ff991588478
client/templates/bets/create.js
client/templates/bets/create.js
Template.createBetForm.helpers({ photo: function(){ return Session.get("photo"); } }) Template.createBetForm.events({ "submit .create-bet" : function(event){ event.preventDefault(); var title = event.target.betTitle.value, wager = event.target.betWager.value, user = Meteor.user(), ...
Template.createBetForm.helpers({ photo: function(){ return Session.get("photo"); } }) Template.createBetForm.events({ "submit .create-bet" : function(event){ event.preventDefault(); var title = event.target.betTitle.value, wager = event.target.betWager.value, user = Meteor.user(), ...
Change camera options and remove bad function call in form event.
Change camera options and remove bad function call in form event.
JavaScript
mit
nmmascia/webet,nmmascia/webet
2fb0cb2820dee31b4e48937586f7f98c7ec8aa61
lib/index.js
lib/index.js
var docxReader = require("./docx-reader"); var DocumentConverter = require("./document-to-html").DocumentConverter; var htmlPaths = require("./html-paths"); var documentMatchers = require("./document-matchers"); var style = require("./style-reader").readStyle; exports.Converter = Converter; exports.read = read; export...
var docxReader = require("./docx-reader"); var DocumentConverter = require("./document-to-html").DocumentConverter; var htmlPaths = require("./html-paths"); var documentMatchers = require("./document-matchers"); var style = require("./style-reader").readStyle; exports.Converter = Converter; exports.read = read; export...
Add proper styles for single-level (un)ordered lists to standardOptions
Add proper styles for single-level (un)ordered lists to standardOptions
JavaScript
bsd-2-clause
mwilliamson/mammoth.js,mwilliamson/mammoth.js
11bc63451e7eb35c6a5759fd3ecd55c16fa7a936
lib/index.js
lib/index.js
var es = require('event-stream'), gutil = require('gulp-util'), PluginError = gutil.PluginError; module.exports = function (ops) { ops = ops || {}; var cheerio = ops.cheerio || require('cheerio'); return es.map(function (file, done) { if (file.isNull()) return done(null, file); if (file.isStream...
var es = require('event-stream'), gutil = require('gulp-util'), PluginError = gutil.PluginError; module.exports = function (ops) { ops = ops || {}; var cheerio = ops.cheerio || require('cheerio'); return es.map(function (file, done) { if (file.isNull()) return done(null, file); if (file.isStream...
Allow parser options as param
Allow parser options as param
JavaScript
mit
KenPowers/gulp-cheerio,knpwrs/gulp-cheerio,vast/gulp-cheerio
7de6b0f2868cfe47843a2518482fad7f410c4659
lib/index.js
lib/index.js
/*jshint node:true*/ 'use strict'; var exec = require('child_process').exec; var colors = require('colors'); module.exports = title; /** * Sets title to current CLI tab or window. * * @param {strint} input - Title to set * @param {Boolean} win - Add title to window instead of tab */ function title(input, win) {...
/*jshint node:true*/ 'use strict'; var exec = require('child_process').exec; var colors = require('colors'); module.exports = title; /** * Sets title to current CLI tab or window. * * @param {strint} input - Title to set * @param {Boolean} win - Add title to window instead of tab */ function title(input, win) {...
Add spacing to console output
Add spacing to console output
JavaScript
mit
dvdln/terminal-title
5c19b7c5c701253739e68e9ecd31623b8efb704c
lib/index.js
lib/index.js
var mongoose = require('mongoose'); var ShortId = require('./shortid'); var defaultSave = mongoose.Model.prototype.save; mongoose.Model.prototype.save = function(cb) { for (fieldName in this.schema.tree) { if (this.isNew && this[fieldName] === undefined) { var idType = this.schema.tree[fieldName]; i...
var mongoose = require('mongoose'); var ShortId = require('./shortid'); var defaultSave = mongoose.Model.prototype.save; mongoose.Model.prototype.save = function(cb) { for (fieldName in this.schema.tree) { if (this.isNew && this[fieldName] === undefined) { var idType = this.schema.tree[fieldName]; i...
Handle alternate form of mongoose 11000 error
Handle alternate form of mongoose 11000 error
JavaScript
mit
leeroybrun/mongoose-shortid-nodeps,hiconversion/mongoose-shortid-nodeps
15ee2ff765ca72b0636ba1523abd5c738e10864a
lib/index.js
lib/index.js
'use strict'; module.exports = function () { const trackers = []; let isFinished = false; let onFinished = () => {}; function tryToFinish () { if (all(pluck(trackers, 'executed')) && !isFinished) { isFinished = true; onFinished(pluck(trackers, 'args')); } } return { track () { ...
'use strict'; module.exports = function () { const state = createInitialState(); return { track () { const thisIdx = state.trackers.push({executed: false}) - 1; return function () { state.trackers[thisIdx] = {executed: true, args: argsToArray(arguments)}; tryToFinish(state); ...
Refactor to seperate state from operations
Refactor to seperate state from operations
JavaScript
mit
toboid/all-finished
a74eb06d92a9c5e9daeb946297d4c5e5da005ca6
app/today/views/RTICard.js
app/today/views/RTICard.js
define(['moxie.conf', 'underscore', 'today/views/CardView', 'hbs!today/templates/rti'], function(conf, _, CardView, rtiTemplate) { var RTI_REFRESH = 60000; // 1 minute var RTICard = CardView.extend({ initialize: function() { this.model.on('change', this.render, this); }, ...
define(['moxie.conf', 'underscore', 'today/views/CardView', 'hbs!today/templates/rti'], function(conf, _, CardView, rtiTemplate) { var RTI_REFRESH = 60000; // 1 minute var RTICard = CardView.extend({ initialize: function() { this.model.on('change', this.render, this); }, ...
Test for any RTI element on the POI model
Test for any RTI element on the POI model Previously RTI would be added, now it defaults to []
JavaScript
apache-2.0
ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client
0e8cbc303c97564c98bf9c01b0167209555f7d3c
includeIn.js
includeIn.js
(function(_) { var validationErrorFor = { mixin: 'all mixins must be objects.', object: 'target must be a constuctor or an object.' }, withA = function(errorType, object) { if( !_.isObject(object) ) throw '_.includeIn: ' + validationErrorFor[errorType]; return object; ...
(function(_) { var validationErrors = { fn: 'target must be a function.', mixin: 'all mixins must be objects.', object: 'target must be a constuctor or an object.', }, validationStrategies = { fn: _.isFunction, mixin: _.isObject, object: _.isObject...
Add _.extendIn extension: for allow the use of mixins in functions
Add _.extendIn extension: for allow the use of mixins in functions
JavaScript
mit
serradura/lodash_ext
f71f7b40017cbfd8e77b9b191e53aea73631e9b5
both/collections/groups.js
both/collections/groups.js
Groups = new Mongo.Collection('groups'); var GroupsSchema = new SimpleSchema({ name: { type: String } }); // Add i18n tags GroupsSchema.i18n("groups"); Groups.attachSchema(GroupsSchema); Groups.helpers({ 'homes': function () { // Get group ID var groupId = this._id; // Get all homes assigned ...
Groups = new Mongo.Collection('groups'); var GroupsSchema = new SimpleSchema({ name: { type: String } }); // Add i18n tags GroupsSchema.i18n("groups"); Groups.attachSchema(GroupsSchema); Groups.helpers({ 'homes': function () { // Get group ID var groupId = this._id; // Get all homes assigned ...
Add update allow rule; refactor insert rule
Add update allow rule; refactor insert rule
JavaScript
agpl-3.0
GeriLife/wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing
8c9b63e1e9fff3cee0f4e0df0df3e4e20c729536
extensions/renderer/xwalk_internal_api.js
extensions/renderer/xwalk_internal_api.js
// Copyright (c) 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var callback_listeners = {}; var callback_id = 0; var extension_object; function wrapCallback(args, callback) { if (callback) { var id = (callback...
// Copyright (c) 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var callback_listeners = {}; var callback_id = 0; var extension_object; function wrapCallback(args, callback) { if (callback) { var id = (callback...
Add support for persistent callback listener
[Extensions] Add support for persistent callback listener This is going to be the base of the EventTarget implementation. It is important to remove the listener at some point otherwise the object will leak.
JavaScript
bsd-3-clause
tomatell/crosswalk,alex-zhang/crosswalk,bestwpw/crosswalk,chinakids/crosswalk,siovene/crosswalk,tedshroyer/crosswalk,mrunalk/crosswalk,Pluto-tv/crosswalk,chuan9/crosswalk,xzhan96/crosswalk,crosswalk-project/crosswalk,crosswalk-project/crosswalk-efl,jondong/crosswalk,Bysmyyr/crosswalk,qjia7/crosswalk,zeropool/crosswalk,...
07a718377a43c4be0ea960572f76754403fbd98c
client/views/settings/users/users.js
client/views/settings/users/users.js
Template.usersSettings.created = function () { // Get reference to Template instance var instance = this; // Subscribe to all users instance.subscribe("allUsers"); }; Template.usersSettings.helpers({ "users": function () { // Get all users var users = Meteor.users.find().fetch(); console.log(use...
Template.usersSettings.created = function () { // Get reference to Template instance var instance = this; // Subscribe to all users instance.subscribe("allUsers"); }; Template.usersSettings.helpers({ "users": function () { // Get all users var users = Meteor.users.find().fetch(); return users; ...
Add email and roles helpers
Add email and roles helpers
JavaScript
agpl-3.0
GeriLife/wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing
df2301e1c0d4403743918ad0e4fe7afab95efb4e
ghost/admin/app/controllers/application.js
ghost/admin/app/controllers/application.js
/* eslint-disable ghost/ember/alias-model-in-controller */ import Controller from '@ember/controller'; import {inject as service} from '@ember/service'; export default class ApplicationController extends Controller { @service billing; @service customViews; @service config; @service dropdown; @servi...
/* eslint-disable ghost/ember/alias-model-in-controller */ import Controller from '@ember/controller'; import {computed} from '@ember/object'; import {inject as service} from '@ember/service'; export default Controller.extend({ billing: service(), customViews: service(), config: service(), dropdown: se...
Revert "Refactored ApplicationController to use native class"
Revert "Refactored ApplicationController to use native class" This reverts commit 9b6d4822e72425ceec192723f4d469060afe1ea5. - there is an issue with properties not being tracked correctly and the menu not being shown when returning from the editor - reverting to working version with computed properties for now
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
10894cf1bc17a5985c57c3e1a059803ef90b8d76
src/main/resources/public/js/constants.js
src/main/resources/public/js/constants.js
// User roles app.constant('USER_ROLES', { all: ['ROLES_ADMIN', 'ROLES_LEADER', 'ROLES_WORKER'], admin: 'ROLES_ADMIN', worker: 'ROLES_WORKER', leader: 'ROLES_LEADER' }); // Authentication events app.constant('AUTH_EVENTS', { loginSuccess: 'auth-login-success', badRequest: 'auth-bad-request', ...
// User roles app.constant('USER_ROLES', { all: ['ROLES_ADMIN', 'ROLES_LEADER', 'ROLES_WORKER'], admin: 'ROLES_ADMIN', worker: 'ROLES_WORKER', leader: 'ROLES_LEADER' }); // Authentication events app.constant('AUTH_EVENTS', { loginSuccess: 'auth-login-success', badRequest: 'auth-bad-request', ...
Add new work time value - 3/8
Add new work time value - 3/8
JavaScript
mit
fingo/urlopia,fingo/urlopia,fingo/urlopia,fingo/urlopia,fingo/urlopia