commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
f20d73392debf7d3b6c58235ba1b55b96a501af6
src/Sylius/Bundle/AdminBundle/Resources/private/js/sylius-move-taxon.js
src/Sylius/Bundle/AdminBundle/Resources/private/js/sylius-move-taxon.js
/* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import 'semantic-ui-css/components/api'; import $ from 'jquery'; $.fn.extend({ taxonMoveUp() { const e...
/* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import 'semantic-ui-css/components/api'; import $ from 'jquery'; $.fn.extend({ taxonMoveUp() { const e...
Use "$" instead of "jquery" to follow the import statement
Use "$" instead of "jquery" to follow the import statement
JavaScript
mit
foobarflies/Sylius,kayue/Sylius,Zales0123/Sylius,Sylius/Sylius,lchrusciel/Sylius,diimpp/Sylius,venyii/Sylius,venyii/Sylius,loic425/Sylius,loic425/Sylius,pjedrzejewski/Sylius,lchrusciel/Sylius,pamil/Sylius,foobarflies/Sylius,ezecosystem/Sylius,diimpp/Sylius,mbabker/Sylius,Sylius/Sylius,itinance/Sylius,kayue/Sylius,bitba...
29e081cf15200f090a0824b404e8ede980af3abc
bookchook/static/js/main.js
bookchook/static/js/main.js
function displaySeriesNumber() { var s = document.getElementById("id_series"); var name = s.options[s.selectedIndex].text; if (name != '---------') { document.getElementById("seriesNumber").style.visibility = "visible"; } else { document.getElementById("seriesNumber").style.visibility = "hidden"; ...
function displaySeriesNumber() { var s = document.getElementById("id_series"); var name = s.options[s.selectedIndex].text; if (name != '---------') { document.getElementById("seriesNumber").style.visibility = "visible"; } else { var num = document.getElementById("id_number"); num.value = ''; ...
Clear out series number if the user removes the series option
Clear out series number if the user removes the series option
JavaScript
mit
tombasche/BookChook,tombasche/BookChook,tombasche/BookChook
b28c5ea99b5444f7f2ecfe7ab6ba7eae5ca4b26e
packages/ember-htmlbars/tests/integration/attribute_bindings_test.js
packages/ember-htmlbars/tests/integration/attribute_bindings_test.js
import run from 'ember-metal/run_loop'; import EmberView from 'ember-views/views/view'; import compile from 'ember-template-compiler/system/compile'; import { runAppend, runDestroy } from "ember-runtime/tests/utils"; import { set } from 'ember-metal/property_set'; var view; QUnit.module('ember-htmlbars: {{#with}} an...
import run from 'ember-metal/run_loop'; import EmberView from 'ember-views/views/view'; import compile from 'ember-template-compiler/system/compile'; import { runAppend, runDestroy } from "ember-runtime/tests/utils"; import { set } from 'ember-metal/property_set'; var view; QUnit.module('ember-htmlbars: custom morph...
Add test to ensure that ElementMorph's can be cleaned up.
Add test to ensure that ElementMorph's can be cleaned up.
JavaScript
mit
sivakumar-kailasam/ember.js,mdehoog/ember.js,koriroys/ember.js,loadimpact/ember.js,knownasilya/ember.js,jasonmit/ember.js,ef4/ember.js,Trendy/ember.js,sharma1nitish/ember.js,mitchlloyd/ember.js,qaiken/ember.js,green-arrow/ember.js,danielgynn/ember.js,practicefusion/ember.js,jamesarosen/ember.js,olivierchatry/ember.js,s...
74862ba68053e4c2336dc12f2e7b5b200c28f4e6
helpers/users.js
helpers/users.js
var bcrypt = require('bcrypt'); var redisHelper = require('./redis'); var db = redisHelper.getConnection(); function findByUsername(username, next) { db.hget('users', username, function(err, hashedpw) { if (hashedpw != null) { return next(null, { username: username, hashedpw: hashedpw }); } return...
var bcrypt = require('bcrypt'); var redisHelper = require('./redis'); var db = redisHelper.getConnection(); function findByUsername(username, next) { db.hget('users', username, function(err, hashedpw) { if (hashedpw != null) { return next(null, { username: username, hashedpw: hashedpw }); } return...
Add a 'createUser' function to the user helper module
Add a 'createUser' function to the user helper module
JavaScript
mit
toofishes/coffee-monitor
c47093e82a1814dd421c37fc3cbef9512541d526
test/website.js
test/website.js
var path = require('path'); var _ = require('lodash'); var assert = require('assert'); var fs = require("fs"); var fsUtil = require("../lib/utils/fs"); describe('Website Generator', function () { it('should correctly generate a book to website', function(done) { testGeneration(books[1], "site", function(...
var path = require('path'); var _ = require('lodash'); var assert = require('assert'); var fs = require("fs"); var fsUtil = require("../lib/utils/fs"); describe('Website Generator', function () { it('should correctly generate a book to website', function(done) { testGeneration(books[1], "site", function(...
Add test for generation of multilingual book
Add test for generation of multilingual book
JavaScript
apache-2.0
mautic/documentation,JohnTroony/gitbook,justinleoye/gitbook,alex-dixon/gitbook,mautic/documentation,iamchenxin/gitbook,rohan07/gitbook,ryanswanson/gitbook,youprofit/gitbook,strawluffy/gitbook,a-moses/gitbook,OriPekelman/gitbook,tshoper/gitbook,CN-Sean/gitbook,thelastmile/gitbook,OriPekelman/gitbook,2390183798/gitbook,m...
9d77e8521f17594a2e2dcd4e78e48116a83523f4
js/controllers.js
js/controllers.js
angular.module('mini-data.controllers', []) .controller('mainCtrl', function($scope){ var getTimeInfo = function(){ var now = new Date(); var hours = now.getHours(); var period = 'AM'; var minutes = now.getMinutes(); if(hours > 12){ hours -= 12; period = 'PM'; ...
angular.module('mini-data.controllers', []) .controller('mainCtrl', function($scope){ var getTimeInfo = function(){ var now = new Date(); var hours = now.getHours(); var period = 'AM'; var minutes = now.getMinutes(); if(hours > 12){ hours -= 12; period = 'PM'; ...
Add setInterval to keep clock up to date
Add setInterval to keep clock up to date
JavaScript
mit
tylermcginnis/mini-data
2a8fafbbe8955dd5873e5b0f9c5f2ae931823d67
client/utils/tests/game.js
client/utils/tests/game.js
const { describe, it } = global; import {expect} from 'chai'; import {default as GameUtil} from '../game'; describe('game utilities', () => { it('determines the correct monster', () => { const winMap = [ { ingredients: [ 'BloodOfVirgin', 'EyeOfEnemy' ], expectedMonster: 'Ooze' }, ...
const { describe, it } = global; import {expect} from 'chai'; import {default as GameUtil} from '../game'; describe('game utilities', () => { it('determines the correct monster', () => { const winMap = [ { ingredients: [ 'BloodOfVirgin', 'EyeOfEnemy' ], expectedMonster: 'Ooze' }, ...
Add additional test to determine monster
Add additional test to determine monster
JavaScript
mit
CapsuleCat/GildGame,CapsuleCat/GildGame
16d9447b912d347fbef843d27781273e51df5498
orderedmodel/static/orderedmodel/jquery.inlineordering.js
orderedmodel/static/orderedmodel/jquery.inlineordering.js
/* Code taken from django snippets http://djangosnippets.org/snippets/1053/ */ (function($){ $(function() { $('div.inline-group').sortable({ items: 'div.inline-related', handle: 'h3:first', update: function() { $(this).find('div.inline-related').each(funct...
/* Code taken from django snippets http://djangosnippets.org/snippets/1053/ */ (function($){ $(function() { $('div.inline-group').sortable({ items: 'div.inline-related', handle: 'h3:first', update: function() { $(this).find('div.inline-related').each(funct...
Add a dirty hack for not loosing value of selects while mooving
Add a dirty hack for not loosing value of selects while mooving
JavaScript
bsd-3-clause
MagicSolutions/django-orderedmodel,MagicSolutions/django-orderedmodel
0ab7016ce48ee6b703c1b554104a6b64dcae21df
test/helpers.js
test/helpers.js
import { Builder, Key } from 'selenium-webdriver'; export const driver = new Builder() .forBrowser('chrome') .usingServer('http://localhost:4444/wd/hub') .build(); export const isMac = async () => { const capabilities = await driver.getCapabilities(); const os = capabilities.get('platform'); ret...
import { Builder, Key } from 'selenium-webdriver'; export const driver = new Builder() .forBrowser('chrome') .withCapabilities({ 'browserstack.local': true, 'browserstack.localIdentifier': process.env.BROWSERSTACK_LOCAL_IDENTIFIER || process.env.TRAVIS_JOB_NUMBER }) .usingServer('http://localhost:4444/...
Add browserstack capabilities to webdriver config
chore: Add browserstack capabilities to webdriver config
JavaScript
mit
oriondean/finput,alisd23/finput,ScottLogic/finput,ScottLogic/finput,ScottLogic/finput,oriondean/finput,oriondean/finput,alisd23/finput
8366672d9e2a66d362e8508c6de4f5c7ec822089
tests.bundle.js
tests.bundle.js
var context = require.context('./src', true, /^((?!image).)*\.js$/); context.keys().forEach(context);
// For some reason, we can't store the paths in a list variable and then // iterate. It sounds crazy but it just won't work. Hence, we manually unroll // the would-be loop instead. var context; context = require.context('./components', true, /^((?!image).)*\.js$/); context.keys().forEach(context); context = require.c...
Make unit tests work with restructured source code
test(unit): Make unit tests work with restructured source code
JavaScript
apache-2.0
Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela
0e5774f3c8f90a5f407813e4b11d4089514b4d9d
test/javascripts/unit/hide_department_children_test.js
test/javascripts/unit/hide_department_children_test.js
module("Hide department children", { setup: function() { this.$departments = $( '<div class="js-hide-department-children">' + '<div class="department">' + '<div class="child-organisations">' + '<p>child content</p>' + '</div>' + '</div>' + '</div>'); $('#qunit-...
module("Hide department children", { setup: function() { this.$departments = $( '<div class="js-hide-department-children">' + '<div class="department">' + '<div class="organisations-box">' + '<p>child content</p>' + '</div>' + '</div>' + '</div>'); $('#qunit-fi...
Update javascript test for new structure
Update javascript test for new structure
JavaScript
mit
robinwhittleton/whitehall,askl56/whitehall,hotvulcan/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,hotvulcan/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,alphagov/whitehall,robinwhittleton/whitehall,ggoral/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,askl56/whitehall,YOTOV-LIMITED/whitehall,...
90966fe2a706dc527bc02384d0d4fbb666cd5baf
src/defaults.js
src/defaults.js
/** * @flow */ export const DEFAULT_PATH = '/dispatch/'; export function DEFAULT_ENCODE(_: string, data: Object): string { return JSON.stringify(data); } export function DEFAULT_DECODE(_: string, data: string): Object { return JSON.parse(data); } export default { path: DEFAULT_PATH, encode: DEFAULT_ENCODE, deco...
/** * @flow */ export const DEFAULT_PATH = '/dispatch/'; export function DEFAULT_ENCODE(_: string, data: Object): string { return JSON.stringify(data); } export function DEFAULT_DECODE(_: string, data: string): Object { return JSON.parse(data); } export default { path: DEFAULT_PATH, encodeState: DEFAULT_ENCODE, ...
Fix Default Encode/Decode State Functions
Fix Default Encode/Decode State Functions Fix the default object param names exported from 'defaults.js', so encoding/decoding when no custom functions are given.
JavaScript
mit
nheyn/express-isomorphic-dispatcher
c8549853827a9bc228db02f046ee3221af3408ea
js/components/developer/create-job-screen/calendarCard.js
js/components/developer/create-job-screen/calendarCard.js
import React, { Component } from 'react'; import { Grid, Col, Form, Item, Label, Input, Card, CardItem } from 'native-base'; import CardHeader from '../../common/card-header/cardHeader'; // Temporary constants. These will be moved and implemented in another way in the future! const DATE_STRING = 'Datum'; const TIME_S...
import React, { Component } from 'react'; import { Grid, Col, Form, Item, Label, Input, Card, CardItem } from 'native-base'; import CardHeader from '../../common/card-header/cardHeader'; // Temporary constants. These will be moved and implemented in another way in the future! const DATE_STRING = 'Datum'; const TIME_S...
Make calendar input fields numeric
Make calendar input fields numeric
JavaScript
mit
justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client
fc3736a3932358cb8cf6eda740f771ccd4e41994
forum-web-app/src/app.js
forum-web-app/src/app.js
"use strict"; // src/app.js let Post = { findAll() { return new Promise( (resolve, reject) => { resolve("OK posts!"); }); } }; let ui = { renderPosts(posts) { console.log(posts); } }; Post.findAll().then(ui.renderPosts);
"use strict"; // src/app.js let Post = { findAll() { return new Promise( (resolve, reject) => { let uri = "http://localhost:3000/posts"; let request = new XMLHttpRequest(); request.open("GET", uri, true); request.onload = () => { let status = request.status; if (status ...
Write findApp method for Post. Catch the error
Write findApp method for Post. Catch the error
JavaScript
mit
var-bin/reactjs-training,var-bin/reactjs-training,var-bin/reactjs-training
7badb683985ca10426a7852ba829a66670f04b61
client/tests/webdriver/specs/previewRollupEmail.spec.js
client/tests/webdriver/specs/previewRollupEmail.spec.js
import Rollup from "../pages/rollup.page" describe("Preview rollup page", () => { beforeEach("Open the rollup page", () => { Rollup.open() Rollup.rollup.waitForExist() Rollup.rollup.waitForDisplayed() }) describe("When clicking the email preview button, the daily rollup should be generated", () => {...
import Rollup from "../pages/rollup.page" describe("Preview rollup page", () => { beforeEach("Open the rollup page", () => { Rollup.open() Rollup.rollup.waitForExist() Rollup.rollup.waitForDisplayed() }) describe("When clicking the email preview button, the daily rollup should be generated", () => {...
Make test slightly more robust with latest Chrome
Make test slightly more robust with latest Chrome
JavaScript
mit
NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet
4be4890e4e08680a98dc7ebbd8721a470a18fd3e
test/ringo/promise_test.js
test/ringo/promise_test.js
var assert = require("assert"); var {defer, promises} = require("ringo/promise"); exports.testPromiseList = function() { var d1 = defer(), d2 = defer(), d3 = defer(); var l = promises(d1.promise, d2.promise, d3); // promiseList should convert d3 to promise l.then(function(result) { assert.deepEqual...
var assert = require("assert"); var {defer, promises} = require("ringo/promise"); exports.testPromiseList = function() { var d1 = defer(), d2 = defer(), d3 = defer(), done = defer(); var l = promises(d1.promise, d2.promise, d3); // promiseList should convert d3 to promise l.then(function(result) { ...
Make sure promises test assertions are run by test runner thread
Make sure promises test assertions are run by test runner thread
JavaScript
apache-2.0
oberhamsi/ringojs,oberhamsi/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ringo/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,Transcordia/ringojs,ringo/ringojs,oberhamsi/ringojs,Transcordia/ringojs
89138b1b77808fe3389c74d0616a1100c7ac2060
tests/integration/components/search-facet-worktype/component-test.js
tests/integration/components/search-facet-worktype/component-test.js
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('search-facet-worktype', 'Integration | Component | search facet worktype', { integration: true }); test('it renders', function(assert) { this.set('key', 'type'); this.set('title', 'Type'...
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('search-facet-worktype', 'Integration | Component | search facet worktype', { integration: true }); test('it renders', function(assert) { this.set('key', 'type'); this.set('title', 'Type'...
Modify test to reflect new data being passed in.
Modify test to reflect new data being passed in.
JavaScript
apache-2.0
CenterForOpenScience/ember-osf,binoculars/ember-osf,chrisseto/ember-osf,jamescdavis/ember-osf,jamescdavis/ember-osf,crcresearch/ember-osf,crcresearch/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,baylee-d/ember-osf,chrisseto/ember-osf,binoculars/ember-osf
8221627de162eb9f139749755f190df72581ea6f
app/notes/notes.js
app/notes/notes.js
angular.module('meganote.notes', [ 'ui.router' ]) .config(function($stateProvider) { $stateProvider .state('notes', { url: '/notes', templateUrl: 'notes/notes.html', controller: 'NotesController' }) .state('notes.form', { url: '/:noteId', templateUrl: 'notes/notes-form.html' }...
angular.module('meganote.notes', [ 'ui.router' ]) .config(function($stateProvider) { $stateProvider .state('notes', { url: '/notes', templateUrl: 'notes/notes.html', controller: 'NotesController' }) .state('notes.form', { url: '/:noteId', templateUrl: 'notes/notes-form.html' }...
Remove unused scope from NotesController.
Remove unused scope from NotesController.
JavaScript
mit
camerongrundy/meganote-1,camerongrundy/meganote-1,xternbootcamp16/meganote,xternbootcamp16/meganote
0d2fca47c18f88cf48a31d65231579a9e5cdd2b6
website/src/app/global.components/check-md-content.component.js
website/src/app/global.components/check-md-content.component.js
angular.module('materialscommons').component('checkMdContent', { template: ` <div ng-if="$ctrl.show"> Hello there <md-content> <div ng-repeat="item in $ctrl.items">{{item}}</div> </md-content> </div> `, controller: CheckMDContentComponentController, bindings: ...
angular.module('materialscommons').component('checkMdContent', { template: ` <div layout="column" flex> <div>Hello there from directive<div> <md-content flex> <div ng-repeat="item in $ctrl.items">{{item}}</div> </md-content> </div> `, controller: CheckMDContentCom...
Change directive so that its layout matches the top level.
Change directive so that its layout matches the top level.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
042e6f4ecdf8b9c013da1ad64e7af023fc69abe7
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-respond', contentFor: function(type, config) { if (type === 'head-footer') { var output = '<script src="/ember-cli-respond/respond.min.js"></script>'; if (config.respond.proxy === true) { output += '<link href...
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-respond', contentFor: function(type, config) { if (type === 'head-footer') { var output = '<script src="/ember-cli-respond/respond.min.js"></script>'; if (typeof config.respond !== 'undefined' && config.respond.proxy === ...
Add missing link to external server
Add missing link to external server
JavaScript
mit
sportly/ember-cli-respond,sportly/ember-cli-respond
a5adff4073583686120d66bc132c40f076ae7a9d
index.js
index.js
exports.eejsBlock_styles = function(hook_name, args, cb){ args.content += '<style type="text/css">' + '.toolbar ul li.syncstatus {' + ' display: none;' + ' line-height: 32px;' + ' margin-left: 10px;' + ' font-size: 14pt;' + ' color: #666;' + '}' + "</style>"; cb(); } exports....
exports.eejsBlock_styles = function(hook_name, context, cb){ context.content += '<style type="text/css">' + '.toolbar ul li.syncstatus {' + ' display: none;' + ' line-height: 32px;' + ' margin-left: 10px;' + ' font-size: 14pt;' + ' color: #666;' + '}' + "</style>"; cb(); } exp...
Rename args to context for clarity.
Rename args to context for clarity.
JavaScript
apache-2.0
xavidotron/ep_sync_status,xavidotron/ep_sync_status
c56d1c8541c20fc5d9e89c7eb5f593adcd9f345e
index.js
index.js
var newrelic = require('newrelic'); var express = require('express'); var compression = require('compression'); var seo = require('mean-seo'); var app = express(); // Enable gzip compression. app.use(compression()); // Enable PhantomJS SEO. if (process.env.REDISCLOUD_URL) { // If we've got Redis available, use tha...
var newrelic = require('newrelic'); var express = require('express'); var compression = require('compression'); var seo = require('mean-seo'); var app = express(); // Enable gzip compression. app.use(compression()); // Enable PhantomJS SEO. if (process.env.REDISCLOUD_URL) { // If we've got Redis available, use tha...
Make express server a lot more verbose.
Make express server a lot more verbose.
JavaScript
mpl-2.0
readfwd/macovei,readfwd/macovei
7fec3ec0dacae4318ff4fb1b30e39b59cd56a2b3
index.js
index.js
var PeerServer = require('peer').PeerServer, express = require('express'), Topics = require('./public/src/Topics.js'), app = express(), port = process.env.PORT || 3001; app.use(express.static(__dirname + '/public')); var expressServer = app.listen(port); var io = require('socket.io').listen(expressSer...
'use strict'; var PeerServer = require('peer').PeerServer; var express = require('express'); var Topics = require('./public/src/Topics.js'); var app = express(); var port = process.env.PORT || 3001; app.use(express.static(__dirname + '/public')); var expressServer = app.listen(port); var io = require('socket.io').li...
Validate the server according to jscs
Validate the server according to jscs
JavaScript
mit
kunalrai/kandy,mgechev/ReactChat,Jonekee/ReactChat,jahanzaibbahadur/ReactChat,kunalrai/kandy,jahanzaibbahadur/ReactChat,Jonekee/ReactChat
46d2a2abafc5b29d2de94d5469affc4dad6f7530
index.js
index.js
module.exports = { onLoad: function(callback) { if (typeof callback !== 'function') { throw new Error('"onLoad" must have a callback function'); } withLiveReactload(function(lrload) { var winOnload = window.onload; if (!winOnload || !winOnload.__is_livereactload) { window.onlo...
module.exports = { onLoad: function(callback) { if (typeof callback !== 'function') { throw new Error('"onLoad" must have a callback function'); } withLiveReactload(function(lrload) { var winOnload = window.onload; if (!winOnload || !winOnload.__is_livereactload) { window.onlo...
Fix anonymous class exposing functionality
Fix anonymous class exposing functionality
JavaScript
mit
milankinen/livereactload-api
c1b086651613ffea23d16a78149a7b6a99fdaf94
index.js
index.js
#!/usr/bin/env node const co = require('co'); const util = require('./lib/util'); const runCommand = require('./lib/run.cmd'); const initCommand = require('./lib/init.cmd'); const constants = require('./lib/constants'); const main = function* (argv) { if (argv.help) { return util.writeLn(yield util.help()); }...
#!/usr/bin/env node const co = require('co'); const util = require('./lib/util'); const runCommand = require('./lib/run.cmd'); const initCommand = require('./lib/init.cmd'); const constants = require('./lib/constants'); const main = function* (argv) { if (argv.help) { return util.writeLn(yield util.help()); }...
Add the program name to error messages
refactor: Add the program name to error messages
JavaScript
mit
suzuki-shunsuke/ssh-seed,suzuki-shunsuke/ssh-seed
ea145d64676b1460cf35ab50d920028bc60bce4b
index.js
index.js
'use strict'; var mediaQueryText = require('mediaquery-text'), cheerio = require('cheerio'); module.exports = function (html, options, callback) { var results = {}, $ = cheerio.load(html), styleDataList, styleData; results.css = []; $('style').each(function (index, element) {...
'use strict'; var mediaQueryText = require('mediaquery-text'), cheerio = require('cheerio'); module.exports = function (html, options, callback) { var results = {}, $ = cheerio.load(html, { decodeEntities: false }), styleDataList, styleData; results.css = []; ...
Set decodeEntities to false for cheerio.
Set decodeEntities to false for cheerio.
JavaScript
mit
jonkemp/style-data,jonkemp/style-data
c090742c0e49e9d61ee4c6c55bd4de7bcaefd53f
src/geo/leaflet/leaflet-cartodb-webgl-layer-group-view.js
src/geo/leaflet/leaflet-cartodb-webgl-layer-group-view.js
var TC = require('tangram.cartodb'); var LeafletLayerView = require('./leaflet-layer-view'); var L = require('leaflet'); var LeafletCartoDBVectorLayerGroupView = L.Class.extend({ includes: [ LeafletLayerView.prototype ], options: { minZoom: 0, maxZoom: 28, tileSize: 256, zoomOffset: 0, t...
var TC = require('tangram.cartodb'); var LeafletLayerView = require('./leaflet-layer-view'); var L = require('leaflet'); var LeafletCartoDBVectorLayerGroupView = L.Class.extend({ includes: [ LeafletLayerView.prototype ], options: { minZoom: 0, maxZoom: 28, tileSize: 256, zoomOffset: 0, t...
Add some events and url transform
Add some events and url transform
JavaScript
bsd-3-clause
splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js
a69260520015e65f86532c83c9a4ea2d5aef493b
lib/repository-mappers/figshare/parseL1ArticlePresenters.js
lib/repository-mappers/figshare/parseL1ArticlePresenters.js
import { map } from 'lodash'; function parseL1ArticlePresenter(article) { return { identifier: article.doi, datePublished: article.published_date, title: article.title, } } export default function parseL1ArticlePresenters(articles) { return map(articles, parseL1ArticlePresenter); }
import { map } from 'lodash'; function parseL1ArticlePresenter(article) { return { id: article.id, identifier: article.doi, datePublished: article.published_date, title: article.title, } } export default function parseL1ArticlePresenters(articles) { return map(articles, parseL1ArticlePresenter);...
Add figshare ID to L1 presenter data
Add figshare ID to L1 presenter data
JavaScript
mit
mozillascience/software-discovery-dashboard,mozillascience/software-discovery-dashboard
c988eaec3eb64598b0ef2896cab75cc2f1446954
extensions/fidRemove.ajax.js
extensions/fidRemove.ajax.js
(function($, undefined) { // Is History API reliably supported? (based on Modernizr & PJAX) if (!(window.history && history.pushState && window.history.replaceState && !navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/))) return; // thx to @ic (http://forum.nette.org/cs/profile.php?i...
(function($, undefined) { // Is History API reliably supported? (based on Modernizr & PJAX) if (!(window.history && history.pushState && window.history.replaceState && !navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/))) return; // thx to @ic (http://forum.nette.org/cs/profile.php?i...
Fix removal of antecedent '?' or '&' in fidRemove
Fix removal of antecedent '?' or '&' in fidRemove
JavaScript
mit
vojtech-dobes/nette.ajax.js
5f36949484b810c0d16d513a7df8bf7322cdbfee
lib/ws/factory.js
lib/ws/factory.js
var isNode = typeof window === 'undefined'; var WebSocket = isNode ? require('ws') : window.WebSocket; /** * Wraps a DOM socket with EventEmitter-like syntax. * @param {Socket} socket * @return {Socket} */ function wrapDOM(socket) { function wrapHandler(event, fn) { return (ev) => { if (ev...
var isNode = typeof window === 'undefined'; var WebSocket = isNode ? require('ws') : window.WebSocket; /** * Wraps a DOM socket with EventEmitter-like syntax. * @param {Socket} socket * @return {Socket} */ function wrapDOM(socket) { function wrapHandler(event, fn) { return function(ev) { i...
Remove ES6 from ws/factor for stupid old browsers
Remove ES6 from ws/factor for stupid old browsers
JavaScript
mit
WatchBeam/beam-client-node,WatchBeam/beam-client-node
de6e49b30f2e887346f0025689ffe27dbb4544f7
src/flat-metadata/index.js
src/flat-metadata/index.js
export default class FlatMetaData { static to(data) { return buildMetaData(data); } } function buildMetaData(all) { const items = buildItems(extractAllItems(all)); return {items: items}; } function extractAllItems(all) { const groups = all.groups; let extractedItems = {}; for (let groupName in group...
export default class FlatMetaData { static to(data) { return buildMetaData(data); } } function buildMetaData(all) { const items = buildItems(extractAllItems(all)); return {items: items}; } function extractAllItems(all) { const groups = all.groups; let extractedItems = {}; for (let groupName in group...
Move the clone function closer to it's usage.
Move the clone function closer to it's usage.
JavaScript
mit
tddbin/katas,Semigradsky/katas,Semigradsky/katas,Semigradsky/katas,tddbin/katas,tddbin/katas
bee2e1a3e54492f51cce188b1a84a2f16fd2a320
src/foam/u2/mlang/Table.js
src/foam/u2/mlang/Table.js
foam.CLASS({ package: 'foam.u2.mlang', name: 'Table', extends: 'foam.dao.DAOSink', requires: [ 'foam.dao.ArrayDAO', 'foam.u2.view.TableView', ], properties: [ { name: 'dao', expression: function(of) { return this.ArrayDAO.create({of: of}); }, }, { class: '...
foam.CLASS({ package: 'foam.u2.mlang', name: 'Table', extends: 'foam.dao.DAOSink', requires: [ 'foam.dao.ArrayDAO', 'foam.u2.view.TableView', ], properties: [ { name: 'dao', expression: function(of) { return this.ArrayDAO.create({of: of}); }, }, { class: '...
Remove a useless line of code.
Remove a useless line of code.
JavaScript
apache-2.0
foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm
b94053e63365521d5c24304b9ef2a8356fd6b0ad
src/handleCommitMessage.js
src/handleCommitMessage.js
/** Copyright 2019 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.0 Unless required by applicable law or agreed to in writing, software ...
/** Copyright 2019 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.0 Unless required by applicable law or agreed to in writing, software ...
Support users that do not use git. Console.log the commit message
Support users that do not use git. Console.log the commit message
JavaScript
apache-2.0
google/lintush
a0c20f380902e12b967c62d4bc7eb7d33fadbf27
scripts/cypress/cypress-run.js
scripts/cypress/cypress-run.js
// Based on: https://github.com/cypress-io/cypress/issues/416#issuecomment-337400871 // Runs Cypress runner per integration test. Mitigates memory hogging issues. // Once a Cypress version is released that clears renderer // between tests this hack (entire file) can be removed. const cypress = require('cypress') const...
const cypress = require('cypress') const SCRIPTS_FOLDER = process.env.SCRIPTS_FOLDER || 'test/cypress/integration'; cypress.run({ config: { integrationFolder: SCRIPTS_FOLDER }, env: { API_ROOT: process.env.API_ROOT, USERNAME_EMPLOYEE: process.env.USERNAME_EMPLOYEE, USERNAME_EMPLOYEE_PLUS: proce...
Split spec run merged into one single run command
Split spec run merged into one single run command
JavaScript
mpl-2.0
Amsterdam/atlas,DatapuntAmsterdam/atlas,DatapuntAmsterdam/atlas_prototype,DatapuntAmsterdam/atlas_prototype,DatapuntAmsterdam/atlas,Amsterdam/atlas,Amsterdam/atlas,Amsterdam/atlas,DatapuntAmsterdam/atlas
5fbfbba0b859fcbd35b2800eed0fca5a7533cf67
e2e/index.js
e2e/index.js
import scantradtk from '../lib'; describe('scantradtk', function () { var specification = { extension: 'jpg', pageURL: 'http://lel-scan.co/mangas/${title}/${chapter}/${page}.${extension}?v=f', chapterRule: 'none', pageRule: 'fixed2' }; var mangaTitle = 'shingeki-no-kyojin'; var volumes = { ...
describe('scantradtk', function () { var specification = { extension: 'jpg', pageURL: 'http://lel-scan.co/mangas/${title}/${chapter}/${page}.${extension}?v=f', chapterRule: 'none', pageRule: 'fixed2' }; var mangaTitle = 'shingeki-no-kyojin'; var volumes = { T17: { begin: 68, ...
Fix error on static code analysis by Webstorm
Fix error on static code analysis by Webstorm
JavaScript
mit
m-enochroot/scantradtk
806ad6a42c08e028030e1d785eff2e405c5e4406
website/src/app/global.components/mc-editable-header.component.js
website/src/app/global.components/mc-editable-header.component.js
angular.module('materialscommons').component('mcEditableHeader', { template: ` <div layout="column" layout-align="start stretch"> <span ng-if="!$ctrl.editField" ng-click="$ctrl.editField = true" ng-class="$ctrl.headerClasses" style="cursor: pointer"> ...
angular.module('materialscommons').component('mcEditableHeader', { template: ` <div layout="column" layout-align="start stretch"> <span ng-if="!$ctrl.editField" ng-click="$ctrl.editField = true" ng-class="$ctrl.headerClasses" style="cursor: pointer"> ...
Add onChange handle to call back when a field has been changed.
Add onChange handle to call back when a field has been changed.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
2e15c22971a79d0fb1d091f4e550aa89d46fcbbf
etc/remark/plugins/jsdoc.js
etc/remark/plugins/jsdoc.js
'use strict'; var plugins = []; plugins = plugins.concat( require( './lint/jsdoc.js' ) ); plugins = plugins.concat( require( './eslint' ) ); plugins = plugins.concat( require( './lint-equations' ) ); // EXPORTS // module.exports = plugins;
'use strict'; var plugins = []; plugins = plugins.concat( require( './lint/jsdoc.js' ) ); plugins = plugins.concat( require( './lint-equations' ) ); // EXPORTS // module.exports = plugins;
Remove ESLint plugin to avoid circular dependency
Remove ESLint plugin to avoid circular dependency
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
35af9f09eb606d71af2b542765b09ecf8a2c617f
src/satelize.js
src/satelize.js
// node http api var http = require('http'); /* SERVICE PROVIDED BY TELIZE.COM http://www.telize.com/geoip/46.19.37.108 */ var serviceHost = 'www.telize.com'; var servicePath = '/geoip'; var serviceJSONP = '?callback=getgeoip'; function Satelize() { this.init(); } Satelize.prototype.init = function() { retur...
// node http api var http = require('http'); /* SERVICE PROVIDED BY TELIZE.COM http://www.telize.com/geoip/46.19.37.108 */ var serviceHost = 'www.telize.com'; var servicePath = '/geoip'; var serviceJSONP = '?callback=getgeoip'; function Satelize() { this.init(); } Satelize.prototype.init = function() { retur...
Fix problem when ERROR after a timeout
Fix problem when ERROR after a timeout
JavaScript
mit
darul75/satelize
4bafba4b4498f20014c83023948ca487c41a017b
ep_github.js
ep_github.js
var github = require('connect_auth_github'); var settings = require('../ep_etherpad-lite/node/utils/Settings'); var exp = require('../ep_etherpad-lite/node_modules/express'); exports.expressConfigure = function(hook_name, args, cb) { args.app.use(github.orgAccess({ appId: settings.users.github.appId, ...
var github = require('connect_auth_github'); var settings = require('ep_etherpad-lite/node/utils/Settings'); var exp = require('ep_etherpad-lite/node_modules/express'); exports.expressConfigure = function(hook_name, args, cb) { args.app.use(function(req, res, next) { if (req.url.match(/^\/static/) || req....
Exclude static and javascripts paths.
Exclude static and javascripts paths. Signed-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@stormz.me>
JavaScript
bsd-2-clause
francois2metz/ep_github
9e9fea5b7d825ca5b4877ba793e1223bfc6aff5e
chrome/content/preferences.js
chrome/content/preferences.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/. */ const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; var simplels =...
/* * 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/. */ const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; var simplels =...
Use strict comparisons (2): Fix regression
Use strict comparisons (2): Fix regression
JavaScript
mpl-2.0
nohamelin/simple-locale-switcher
55fbbf2eda90c046493f6c8a7e4b5dd1d9fb6c6c
src/js/components/Alert.js
src/js/components/Alert.js
import classNames from 'classnames'; import React from 'react'; import Icon from './Icon'; const Alert = ({children, flushBottom, showIcon, type}) => { const classes = classNames('alert', { [`alert-${type}`]: type != null, 'flush-bottom': flushBottom === true }); let icon = null; if (showIcon) { ...
import classNames from 'classnames'; import React from 'react'; import Icon from './Icon'; const Alert = ({children, flushBottom, showIcon, type}) => { const classes = classNames('alert', { [`alert-${type}`]: type != null, 'flush-bottom': flushBottom === true }); let icon = null; if (showIcon) { ...
Add wrapper to svg for proper alignment
Add wrapper to svg for proper alignment
JavaScript
apache-2.0
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
426e1767fc1dabfef58a52d476cac6315c2d78cb
src/util/analytics.js
src/util/analytics.js
import Piwik from 'piwik-react-router' /** * @typedef {Object} EventTrackInfo * @property {string} category The event category ('Search', 'Blacklist', etc.). * @property {string} action The event action ('Add Entry', etc.). * @property {string} [name] The optional event name (user input - other custom info). * @p...
import Piwik from 'piwik-react-router' /** * @typedef {Object} EventTrackInfo * @property {string} category The event category ('Search', 'Blacklist', etc.). * @property {string} action The event action ('Add Entry', etc.). * @property {string} [name] The optional event name (user input - other custom info). * @p...
Set up runtime JS error tracking
Set up runtime JS error tracking - this client lib supports it with `trackErrors` option. Seems to work alright giving the line the error occurred at + message
JavaScript
mit
WorldBrain/WebMemex,WorldBrain/WebMemex
19392e6952910413efe67ff54d7ab5efc7ce94ea
src/writer_modules/core/components/container_component.js
src/writer_modules/core/components/container_component.js
var Substance = require('substance'); var $$ = React.createElement; var _ = require("underscore"); var Surface = Substance.Surface; // Container Node // ---------------- // // Represents a flat collection of nodes var ContainerNode = React.createClass({ displayName: "ContainerNode", render: function() { var ...
var Substance = require('substance'); var $$ = React.createElement; var _ = require("underscore"); var Surface = Substance.Surface; // Container Node // ---------------- // // Represents a flat collection of nodes var ContainerNode = React.createClass({ displayName: "ContainerNode", render: function() { var...
Use Fullfledged editor as Surface model.
Use Fullfledged editor as Surface model.
JavaScript
mit
substance/archivist-composer,substance/archivist-composer
fd02546bafc79cb79f3c18323ade4b5f39a78b5e
src/app/frontend/servicebindinglist/servicebindinglist_module.js
src/app/frontend/servicebindinglist/servicebindinglist_module.js
// Copyright 2015 Google Inc. All Rights Reserved. // // 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...
// Copyright 2015 Google Inc. All Rights Reserved. // // 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...
Add an injectable service binding list resource service
Add an injectable service binding list resource service
JavaScript
apache-2.0
vin/dashboard,vin/dashboard,vin/dashboard,vin/dashboard
8bf80cbed1ee6bbf614f142c90c7706009cb380c
lib/node_modules/@stdlib/math/base/dist/arcsine/lib/index.js
lib/node_modules/@stdlib/math/base/dist/arcsine/lib/index.js
'use strict'; /* * When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. */ // MODULES // var setReadOnly = require( '@stdlib/utils/define-read-only-property' ); // MAIN // /** * Top-level namespace. * * @namespace arcsine */ var arcsine = {}; /** * @nam...
'use strict'; /* * When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. */ // MODULES // var setReadOnly = require( '@stdlib/utils/define-read-only-property' ); // MAIN // /** * Top-level namespace. * * @namespace arcsine */ var arcsine = {}; /** * @nam...
Add modules to arcsine namespace
Add modules to arcsine namespace
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
02171c950ff9abe5a90e2d58c334243647facb24
packages/vega-parser/src/parsers/guides/legend-title.js
packages/vega-parser/src/parsers/guides/legend-title.js
import {GuideTitleStyle} from './constants'; import guideMark from './guide-mark'; import {TextMark} from '../marks/marktypes'; import {LegendTitleRole} from '../marks/roles'; import {addEncode} from '../encode/encode-util'; export default function(spec, config, userEncode, dataRef) { var zero = {value: 0}, ti...
import {GuideTitleStyle} from './constants'; import guideMark from './guide-mark'; import {lookup} from './guide-util'; import {TextMark} from '../marks/marktypes'; import {LegendTitleRole} from '../marks/roles'; import {addEncode, encoder} from '../encode/encode-util'; export default function(spec, config, userEncode...
Add configuration properties for legend title specifications.
Add configuration properties for legend title specifications.
JavaScript
bsd-3-clause
vega/vega,vega/vega,vega/vega,vega/vega,lgrammel/vega
22059c4bb9da11791d842cfb4663727ed4dcb118
lib/sqs/index.js
lib/sqs/index.js
"use strict"; module.exports = { SqsConsumer: require('./sqs-consumer') };
"use strict"; module.exports = { SqsConsumer: require('./sqs-consumer'), SqsBase: require('./sqs-base') };
Add missing sqs base import
Add missing sqs base import Add missing sqs base import
JavaScript
mit
meltmedia/aws-sdk-js-ext
6cc5290bd11d750c7b77e7f805468ded0933cf1d
src/components/NextBuses.js
src/components/NextBuses.js
import React from 'react' import { Col, Row } from 'react-bootstrap' import logo from '../images/ripta_logo.png' export default class NextBuses extends React.Component { componentDidMount() { fetch('http://localhost:8000/api/tripupdates/route/34') .then(response => { console.log(response) }...
import React from 'react' import { Col, Row } from 'react-bootstrap' import logo from '../images/ripta_logo.png' export default class NextBuses extends React.Component { constructor(props) { super(props) this.state = { stops: [], tripUpdates: [] } } componentDidMount() { fetch('http...
Call api to get tripupdates and stops
Call api to get tripupdates and stops
JavaScript
mit
one-stop-team/ripta-app,one-stop-team/ripta-app
84e799e1d60b94ba7a98111a0e8811b104e83d9b
packages/truffle-box/box.js
packages/truffle-box/box.js
var utils = require("./lib/utils"); var tmp = require("tmp"); var path = require("path"); var Config = require("truffle-config"); var Box = { unbox: function(url, destination, options) { options = options || {}; options.logger = options.logger || {log: function() {}} return Promise.resolve() .the...
var utils = require("./lib/utils"); var tmp = require("tmp"); var path = require("path"); var Config = require("truffle-config"); var Box = { unbox: function(url, destination, options) { options = options || {}; options.logger = options.logger || { log: () => {} }; const downloadBoxOptions = { fo...
Update some function syntax and add options to the downloadBox call
Update some function syntax and add options to the downloadBox call
JavaScript
mit
ConsenSys/truffle
1b44f360b0aa946d74965c26aae7fd649afcea4a
src/App.js
src/App.js
var gl; var App = new Class({ Implements: Options, options: { name: 'webglet-app', width: 800, height: 600, frameRate: 60 }, initialize: function(element, options) { this.setOptions(options); this.element = element; this.createCanvas(); }, ...
var gl; var App = new Class({ Implements: Options, options: { name: 'webglet-app', width: 800, height: 600, frameRate: 60 }, initialize: function(element, options) { this.setOptions(options); this.element = element; this.createCanvas(); }, ...
Make run loop work within the app class
Make run loop work within the app class
JavaScript
mit
oampo/webglet
0102541131aa840a1ba1812703345f0c096485fc
demo/read-input.js
demo/read-input.js
window.__i10c = {}; window.__i10c.getInputValue = (inputEle) => { return inputEle.value; } window.__i10c.setInputValue = (inputEle, val) => { inputEle.value = val; } window.__i10c.getAllInputValues = () => { var elements = document.getElementsByTagName('input'); for (var i = 0; i < elements.length; i...
window.__i10c = { elements: document.getElementsByTagName('input'), getInputValue: function(inputEle) { return inputEle.value; }, setInputValue: function(inputEle, val) { inputEle.value = val; }, getAllInputValues: function() { for (var i = 0; i < this.elements.length;...
Call getAllInputValues every 2 secs and reorganize the object
Call getAllInputValues every 2 secs and reorganize the object
JavaScript
mit
instartlogic/instartlogic.github.io
cc52754ad5a3049f7034a7b876fa6427f5572d71
test/process.js
test/process.js
var Process = require("../lib/Process"); var chai = require("chai"); var chaiAsPromised = require("chai-as-promised"); chai.use(chaiAsPromised); var expect = chai.expect; describe("Testing Process class", function () { it("echo hello", function () { var process = new Process({ command: "echo", ...
var Process = require("../lib/Process"); var chai = require("chai"); var chaiAsPromised = require("chai-as-promised"); chai.use(chaiAsPromised); var expect = chai.expect; describe("Testing Process class", function () { this.timeout(5000); it("echo hello", function () { var process = new Process({ ...
Increase timeout so that the large stdout test won't fail on slow machine.
Increase timeout so that the large stdout test won't fail on slow machine.
JavaScript
mit
sarosia/proceger,sarosia/proceger
570debb9b600a7f7074e7df8d5a51c4004a68995
js-files/building_objects.js
js-files/building_objects.js
function Person(firstname, lastname) { console.log(this); this.firstname = firstname; this.lastname = lastname; console.log('This function is invoked'); // return { greet: 'I got in the way'}; } var john = new Person('john', 'doe'); var jane = new Person('jane', 'doe'); console.log(john); console.log(jane);
function Person(firstname, lastname) { console.log(this); this.firstname = firstname; this.lastname = lastname; console.log('This function is invoked'); // return { greet: 'I got in the way'}; } Person.prototype.getFullName = function() { return this.firstname + ' ' + this.lastname; } var john = new Pers...
Expand on building objects example
Expand on building objects example
JavaScript
mit
kiriakosv/learn-vanilla-javascript,kiriakosv/learn-vanilla-javascript
94d59bc58351c544de127d543a85f17cd06e2648
js/agency.min.js
js/agency.min.js
/*! * Start Bootstrap - Agency v1.1.1 (http://startbootstrap.com/template-overviews/agency) * Copyright 2013-2016 Start Bootstrap * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) */ !function(t){"use strict";t("a.page-scroll").bind("click",function(o){var a=t(this);t("...
/*! * Start Bootstrap - Agency v1.1.1 (http://startbootstrap.com/template-overviews/agency) * Copyright 2013-2016 Start Bootstrap * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) */ !function(t){"use strict";t("a.page-scroll").bind("click",function(a){var o=t(this);t("...
Hide navbar-collapse on item click
fix: Hide navbar-collapse on item click Updated min file
JavaScript
mit
MisterSchmitz/misterschmitz.github.io,MisterSchmitz/misterschmitz.github.io
28f067f2d324a883f871142c04b0770390d94562
lib/dep-utils.js
lib/dep-utils.js
'use strict'; let fs = require('fs'); let path = require('path'); let parentPath = path.resolve(__dirname, '..'); let config = JSON.parse(fs.readFileSync(path.join(parentPath, '.neutronrc'))); let deps = config.dependencies; exports.srcGlob = function(dep) { if (!(dep in Object.keys(deps))) { return []; } ...
'use strict'; let fs = require('fs'); let path = require('path'); let parentPath = path.resolve(__dirname, '..'); let config = JSON.parse(fs.readFileSync(path.join(parentPath, '.neutronrc'))); let deps = config.dependencies; exports.srcGlob = function(dep) { if (!(dep in deps)) { return []; } let sources =...
Fix bug in dependency utiils :bug:
Fix bug in dependency utiils :bug:
JavaScript
mit
yan-foto/neutron
46272ef11cff3c1a688ddd109d4c9a89fd6958bb
client/client.js
client/client.js
var myUsername = null; var URL = window.location.hostname + ':8080'; var socket = io.connect(URL); var channel; var ready = false; var active = true; var first = true; function updateOwnMessagesInHistory() { $('#message-list li').each(function() { if ($(this).find('strong').text() == myUsername) { ...
var myUsername = null; var URL = window.location.hostname + ':8080'; var socket = io.connect(URL); var channel; var ready = false; var active = true; var first = true; function updateOwnMessagesInHistory() { $('#message-list li').each(function() { if ($(this).find('strong').text() == myUsername) { ...
Remove dead code from login modal window
Remove dead code from login modal window
JavaScript
mit
dionyziz/ting,VitSalis/ting,gtklocker/ting,dionyziz/ting,VitSalis/ting,mbalamat/ting,mbalamat/ting,gtklocker/ting,VitSalis/ting,sirodoht/ting,mbalamat/ting,gtklocker/ting,VitSalis/ting,dionyziz/ting,mbalamat/ting,gtklocker/ting,dionyziz/ting,odyvarv/ting-1,odyvarv/ting-1,sirodoht/ting,sirodoht/ting,odyvarv/ting-1,odyva...
1b2ffe82b641c66bd56643c47798ab9742935113
lib/_internals/proto-deep.js
lib/_internals/proto-deep.js
'use strict'; var startsWith = require('es5-ext/lib/String/prototype/starts-with') , getOwnPropertyNames = Object.getOwnPropertyNames; module.exports = function self(proto, name) { var prop; if (!startsWith.call(name, '__') || (name === '__value') || !(prop = this[name])) { return; } prop.__proto__ = prot...
'use strict'; var remove = require('es5-ext/lib/Array/prototype/remove') , startsWith = require('es5-ext/lib/String/prototype/starts-with') , getOwnPropertyNames = Object.getOwnPropertyNames , objProto = Object.prototype; module.exports = function self(proto, name) { var prop, nuProto; if (!startsWith.ca...
Make sure _children_ property is updated
Make sure _children_ property is updated
JavaScript
mit
medikoo/dbjs
0a3c79d3ce7a084f4485406fa9c81d6d74aea633
gatsby-node.js
gatsby-node.js
let fetch = require('node-fetch'); const getRepository = async (slug) => { const response = await fetch(`https://api.github.com/repos/mirego/${slug}`, { headers: { Authorization: `token ${process.env.GITHUB_TOKEN}`, }, }); return await response.json(); }; exports.sourceNodes = async ({actions, cr...
let fetch = require('node-fetch'); const getRepository = async (slug) => { const response = await fetch(`https://api.github.com/repos/mirego/${slug}`, { headers: { Authorization: `token ${process.env.GITHUB_TOKEN}`, }, }); return await response.json(); }; exports.sourceNodes = async ({actions, cr...
Use “for” instead of “forEach” for external projects too
Use “for” instead of “forEach” for external projects too
JavaScript
bsd-3-clause
mirego/mirego-open-web,mirego/mirego-open-web
ed2ea9871d2c1aad681f40779db49f3ec812da45
src/app.js
src/app.js
import { graphql, buildSchema } from 'graphql'; import schema from './schema'; let id = 1; let query = `{ todo(id: ${id}) { id, text, complete } }`; graphql(schema, query).then((response) => { console.log(response); });
import { graphql } from 'graphql'; import express from 'express'; import graphqlHTTP from 'express-graphql'; import schema from './schema'; let app = express(); app.use('/graphiql', graphqlHTTP({ schema: schema, rootValue: {}, graphiql: true, })); app.use('/', graphqlHTTP({ schema: schema, rootValue: {} }...
Set up graphql api via express
Set up graphql api via express
JavaScript
mit
jall/graphql-todo-backend
eb785e9827999573d4b1d7dd72f365574770c63d
tests/test-helpers.js
tests/test-helpers.js
import { createLocalVue, shallowMount } from '@vue/test-utils'; import LMap from '@/components/LMap.vue'; const localVue = createLocalVue(); export async function wrapInMap (LeafletComponent, props) { const componentWrapper = { render (h) { return h(LeafletComponent, { props }); } }; const wrapper...
import { createLocalVue, shallowMount } from '@vue/test-utils'; import LMap from '@/components/LMap.vue'; const localVue = createLocalVue(); export function getWrapperWithMap (lComponent, propsData, mountOptions) { const mapWrapper = shallowMount(LMap, { localVue }); const componentCreated = lComponent.cre...
Return both component and map wrappers when mounting
Return both component and map wrappers when mounting
JavaScript
mit
KoRiGaN/Vue2Leaflet
c2d9247ea82b07c28dba83580b1c9c50112083f1
ecmascript-testcases/test-dev-call-expr.js
ecmascript-testcases/test-dev-call-expr.js
/* * CallExpression tests */ /*--- { "skip": true } ---*/ /* FIXME: expressions like: foo()() and foo().bar() etc */
/* * CallExpression tests */ /*=== basic 1 2 3 1 2 3 4 ===*/ function f(x) { return function (y) { return function (z) { print(x, y, z); } } } function g(x) { return { foo: function (y) { return function (z) { return { ...
Add a few basic call expression tests
Add a few basic call expression tests
JavaScript
mit
pombredanne/duktape,markand/duktape,reqshark/duktape,chenyaqiuqiu/duktape,skomski/duktape,tassmjau/duktape,tassmjau/duktape,pombredanne/duktape,svaarala/duktape,harold-b/duktape,thurday/duktape,sloth4413/duktape,haosu1987/duktape,harold-b/duktape,zeropool/duktape,nivertech/duktape,skomski/duktape,sloth4413/duktape,svaa...
21f18eb3221dcb26c41bd7ae3ec946aaabff3e33
templates/system/modules/validate-site/themes/base/js/validationbox.js
templates/system/modules/validate-site/themes/base/js/validationbox.js
/* * Author: Pierre-Henry Soria <hello@ph7cms.com> * Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. */ var $validationBox = (function() { $.get(pH7Url.base + 'validate-si...
/* * Author: Pierre-Henry Soria <hello@ph7cms.com> * Copyright: (c) 2015-2016, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. */ var $validationBox = (function() { $.get(pH7Url.base + 'validate-si...
Fix Validate Site popup when open on mobile phones
Fix Validate Site popup when open on mobile phones
JavaScript
mit
pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS
125146ab7275ad18a0b44c84817aa627f53cf811
app/assets/javascripts/reader_profile_january/FAndPEnglishTab.js
app/assets/javascripts/reader_profile_january/FAndPEnglishTab.js
import React from 'react'; import tabProptypes from './tabPropTypes'; import {mostRecentDataPoint} from './dibelsParsing'; import {F_AND_P_ENGLISH} from '../reading/thresholds'; import {Tab} from './Tabs'; export default class FAndPEnglishTab extends React.Component { render() { const {style, onClick, readerJso...
import React from 'react'; import tabProptypes from './tabPropTypes'; import {F_AND_P_ENGLISH} from '../reading/thresholds'; import GenericDibelsTab from './GenericDibelsTab'; export default class FAndPEnglishTab extends React.Component { render() { return ( <GenericDibelsTab {...this.props} ...
Fix highlighting on F&P tab
Reading: Fix highlighting on F&P tab
JavaScript
mit
studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights
9bd72fe7d5b61c78a2e7333a7b746e0e2b37c48b
src/model/operations/statements/StatementsByCategory.js
src/model/operations/statements/StatementsByCategory.js
var _ = require('underscore'), StatementsByFilter = require('./StatementsByFilter'); var StatementsByCategory = function() { }; StatementsByCategory.prototype = { /** * This converts an AmountEntryCollection into a set of Statements * based on what category is stored for the entry. * * @param e...
var _ = require('underscore'), StatementsByFilter = require('./StatementsByFilter'), AmountEntryCollection = require('../../AmountEntryCollection'), Statement = require('../../Statement'); var StatementsByCategory = function() { }; StatementsByCategory.prototype = { /** * This converts an AmountEnt...
Create missing categories mentioned in categoryPreference
Create missing categories mentioned in categoryPreference
JavaScript
mit
onebytegone/banknote-client,onebytegone/banknote-client
bee98d2e01889f0194c6b3083369c489c8380199
js/foundation/foundation.alert.js
js/foundation/foundation.alert.js
;(function ($, window, document, undefined) { 'use strict'; Foundation.libs.alert = { name : 'alert', version : '5.0.3', settings : { animation: 'fadeOut', speed: 300, // fade out speed callback: function (){} }, init : function (scope, method, options) { this.binding...
;(function ($, window, document, undefined) { 'use strict'; Foundation.libs.alert = { name : 'alert', version : '5.1.0', settings : { animation: 'fadeOut', speed: 300, // fade out speed callback: function (){} }, init : function (scope, method, options) { this.binding...
Convert Alert to S selector engine.
Convert Alert to S selector engine.
JavaScript
mit
DaSchTour/foundation-sites,claytonrodgers/foundation,natewiebe13/foundation-sites,themccallister/foundation,oller/foundation,djlotus/foundation,MarcGuay/foundation,Owlbertz/foundation,glizer/foundation,djlotus/foundation,iwikmu/foundation,jaylensoeur/foundation-sites-6,JihemC/Foundation-Demo,RichardLee1978/foundation,l...
8ca1a1e6523fe0142b9158f3492b7610895332c6
source/views/convocations/archived-row.js
source/views/convocations/archived-row.js
// @flow import React from 'react' import {StyleSheet} from 'react-native' import {ListRow, Detail, Title} from '../components/list' import type {PodcastEpisode} from './types' const styles = StyleSheet.create({ row: { paddingTop: 5, paddingBottom: 5, }, }) type Props = { event: PodcastEpisode, onPress: Podc...
// @flow import React from 'react' import {StyleSheet} from 'react-native' import {ListRow, Detail, Title} from '../components/list' import type {PodcastEpisode} from './types' import {fastGetTrimmedText} from '../../lib/html' import {AllHtmlEntities} from 'html-entities' const styles = StyleSheet.create({ row: { ...
Convert entities to readable text in convos
Convert entities to readable text in convos
JavaScript
mit
carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls
c0362bca15b351132849558091798d3a18a1f69f
app/assets/javascripts/controllers/dashboard_controller.js
app/assets/javascripts/controllers/dashboard_controller.js
Hummingbird.DashboardController = Ember.Controller.extend({ currentTab: "dashboard", highlightDasboard: function() { return this.get('currentTab') == "dashboard" }.property('currentTab'), highlightPosts: function() { return this.get('currentTab') == "posts" }.property('currentTab'), highlightMedia: function()...
Hummingbird.DashboardController = Ember.Controller.extend({ currentTab: "dashboard", highlightDasboard: function() { return this.get('currentTab') == "dashboard" }.property('currentTab'), highlightPosts: function() { return this.get('currentTab') == "posts" }.property('currentTab'), highlightMedia: function()...
Fix loading more posts on UserActivity tab
Fix loading more posts on UserActivity tab
JavaScript
apache-2.0
Snitzle/hummingbird,NuckChorris/hummingbird,cybrox/hummingbird,paladique/hummingbird,paladique/hummingbird,erengy/hummingbird,MiLk/hummingbird,sidaga/hummingbird,xhocquet/hummingbird,synthtech/hummingbird,astraldragon/hummingbird,astraldragon/hummingbird,astraldragon/hummingbird,Snitzle/hummingbird,jcoady9/hummingbird,...
9052c8f501950955408d482919515ede0dc15b3b
app/assets/javascripts/extensionNew.js
app/assets/javascripts/extensionNew.js
jQuery(function() { var updateNameAndDescription = function() { var urlField = $("#extension-url-short-field"); var repos = urlField.data("repos"); var current = urlField.val(); var repo = null; for (var i = 0; i < repos.length; i++) { if (repos[i].full_name == current) { repo = re...
jQuery(function() { var updateNameAndDescription = function() { var urlField = $("#extension-url-short-field"); var repos = urlField.data("repos"); var current = urlField.val(); var repo = null; for (var i = 0; i < repos.length; i++) { if (repos[i].full_name == current) { repo = re...
Fix repo select on create
Fix repo select on create
JavaScript
apache-2.0
ManageIQ/depot.manageiq.org,ManageIQ/depot.manageiq.org,ManageIQ/depot.manageiq.org,ManageIQ/depot.manageiq.org
49772547b7a0f6e075dc8574dba9866a59f8ef3b
lib/index.js
lib/index.js
module.exports = require('./common/minilog.js'); var consoleLogger = require('./node/console.js'); // intercept the pipe method and transparently wrap the stringifier, if the // destination is a Node core stream module.exports.Stringifier = require('./node/stringify.js'); var oldPipe = module.exports.pipe; module.e...
module.exports = require('./common/minilog.js'); var consoleLogger = require('./node/console.js'); // if we are running inside Electron then use the web version of console.js isChrome = (typeof navigator != 'undefined' && /chrome/i.test(navigator.userAgent)); if (isChrome) { consoleLogger = require('./web/console...
Use the Chrome formatter when running in Electron
Use the Chrome formatter when running in Electron
JavaScript
mit
mixu/minilog,mixu/minilog
9ca77ef65b4b05cf65527ca679b6aa3549dc8a47
spec/utils/checksize.js
spec/utils/checksize.js
#!/usr/bin/env node const { exec } = require('child_process'); const limit = 5000; exec('du -k --total browser/*', (err, stdout) => { if (err) { console.error(err); process.exit(1); } const lines = stdout.split('\n'); const entries = {}; lines.forEach((line) => { if (!line.length) { return; ...
#!/usr/bin/env node const { exec } = require('child_process'); const limit = 5000; exec('du -k --total browser/* --exclude *.map', (err, stdout) => { if (err) { console.error(err); process.exit(1); } const lines = stdout.split('\n'); const entries = {}; lines.forEach((line) => { if (!line.length) ...
Exclude sourcemaps from size check
Exclude sourcemaps from size check
JavaScript
mit
noflo/noflo-browser,noflo/noflo-browser
c520b41c2318abcd1e224eee15d4368a460f395b
lib/index.js
lib/index.js
/** * Raw asychronous filter methods. * * @type {object} */ exports.filtersAsync = require('./lib/async/filters'); /** * Raw sychronous filter methods. * * @type {object} */ exports.filtersSync = require('./lib/sync/filters'); /** * Raw asynchronous tag objects. * * @type {object} */ exports.tagsAsync = r...
// # Project Scaffolder Extras // // ## Components // // * [folderize.js](sync/filters/folderize.js.html) - Transform a package notation to folderized notation; // * [ansibleVariable.js](sync/filters/ansibleVariable.js.html) - A way to dynamically create variable names for templates which are Jinja templates at the end...
Rewrite a file for documentation
Rewrite a file for documentation
JavaScript
mit
lotaris/project-scaffolder-extras
3aba835cb44a5fcde383da493dca5a1ea8f08788
LayoutTests/fast/repaint/resources/text-based-repaint.js
LayoutTests/fast/repaint/resources/text-based-repaint.js
// Asynchronous tests should manually call finishRepaintTest at the appropriate time. window.testIsAsync = false; function runRepaintTest() { if (!window.testRunner || !window.internals) { setTimeout(repaintTest, 100); return; } if (window.enablePixelTesting) testRunner.dumpAsTextW...
// Asynchronous tests should manually call finishRepaintTest at the appropriate time. window.testIsAsync = false; function runRepaintTest() { if (!window.testRunner || !window.internals) { setTimeout(repaintTest, 100); return; } if (window.enablePixelTesting) testRunner.dumpAsTextW...
Make text based repaint output not appear in images
Make text based repaint output not appear in images BUG=345027 Review URL: https://codereview.chromium.org/197553008 git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@169165 bbb929c8-8fbe-4397-9dbb-9b2b20218538
JavaScript
bsd-3-clause
primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs
630972104531fde89d921c03bc01c3b813fc0304
public/js/app.js
public/js/app.js
window.Chip8 = require('../../src/chip8'); window.chip8 = new Chip8(function() {console.log('beep')}); console.log('chip8 is here!');
document.addEventListener('DOMContentLoaded', function() { Chip8 = require('../../src/chip8'); chip8 = new Chip8(function() {console.log('beep')}); console.log('chip8 is here!'); });
Load Chip8 after DOM ready
Load Chip8 after DOM ready
JavaScript
mit
concreted/chipjs,concreted/chipjs
cdf3efcaa925d3e0261de9b62de038e7a48a48a6
examples/Icon/BasicIcons.js
examples/Icon/BasicIcons.js
import React from 'react'; import Icon from 'src/Icon'; function BasicIconsSet() { return ( <div> <Icon type="add" /> <Icon type="edit" /> <Icon type="duplicate" /> <Icon type="copypaste" /> <Icon type="tickets" /> <Icon type="trashca...
import React from 'react'; import Icon from 'src/Icon'; function BasicIconsSet() { return ( <div> <Icon type="add" /> <Icon type="edit" /> <Icon type="duplicate" /> <Icon type="copypaste" /> <Icon type="tickets" /> <Icon type="trashca...
Add example for download icon
Add example for download icon
JavaScript
apache-2.0
iCHEF/gypcrete,iCHEF/gypcrete
0e955871fedbff06c859ef5dbd1acfacb8f56c97
examples/battery-voltage.js
examples/battery-voltage.js
var five = require('johnny-five'); var ChipIO = require('../index'); // or require('chip-io'); var board = new five.Board({ io: new ChipIO() }); board.on('ready', function() { // create (analog) sensor on BAT pin var bat = new five.Sensor('BAT'); // listen for value changes bat.on('change', function(value)...
var five = require('johnny-five'); var chipio = require('../index'); // or require('chip-io'); var board = new five.Board({ io: new chipio() }); board.on('ready', function() { // create battery voltage sensor var batteryVoltage = new chipio.BatteryVoltage(); // listen for value changes batteryVoltage.on('c...
Update battery voltage example to use chipio.BatteryVoltage
Update battery voltage example to use chipio.BatteryVoltage
JavaScript
mit
sandeepmistry/node-chip-io
e1166254a34d0c104b9c3b1baf0eb8295bd9ecd0
modules/offline/index.js
modules/offline/index.js
const _ = require('lodash') const path = require('path') // https://github.com/NekR/offline-plugin/blob/master/docs/examples/SPA.md // https://github.com/NekR/offline-plugin-pwa const defaults = { safeToUseOptionalCaches: true, externals: [ '/' ], AppCache: { events: true, FALLBACK: {'/': '/offli...
const _ = require('lodash') const path = require('path') // https://github.com/NekR/offline-plugin/blob/master/docs/examples/SPA.md // https://github.com/NekR/offline-plugin-pwa module.exports = function nuxtOffline(options) { if (this.options.offline === false || this.options.dev) { return } // common.[ch...
Use proper asset regex based on build.filenames
fix(offline): Use proper asset regex based on build.filenames
JavaScript
mit
nuxt-community/modules
a9cae81645a95838d27c702c68fa9a6a60fbad5e
js/enemyType.js
js/enemyType.js
var EnemyType = {}; EnemyType.Trash = function (game) { Phaser.Group.call(this, game, game.world, 'Trash Enemy', false, true, Phaser.Physics.ARCADE); this.enemySpeed = 200; //Add 10 trash enemies into this group for (var i = 0; i < 10; i++) { this.add(new Enemy(game, 'enemy3'), true); } retu...
var EnemyType = {}; EnemyType.Trash = function (game) { Phaser.Group.call(this, game, game.world, 'Trash Enemy', false, true, Phaser.Physics.ARCADE); this.enemySpeed = 200; //Add 10 trash enemies into this group for (var i = 0; i < 10; i++) { this.add(new Enemy(game, 'enemy3'), true); } retu...
Make enemy move more unpredictable
Make enemy move more unpredictable
JavaScript
mit
Acaki/WWW_project,Acaki/WWW_project,Acaki/WWW_project
83eae8d347c311b3ac4f255f421289de59851890
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var $ = require('gulp-load-plugins')({ pattern: '*' }); var port = process.env.SERVER_PORT || 3000; $.requireDir('../../gulp'); // Builds the documentation and framework files gulp.task('build', ['sass', 'javascript']); // Starts a BrowerSync instance gulp.task('serve', ['build'], fu...
var gulp = require('gulp'); var $ = require('gulp-load-plugins')({ pattern: '*' }); var port = process.env.SERVER_PORT || 3000; $.requireDir('../../gulp'); // Builds the documentation and framework files gulp.task('build', ['sass', 'javascript']); // Starts a BrowerSync instance gulp.task('serve', ['build'], fu...
Add a watcher for the index.html file
Add a watcher for the index.html file
JavaScript
mit
Qarzak/nuCSS
134403d34595956421100d9d3f15f45926555bbe
src/components/MainMenu/actions.js
src/components/MainMenu/actions.js
import { dialog } from 'remote'; import alt from '../../alt' import ModalActions from './../Modal/actions'; class MainMenuActions { openURL(paste = false) { // for pasting later if (typeof paste !== 'string') ModalActions.open({ title: 'Add URL', type: 'UR...
import { dialog } from 'remote'; import alt from '../../alt' import path from 'path' import ModalActions from './../Modal/actions'; import PlayerActions from './../Player/actions'; class MainMenuActions { openURL(paste = false) { // for pasting later if (typeof paste !== 'string') ModalA...
Support Browse for Single Video File
Support Browse for Single Video File
JavaScript
lgpl-2.1
jaruba/PowderPlayer,daju1/p2pPlayer,jaruba/PowderPlayer,daju1/p2pPlayer
f8f2f201082dbc244519b51cc8a6ad8322014199
src/app/issue/issue_ctrl.js
src/app/issue/issue_ctrl.js
var mod = angular.module('Trestle.issue', []); mod.controller('IssueCtrl', function($scope, $dialog) { // init $scope.$id = "IssueCtrl_" + $scope.$id; _.extend(this, { init: function(issue) { this.issue = issue; }, isPullRequest: function() { return this.issue.pull_reques...
var mod = angular.module('Trestle.issue', []); mod.controller('IssueCtrl', function($scope, $modal, $rootScope) { // init $scope.$id = "IssueCtrl_" + $scope.$id; _.extend(this, { init: function(issue) { this.issue = issue; }, isPullRequest: function() { return this.issue....
Move the issue details over to using $modal.
refactor: Move the issue details over to using $modal.
JavaScript
bsd-3-clause
trestle-pm/trestle
e3de102b5bb15ae96ccbd3f68fdb9b479f4da4e1
js/templates.js
js/templates.js
var Templates = {}; Templates.ItemListingTemplate = _.template('\ <div class="item media">\ <img class="pull-left" src="<%= imageUrl %>" />\ <div class="media-body">\ <h3 class="media-heading"><%= name %></h3>\ <div class="item-expiry"><span class="glyphicon glyphicon-calendar"></span><%= dateEnd.toDateStri...
var Templates = {}; Templates.ItemListingTemplate = _.template('\ <div class="item media">\ <img class="pull-left" src="<%= imageUrl %>" />\ <div class="media-body">\ <h3 class="media-heading"><%= name %></h3>\ <div class="item-expiry"><span class="glyphicon glyphicon-calendar"></span><%= dateEnd.toDateStri...
Add buyer suffix to template.
Add buyer suffix to template.
JavaScript
mit
burnflare/CrowdBuy,burnflare/CrowdBuy
e4509c1695d806f29819a22df28288496fc72ea3
public/app/components/app.js
public/app/components/app.js
// Module // Language support: Use https://github.com/angular-translate/angular-translate/blob/master/demo/ex1_basic_usage.htm var client28App = angular.module("client28App", ['ngRoute', 'ngResource', 'pascalprecht.translate']) .config(['$routeProvider', '$translateProvider', function ($routeProvider, $translateP...
// Module // Language support: Use https://github.com/angular-translate/angular-translate/blob/master/demo/ex1_basic_usage.htm var client28App = angular.module("client28App", ['ngRoute', 'ngResource', 'pascalprecht.translate']) .config(['$routeProvider', '$translateProvider', function ($routeProvider, $translateP...
Remove old personal language support.
Remove old personal language support.
JavaScript
mit
a-lavoie/client1,a-lavoie/client1,a-lavoie/client1
f67ec7d847d7070f131b5e5e842f90e6d075c8d4
client/react/components/PickYourPoo.js
client/react/components/PickYourPoo.js
import React from 'react'; class PickYourPoo extends React.Component { constructor(props) { super(props); } render () { return ( <div> <h1 class="title">PoopVR</h1> <i class="em em-poop"></i> <div class="status"> <p>Coming Soon!</p> </div> <ul> ...
import React from 'react'; import DinoScene from '../../aframe/components/DinoScene'; import WarScene from '../../aframe/components/WarScene'; const pooScenes = { war: WarScene, dino: DinoScene, } class PickYourPoo extends React.Component { constructor(props) { super(props); this.state = {}; } load...
Add click handling for each poo event
Add click handling for each poo event
JavaScript
mit
PhoneThrone/PoopVR,shanemcgraw/PoopVR,PhoneThrone/PoopVR,shanemcgraw/PoopVR
f1d1997ea43ac131a2632f0cda3068647a089135
packages/truffle-core/templates/example.js
packages/truffle-core/templates/example.js
contract('Example', function(accounts) { it("should assert true", function(done) { var example = Example.at(Example.deployed_address); assert.isTrue(true); done(); }); });
contract('Example', function(accounts) { it("should assert true", function(done) { var example = Example.deployed(); assert.isTrue(true); done(); }); });
Use Example.deployed() to retrieve deployed contract in tests.
Use Example.deployed() to retrieve deployed contract in tests.
JavaScript
mit
ConsenSys/truffle
a730026f5cd237ed43e755c6f989dd69ad3d0195
lib/core-components/famous-tests/physics/basic/particle/particle.js
lib/core-components/famous-tests/physics/basic/particle/particle.js
FamousFramework.scene('famous-tests:physics:basic:particle', { behaviors: { '.particle': { 'size': [200, 200], 'align': [0.5, 0.5], 'mount-point': [0.5, 0.5], 'style': { 'background': 'whitesmoke', 'border-radius': '50%' ...
FamousFramework.scene('famous-tests:physics:basic:particle', { behaviors: { '.particle': { 'size': [200, 200], 'align': [0.5, 0.5], 'mount-point': [0.5, 0.5], 'style': { 'background': 'whitesmoke', 'border-radius': '50%' ...
Add example of removing physics body
example: Add example of removing physics body
JavaScript
mit
woltemade/framework,ildarsamit/framework,infamous/famous-framework,colllin/famous-framework,Famous/framework,Famous/framework,SvitlanaShepitsena/remax-banner,infamous/framework,SvitlanaShepitsena/shakou,infamous/framework,KraigWalker/framework,SvitlanaShepitsena/remax-banner,KraigWalker/framework,SvitlanaShepitsena/fra...
3196e60241a280e1171addf6d5aeb1f54db4e259
troposphere/static/js/components/images/common/Bookmark.react.js
troposphere/static/js/components/images/common/Bookmark.react.js
import React from "react"; import actions from "actions"; import stores from "stores"; // images import filled_star from "images/filled-star-icon.png"; import empty_star from "images/empty-star-icon.png"; export default React.createClass({ displayName: "CommonBookmark", toggleFavorite: function(e) { e...
import React from "react"; import actions from "actions"; import stores from "stores"; // images import filled_star from "images/filled-star-icon.png"; import empty_star from "images/empty-star-icon.png"; export default React.createClass({ displayName: "CommonBookmark", toggleFavorite: function(e) { e...
Stop favorite click from triggering card click
Stop favorite click from triggering card click
JavaScript
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
3317bf7d29416c3125510dddcd31da1a9cc34dd8
static/javascript/tba_js/tba_favorites.js
static/javascript/tba_js/tba_favorites.js
function getFavoriteTeams() { var cookieName = "tba-favorite-teams"; var storedFavoriteTeams = $.cookie(cookieName); console.log(storedFavoriteTeams); if (storedFavoriteTeams == null) { // Set cookie expiration var date = new Date(); date.setTime(date.getTime() + (5 * 60 * 1000)); // 5 minutes ...
function getFavoriteTeams() { var cookieName = "tba-favorite-teams"; var storedFavoriteTeams = $.cookie(cookieName); console.log(storedFavoriteTeams); if (storedFavoriteTeams == null) { // Set cookie expiration var date = new Date(); date.setTime(date.getTime() + (5 * 60 * 1000)); // 5 minutes ...
Speed up showing favorite icons
Speed up showing favorite icons
JavaScript
mit
jaredhasenklein/the-blue-alliance,tsteward/the-blue-alliance,phil-lopreiato/the-blue-alliance,synth3tk/the-blue-alliance,verycumbersome/the-blue-alliance,fangeugene/the-blue-alliance,nwalters512/the-blue-alliance,the-blue-alliance/the-blue-alliance,the-blue-alliance/the-blue-alliance,fangeugene/the-blue-alliance,synth3...
0b2e00bceb0de6cc6b92dd62d7856586bf3eedb0
template/app/src/vuex/store.js
template/app/src/vuex/store.js
import Vue from 'vue' import Vuex from 'vuex' {{#if_eq vueVersion 'next'}} import actions from './actions' import getters from './getters' {{/if_eq}} import modules from './modules' Vue.use(Vuex) export default new Vuex.Store({ {{#if_eq vueVersion 'next'}} actions, getters, {{/if_eq}} modules, strict: tru...
import Vue from 'vue' import Vuex from 'vuex' {{#if_eq vueVersion 'next'}} import * as actions from './actions' import * as getters from './getters' {{/if_eq}} import modules from './modules' Vue.use(Vuex) export default new Vuex.Store({ {{#if_eq vueVersion 'next'}} actions, getters, {{/if_eq}} modules, s...
Fix import actions & getters
Fix import actions & getters
JavaScript
mit
re-fort/electron-vue,SimulatedGREG/electron-vue,SimulatedGREG/electron-vue,re-fort/electron-vue,SimulatedGREG/electron-vue,re-fort/electron-vue
738c966112c8ea5d18babce81e944b6b691dd39f
lib/defaults.js
lib/defaults.js
module.exports = { //database user's name user: process.env.USER, //name of database to connect database: process.env.USER, //database user's password password: null, //database port port: 5432, //number of rows to return at a time from a prepared statement's //portal. 0 will return all rows at ...
module.exports = { // database host defaults to localhost host: 'localhost', //database user's name user: process.env.USER, //name of database to connect database: process.env.USER, //database user's password password: null, //database port port: 5432, //number of rows to return at a time fro...
Add default value for connection host.
Add default value for connection host. Native binding connection tests will fail if the PGHOST environment variable is not set. There already exists several defaul values for user, password and port. It would make sense to have a default host setting as well - localhost appears to be a reasonable default.
JavaScript
mit
brianc/node-postgres,brianc/node-postgres,cricri/node-postgres
c7fd652bcbacfad1ac56d90527d1ced40ee1a9db
lib/email.js
lib/email.js
import nodemailer from 'nodemailer'; import sendmailTransport from 'nodemailer-sendmail-transport'; const transporter = nodemailer.createTransport(sendmailTransport()); export default transporter;
import nodemailer from 'nodemailer'; import sendmailTransport from 'nodemailer-sendmail-transport'; import { smtpOptions } from '../config'; const transporter = nodemailer.createTransport( smtpOptions || sendmailTransport() ); export default transporter;
Allow config to specify smtpOptions instead of sendmail
Allow config to specify smtpOptions instead of sendmail
JavaScript
mit
bradleyboy/standbot
a48f5baf141fa0f49159bf0fcf10d52fbf9e4fea
src/views/ResumeView.js
src/views/ResumeView.js
import React from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import goHomeActions from 'actions/goHome'; import RaisedButton from 'material-ui/lib/raised-button'; const map...
import React from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import goHomeActions from 'actions/goHome'; import RaisedButton from 'material-ui/lib/raised-button'; const map...
Create second view linking to homepage
[feat]: Create second view linking to homepage
JavaScript
mit
AndrewTHuang/fear-the-repo,ericsonmichaelj/fear-the-repo,dont-fear-the-repo/fear-the-repo,sujaypatel16/fear-the-repo,ericsonmichaelj/fear-the-repo,sujaypatel16/fear-the-repo,AndrewTHuang/fear-the-repo,dont-fear-the-repo/fear-the-repo
f871cbf4c93a14a3f0f8f86b312e34bd7c9f553a
lib/template.js
lib/template.js
var fs = require('fs'); var logger = require('./logger'); var template = exports; template.load = function(path) { try { path = fs.realpathSync(path); var template = fs.readFileSync(path, 'utf-8'); return template; } catch (err) { logger.error('Template file not found or not readable: ' + path); ...
var fs = require('fs'); var logger = require('./logger'); var template = exports; template.load = function(path) { try { path = fs.realpathSync(path); var template = fs.readFileSync(path, 'utf-8'); return template; } catch (err) { logger.error('Template file not found or not readable: ' + path); ...
Change render function to ignore special replacement patterns
Change render function to ignore special replacement patterns
JavaScript
mit
zeis/kokoi
3fd034901465ddb82bdd6ed816206c789a551e12
lib/index.js
lib/index.js
require('core-js/shim'); const $ = require('jquery'); const stageConfigs = require('./stages.json'); const Game = require('./game'); $(document).ready(() => { const game = new Game(stageConfigs); $('.modal').each((index, element) => { const $modal = $(element); $modal.find('.close').click(() => { $modal.rem...
require('core-js/es5'); require('core-js/es6'); const $ = require('jquery'); const stageConfigs = require('./stages.json'); const Game = require('./game'); $(document).ready(() => { const game = new Game(stageConfigs); $('.modal').each((index, element) => { const $modal = $(element); $modal.find('.close').clic...
Exclude ES7 shims of core-js
Exclude ES7 shims of core-js
JavaScript
mit
tsg-ut/mnemo,tsg-ut/mnemo
e3a6e4fadb6e402e3c0ea422f778ea49c7b1b180
js/algorithms/CountingSort.js
js/algorithms/CountingSort.js
// ONLY works for numbers function countingSort(array, maxValue) { highlightCode([0]); if (array.constructor !== Array || array.length == 0) { highlightCode([1]); return []; } highlightCode([3, 4, 6]); var valueCount = Array.apply(null, Array(maxValue)).map(Number.prototype.valueO...
// ONLY works for numbers function countingSort(array, maxValue) { highlightCode([0]); if (array.constructor !== Array || array.length == 0) { highlightCode([1]); return []; } highlightCode([3, 4, 6]); var valueCount = Array.apply(null, Array(maxValue)).map(Number.prototype.valueO...
Clear highlight when the animation finishes
Clear highlight when the animation finishes
JavaScript
mit
DAT200-Visualization-Team/DAT200-Visualization,DAT200-Visualization-Team/DAT200-Visualization
c08d5ce22a9664e124e94e8a00075b92a1610403
lib/utils.js
lib/utils.js
var titleCase = function toTitleCase(str) { return str.replace(/\w\S*/g, function (txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }); }; var uuid = function uuidGenerator () { 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random()*16|0, v = c...
var titleCase = function toTitleCase(str) { return str.replace(/\w\S*/g, function (txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }); }; var uuid = function uuidGenerator () { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random()*16|0...
Fix uuid generator, add objectSize calculator
Fix uuid generator, add objectSize calculator
JavaScript
mit
Sanox/browserstack-runner,shirish87/browserstack-runner,leobalter/browserstack-runner,browserstack/browserstack-runner,Sanox/browserstack-runner,jzaefferer/browserstack-runner,TehShrike/browserstack-runner,jzaefferer/browserstack-runner,triptease/browserstack-runner,triptease/browserstack-runner,FanaHOVA/ember-browsers...
10146bd477885fd4e33e9e7750ad788cc32e3cc3
src/lib/init.js
src/lib/init.js
import async from 'async' import store from '../store' const init = (callback) => { const storeActions = [ 'loadProductionStatus', 'loadTaskStatuses', 'loadAssetTypes', 'loadTaskTypes', 'loadPeople', 'loadOpenProductions' ] if (store.getters.isCurrentUserManager) { storeActions.push(...
import async from 'async' import store from '../store' import { LOGIN_SUCCESS } from '../store/mutation-types' /** * Load base data required to display properly all information. */ const init = (callback) => { const storeActions = [ 'loadProductionStatus', 'loadTaskStatuses', 'loadAssetTypes', 'lo...
Load custom actions not only for managers
Load custom actions not only for managers CG artists may have some custom action to runs on selected tasks.
JavaScript
agpl-3.0
cgwire/kitsu,cgwire/kitsu
e2c4892a3c13ae507cad3652f8882c5fcb961404
tasks/cover.js
tasks/cover.js
import Gulp from 'gulp'; import istanbul from 'gulp-istanbul'; import mocha from 'gulp-mocha'; import {Server as KarmaServer} from 'karma'; import plumber from '@kpdecker/linoleum/src/plumber'; import {BUILD_TARGET, COVERAGE_TARGET} from '@kpdecker/linoleum/config'; // This task hierarchy is to hack around // https...
import Gulp from 'gulp'; import istanbul from 'gulp-istanbul'; import mocha from 'gulp-mocha'; import {Server as KarmaServer} from 'karma'; import plumber from '@kpdecker/linoleum/src/plumber'; import {BUILD_TARGET, COVERAGE_TARGET} from '@kpdecker/linoleum/config'; // This task hierarchy is to hack around // https...
Use dot reporter for server tests
Use dot reporter for server tests Further noise reductions
JavaScript
mit
kpdecker/linoleum-webpack
84de059065c054adce97cf295bc3086664d68f0f
js/style-select.js
js/style-select.js
/* * style-select.js * https://github.com/savetheinternet/Tinyboard/blob/master/js/style-select.js * * Changes the stylesheet chooser links to a <select> * * Released under the MIT license * Copyright (c) 2013 Michael Save <savetheinternet@tinyboard.org> * * Usage: * $config['additional_javascript'][] = 'js...
/* * style-select.js * https://github.com/savetheinternet/Tinyboard/blob/master/js/style-select.js * * Changes the stylesheet chooser links to a <select> * * Released under the MIT license * Copyright (c) 2013 Michael Save <savetheinternet@tinyboard.org> * * Usage: * $config['additional_javascript'][] = 'js...
Select chosen stylesheet on load
Select chosen stylesheet on load
JavaScript
mit
Admin-Kaf/Tinyboard,Admin-Kaf/Tinyboard,Admin-Kaf/Tinyboard,Admin-Kaf/Tinyboard
28419f0691a2c7aed23636818a435bb650ff19f0
test/protractor.conf.js
test/protractor.conf.js
exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: [ 'internal/modeCostTracking/*.js', 'internal/modeDevelop/*.js', 'internal/modePrivateIaas/*.js', 'internal/modePublicBrokerage/*.js', 'internal/modeSquStudentCloud/*.js' ], suites: { costTracking: 'internal/modeC...
exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: [ 'internal/modeCostTracking/*.js', 'internal/modeDevelop/*.js', 'internal/modePrivateIaas/*.js', 'internal/modePublicBrokerage/*.js', 'internal/modeSquStudentCloud/*.js' ], suites: { costTracking: 'internal/modeC...
Use firefox for testing by default
Use firefox for testing by default - Chrome support on Linux platform is bad
JavaScript
mit
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
132ef3393b4a1d7225221f969c6cce33e909f820
src/reducers/connections.js
src/reducers/connections.js
import { DB_CONNECT_REQUEST, DB_CONNECT_SUCCESS, DB_CONNECT_FAILURE, } from '../actions/connections'; import { UPDATE_SERVER_SUCCESS } from '../actions/servers'; const initialState = { didInvalidate: true, }; export default function (state = initialState, action) { switch (action.type) { case UPDATE_SER...
import { DB_CONNECT_REQUEST, DB_CONNECT_SUCCESS, DB_CONNECT_FAILURE, } from '../actions/connections'; import { SAVE_SERVER_SUCCESS } from '../actions/servers'; const initialState = { didInvalidate: true, }; export default function (state = initialState, action) { switch (action.type) { case SAVE_SERVER_...
Fix issue when server changed and connection failed
Fix issue when server changed and connection failed
JavaScript
mit
sqlectron/sqlectron-term