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
8b430e4d8373ca6d110c840bf9eaeaa86767aaae
client/src/js/indexes/components/History.js
client/src/js/indexes/components/History.js
import React from "react"; import { map, sortBy } from "lodash-es"; import { Row, Col, ListGroup, ListGroupItem, Panel } from "react-bootstrap"; import { LoadingPlaceholder } from "../../base"; export default function RebuildHistory ({ unbuilt, error }) { let content; if (unbuilt === null) { content...
import React from "react"; import { map, sortBy } from "lodash-es"; import { Row, Col, ListGroup, ListGroupItem, Panel } from "react-bootstrap"; import { LoadingPlaceholder } from "../../base"; export default function RebuildHistory ({ unbuilt, error }) { const extraChanges = unbuilt.page_count > 1 ? ( ...
Add build index modal extra changes message
Add build index modal extra changes message
JavaScript
mit
igboyes/virtool,virtool/virtool,igboyes/virtool,virtool/virtool
6054caec28b2362199c8b51a0dd31d59926dca8f
js/disclaimer.js
js/disclaimer.js
(function() { var saml = document.createElement('script'); saml.type = 'text/javascript'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(saml); })(); $(document).ready(function(){ $('#password').parent().removeClass("infield groupbottom"); $('#password').paren...
(function() { var saml = document.createElement('script'); saml.type = 'text/javascript'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(saml); })(); $(document).ready(function(){ $('#password').parent().removeClass("infield groupbottom"); $('#password').paren...
Change string to English and remove absolute paths to work on installations not located under site root
Change string to English and remove absolute paths to work on installations not located under site root
JavaScript
agpl-3.0
mikelolasagasti/owncloud-disclaimer,mikelolasagasti/owncloud-disclaimer
18e36192c07c6e2e00a2e4f33adee5539777dd42
lib/handshake.js
lib/handshake.js
'use strict'; /* lib/handshake.js * WebSocket handshake. * * */ module.exports = exports = function(){ }; exports._headers = function(raw){ if (raw instanceof Buffer) raw = raw.toString('utf-8'); let chunks = raw.split(/\r?\n/), headers = { 0:chunks[0] }, chunk = null, toObj = /^(.+?):\s?/; for...
'use strict'; const crypto = require('crypto'); /* lib/handshake.js * WebSocket handshake. * * */ module.exports = exports = function(data){ if (this.state === 'start') { let headers = exports._headers(data); console.log(headers['sec-websocket-key']); } else if (this.state === 'handshake:response') { ...
Fix header parsing and add test
Fix header parsing and add test
JavaScript
mit
jamen/rela
1789afc7a91a33d7da5d49fbc72df51a2d27eca8
js/scripts.js
js/scripts.js
// DOM Ready $(function() { // www.conditionizr.com // Legacy content and retina scripts and styles $('head').conditionizr({ ieLessThan : { active: true, version: '9', scripts: false, styles: false, classes: true, customScript: 'WORDPRESS_THEME_DIRECTORY_HERE/js/mediaqueries.min.js' } }); ...
// DOM Ready $(function() { // www.conditionizr.com // Legacy content and retina scripts and styles $('head').conditionizr({ ieLessThan : { active: true, version: '9', scripts: false, styles: false, classes: true, customScript: 'WORDPRESS_THEME_DIRECTORY_HERE/js/mediaqueries.min.js' } }); ...
Remove iPhone scrollbar onload script
Remove iPhone scrollbar onload script Sometimes jilts the page back to top if you've already scrolled down. Not a necessary feature.
JavaScript
mit
LA1CH3/ChildSaversXrpm,grischka/html5blank,alessiosantocs/woopstrapblank,dydx/html5blank,LA1CH3/obxsurfinfoXrpm,Montana-Studio/Mediakit,johngibbons/creativebasis,Acrata/voilarts,alessiosantocs/wp-maison,GuiHarrison/siteArtOuro,johngibbons/adesigncouple,LA1CH3/ChildSaversXrpm,GuiHarrison/siteArtOuro,jdheeter/Distribit.N...
a5b3d4add01c98b89bc8ce054642da69c00e5ffd
js/ui/options.js
js/ui/options.js
(function () { // Add behaviour for option buttons app(function (api) { var resetbtn = document.querySelector("#resetbtn"); resetbtn.addEventListener("click", function () { api.reset(); api.args.searchinput.value = ""; api.args.searchinput.focus(); ...
(function () { // Add behaviour for option buttons app(function (api) { var topnav = document.querySelector(api.args.topnav), bottomnav = document.querySelector(api.args.bottomnav); /** * Actions to perform when reset button is clicked */ var resetbtn_act...
Add delegated listeners to topnav and bottomnav for actions
Add delegated listeners to topnav and bottomnav for actions Signed-off-by: Kaustav Das Modak <ba1ce5b1e09413a89404909d8d270942c5dadd14@yahoo.co.in>
JavaScript
apache-2.0
vasuki1996/finder,applait/finder,applait/finder,vasuki1996/finder
a494c5360862317a6758186582943ca8bd533145
config/targets.js
config/targets.js
'use strict'; const browsers = [ 'last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions' ]; const isCI = !!process.env.CI; const isProductionLikeBuild = ['production', 'preview'].includes(process.env.EMBER_ENV); if (isCI || isProductionLikeBuild) { browsers.push('last 1 edge versions');...
'use strict'; const browsers = [ 'last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions' ]; const isCI = !!process.env.CI; const isProductionLikeBuild = ['production', 'preview'].includes(process.env.EMBER_ENV); if (isCI || isProductionLikeBuild) { browsers.push('last 1 edge versions');...
Drop support for unsupported browsers
Drop support for unsupported browsers This set of browsers that we target did not match our published support matrix and was including IE11 which does not have CSS Grid support and looks terrible. Instead we should only target browsers that we actually support.
JavaScript
mit
dartajax/frontend,jrjohnson/frontend,djvoa12/frontend,thecoolestguy/frontend,djvoa12/frontend,jrjohnson/frontend,thecoolestguy/frontend,ilios/frontend,dartajax/frontend,ilios/frontend
12b73f1823f2388474f90e8f5b2ce54f56395518
editor/main.js
editor/main.js
require([ "hr/utils", "hr/dom", "hr/promise", "hr/hr", "hr/args", "resources/init", "core/application", "core/packages", "utils/dialogs", "models/file" ], function(_, $, Q, hr, args, resources, app, packages) { window.codebox = { require: require }; resourc...
require([ "hr/utils", "hr/dom", "hr/promise", "hr/hr", "hr/args", "resources/init", "core/application", "core/packages", "utils/dialogs", "models/file" ], function(_, $, Q, hr, args, resources, app, packages) { window.codebox = { require: require, app: app ...
Add app object to global codebox
Add app object to global codebox
JavaScript
apache-2.0
Ckai1991/codebox,lcamilo15/codebox,lcamilo15/codebox,nobutakaoshiro/codebox,ronoaldo/codebox,rajthilakmca/codebox,fly19890211/codebox,ronoaldo/codebox,code-box/codebox,indykish/codebox,kustomzone/codebox,rodrigues-daniel/codebox,etopian/codebox,Ckai1991/codebox,LogeshEswar/codebox,quietdog/codebox,listepo/codebox,ahmad...
6706dede66eed86f64d653ac3fe44a10e9044d55
eg/blink.js
eg/blink.js
var Galileo = rewire("../lib/galileo"); var board = new Galileo(); board.on("ready", function() { var byte = 0; this.pinMode(9, this.MODES.OUTPUT); setInterval(function() { board.digitalWrite(9, (byte ^= 1)); }, 500); });
var Galileo = rewire("../lib/galileo"); var board = new Galileo(); board.on("ready", function() { var byte = 0; setInterval(function() { board.digitalWrite(9, (byte ^= 1)); }, 500); });
Remove unnecessary call to pinMode
Remove unnecessary call to pinMode Signed-off-by: Rick Waldron <dd8fdbe95c7f81f312b273ef8860922803e9ef16@gmail.com>
JavaScript
mit
kimathijs/galileo-io,julianduque/galileo-io,ashishdatta/galileo-io,rwaldron/galileo-io,vj-ug/galileo-io
075a59bd6815981935c4130129d8f1884dc6c31e
lib/plugin.js
lib/plugin.js
/** * Auth cantina plugin. */ var connect = require('connect'); // Expose this service's package info. require('pkginfo')(module); // The plugin is being attached to an app. exports.attach = function(options) { options = options || {}; this.utils.defaults(options, { secret: 'keyboard cat', key: 'conne...
/** * Auth cantina plugin. */ var connect = require('connect'); // Expose this service's package info. require('pkginfo')(module); // The plugin is being attached to an app. exports.attach = function(options) { options = options || {}; this.utils.defaults(options, { secret: 'keyboard cat', key: 'conne...
Connect body parser doesn't work in union (and not necessary for session)
Connect body parser doesn't work in union (and not necessary for session)
JavaScript
apache-2.0
cantina/cantina-session
81f7a72faef0c82bf746b3a562f8ed7aab67b69a
js/views/sidebar.js
js/views/sidebar.js
( function( window, Backbone, $, _, Scrivener, undefined ) { "use strict"; var document = window.document; Scrivener.Views.Sidebar = Backbone.View.extend( { className : 'scrivener-customizer-sidebar', events : { 'click .button.close' : 'onCloseCustomizerClick' }, initialize : function( attributes ) {...
( function( window, Backbone, $, _, Scrivener, undefined ) { "use strict"; var document = window.document; Scrivener.Views.Sidebar = Backbone.View.extend( { className : 'scrivener-customizer-sidebar', events : { 'click .button.close' : 'onCloseCustomizerClick', 'click #set-post-thumbnail' : 'openMediaM...
Add media manager open JS method
Add media manager open JS method
JavaScript
mit
resarahman/Post-Customizer,chirox/Post-Customizer,10up/Post-Customizer,chirox/Post-Customizer,resarahman/Post-Customizer,resarahman/Post-Customizer,tw2113/Post-Customizer,10up/Post-Customizer,chirox/Post-Customizer,tw2113/Post-Customizer
3c0cc96c846dae3aa34adfe081c1b74e3743a9ab
lib/upload.js
lib/upload.js
'use strict'; const crypto = require('crypto'); const request = require('request'); const url = process.env.UPLOAD_URL; module.exports = function upload(image, cb) { const stream = request.get(image); const shasum = crypto.createHash('sha1'); // Generate SHA1 checksum of image file stream.on('data', shasum.u...
'use strict'; const crypto = require('crypto'); const request = require('request'); const url = process.env.UPLOAD_URL; module.exports = function upload(image, cb) { const stream = request.get(image); const shasum = crypto.createHash('sha1'); // Generate SHA1 checksum of image file stream.on('data', shasum.u...
Add validate() and getImage() helper functions
Add validate() and getImage() helper functions
JavaScript
mit
Turbasen/reconvert-images
23d8dd7ba5829efd4c97351b2bb61fabf26aa32f
src/plugins/demo.js
src/plugins/demo.js
export class Plugin { constructor(Knekt) { this.registerRoutes(Knekt); } properties = { name: "My Plugin", description: "A demo plugin", website: "http://Knekt.co", author: "Alex Catchpole" }; registerRoutes(Knekt) { //Namespace your routes! Knekt.addRoute({ method: 'GET', path: '/my-p...
export class Plugin { constructor(Knekt) { this.registerRoutes(Knekt); } //properties is how you provide information to the client. properties = { name: "My Plugin", description: "A demo plugin", website: "http://Knekt.co", author: "Alex Catchpole", routes: [ { route: '/my-plugin/test', met...
Update properties of plugin to include routes used
Update properties of plugin to include routes used
JavaScript
mit
goKnekt/Knekt-Server
3f66abf7a95ee1f9365ffbe85f2604ab5897ed33
lib/base-overlay.js
lib/base-overlay.js
'use strict'; var google = global.google; function onAdd() { var panes = this.getPanes(); panes.overlayLayer.appendChild(this.el); } function positionOverlayByDimensions(projectedLatLng) { var offsetHeight = this.el.offsetHeight, offsetWidth = this.el.offsetWidth; this.el.style.top = projec...
'use strict'; var google = global.google; function onAdd() { var panes = this.getPanes(); panes.overlayLayer.appendChild(this.el); } function positionOverlayByDimensions(projectedLatLng) { var offsetHeight = this.el.offsetHeight, offsetWidth = this.el.offsetWidth; this.el.style.top = projec...
Use `Object.create` instead of `new` for prototype inheritance.
Use `Object.create` instead of `new` for prototype inheritance.
JavaScript
mit
zpratt/async-google-maps
c8941975bcdadff477069828984b5e9a5efc51d7
gulpfile.js
gulpfile.js
const gulp = require('gulp'); const eslint = require('gulp-eslint'); const mocha = require('gulp-mocha'); gulp.task('lint', () => { return gulp.src(['./*.js']) .pipe(eslint()) .pipe(eslint.format()) .pipe(eslint.failAfterError()); }); gulp.task('test', () => { return gulp.src(['./test....
'use strict'; const gulp = require('gulp'); const eslint = require('gulp-eslint'); const mocha = require('gulp-mocha'); gulp.task('lint', () => { return gulp.src(['./*.js']) .pipe(eslint()) .pipe(eslint.format()) .pipe(eslint.failAfterError()); }); gulp.task('test', ['lint'], () => { ...
Make sure linting is performed
Make sure linting is performed
JavaScript
mit
lesshint/reporter-stylish
09e9ad168843792d61248da12fe376314b5f6623
lib/common/html_blocks.js
lib/common/html_blocks.js
// List of valid html blocks names, accorting to commonmark spec // http://jgm.github.io/CommonMark/spec.html#html-blocks 'use strict'; module.exports = [ 'address', 'article', 'aside', 'base', 'basefont', 'blockquote', 'body', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dia...
// List of valid html blocks names, accorting to commonmark spec // http://jgm.github.io/CommonMark/spec.html#html-blocks 'use strict'; module.exports = [ 'address', 'article', 'aside', 'base', 'basefont', 'blockquote', 'body', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dia...
Add missed h2..h6 to whitelisted block tags
Add missed h2..h6 to whitelisted block tags
JavaScript
mit
GerHobbelt/markdown-it,markdown-it/markdown-it,GerHobbelt/markdown-it,rlidwka/markdown-it
fab314056b01d8f6425a6b67d9cc470458f820b1
lib/moduleloader/index.js
lib/moduleloader/index.js
/** * Module dependencies */ var buildDictionary = require('./buildDictionary'); /** * Module loader (aka Cargo) * * Load a module into memory */ module.exports = { /** * Build a dictionary of named modules * (throws an error if the container cannot be loaded) * * @param {Object} options * @para...
/** * Module dependencies */ var buildDictionary = require('./buildDictionary'); /** * Module loader * * Load a module into memory */ module.exports = { /** * Build a dictionary of named modules * (responds with an error if the container cannot be loaded) * * @param {Object} options * @param {Fu...
Update docs for module loader.
Update docs for module loader.
JavaScript
mit
anweiss/sails,balderdashy/sails,jianpingw/sails,listepo/sails,zand3rs/sails,antoniopol06/sails,apowers313/sails,hokkoo/sails,denismars/sails,boarderdav/sails,saronwei/sails,tjwebb/sails,sunnycmf/sails,hokkoo/sails,JumpLink/sails,saniko/soundcloud_mithril,jenalgit/sails,hellowin/sails,youprofit/sails,t2013anurag/sails,b...
249dc7bed56f55e88a4c15cc01d63637e7d38778
public/service-worker.js
public/service-worker.js
// Copyright 2019 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
/* * @license * Your First PWA Codelab (https://g.co/codelabs/pwa) * Copyright 2019 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 * * https://w...
Update license & add strict
Update license & add strict
JavaScript
apache-2.0
googlecodelabs/your-first-pwapp,googlecodelabs/your-first-pwapp
b9f7063c023709cb7de2ac28386e7fe82b65cc0d
src/test/methods.js
src/test/methods.js
import test from 'tape'; import { methods, isStamp } from '../'; test('methods()', nest => { const a = { a: () => {} }; const b = { b: () => {} }; const c = { c: () => {} }; nest.test('...with no arguments', assert => { const actual = isStamp(methods()); const expected = true; assert.equal(actual...
import test from 'tape'; import _ from 'lodash'; import { methods, isStamp } from '../'; test('methods()', nest => { const a = { a: () => {} }; const b = { b: () => {} }; const c = { c: () => {} }; nest.test('...with no arguments', assert => { const actual = isStamp(methods()); const expected = true; ...
Fix tests for older envs.
Fix tests for older envs.
JavaScript
mit
stampit-org/stamp-utils
57a7e57d45d9d01f26ceb6f46164ac9761de8ede
lib/plugins/pagination.js
lib/plugins/pagination.js
module.exports = function( action, options ) { this.reservedParams.push('limit', 'skip', 'p'); if (action === 'index') { this.on('validate', function( req ) { var maxLimit = options.maxLimit; req.checkQuery('limit').optional().isInt(); req.checkQuery('limit', 'limit must be greater than, or ...
module.exports = function( action, options ) { this.reservedParams.push('limit', 'skip', 'p'); if (action === 'index') { this.on('sanitize', function( req ) { req.sanitizeQuery('limit').toInt(); req.sanitizeQuery('skip').toInt(); req.sanitizeQuery('p').toInt(); }); this.on('validate'...
Apply sanitization to limit, skip & p
Apply sanitization to limit, skip & p
JavaScript
isc
Bajix/vottu
e2f004662b1a0d9dfd5c90dc1e54e84b9a5e7361
lib/cartodbmapclient.js
lib/cartodbmapclient.js
'use strict'; var request = require('request'); class CartoDBMapClient { constructor(user, apiKey) { this.user = user; this.apiKey = apiKey; this.baseURL = 'https://' + this.user + '.cartodb.com/'; } createNamedMap(options) { this.existsNamedMap(options.name).then(function() { }); } ex...
'use strict'; var request = require('request'); class CartoDBMapClient { constructor(user, apiKey) { this.user = user; this.apiKey = apiKey; this.baseURL = 'https://' + this.user + '.cartodb.com/'; } createNamedMap(options) { this.existsNamedMap(options.name).then(function() { }); } ex...
Fix promises params and this references
Fix promises params and this references
JavaScript
mit
gkudos/node-cartodb-map-api
12e9070a65e55bac025ffb99dd16b1bcc51106d7
js/app.js
js/app.js
$.fn.filterByData = function(prop, val) { return this.filter( function() { return $(this).data(prop)==val; } ); }; $(document).ready(function() { var radios = $('.table-view.radio'); var saveBtn = $('#save'); var options = $.url().param(); radios.each(function (index) { var radio = $(this); ...
$.fn.filterByData = function(prop, val) { return this.filter( function() { return $(this).data(prop)==val; } ); }; $(document).ready(function() { var radios = $('.table-view.radio'); var saveBtn = $('#save'); var options = $.url().param(); radios.each(function (index) { var radio = $(this); ...
Return all properties (including nulls)
Return all properties (including nulls)
JavaScript
mit
mntnorv/overload-config
864bf311a4736b469ded79d2c1280e8313976a96
js/app.js
js/app.js
function startApp() { // sessionStorage.clear(); // Logout user after refresh web page showMenuHideLinks(); listItems(); if (sessionStorage.getItem('username')) { $('#loggedInUser').text('Welcome, ' + sessionStorage.getItem('username') + '!'); $('#loggedInUser').show(); } $('#i...
function startApp() { // sessionStorage.clear(); // Logout user after refresh web page showMenuHideLinks(); listItems(); if (sessionStorage.getItem('username')) { $('#loggedInUser').text('Welcome, ' + sessionStorage.getItem('username') + '!'); $('#loggedInUser').show(); } $('#i...
Add click function for myAds link
Add click function for myAds link
JavaScript
mit
Software-Technologies-Teamwork/Car-Sellers,Software-Technologies-Teamwork/Car-Sellers
617c95e48c0d4d65b1deee5ed4bd131bf9a06666
tests/test-index.js
tests/test-index.js
'use strict'; var config = require('../lib/index'); var eslint = require('eslint'); var isObject = require('is-object'); var path = require('path'); var test = require('tape'); test('test basic properties of default config', function(t) { t.ok(isObject(config.extends), 'extends is an object'); t.ok(isObject(confi...
'use strict'; var config = require('../lib/index'); var eslint = require('eslint'); var isObject = require('is-object'); var path = require('path'); var test = require('tape'); test('test basic properties of default config', function(t) { t.ok(isObject(config.extends), 'extends is an object'); t.equal(config.pars...
Fix the check on parser being a string not object
:green_heart: Fix the check on parser being a string not object
JavaScript
mit
jamieconnolly/eslint-config
aa46f414201a857a1ab58f7ebd250efa4f4bfe93
tools/distServer.js
tools/distServer.js
// This file configures a web server for testing the production build // on your local machine. import browserSync from 'browser-sync'; import historyApiFallback from 'connect-history-api-fallback'; // Run Browsersync browserSync({ port: 3000, ui: { port: 3001 }, server: { baseDir: 'dist' }, file...
// This file configures a web server for testing the production build // on your local machine. import browserSync from 'browser-sync'; import historyApiFallback from 'connect-history-api-fallback'; import {chalkProcessing} from './chalkConfig'; /* eslint-disable no-console */ console.log(chalkProcessing('Opening pr...
Add message when opening prod build
Add message when opening prod build
JavaScript
mit
Tinker-Ware/eyes,Tinker-Ware/eyes
d3457c409049ad5dd2789b345a452dd7d844fbaa
lib/db.js
lib/db.js
exports.get = function getMany(model, params) { } exports.add = function add(model, data) { } exports.update = function update(model, id, data) { } exports.delete = function delete(model, id, params) { }
function get(model, params, cb) { } function add(model, data, cb) { } function update(model, id, data, cb) { } function del(model, id, params, cb) { } function getNameFromModel(model) { return new model().tableName; } exports.get = get; exports.add = add; exports.update = update; exports.delete = del; exports.g...
Add function to get table name from model
Add function to get table name from model
JavaScript
mit
ganemone/bookshelf-restful
10cfe0e35516dd9fc7bc28969fd9c20625ff8ce7
portal/js/router.js
portal/js/router.js
App.Router.map(function () { this.resource('projects', {path: '/'}, function() { this.resource('project', {path: 'projects/:project_id'}, function() { this.resource('investigations', function() { this.resource('investigation', {path: '/:investigation_id'}); }); }); }); }); App.Rou...
App.Router.map(function () { this.resource('projects', {path: '/'}, function() { this.resource('project', {path: 'projects/:project_id'}, function() { this.resource('investigations', function() { this.resource('investigation', {path: '/:investigation_id'}); }); }); }); }); App.Rou...
Check if we have any projects
Check if we have any projects
JavaScript
apache-2.0
with-regard/regard-website
9c189528a75915208d7bab011b44e8b748c03a71
tasks/lib/ctools.js
tasks/lib/ctools.js
/** * common code goes here */ var grunt = require('grunt'), exec = require('child_process').exec, _ = grunt.util._; module.exports.registerTool = function(task, toolname) { var callback = task.async(), files = [], closureLinterPath = task.data.closureLinterPath, options = grunt....
/** * common code goes here */ var grunt = require('grunt'), exec = require('child_process').exec, _ = grunt.util._; module.exports.registerTool = function(task, toolname) { var callback = task.async(), files = [], closureLinterPath = task.data.closureLinterPath, options = grunt....
Fix command line arguments order for gjslint
Fix command line arguments order for gjslint Closure Linter does not respect "--strict" flag if it goes after files list.
JavaScript
mit
wzr1337/grunt-closure-linter,wzr1337/grunt-closure-linter
92041357b218855928caa61e1b70d1ae4337c17f
modules/githubHook.js
modules/githubHook.js
'use strict'; module.exports = function(config, ircbot, utils) { ircbot.emit('registerHttp', 'post', '/hooks/github', function(req, res) { const crypto = require('crypto'); const signature = req.headers['x-hub-signature']; const algo = signature.substr(0, signature.indexOf('=')); const expectedSignature = ...
'use strict'; module.exports = function(config, ircbot, utils) { ircbot.emit('registerHttp', 'post', '/hooks/github', function(req, res) { const crypto = require('crypto'); if (!('x-hub-signature' in req.headers)) { res.writeHead(400, { 'Content-Type': 'text/plain' }); res.end('Bad request'); r...
Fix missing header causing crash
Fix missing header causing crash
JavaScript
mit
initLab/irc-notifier
8acd32ad6756868475adc12d028f8d850377d9c3
tasks/util/strict_d3.js
tasks/util/strict_d3.js
var path = require('path'); var transformTools = require('browserify-transform-tools'); var constants = require('./constants'); var pathToStrictD3Module = path.join( constants.pathToImageTest, 'strict-d3.js' ); /** * Transform `require('d3')` expressions to `require(/path/to/strict-d3.js)` */ module.export...
var path = require('path'); var transformTools = require('browserify-transform-tools'); var constants = require('./constants'); var pathToStrictD3Module = path.join( constants.pathToImageTest, 'strict-d3.js' ); /** * Transform `require('d3')` expressions to `require(/path/to/strict-d3.js)` */ module.export...
Fix karma tests in windows
Fix karma tests in windows
JavaScript
mit
etpinard/plotly.js,iongroup/plotly.js,asolagmbh/plotly.js,asolagmbh/plotly.js,asolagmbh/plotly.js,aburato/plotly.js,iongroup/plotly.js,plotly/plotly.js,plotly/plotly.js,iongroup/plotly.js,plotly/plotly.js,etpinard/plotly.js,etpinard/plotly.js,aburato/plotly.js,plotly/plotly.js
7962b814525fca9fb87a9abff2a9e6c99888391c
examples/plugins/testBasic/index.js
examples/plugins/testBasic/index.js
var hydra = require('hydra'), HydraHeadStatic = hydra.heads.HydraHeadStatic, HydraHead = hydra.heads.HydraHead; exports.getBodyParts = function(config, modules) { var assert = modules.assert; return { name: "testBasic", tests: { firstTestFoo: { ...
var hydra = require('hydra'), HydraHeadStatic = hydra.heads.HydraHeadStatic, HydraHead = hydra.heads.HydraHead; exports.getBodyParts = function(config, modules) { var assert = modules.assert; return { name: "testBasic", tests: { firstTestFoo: { ...
Add example of test instructions in sample plugin
Add example of test instructions in sample plugin
JavaScript
apache-2.0
mlev/robohydra,robohydra/robohydra,robohydra/robohydra,mlev/robohydra,mlev/robohydra
49b15fd4156f99e5e7b41e73d24b437dbfac1dc2
test/swaggerTest.js
test/swaggerTest.js
var request = require('supertest') , app = require('../express'); describe("documentation tests", function() { it("should get swagger document", function(done) { request(app) .get('/api/api-docs') .set('Accept', 'application/json') .expect(200) .expect('Content-Type', /json/) .en...
var request = require('supertest') , app = require('../express'); describe("swagger tests", function() { it("should get swagger document", function(done) { request(app) .get('/api/api-docs') .set('Accept', 'application/json') .expect(200) .expect('Content-Type', /json/) .end(done...
Update name on swagger test
Update name on swagger test
JavaScript
apache-2.0
ngageoint/mage-server,newmanw/mage-server,jclark118/mage-server,ngageoint/mage-server,jclark118/mage-server,newmanw/mage-server,ngageoint/mage-server,jclark118/mage-server,newmanw/mage-server,ngageoint/mage-server
c812be4f392e5da60422d63abc90f5f0fb30171e
test/test-helper.js
test/test-helper.js
/* * node-http-cache. * Copyright © 2012 Chris Corbyn. * * See LICENSE file for details. */ /* Convenience stuff for testing */ module.exports = { httpCache: require('../lib/http-cache'), http: require('http'), sinon: require('sinon'), memo: require('memo-is'), /** Create a full stub obj...
/* * node-http-cache. * Copyright © 2012 Chris Corbyn. * * See LICENSE file for details. */ /* Convenience stuff for testing */ module.exports = { httpCache: require('../lib/http-cache'), http: require('http'), sinon: require('sinon'), memo: require('memo-is'), /** Create a full stub obj...
Fix a bunch of issues with the stub helper thingo
Fix a bunch of issues with the stub helper thingo
JavaScript
mit
d11wtq/node-http-cache
bf8c61e6c9b6206fc496488cd6faced7f12dd5c5
ext/codecast/7.1/codecast-loader.js
ext/codecast/7.1/codecast-loader.js
$(document).ready(function() { if (window.taskData) { var taskInstructionsHtml = $('#taskIntro').html(); var hints = $('#taskHints > div').toArray().map(elm => { return { content: elm.innerHTML.trim() }; }); var additionalOptions = window.taskData.codecastParameters ? window.task...
$(document).ready(function() { if (window.taskData) { var taskInstructionsHtml = $('#taskIntro').html(); var hints = $('#taskHints > div').toArray().map(elm => { return { content: elm.innerHTML.trim() }; }); var additionalOptions = window.taskData.codecastParameters ? window.task...
Use window.stringsLanguage by default if fulfilled
Use window.stringsLanguage by default if fulfilled
JavaScript
mit
France-ioi/bebras-modules,France-ioi/bebras-modules
7bc2ec71730925101105d46b00577108e1578098
lib/main.js
lib/main.js
(function initialization(container) { container.Fmk = { Models: {}, Views: {}, Services: {}, Helpers: {} }; })(typeof module === 'undefined' && typeof window !== 'undefined' ? window : exports);
/*global window*/ (function initialization(container) { container.Fmk = { Models: {}, Views: {}, Services: {}, Helpers: {}, initialize: function initialize(options){ this.Helpers.metadataHelper.initialize(options); this.Helpers.modelValidationPromiseHelper.initialize(options); } ...
Add global initialization to the lib
Add global initialization to the lib
JavaScript
mit
Jerom138/focus,Jerom138/focus,Jerom138/focus,KleeGroup/focus-core
0896d400a1d65efbecbe6b0921c75cc88023a692
src/components/loadJSON.js
src/components/loadJSON.js
var fs = require('fs'); var parallelStream = require('pelias-parallel-stream'); var maxInFlight = 10; module.exports.create = function create_json_parse_stream(dataDirectory) { return parallelStream(maxInFlight, function(record, enc, next) { fs.readFile(dataDirectory + record.path, function(err, data) { i...
var fs = require('fs'); var parallelStream = require('pelias-parallel-stream'); var maxInFlight = 10; module.exports.create = function create_json_parse_stream(dataDirectory) { return parallelStream(maxInFlight, function(record, enc, next) { fs.readFile(dataDirectory + record.path, function(err, data) { i...
Improve JSON parsing error message
Improve JSON parsing error message
JavaScript
mit
pelias/whosonfirst,pelias/whosonfirst
28229d6804f826201326d7c440d9c7749c0ae104
client/main.js
client/main.js
getUserLanguage = function () { // Put here the logic for determining the user language return "zh"; }; if (Meteor.isClient) { Meteor.startup(function () { _.extend(Notifications.defaultOptions, { timeout: 3500 }); TAPi18n.setLanguage(getUserLanguage()) .done(function () { Sessi...
const userLanguage = () => { // If the user is logged in, retrieve their saved language if (Meteor.user()) return Meteor.user().profile.language; }; if (Meteor.isClient) { Meteor.startup(function () { _.extend(Notifications.defaultOptions, { timeout: 3500 }); Tracker.autorun(() => { let ...
Add a new method to find language for user
Add a new method to find language for user
JavaScript
apache-2.0
easycase17/easycase,easycase17/easycase
6db7a703fc1883c81e8c6fd27fc8d92f24251244
share/spice/gifs/gifs.js
share/spice/gifs/gifs.js
(function(env){ "use strict"; env.ddg_spice_gifs = function (api_result) { if (!api_result || !api_result.data || !api_result.data.length){ return Spice.failed("gifs"); } var searchTerm = DDG.get_query().replace(/gifs?|giphy/ig,'').trim(); Spice.add({ ...
(function(env){ "use strict"; env.ddg_spice_gifs = function (api_result) { if (!api_result || !api_result.data || !api_result.data.length){ return Spice.failed("gifs"); } var searchTerm = DDG.get_query().replace(/gifs?|giphy/ig,'').trim(); Spice.add({ ...
Add image_mobile to show the animated gif on mobile.
Gifs: Add image_mobile to show the animated gif on mobile.
JavaScript
apache-2.0
iambibhas/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,echosa/zeroclickinfo-spice,sevki/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,levaly/zeroclickinfo-spice,mayo/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,sagarhani/...
90d768668fb589583657aa949683149bc6d33020
plugin/index.js
plugin/index.js
import BabelRootImportHelper from './helper'; export default function({ types: t }) { class BabelRootImport { constructor() { const that = this; return { visitor: { ImportDeclaration(path, state) { const givenPath = path.node.source.value; var rootPathSuffix...
import BabelRootImportHelper from './helper'; export default function({ types: t }) { class BabelRootImport { constructor() { const that = this; return { visitor: { ImportDeclaration(path, state) { const givenPath = path.node.source.value; var rootPathSuffix...
Add support to run inside Meteor. When running this babel-plugin inside Meteor, it gives us weird errors. But, we don't need this to use inside Meteor. Meteor do this for us automatically. So, we simply turn off this when using inside Meteor.
Add support to run inside Meteor. When running this babel-plugin inside Meteor, it gives us weird errors. But, we don't need this to use inside Meteor. Meteor do this for us automatically. So, we simply turn off this when using inside Meteor.
JavaScript
mit
Quadric/babel-plugin-inline-import
ee2e0f736d2a52f083ccf76f08a792b875d38c19
public/index.js
public/index.js
'use strict'; angular.module('app', ['ngRoute']);
'use strict'; angular .module('app', ['ngRoute']) .config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { $routeProvider .when('/', {templateUrl: 'ng/views/home.html', controller: 'HomeCtrl'}) .otherwise({redirectTo: '/404'}); $locationProvider.html5Mode(tr...
Add home route and redirect others to /404
[ng] Add home route and redirect others to /404
JavaScript
mit
JR10/jpanel,JR10/jpanel
17fde9fd84341b17a81981d243d349da26571785
packages/@sanity/form-builder/src/sanity/inputs/client-adapters/assets.js
packages/@sanity/form-builder/src/sanity/inputs/client-adapters/assets.js
import client from 'part:@sanity/base/client' function uploadAsset(assetType, asset) { return client.observable.assets.upload(assetType, asset.file) .map(event => { if (event.type === 'response') { // rewrite to a 'complete' event return { type: 'complete', id: event.bod...
import client from 'part:@sanity/base/client' function uploadAsset(assetType, asset) { return client.observable.assets.upload(assetType, asset.file) .map(event => { if (event.type === 'response') { // rewrite to a 'complete' event return { type: 'complete', id: event.bod...
Use .getDocument to fetch image record to avoid sync issues
[form-builder] Use .getDocument to fetch image record to avoid sync issues
JavaScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
e03b48023b001e2bdcedd9d0257d944bf1e860a6
plugins/c9.static/unpacked_helper.js
plugins/c9.static/unpacked_helper.js
"use strict"; plugin.consumes = [ "db", "connect.static" ]; plugin.provides = [ "unpacked_helper" ]; module.exports = plugin; function plugin(options, imports, register) { var connectStatic = imports["connect.static"]; var assert = require("assert"); var baseUrl = options.baseUrl; var ideBase...
"use strict"; plugin.consumes = [ "db", "connect.static" ]; plugin.provides = [ "unpacked_helper" ]; module.exports = plugin; function plugin(options, imports, register) { var connectStatic = imports["connect.static"]; var assert = require("assert"); var baseUrl = options.baseUrl; var ideBase...
Disable parallel requests for now
Disable parallel requests for now
JavaScript
bsd-3-clause
humberto-garza/VideoJuegos,humberto-garza/VideoJuegos
2843f40ec417e2a2b779b1c8a55f6c314f80822e
es2015/entries.js
es2015/entries.js
"use strict"; let tags = ; console.log(`Total items ${tags.size}`);
"use strict"; let tags = new Set(); tags.add("JavaScript"); tags.add("Programming"); tags.add("Web"); console.log(`Total items ${tags.size}`);
Use Set and methods of Set
Use Set and methods of Set
JavaScript
mit
var-bin/reactjs-training,var-bin/reactjs-training,var-bin/reactjs-training
f40aea957e9dea427b9ce50797be49d443d56197
lib/imports.js
lib/imports.js
exports.async = require('async'); exports.connect = exports.express = require('express'); exports.fs = require('fs-extra'); exports.hooks = require('hooks'); exports.jade = require('jade'); exports.multiparty = require('multiparty'); exports.negotiator = require('negotiator'); exports.routes = require('routes'); export...
exports.async = require('async'); exports.connect = exports.express = require('express'); exports.express_session = require('express-session'); exports.fs = require('fs-extra'); exports.hooks = require('hooks'); exports.jade = require('jade'); exports.multiparty = require('multiparty'); exports.negotiator = require('ne...
Make express-session version used by Turnpike available on turnpike.exports.express_session
Make express-session version used by Turnpike available on turnpike.exports.express_session
JavaScript
mit
jay-depot/turnpike,jay-depot/turnpike
0fb6efdd51b1a821408c9d864fcb91f16567133a
bin/hogan-compile.js
bin/hogan-compile.js
#!/usr/bin/env node /* * Compiles Hogan templates and prints result to stdout */ var hogan = require('../lib/hogan'), path = require('path'), fs = require('fs'); // we assume that argv[2] is a list of files, or a directory // that contains mustache templates var argv = process.argv.slice(2); var output = [...
#!/usr/bin/env node /* * Compiles Hogan templates and prints result to stdout */ var hogan = require('../lib/hogan'), path = require('path'), fs = require('fs'); // we assume that argv[2] is a list of files, or a directory // that contains mustache templates var argv = process.argv.slice(2); var output = [...
Make the compilation return an object instead of a function
Make the compilation return an object instead of a function Ticket #13
JavaScript
apache-2.0
pornel/hogan.js,twitter/hogan.js,kavallo/hogan.js,bariders/hogan.js,margaritis/hogan.js,twitter/hogan.js,pornel/hogan.js,kavallo/hogan.js,sresoft/thengrow,pedroha/hogan.js,paulwib/hogan.js,ahumphreys87/iBars,paulwib/hogan.js,pedroha/hogan.js,sresoft/thengrow,sresoft/thengrow,bariders/hogan.js,ahumphreys87/iBars,sresoft...
7137dc5294442423d8fc7298bb167683922d0f85
routes/index.js
routes/index.js
var express = require('express'); var router = express.Router(); var controller = require('../controllers/index'); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: 'Express' }); }); /* POST home page. */ router.post('/', function(req, res, next) { console.dir(req.body); ...
var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: 'Express' }); }); router.get('/create-account', function(req, res, next) { res.render('create_account'); }); router.post('/create-account', function(req, re...
Add create account get and post routes, attendance get and post routes, login route, and verifyCard dummy function for use in attendance.
Add create account get and post routes, attendance get and post routes, login route, and verifyCard dummy function for use in attendance.
JavaScript
mit
crowelch/Organization-Manager,crowelch/Organization-Manager
ac09b1ec77fa3c44a09823c27be7fb92e3a1b913
lib/normalize.js
lib/normalize.js
module.exports = normalize var isValid = require("./is_valid") var fixer = require("./fixer") var fieldsToFix = ['name','version','description','repository' ,'files','bin','man','keywords','readme'] var otherThingsToFix = ['dependencies','people'] var thingsToFix = fieldsToFix.map(function(fieldNam...
module.exports = normalize var isValid = require("./is_valid") var fixer = require("./fixer") var fieldsToFix = ['name','version','description','repository' ,'files','bin','man','keywords','readme'] var otherThingsToFix = ['dependencies','people'] var thingsToFix = fieldsToFix.map(function(fieldNam...
Make a point about CoffeeScript.
Make a point about CoffeeScript.
JavaScript
bsd-2-clause
sindresorhus/normalize-package-data,kemitchell/normalize-package-data
944f1e3d914fb9770158b7c905d7ac1b0d5a7652
src/scripts/main.js
src/scripts/main.js
(function ($) { $(document).ready(function () { // Media queries var mqExtraSmall = 480; var mqSmall = 768; var mqMedium = 992; var mqLarge = 1200; // Smooth scrolling for anchor links $('a[href*="#"]:not([href="#"],[data-toggle],[data-slide])').click(function() { if (location.pathn...
(function ($) { $(document).ready(function () { // Media queries var mqExtraSmall = 480; var mqSmall = 768; var mqMedium = 992; var mqLarge = 1200; // Smooth scrolling for anchor links $('a[href*="#"]') // Remove links that don't actually link to anything .not('[href="#"]') .c...
Update smooth scrolling script with focus added
Update smooth scrolling script with focus added
JavaScript
mit
Guirec/static-front-starter,Guirec/static-front-starter
9344299298973c231b6ac53cba2970bcc66e8cf1
src/_umd_header.js
src/_umd_header.js
(function (root, factory) { if (typeof define === 'function' && define.amd) { define(['d3', 'topojson'], factory); } else if (typeof exports === 'object') { module.exports = factory(require('d3'), require('topojson')); } else { root.planetaryjs = factory(root.d3, root.topojson, root); } }(this, func...
(function (root, factory) { if (typeof define === 'function' && define.amd) { define(['d3', 'topojson'], function(d3, topojson) { return (root.planetaryjs = factory(d3, topojson, root)); }); } else if (typeof exports === 'object') { module.exports = factory(require('d3'), require('topojson')); }...
Set `planetaryjs` global when using AMD
Set `planetaryjs` global when using AMD While using RequireJS to AMD load ng-planetaryjs, planetaryjs, and their dependencies, ng-planetaryjs still looks for global object planetaryjs (such as in `var globe = planetaryjs.planet();`). Thus use the UMD pattern "AMD with global, Node, or global" instead of "AMD, Node, or...
JavaScript
mit
BinaryMuse/planetary.js,BinaryMuse/planetary.js
2684c3b8bcaa4518c925920b4797777bdc319379
src/index.js
src/index.js
'use strict' import validateKey from 'firebase-validate-key' import extend from 'xtend' import find from 'babel-runtime/core-js/array/find' import * as serverValue from 'firebase-server-value' export default function valueToFirebase (value) { if (typeof value === 'undefined') { throw new Error('Firebase cannot ...
'use strict' import validateKey from 'firebase-validate-key' import extend from 'xtend' import find from 'babel-runtime/core-js/array/find' import * as serverValue from 'firebase-server-value' export default function valueToFirebase (value) { if (typeof value === 'undefined') { throw new Error('Firebase cannot ...
Fix exports so module.exports is defined
Fix exports so module.exports is defined
JavaScript
mit
bendrucker/value-to-firebase
4f3489745bff7445d34935b450abc6e05b26e533
src/types/number.js
src/types/number.js
import ConfigFieldBaseType from './base'; class NumberType extends ConfigFieldBaseType { constructor(min, max) { super(); this.validators.push(val => typeof val === 'number'); if (min !== null && min !== undefined) { this.validators.push(val => val > min); } if (max !== null && max !== u...
import BaseType from './base'; class NumberType extends BaseType { constructor({ min, max } = {}) { super(); this.transformators.pre.push(val => Number(val)); this.validators.push(val => !isNaN(val)); this.validators.push(val => ((typeof min === 'number') ? val >= min : true)); this.val...
Edit validation and transformation process in Number type
feat(types): Edit validation and transformation process in Number type
JavaScript
mit
TeslaCtroitel/twconf
addcd33f711f263e0c6de3e60f5de54e7097cc27
scripts/main.js
scripts/main.js
$(function() { // menu initialization var $menu = $('#menu'); var $menuEntries = $menu.children('div'); $(window).on('hashchange load', function() { $menuEntries.hide(); var clickedMenuEntry = $menuEntries.filter(window.location.hash).size() ? window.location.has...
$(function() { // menu initialization var $menu = $('#menu'); var $menuEntries = $menu.children('div'); $(window).on('hashchange', function() { $menuEntries.hide(); var clickedMenuEntry = $menuEntries.filter(window.location.hash).size() ? window.location.hash : ...
Move images preloading and background cycling start to the "window.load"
Move images preloading and background cycling start to the "window.load" Also trigger initial "window.hashchange" event immediately.
JavaScript
apache-2.0
MovingBlocks/movingblocks.github.com,smsunarto/movingblocks.github.com,MovingBlocks/movingblocks.github.com,smsunarto/movingblocks.github.com,MovingBlocks/movingblocks.github.com,smsunarto/movingblocks.github.com
e33ff14caf33b7d208e3d02cc60e5b173ac328e0
src/util/helpers.js
src/util/helpers.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/. */ /** * Gets the current guild and UNIQUE member counts. * * @param {CommandoClient} client - The Discord.JS-Comm...
/* 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/. */ /** * Gets the current guild and UNIQUE member counts. * * @param {CommandoClient} client - The Discord.JS-Comm...
Add fancy commas to member and guild counts
Add fancy commas to member and guild counts
JavaScript
mpl-2.0
BytewaveMLP/Randibooru.js
4f4c42d6636ee52e4d999993d4259483158ea5d9
spec/karma.conf.ci.js
spec/karma.conf.ci.js
// Karma configuration // Generated on Wed Aug 30 2017 09:45:21 GMT+0800 (中国标准时间) const karmaConfig = require('./karma.conf.common.js') module.exports = function(config) { config.set( Object.assign( {}, karmaConfig, { customLaunchers: { ...
// Karma configuration // Generated on Wed Aug 30 2017 09:45:21 GMT+0800 (中国标准时间) const karmaConfig = require('./karma.conf.common.js') module.exports = function(config) { config.set( Object.assign( {}, karmaConfig, { browserStack: { u...
Fix Travis CI build error
:hammer: Fix Travis CI build error
JavaScript
mit
shianqi/NetEase-Cloud-Music-Web,shianqi/NetEase-Cloud-Music-Web
e09c3e8239bfd11521ed8b0a9c36ca583da990b8
src/global.js
src/global.js
function insert_emoticons(ident, classes) { classes = classes || ""; decoder = image_decoder.images; console.log("Replacing " + $(ident).length + " instances of " + ident); $(ident).each(function() { for (var i = 0; i < decoder.length; i++) { key = Object.keys(decoder[i]); image = decoder[i][key...
function insert_emoticons(ident, classes) { classes = classes || ""; decoder = image_decoder.images; console.log("Replacing " + $(ident).length + " instances of " + ident); $(ident).each(function() { for (var i = 0; i < decoder.length; i++) { key = Object.keys(decoder[i]); image = decoder[i][key...
Replace now does multiple recurrances of emoticon code
Replace now does multiple recurrances of emoticon code
JavaScript
mit
RealOrangeOne/hipchat-emoticons-for-all,RealOrangeOne/hipchat-emoticons-for-all,RealOrangeOne/hipchat-emoticons-for-all
d01a4a45254ae0c3c22a054a575631999c48641e
src/codeManager.js
src/codeManager.js
var utils = require("./utils"); function CodeManager() { this.codes = []; this.currentSession = -1; this.codesGenerated = false; } CodeManager.prototype.nextSession = function() { if (this.codes[this.currentSession + 1]) { this.currentSession++; } else if (this.currentSession === -1) { ...
var utils = require("./utils"); function CodeManager() { this.codes = []; this.currentSession = -1; this.codesGenerated = false; } CodeManager.prototype.nextSession = function() { if (!this.codesGenerated) { throw "No codes generated"; } if (this.codes[this.currentSession + 1]) { ...
Clarify logic around codesGenerated boolean
Clarify logic around codesGenerated boolean
JavaScript
mit
cthit/VoteIT,cthit/VoteIT
322d69e1b82b3471f55589caa8072f61b54321fd
tutor/src/models/purchases/purchase.js
tutor/src/models/purchases/purchase.js
import { find } from 'lodash'; import moment from 'moment'; import { BaseModel, identifiedBy, field, identifier, belongsTo, computed, observable, } from '../base'; import { TimeStore } from '../../flux/time'; @identifiedBy('purchase/product') class Product extends BaseModel { @identifier uuid; @field name; @fi...
import { find } from 'lodash'; import moment from 'moment'; import { BaseModel, identifiedBy, field, identifier, belongsTo, computed, observable, } from '../base'; import Courses from '../courses-map'; import { TimeStore } from '../../flux/time'; @identifiedBy('purchase/product') class Product extends BaseModel { @...
Remove course from courses list when refunded
Remove course from courses list when refunded
JavaScript
agpl-3.0
openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js
28df150784ab628b5354be523b23fffa5118aeb8
lib/express.js
lib/express.js
if (require.paths.indexOf(__dirname + '/support/ext/lib') === -1) { require.paths.unshift(__dirname + '/support/ext/lib') require.paths.unshift(__dirname + '/support/haml/lib') require.paths.unshift(__dirname + '/support/sass/lib') require.paths.unshift(__dirname + '/support/multipart/lib') } require('ext') Cl...
require.paths.unshift(__dirname + '/support/ext/lib') require.paths.unshift(__dirname + '/support/haml/lib') require.paths.unshift(__dirname + '/support/sass/lib') require.paths.unshift(__dirname + '/support/multipart/lib') require('ext') Class = require('support/class/lib/class').Class require('express/core')
Revert "Only unshift support libs once"
Revert "Only unshift support libs once" This reverts commit 0950083da24377142418e0a8dd14e883ba7db210.
JavaScript
mit
pstrike/express,featurist/express,bjrmatos/express,maraoz/express,andrejewski/express,VegeChou/express,juandav/express,simudream/express,Matrixbirds/express,smcmurray/express,hightechweb/express,frank06/express,nodejs-camp/booklog-mora,Faiz7412/express,HXYNODE/express,abhi3/express,gnowoel/express,MoraLin/mora-test,ste...
fd25909239afc12f1f06fad8057517a274f35e75
app/assets/javascripts/api/application.js
app/assets/javascripts/api/application.js
//= require ../analytics //= require i18n/translations //= require jquery //= require catarse.js/dist/catarse.js
//= require ../analytics //= require i18n/translations //= require jquery //= require ../lib/replace-diacritics //= require catarse.js/dist/catarse.js
Add catarse.js missing local dependency
Add catarse.js missing local dependency Signed-off-by: Vinicius Andrade <16687ac525c18d05db54be8266913435a820383c@gmail.com>
JavaScript
mit
catarse/catarse,catarse/catarse,catarse/catarse,catarse/catarse
4564849c530d1b8ce2f4dcdec6c5d7644e9dbf4e
src/Input/Methods/TapInput.js
src/Input/Methods/TapInput.js
function TapInput(element, tapRegions) { this.element = typeof element !== 'undefined' ? element : document; this.tapRegions = Array.isArray(tapRegions) ? tapRegions : []; this.upCount = 0; this.listeners = { touchStart: this.tap.bind(this) }; } TapInput.prototype.add = function(tapRegion) ...
function TapInput(element, tapRegions) { this.element = typeof element !== 'undefined' ? element : document; this.tapRegions = Array.isArray(tapRegions) ? tapRegions : []; this.upCount = 0; this.listeners = { touchStart: this.tap.bind(this), mouseDown: this.tap.bind(this) }; } TapIn...
Add mouse input to tap input
Add mouse input to tap input
JavaScript
mit
mnito/factors-game,mnito/factors-game
147a39fe239ac52c55dee9e71c48122ca3c09a1a
app/controllers/google-map/info-window.js
app/controllers/google-map/info-window.js
import Ember from 'ember'; var computed = Ember.computed; var alias = computed.alias; /** * @class GoogleMapInfoWindowController * @extends Ember.Controller */ export default Ember.Controller.extend({ templateName: alias('model.templateName'), zIndex: alias('model.zIndex'), lat: alias('model.l...
import Ember from 'ember'; var computed = Ember.computed; var alias = computed.alias; /** * @class GoogleMapInfoWindowController * @extends Ember.Controller */ export default Ember.Controller.extend({ templateName: alias('model.templateName'), zIndex: alias('model.zIndex'), lat: alias('model.l...
Create alias for title & description.
[FIX] Create alias for title & description. As per the documentation for the deprecation of object controllers, model properties must now be referenced explicitly via the model as proxying behaviour has been removed: http://emberjs.com/deprecations/v1.x/#toc_objectcontroller
JavaScript
mit
SamvelRaja/ember-google-map,ssendev/ember-google-map,lukemcfarlane/ember-google-map,lukemcfarlane/ember-google-map,SamvelRaja/ember-google-map,ssendev/ember-google-map,huafu/ember-google-map,oswaldoacauan/ember-google-map,lukemcfarlane/ember-google-map,huafu/ember-google-map,jedrula/ember-google-map,SamvelRaja/ember-go...
d77304df34c4c164c7d490c73801013f92f69e08
t/live/juice_cgi.js
t/live/juice_cgi.js
var cgi = require('juice/engine/cgi'); function application(env) { return [ 200, {contentType: 'text/html'}, function() { yield "Hi!"; yield "<h2>Title</h2>"; yield "<b>Hi!</b>"; yield "<pre>Script url args are " + env.PATH_INFO + "</pre>"; yield "<pre>This script is rooted...
function doneChore(env, task_id) { return [ 200, {contentType: 'text/html'}, function() { yield "<b>Hi!</b>"; yield "<pre>Script url args are " + env.PATH_INFO + "</pre>"; yield "<pre>This script is rooted at " + env.SCRIPT_NAME + "</pre>"; yield "<h2>Title \u2603</h2>"; } ]...
Use the new dispatcher framework
Use the new dispatcher framework
JavaScript
mit
ashb/juice,ashb/juice
a0d6dc951371f7edd47f34320b98090948e3e72c
src/js/teamPage.js
src/js/teamPage.js
function retrieveGetParameters(){ let parameters = {} window.location.search .substring(1) //Remove '?' at beginning .split('&') //Split key-value pairs .map((currentElement) => { //Fil...
function retrieveGetParameters(){ let parameters = {} window.location.search .substring(1) //Remove '?' at beginning .split('&') //Split key-value pairs .map((currentElement) => { //Fil...
Add function for retrieving team name from URL
Add function for retrieving team name from URL
JavaScript
mit
spethso/PizzaCalculator,spethso/PizzaCalculator
ea96881caa0ec0e96b68215a7381603272571787
app/modules/cache.js
app/modules/cache.js
var azurecache = require('azurecache'); module.exports = function(fake){ if(fake){ exports.get = function(data,callback){ if(typeof callback === 'function'){callback(null,null);} else { return null }}; exports.put = function(data,callback){ if(typeof callback === 'function'){callback(null,null);} e...
var azurecache = require('azurecache'); module.exports = function(fake){ if(fake){ exports.get = function(data,callback){ if(typeof callback === 'function'){callback(null,null);} else { return null }}; exports.put = function(id,data,tts){ return true; }; exports.remove = function(data,callb...
Fix IDE complaining about Cache.put only expecting 2 arguments
Fix IDE complaining about Cache.put only expecting 2 arguments
JavaScript
mit
EnzoMartin/Steam-Backbone-Storefront
a6dbbae2a6d35416ee16c12d482af094f732ab64
timeside/player/static/timeside2/app/scripts/core/models/client/analysis.js
timeside/player/static/timeside2/app/scripts/core/models/client/analysis.js
define([ 'backbone.associations', '../qt_basemodel' ], function (Backbone,BaseModel) { 'use strict'; return BaseModel.extend({ defaults: { url : '', uuid : '', title : '', preset : '', //url du preset sub_processor : '' //url du subprocessor }, relations: [], /...
define([ 'backbone.associations', '../qt_basemodel' ], function (Backbone,BaseModel) { 'use strict'; return BaseModel.extend({ defaults: { url : '', uuid : '', title : '', preset : '', //url du preset sub_processor : '', //url du subprocessor parameters_schema : '' //s...
Update Backbone model for Analysis
Server: Update Backbone model for Analysis
JavaScript
agpl-3.0
Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide
b4cc45b959822557148720919b92827d0562b118
src/ng-justgage.js
src/ng-justgage.js
angular.module("ngJustGage", []) .directive('justGage', function ($compile, $timeout) { return { restrict: 'E', scope: { id: '@', min: '=', max: '=', title: '@', value: '=' }, template: '<div id={{id}}-justgage></div>', compile: function...
angular.module("ngJustGage", []) .directive('justGageStatic', function ($compile, $timeout) { return { restrict: 'E', scope: { id: '@', min: '=', max: '=', title: '@', value: '=' }, template: '<div id={{id}}-justgagestatic></div>', compil...
Add in a <just-gage-dynamic> and rename original to <just-gage-static>
Add in a <just-gage-dynamic> and rename original to <just-gage-static>
JavaScript
mit
mattlaver/angular-justgage,mattlaver/angular-justgage
373f8f1e4f01d8fe7b0fb2741fca2940af84e3cd
server/server.js
server/server.js
const express = require("express"); const bodyParser = require("body-parser"); const methodOverride = require("method-override"); const api = require("./api"); function server(emitter, state, logger) { const app = express(); app.use(bodyParser.json()); app.use(methodOverride()); app.use("/api", api(e...
const express = require("express"); const bodyParser = require("body-parser"); const methodOverride = require("method-override"); const api = require("./api"); function server(emitter, state, logger) { const app = express(); app.use(bodyParser.json()); app.use(methodOverride()); app.use("/api", api(e...
Use absolute path for serving static assets.
Use absolute path for serving static assets.
JavaScript
mit
t-gabor/sunshade-control,t-gabor/sunshade-control,t-gabor/sunshade-control
23cf6389c28add33a349fe7f5c23e8341c22c298
lib/helpers.js
lib/helpers.js
"use strict"; function removeContainer(container, onResultCallback) { let options = { "v": true, "force": true }; container.remove(options, onResultCallback || () => { }); } function removeContainers(containers) { containers.forEach(container => { removeContainer(container); }); } exports.remo...
"use strict"; function removeContainer(container, onResultCallback) { let options = { "v": true, "force": true }; let dummy = () => { }; container.remove(options, onResultCallback || dummy); } function removeContainers(containers) { containers.forEach(container => { removeContainer(contain...
Add support for Node.js 6
Add support for Node.js 6
JavaScript
mit
toksaitov/auca-judge-back
a0f082064e1d54e8cc7fc2c061aaa6f96b8a6d6c
src/parse-response.js
src/parse-response.js
function parseResponse(response) { let text; if (response && response.content && (typeof response.content === 'string')) { text = response.content; } if (response && response.text && (typeof response.text === 'string')) { text = response.text; } try { const parsedResponse = JSON.parse(text); ...
function parseResponse(response) { let text; if (response && response.content && (typeof response.content === 'string')) { text = response.content; } if (response && response.text && (typeof response.text === 'string')) { text = response.text; } try { const parsedResponse = JSON.parse(text); ...
Throw error instead of logging.
Throw error instead of logging.
JavaScript
mit
anchorchat/react-stickerpipe
1ce65bd634dd1a831cb104bb66fdb173c4948057
app/support/DbAdapter/utils.js
app/support/DbAdapter/utils.js
import _ from 'lodash'; export const unexistedUID = '00000000-0000-0000-C000-000000000046'; export function initObject(classDef, attrs, id, params) { return new classDef({ ...attrs, ...{ id }, ...params }); } export function prepareModelPayload(payload, namesMapping, valuesMapping) { return _.transform(payload,...
import _ from 'lodash'; export const unexistedUID = '00000000-0000-0000-C000-000000000046'; export function initObject(classDef, attrs, id, params) { return new classDef({ ...attrs, id, ...params }); } export function prepareModelPayload(payload, namesMapping, valuesMapping) { const result = {}; const keys = ...
Rewrite and simplify prepareModelPayload function
Rewrite and simplify prepareModelPayload function
JavaScript
mit
FreeFeed/freefeed-server,FreeFeed/freefeed-server
e393741b0778bd2826e504ec82b5421c6f74b116
www/videoplayer.js
www/videoplayer.js
cordova.define("com.moust.cordova.videoplayer.VideoPlayer", function(require, exports, module) { var exec = require("cordova/exec"); module.exports = { DEFAULT_OPTIONS: { volume: 1.0, scalingMode: 1 }, SCALING_MODE: { SCALE_TO_FIT: 1, SCALE_TO_FIT_WITH_CROPPING: 2 }, ...
var exec = require("cordova/exec"); module.exports = { DEFAULT_OPTIONS: { volume: 1.0, scalingMode: 1 }, SCALING_MODE: { SCALE_TO_FIT: 1, SCALE_TO_FIT_WITH_CROPPING: 2 }, play: function (path, options, successCallback, errorCallback) { options = this.merge...
Fix doubling of js module definition
Fix doubling of js module definition
JavaScript
mit
bva/cordova-plugin-videoplayer,bva/cordova-plugin-videoplayer
bbde1a0158a7d6e4fdbced6ab2cf1860de0457c2
test/Jar_test.js
test/Jar_test.js
"use strict" var Jar = require("../src/Jar.js") describe("Jar", function () { })
"use strict" var Jar = require("../src/Jar.js") , spawn = require("child_process").spawn , path = require("path") , fs = require("fs") , assert = require("assert") var helloBuildDir = path.resolve(__dirname + "/../support/hello") , helloJarPath = path.resolve(__dirname + "/../support/hello/hello.jar") var ...
Build the test jar file from the tests.
Build the test jar file from the tests.
JavaScript
mit
desertnet/jarfile,desertnet/jarfile
6f672076c23a0c4f8f341d5b65629e6f2abf94ae
blueprints/sl-ember-test-helpers/index.js
blueprints/sl-ember-test-helpers/index.js
/* globals module */ var EOL = require('os').EOL; module.exports = { description: 'Register test helpers', afterInstall: function( options ) { // Import statement var firstFile = 'tests/helpers/start-app.js', firstText = "import slregisterTestHelpers from './...
/* globals module */ var EOL = require('os').EOL; module.exports = { description: 'Register test helpers', afterInstall: function( options ) { // Import statement var firstFile = 'tests/helpers/start-app.js', firstText = "import slregisterTestHelpers from './...
Add "requires" entry to .jshintrc entry in blueprint (overlooked in previous commit)
Add "requires" entry to .jshintrc entry in blueprint (overlooked in previous commit)
JavaScript
mit
erangeles/sl-ember-test-helpers,softlayer/sl-ember-test-helpers,azizpunjani/sl-ember-test-helpers,azizpunjani/sl-ember-test-helpers,notmessenger/sl-ember-test-helpers,notmessenger/sl-ember-test-helpers,erangeles/sl-ember-test-helpers,softlayer/sl-ember-test-helpers
c54cf9a4d66f3166103bd46f9a503865670ff271
app/client/lib/ethereum/1_web3Init.js
app/client/lib/ethereum/1_web3Init.js
import Web3 from 'web3'; // set providor if(typeof web3 !== 'undefined') web3 = new Web3(web3.currentProvider); else web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
// set providor if(typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { let Web3 = require('web3'); web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); }
Fix import statement triggering in Mist
Fix import statement triggering in Mist
JavaScript
mit
ferni/ens-registrar-dapp,ferni/ens-registrar-dapp
18a8351e06ae7f99761258cfee2276a8354e8608
app/js/services/treebank_persister.js
app/js/services/treebank_persister.js
'use strict'; /* * */ angular.module('arethusa').factory('TreebankPersister', [ 'documentStore', 'configurator', function (documentStore, configurator) { return function() { }; } ]);
'use strict'; /* * */ angular.module('arethusa').factory('TreebankPersister', [ 'documentStore', 'configurator', 'navigator', function (documentStore, configurator, navigator) { return function(conf) { var resource = configurator.provideResource(conf.resource); function updateXml() { ...
Add update fns to TreebankPersister
Add update fns to TreebankPersister
JavaScript
mit
alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa
93652660b888dea378a47638780da3497ab7a7f3
test/header-spec.js
test/header-spec.js
import React from 'react' import ReactTestUtils from 'react-addons-test-utils' import assert from 'assert' import {getKaomoji, getYmdStr } from '../app/Resources/js/utils/util.js' import Header from '../app/Resources/js/components/header.jsx' describe('testHeader', () => { const getComponent = () => { retu...
import React from 'react' import ReactTestUtils from 'react-addons-test-utils' import assert from 'assert' import Header from '../app/Resources/js/components/header.jsx' describe('testHeader', () => { const getComponent = () => { return ReactTestUtils.renderIntoDocument(<Header getDailyJson={[]} timelineDa...
Revert "travis fail karma fix"
Revert "travis fail karma fix" This reverts commit 603eb5ee8bba3c881cee80d4e89a9faa82449c24.
JavaScript
apache-2.0
ryota-murakami/daily-tweet,ryota-murakami/daily-tweet,ryota-murakami/daily-tweet,ryota-murakami/tweet-pick,ryota-murakami/tweet-pick,ryota-murakami/tweet-pick,ryota-murakami/daily-tweet
7442781f2a78b1777da5ec7fea22fa16ef9b1dd7
src/main.js
src/main.js
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import { VueRouter, router } from './router' import App from './App' import './styles.js' /* eslint-disable no-new */ new Vue({ router, el: '#app', ...
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import { VueRouter, router } from './router' import App from './App' import './styles.js' Vue.use(VueRouter) /* eslint-disable no-new */ new Vue({ rout...
Order imports and load VueRoiuter config
Order imports and load VueRoiuter config
JavaScript
apache-2.0
libre-forge/vijecnica,libre-forge/vijecnica
58980734a9acae4b97cb65149e7ec1a19d51457e
index/splitter.js
index/splitter.js
const $ = require('jquery'); $(document).ready(function(){ $('#splitter').mousedown(function(e){ e.preventDefault(); $(document).mousemove(function(e){ $('.content').css("width",$(document).width()-e.pageX+2); $('.side-bar').css("width",e.pageX+2); }) }); $(document).mouseup(fun...
const $ = require('jquery'); var splitterLocation; $(document).ready(function(){ $('#splitter').mousedown(function(e){ e.preventDefault(); $(document).mousemove(function(e){ splitterLocation = e.pageX; $('.content').css("width", $(document).width() - splitterLocation); $('.side-b...
Fix a bug that .content does not fit with the window (instead, blank area appears on the right side) when the window is resized.
Fix a bug that .content does not fit with the window (instead, blank area appears on the right side) when the window is resized.
JavaScript
mit
TomoyukiAota/electron-directory-treeview,TomoyukiAota/electron-directory-treeview
fa1f55e968cad7afee1011a3d3e533c1854151a9
test/index.js
test/index.js
'use strict'; var assert = require('assert'); var Response = require('../'); var res = new Response(200, { 'Foo-Bar': 'baz-Bosh', 'bar-foo': 'bish-Bosh' }, 'foo bar baz'); assert(res.statusCode = 200); assert(res.headers['foo-bar'] === 'baz-Bosh'); assert(res.headers['bar-foo'] === 'bish-Bosh'); assert(res.body =...
'use strict'; var assert = require('assert'); var Response = require('../'); var res = new Response(200, { 'Foo-Bar': 'baz-Bosh', 'bar-foo': 'bish-Bosh' }, 'foo bar baz', 'http://example.com'); assert(res.statusCode = 200); assert(res.headers['foo-bar'] === 'baz-Bosh'); assert(res.headers['bar-foo'] === 'bish-Bos...
Update tests for `res.url` and `err.url`
Update tests for `res.url` and `err.url`
JavaScript
mit
ForbesLindesay/http-response-object,ForbesLindesay/http-response-object
332c0d4a435409b232e61768aaf4ee5cca461790
js/browser/app.js
js/browser/app.js
jsio.path.common = 'js'; jsio.path.browser = 'js'; jsio('from common.javascript import bind'); jsio('import net, logging'); jsio('import common.Item'); jsio('import common.itemFactory'); jsio('import browser.ItemView'); jsio('import browser.UbiquityClient'); gClient = new browser.UbiquityClient(); gClient.connect...
jsio.path.common = 'js'; jsio.path.browser = 'js'; jsio('from common.javascript import bind'); jsio('import net, logging'); jsio('import common.Item'); jsio('import common.itemFactory'); jsio('import browser.ItemView'); jsio('import browser.UbiquityClient'); gClient = new browser.UbiquityClient(); gClient.connect...
Remove debug statement and setTimeout. Its annoying that exceptions get caught on the rtjp layer - would probably be better to hand off control somewhere in the stack with a setTimeout
Remove debug statement and setTimeout. Its annoying that exceptions get caught on the rtjp layer - would probably be better to hand off control somewhere in the stack with a setTimeout
JavaScript
mit
marcuswestin/fin
f9896d73d67b3411a2d24a3e0ba6fd171117561a
app/javascript/gobierto_plans/webapp/lib/factory.js
app/javascript/gobierto_plans/webapp/lib/factory.js
import axios from "axios"; const baseUrl = location.origin; const endPoint = `${baseUrl}/api/v1/plans`; const headers = { "Content-type": "application/json", Authorization: window.gobiertoAPI.token }; // Plans-endpoint factory to get/post/put/delete API data export const PlansFactoryMixin = { locale: I18n.local...
import axios from "axios"; const baseUrl = location.origin; const endPoint = `${baseUrl}/api/v1/plans`; const token = window.gobiertoAPI.token.length == 0 && window.gobiertoAPI.basic_auth_token ? window.gobiertoAPI.basic_auth_token : window.gobiertoAPI.token const headers = { "Content-type": "application/json", A...
Include basic_auth_token in gobierto plans factories header
Include basic_auth_token in gobierto plans factories header
JavaScript
agpl-3.0
PopulateTools/gobierto,PopulateTools/gobierto-dev,PopulateTools/gobierto-dev,PopulateTools/gobierto,PopulateTools/gobierto,PopulateTools/gobierto-dev,PopulateTools/gobierto-dev,PopulateTools/gobierto
ee8884576624c1bcd4715f81f04541572799cbf4
js/components/developer/developer-screen/index.js
js/components/developer/developer-screen/index.js
import React from 'react'; import { View, Button } from 'react-native'; /* Developer screen. Provides access to components during development. */ export default class DeveloperScreen extends React.Component { static navigationOptions = { tabBar: { label: 'Developer', }, title: 'Developer', }; ...
import React from 'react'; import { View, Button } from 'react-native'; /* Developer screen. Provides access to components during development. */ export default class DeveloperScreen extends React.Component { static navigationOptions = { tabBar: { label: 'Developer', }, title: 'Developer', }; ...
Add navigation to create job screen from developer screen
Add navigation to create job screen from developer screen
JavaScript
mit
justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client
caa18d2f672e107c33d78bd81411a58739081de0
src/util.js
src/util.js
/** * Copyright 2015 The Incremental DOM Authors. 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 ...
/** * Copyright 2015 The Incremental DOM Authors. 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 ...
Use a faster blank object creator
Use a faster blank object creator http://justin.ridgewell.name/browser-benchmark/blank-object/index.html Creation is 2-10x faster (depends on the browser), and access is the same for both existent and non-existent properties.
JavaScript
apache-2.0
google/incremental-dom,sparhami/incremental-dom,google/incremental-dom,PolymerLabs/incremental-dom,google/incremental-dom,sparhami/incremental-dom,jridgewell/incremental-dom,PolymerLabs/incremental-dom,jridgewell/incremental-dom,jridgewell/incremental-dom,sparhami/incremental-dom,sparhami/incremental-dom,PolymerLabs/in...
816c96f043efbdb6daa786b4cef3cc12474860d8
test/thumbs_test.js
test/thumbs_test.js
window.addEventListener('load', function(){ module('touchstart'); test('should use touchstart when touchstart is supported', function() { ok(false, 'not implemented'); // assert({ listener:'touchstart', receives:'touchstart' }); }); test('should use mousedown when touchstart is unsupported', function...
window.addEventListener('load', function(){ module('touchstart'); test('should use touchstart when touchstart is supported', function() { assert({ listener:'touchstart', receives:'touchstart' }); }); test('should use mousedown when touchstart is unsupported', function() { assert({ listener:'touchstar...
Add integrity test for touch events
Add integrity test for touch events
JavaScript
mit
pyrinelaw/thumbs.js,pyrinelaw/thumbs.js,mwbrooks/thumbs.js
2e6f4716a4e61b6447d0378b1d491b568834714e
Routes/API/Yggdrasil/Server.js
Routes/API/Yggdrasil/Server.js
const profileService = require("../../../Db/Service/profileService"); const errors = require("../Mojang/Errors"); module.exports.joinserver = (req, res, next) => { let accessToken = req.body.accessToken, selectedProfile = req.body.selectedProfile, serverId = req.body.serverId, server = "Un...
const profileService = require("../../../Db/Service/profileService"); const errors = require("../Mojang/Errors"); module.exports.joinserver = (req, res, next) => { let accessToken = req.body.accessToken, selectedProfile = req.body.selectedProfile, serverId = req.body.serverId, server = "Un...
Fix return user ProfileID not accessToken
Fix return user ProfileID not accessToken
JavaScript
mit
Indexyz/Identity,Indexyz/Identity
7620e42c44489f6c3c69269d61a058dc1b73c2b9
public/js/app.js
public/js/app.js
$('.m-scooch').scooch(); if ( $('.m-item:first-child' ).hasClass('m-active') ) { $('.m-scooch-controls [data-m-slide="prev"]').addClass('hide'); }; $('.m-scooch-controls a').click(function() { $('.m-scooch-controls a').removeClass('hide'); if ( $('.m-item:first-child' ).hasClass('m-active') ) { $...
$('.m-scooch').scooch(); if ( $('.m-item:first-child' ).hasClass('m-active') ) { $('.m-scooch-controls [data-m-slide="prev"]').addClass('hide'); }; $('.m-scooch').on('afterSlide', function(e, previousSlide, nextSlide) { $('.m-scooch-controls a').removeClass('hide'); if ( $('.m-item:first-child' ).hasCla...
Fix for scooch carousel next/prev buttons
Fix for scooch carousel next/prev buttons
JavaScript
mit
zacharyhalvorson/personal-site,zacharyhalvorson/personal-site
0ae4bd419f733504d8dd840a8725f6d800196136
test/api-stream.js
test/api-stream.js
var fs = require('fs'); var endpoint = require('endpoint'); describe('Writeable Stream Input API', function () { var feedPath = __dirname + '/feeds/rss2sample.xml'; describe('.pipe()', function () { it('works', function (done) { var events = []; fs.createReadStream(feedPath).pipe(FeedParser()) ...
var fs = require('fs'); describe('Writeable Stream Input API', function () { var feedPath = __dirname + '/feeds/rss2sample.xml'; describe('.pipe()', function () { it('works', function (done) { var events = []; fs.createReadStream(feedPath).pipe(FeedParser()) .on('error', function (err) {...
Change stream test to not require additional dependency
Change stream test to not require additional dependency
JavaScript
mit
csotiriou/node-feedparser,humblelistener/node-feedparser,humblelistener/node-feedparser,csotiriou/node-feedparser
335222b443b52e63184e5460079fdeeb2bf03236
server.js
server.js
//Dependencies var restify = require('restify'); var cors = require('cors'); var appInfo = require('./package.json'); //Configuration //var address = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1'; var port = process.env.PORT || 1337; var server = restify.createServer(); //Plug-ins server.use(restify.queryParser());...
//Dependencies var restify = require('restify'); var cors = require('cors'); var appInfo = require('./package.json'); //Configuration var port = process.env.PORT || 1337; var server = restify.createServer(); //Plug-ins server.use(restify.queryParser()); server.use(restify.bodyParser()); server.use(restify.CORS()); ...
Remove reference to openshfit specifics.
Remove reference to openshfit specifics.
JavaScript
mit
vkhazin/UserAgentService,vkhazin/UserAgentService
effeaed6728258ca87ed438117d6a3fe33e36b35
test/testPlugin.js
test/testPlugin.js
const { join } = require('path'); const { transform } = require('babel-core'); module.exports = function testPlugin(code) { const loaderPath = join(__dirname, 'exampleTranslationLoader.js'); const result = transform(code, { plugins: [['./index.js', { translationLoader: loaderPath, }]], }); retur...
const { transform } = require('babel-core'); module.exports = function testPlugin(code) { const result = transform(code, { plugins: [['./index.js', { translationLoader: './test/exampleTranslationLoader', }]], }); return result.code; };
Use relative path for translationLoader
Use relative path for translationLoader
JavaScript
mit
valscion/babel-plugin-i18n
0b3499f274a828474ee18979e5b7959cb8ec86c8
public/assets/js/main.js
public/assets/js/main.js
/** * main.js * * Author: Marian Friedmann * */ $(function() { });
/** * main.js * * Author: Marian Friedmann * */ $(function() { $('.modal-open').click(function() { $('.modal').addClass('modal--active'); }); $('.modal-loading').click(function() { $('.modal').removeClass('modal--active'); $('.modal').addClass('modal--loading'); }); $('.modal-close').click...
Add modal dummy open/close function
Add modal dummy open/close function
JavaScript
mit
cam5/hostkeeper,frdmn/hostkeeper,cam5/hostkeeper,cam5/hostkeeper,frdmn/hostkeeper,frdmn/hostkeeper
fc84754a5be8d5ad88e46812a84b4edecbe10265
src/main/main.js
src/main/main.js
var app = require('app'); var BrowserWindow = require('browser-window'); var menu = require('./menu'); process.env.PATH += ':/usr/local/bin'; var mainWindow; app.on('ready', function () { mainWindow = createWindow(); }); app.on('window-all-closed', function() { if(process.platform !== 'darwin') { app.quit(); }...
var app = require('app'); var BrowserWindow = require('browser-window'); var menu = require('./menu'); process.env.PATH += ':/usr/local/bin'; var mainWindow; app.on('ready', function () { mainWindow = createWindow(); }); app.on('window-all-closed', function () { if (process.platform !== 'darwin') { ...
Make the window full screen.
Make the window full screen.
JavaScript
mit
black-screen/black-screen,j-allard/black-screen,drew-gross/black-screen,j-allard/black-screen,vshatskyi/black-screen,black-screen/black-screen,black-screen/black-screen,vshatskyi/black-screen,railsware/upterm,railsware/upterm,drew-gross/black-screen,j-allard/black-screen,shockone/black-screen,shockone/black-screen,drew...
ee5cf72c30565340411987492c6e6020c364a945
src/charsets/get.js
src/charsets/get.js
'use strict'; const { DEFAULT_INPUT_CHARSET } = require('./constants'); const { validateCharset } = require('./validate'); const { decodeCharset } = require('./transform'); // Normalize charset, including adding defaults and validating const getCharset = function (charset, { format } = {}) { const charsetA = addDef...
'use strict'; // eslint-disable-next-line import/no-internal-modules const encodings = require('iconv-lite/encodings'); const { omitBy } = require('../utilities'); const { DEFAULT_INPUT_CHARSET } = require('./constants'); const { validateCharset } = require('./validate'); const { decodeCharset } = require('./transfo...
Allow retrieving list of supported charsets
Allow retrieving list of supported charsets
JavaScript
apache-2.0
autoserver-org/autoserver,autoserver-org/autoserver
8990a06ded90a65e1b1f310cea0c7cc96bfa2e82
src/mixins/renderable.js
src/mixins/renderable.js
import Graphics from 'flockn/graphics'; var isVisible = function isVisible() { var hasVisibleFlag = Object.hasOwnProperty.call(this, 'visible'); if (hasVisibleFlag) { return this.visible; } else { return true; } }; var renderable = function renderable() { this.on('render', () => { // Only rende...
import checkForFlag from 'flockn/utils/checkforflag'; import Graphics from 'flockn/graphics'; var isVisible = checkForFlag('visible'); var renderable = function renderable() { this.on('render', () => { // Only render if element is visible if (!isVisible.call(this)) { return; } // Emit `render...
Use checkForFlag in render mixin
Use checkForFlag in render mixin
JavaScript
mit
freezedev/flockn,freezedev/flockn
a140305eeb0f1a36305846fd3c10804c0c5c70ae
src/js/game.js
src/js/game.js
(function() { 'use strict'; function Game() { this.player = null; this.cursors = null; } Game.prototype = { create: function () { this.game.world.setBounds(0,0, 1280, 940); this.background = this.add.sprite(0,0, 'background'); var x = this.game.width / 2 , y = this.game...
(function() { 'use strict'; function Game() { this.player = null; this.cursors = null; } Game.prototype = { create: function () { this.game.world.setBounds(0,0, 1280, 940); this.background = this.add.sprite(0,0, 'background'); var x = this.game.width / 2 , y = this.game...
Use velocity rather than just changing positions
Use velocity rather than just changing positions
JavaScript
mit
werme/DATX02
355e892013aefe1f8cf44043278e98c8b7fecac1
src/components/buttonGroup/buttonGroup.stories.js
src/components/buttonGroup/buttonGroup.stories.js
import React from 'react'; import { addStoryInGroup, LOW_LEVEL_BLOCKS } from '../../../.storybook/utils'; import { Store, State } from '@sambego/storybook-state'; import { IconAddMediumOutline } from '@teamleader/ui-icons'; import Button from '../button'; import ButtonGroup from './ButtonGroup'; const store = new Stor...
import React, { useState } from 'react'; import { addStoryInGroup, LOW_LEVEL_BLOCKS } from '../../../.storybook/utils'; import { IconAddMediumOutline } from '@teamleader/ui-icons'; import Button from '../button'; import ButtonGroup from './ButtonGroup'; export default { component: ButtonGroup, title: addStoryInGro...
Replace storybook-state usage from buttonGroup story with useState
Replace storybook-state usage from buttonGroup story with useState
JavaScript
mit
teamleadercrm/teamleader-ui
b0a148ce056e4168b12ea57e956f564af49202ba
HideExtraCourses.user.js
HideExtraCourses.user.js
// ==UserScript== // @name HideExtraCourses // @namespace https://www.github.com/zeta12ti/DuolingoCourseSwitcher // @description Hides extra courses from the update introduced in the update on 2017/06/19. // @include https://*.duolingo.com/* // @version 1.1 // @grant none // ==/UserScript== // ...
// ==UserScript== // @name HideExtraCourses // @namespace https://www.github.com/zeta12ti/DuolingoCourseSwitcher // @description Hides extra courses from the update introduced in the update on 2017/06/19. // @include https://*.duolingo.com/* // @version 1.1 // @grant none // ==/UserScript== // ...
Hide extra courses when the page is sufficiently loaded
Hide extra courses when the page is sufficiently loaded
JavaScript
mit
zeta12ti/DuolingoCourseSwitcher
d589c4d0e6e9c8901b293ff36b50e18869e36503
test/router.js
test/router.js
'use strict' var test = require('tape') var proxyquire = require('proxyquire') test('router (server)', function (t) { var Router = proxyquire('../router', { 'global/document': {}, './history': { onPopState: noop, pushState: noop } }) var router = Router() t.equal(router(), '') t.end(...
'use strict' var test = require('tape') var proxyquire = require('proxyquire') test('router (server)', function (t) { var Router = proxyquire('../router', { 'global/document': {}, './history': { onPopState: noop, pushState: noop } }) var router = Router() t.equal(router(), '') t.end(...
Add tests against path handling via user set or pop state
Add tests against path handling via user set or pop state
JavaScript
mit
ajoslin/sour,bendrucker/sour
43748881f64747620b52287903dd2514d87f2d07
webpack/webpack.server.babel.js
webpack/webpack.server.babel.js
/* eslint-disable import/no-unresolved, global-require */ import nodeExternals from 'webpack-node-externals'; import webpack from 'webpack'; import common from './common'; const isProduction = process.env.NODE_ENV === 'production'; export default { name: 'server', entry: './server', target: 'node', node: { ...
/* eslint-disable import/no-unresolved, global-require */ import nodeExternals from 'webpack-node-externals'; import webpack from 'webpack'; import common from './common'; const isProduction = process.env.NODE_ENV === 'production'; export default { name: 'server', entry: './server', target: 'node', node: { ...
Add process.env.PORT in webpack server config
Add process.env.PORT in webpack server config
JavaScript
mit
richardkall/react-starter
556906457dc55c97cb867125ccd0cb08823a380c
server/config/routes.js
server/config/routes.js
var userController = require('../users/userController.js'); var helpers = require('./helpers.js'); // our custom middleware module.exports = function (app, express) { app.get('/api/users/profile', userController.getUser); // app.post('/api/users/signin', userController.signin); app.post('/api/users/signup', user...
var userController = require('../users/userController.js'); var helpers = require('./helpers.js'); // our custom middleware module.exports = function (app, express) { app.get('/api/users/profile', userController.getUser); app.put('/api/users/profile', userController.updateUser); // app.post('/api/users/signin', ...
Handle PUT request to user profile
Handle PUT request to user profile
JavaScript
mit
gm758/Bolt,elliotaplant/Bolt,elliotaplant/Bolt,boisterousSplash/Bolt,thomasRhoffmann/Bolt,thomasRhoffmann/Bolt,gm758/Bolt,boisterousSplash/Bolt
d45f6520d781fd89569c42e9774c10d348d0a7db
src/responses/general.js
src/responses/general.js
import tmpl from '~/lib/tmpl.js'; /** * This module contains functions to help standardize the responses used to send back to ASK. The * constants are all functions, built by the `tmpl` tag function, documented below. They take * parameters and replace them with the data they are provided. Each index in the templat...
import tmpl from '~/lib/tmpl.js'; /** * This module contains functions to help standardize the responses used to send back to ASK. The * constants are all functions, built by the `tmpl` tag function, documented below. They take * parameters and replace them with the data they are provided. Each index in the templat...
Update welcome and help responses.
Update welcome and help responses.
JavaScript
mit
josephschmitt/alexa-libby
bb613c86643090e80a371fd9f50fe02d3023d630
src/scene/BattleScene.js
src/scene/BattleScene.js
define(function(require){ var scene = new THREE.Object3D(); var camera = new THREE.PerspectiveCamera(75, 16 / 9, 0.1, 5000); var loader = new THREE.JSONLoader(true); var origin = new THREE.Vector3(); var StarSystem = require("component/starfield"); var starfield = StarSystem.create(33, 100...
define(function(require){ var scene = new THREE.Object3D(); var camera = new THREE.PerspectiveCamera(75, 16 / 9, 0.1, 5000); var loader = new THREE.JSONLoader(true); var origin = new THREE.Vector3(); var StarSystem = require("component/starfield"); var starfield = StarSystem.create(33, 100...
Remove init from scene definition
Remove init from scene definition
JavaScript
mit
Suva/insurance,Suva/insurance,Suva/insurance,Suva/insurance