commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 624 | message stringlengths 15 4.7k | lang stringclasses 3
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
70d4c50688bb0492a7f5df19504ae4faa3775dca | gulp/tasks/scripts.js | gulp/tasks/scripts.js | var gulp = require('gulp'),
browserify = require('browserify'),
babelify = require('babelify'),
source = require('vinyl-source-stream'),
paths = require('../paths');
gulp.task('scripts:app', function () {
return browserify({
entries: paths.app.scriptsMain,
debug: true,
transform: ['browse... | var gulp = require('gulp'),
browserify = require('browserify'),
babelify = require('babelify'),
source = require('vinyl-source-stream'),
paths = require('../paths');
gulp.task('scripts:app', function () {
return browserify({
entries: paths.app.scriptsMain,
debug: true,
transform: ['browse... | Add error handling so JS errors don't break streams | Add error handling so JS errors don't break streams
Fixes #1
| JavaScript | mit | trendyminds/pura,trendyminds/pura |
258f0cd6ddceaa84c4f416bd1a338f2f653f57ba | src/components/Dashboard.js | src/components/Dashboard.js | import React, { PropTypes } from 'react';
const formatValue = (item, results) => {
if (!results.hasOwnProperty(item.query)) {
return '—';
}
return (item.formatValue || (e => e))(results[item.query]);
};
const Dashboard = props => (
<div className="dashboard">
{props.items.map(item => (
<div cla... | import React, { PropTypes } from 'react';
const formatValue = (item, results) => {
if (!results.hasOwnProperty(item.query)) {
return '—';
}
return (item.formatValue || (e => e))(results[item.query]);
};
const Dashboard = props => (
<div className="dashboard">
{props.items.map(item => (
<div cla... | Remove unnecessary space from the dashboard items | Remove unnecessary space from the dashboard items
| JavaScript | mit | quintel/etmobile,quintel/etmobile,quintel/etmobile |
6fa8f0c12a3802c92f61d08843f9bfca8b7917c6 | src/components/Hand/Hand.js | src/components/Hand/Hand.js | import React, { Component, PropTypes } from 'react';
import { List } from 'immutable';
import { DraggableCard } from 'containers';
export default class Hand extends Component {
static propTypes = {
cards: PropTypes.instanceOf(List),
}
render() {
const { cards } = this.props;
const styles = require('... | import React, { Component, PropTypes } from 'react';
import { List } from 'immutable';
import { DraggableCard } from 'containers';
export default class Hand extends Component {
static propTypes = {
cards: PropTypes.instanceOf(List),
}
render() {
const { cards } = this.props;
const styles = require('... | Make use of size instead of count() | Make use of size instead of count()
| JavaScript | mit | inooid/react-redux-card-game,inooid/react-redux-card-game |
e7ed1a9bc83bed17178860d4957f2c1f1cc8efd4 | js/admin/chosen/chosenImage.jquery.js | js/admin/chosen/chosenImage.jquery.js | /*
* Chosen jQuery plugin to add an image to the dropdown items.
*/
(function($) {
$.fn.chosenImage = function(options) {
return this.each(function() {
var $select = $(this);
var imgMap = {};
// 1. Retrieve img-src from data attribute and build object of image sources... | /*
* Chosen jQuery plugin to add an image to the dropdown items.
*/
(function($) {
$.fn.chosenImage = function(options) {
return this.each(function() {
var $select = $(this);
var imgMap = {};
// 1. Retrieve img-src from data attribute and build object of image sources... | Make use of the events provided by chosen. Make it work when using the search field. | Make use of the events provided by chosen.
Make it work when using the search field.
| JavaScript | mit | noplanman/podlove-publisher,podlove/podlove-publisher,noplanman/podlove-publisher,katrinleinweber/podlove-publisher,katrinleinweber/podlove-publisher,katrinleinweber/podlove-publisher,podlove/podlove-publisher,podlove/podlove-publisher,katrinleinweber/podlove-publisher,podlove/podlove-publisher,noplanman/podlove-publis... |
bf8150f88649e28ae675be22f5a5e11425e496d0 | src/main/webapp/scripts/controllers.js | src/main/webapp/scripts/controllers.js | 'use strict';
angular.
module('buildMonitor.controllers', [ 'buildMonitor.services', 'uiSlider']).
controller('JobViews', function($scope, $dialog, $timeout, fetch, storage) {
$scope.fontSize = storage.retrieve('fontSize', 1);
$scope.numberOfColumns = storage.retrieve('numberOfColumns',... | 'use strict';
angular.
module('buildMonitor.controllers', [ 'buildMonitor.services', 'uiSlider']).
controller('JobViews', function($scope, $rootScope, $dialog, $timeout, fetch, storage) {
$scope.fontSize = storage.retrieve('fontSize', 1);
$scope.numberOfColumns = storage.retrieve('numbe... | Build Monitor should now correctly respond to Jenkins being restarted | Build Monitor should now correctly respond to Jenkins being restarted
| JavaScript | mit | erikhakansson/jenkins-build-monitor-plugin,drekbour/jenkins-build-monitor-plugin,jan-molak/jenkins-build-monitor-plugin,guoliang/jenkins-build-monitor-plugin,Le0Michine/jenkins-build-monitor-plugin,seanly/jenkins-build-monitor-plugin,Witos/jenkins-build-monitor-plugin,seanly/jenkins-build-monitor-plugin,erikhakansson/j... |
02a986474608e64f161d8ead7534b537614ede35 | extensions/ibus-indicator@example.com/extension.js | extensions/ibus-indicator@example.com/extension.js | /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Main = imports.ui.main;
const Panel = imports.ui.panel;
const PopupMenu = imports.ui.popupMenu;
const Indicator = imports.ui.status.ibus.indicator;
let indicator = null;
let menus = null;
function init() {
}
function main() {
// The gette... | /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Main = imports.ui.main;
const Indicator = imports.ui.status.ibus.indicator;
let indicator = null;
function init() {
}
function enable() {
if (!indicator) {
indicator = new Indicator.Indicator();
Main.panel.addToStatusArea(... | Make use of standard API addToStatusArea | Make use of standard API addToStatusArea
| JavaScript | lgpl-2.1 | fujiwarat/ibus-gjs,fujiwarat/ibus-gjs |
8d84dec27606c0ef2b590091f916a70eb48fd2cd | js/ClientApp.js | js/ClientApp.js | var div = React.DOM.div
var h1 = React.DOM.h1
var MyTitle = React.createClass({
render () {
return (
div(null,
h1(null, 'Check out my first class component!')
)
)
}
})
var MyFirstComponent = (
div(null,
React.createElement(MyTitle, null)
)
)
ReactDOM.render(MyFirstComponent, d... | var div = React.DOM.div
var h1 = React.DOM.h1
var MyTitle = React.createClass({
render () {
return (
div(null,
h1(null, 'Check out my first class component!')
)
)
}
})
var MyTitleFact = React.createFactory(MyTitle)
var MyFirstComponent = (
div(null,
MyTitleFact(null),
React.... | Use factory technique for rendering component | Use factory technique for rendering component
| JavaScript | mit | bencodezen/cloneflix-react-with-bholt,bencodezen/cloneflix-react-with-bholt |
1d5eaf75e434e6ddf91221313804802c67e1145e | js/analytics.js | js/analytics.js | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('creat... | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('creat... | Add print button to resume | Add print button to resume
| JavaScript | mit | coryflucas/CoryLucasDotCom.old |
2f7850ce7aee73acec48d53946db02a82ed02665 | packages/talos.forms/inputs/time.js | packages/talos.forms/inputs/time.js | // Time input
import { Template } from 'meteor/templating';
import { ReactiveForms } from 'meteor/templates:forms';
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';
checkNpmVersions({
jquery: '2.2.4',
}, 'talos:forms');
const $ = require('jquery');
ReactiveForms.createElement({
template: '... | // Time input
import { ReactiveForms } from 'meteor/templates:forms';
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';
checkNpmVersions({
jquery: '2.2.4',
}, 'talos:forms');
const $ = require('jquery');
ReactiveForms.createElement({
template: 'timeInput',
validationEvent: 'blur',
rende... | Add rendered callback for lolliclock | Add rendered callback for lolliclock
| JavaScript | mit | talos-code/mdl-blaze,talos-code/mdl-blaze |
a25983402657c0394c2314daafd89afd8c301779 | packages/test-in-browser/package.js | packages/test-in-browser/package.js | Package.describe({
summary: "Run tests interactively in the browser",
version: '1.0.8-plugins.0',
documentation: null
});
Package.onUse(function (api) {
// XXX this should go away, and there should be a clean interface
// that tinytest and the driver both implement?
api.use('tinytest');
api.use('bootstra... | Package.describe({
summary: "Run tests interactively in the browser",
version: '1.0.8-plugins.1',
documentation: null
});
Package.onUse(function (api) {
// XXX this should go away, and there should be a clean interface
// that tinytest and the driver both implement?
api.use('tinytest');
api.use('bootstra... | Add webapp dependency to test-in-browser | Add webapp dependency to test-in-browser
This ensures the app created for test-packages will have the default
Cordova plugins installed.
| JavaScript | mit | devgrok/meteor,yalexx/meteor,lpinto93/meteor,youprofit/meteor,emmerge/meteor,sdeveloper/meteor,Theviajerock/meteor,shmiko/meteor,benstoltz/meteor,Ken-Liu/meteor,steedos/meteor,aramk/meteor,udhayam/meteor,yyx990803/meteor,baiyunping333/meteor,Jeremy017/meteor,ericterpstra/meteor,paul-barry-kenzan/meteor,juansgaitan/mete... |
99a9a6e891408164e2ee26ad49ff3dcbd082281c | example/Gulpfile.js | example/Gulpfile.js | var NwBuilder = require('node-webkit-builder');
var gulp = require('gulp');
var gutil = require('gulp-util');
gulp.task('nw', function (callback) {
var nw = new NwBuilder({
version: '0.9.2',
files: [ './nwapp/**']
});
// Log stuff you want
nw.on('log', function (mgs) {
gutil.l... | var NwBuilder = require('node-webkit-builder');
var gulp = require('gulp');
var gutil = require('gulp-util');
gulp.task('nw', function () {
var nw = new NwBuilder({
version: '0.9.2',
files: [ './nwapp/**']
});
// Log stuff you want
nw.on('log', function (msg) {
gutil.log('node... | Use promises in Gulp example | Use promises in Gulp example
Gulp supports returning promises to make the task not parallel, so just return it, and use promise-like functions for error logging.
Also, fix a couple typos. | JavaScript | mit | Crunch/nw-builder,imperiumzigna/nw-builder,modulexcite/nw-builder,marianoguerra/nw-builder,GrabCAD/node-webkit-builder,nwjs/nw-builder,modulexcite/nw-builder,cypress-io/nw-builder,marianoguerra/nw-builder,GrabCAD/node-webkit-builder,nwjs/nw-builder,donkeycode/nw-builder,cypress-io/nw-builder,donkeycode/nw-builder,imper... |
8ad2eb577c58dd20e07baf009a9bcb69ec696ee2 | karma.conf.js | karma.conf.js | // Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'sinon-chai', '@angular/cli'],
plugins: [
require('karma-mocha')... | // Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha', 'sinon-chai', '@angular/cli'],
plugins: [
require('karma-mocha')... | Increase Karma's browserNoActivityTimeout to fight timeouts in CI | Increase Karma's browserNoActivityTimeout to fight timeouts in CI
| JavaScript | mit | mattbdean/Helium,mattbdean/Helium,mattbdean/Helium,mattbdean/Helium |
23a014af24dec52f479603f2bd6df0f3cbbae479 | src/js/client/util/index.js | src/js/client/util/index.js | import shortcut from './shortcut';
import setUserRequire from './require';
import log from './log';
module.exports = {
setUserRequire,
shortcut,
log
} | import shortcut from './shortcut';
import setUserRequire from './require';
module.exports = {
setUserRequire,
shortcut,
} | Remove old log utility function | Remove old log utility function
| JavaScript | mit | simonlovesyou/AutoRobot |
e68df8834a5e01b596e65aa91e1f5fe59bb9ad82 | lib/entity.js | lib/entity.js | /**
* Module dependencies.
*/
var pkginfo = require('pkginfo')
, path = require('path');
/**
* Creates an entity object.
*
* An entity is an object with properties used to identify the application.
* These properties can be used in any context in which an identifier is
* needed, such as security where stable... | /**
* Module dependencies.
*/
var pkginfo = require('pkginfo')
, path = require('path');
/**
* Creates an entity object.
*
* An entity is an object with properties used to identify the application.
* These properties can be used in any context in which an identifier is
* needed, such as security where stable... | Remove unneeded fix to cast setting to array. | Remove unneeded fix to cast setting to array.
| JavaScript | mit | bixbyjs/bixby-common |
e6da6955f5632ff3e2766cd54b815f779767ad3d | cli/main.js | cli/main.js | #!/usr/bin/env node
'use strict'
require('debug').enable('UCompiler:*')
const UCompiler = require('..')
const knownCommands = ['go', 'watch']
const parameters = process.argv.slice(2)
if (!parameters.length || knownCommands.indexOf(parameters[0]) === -1) {
console.log('Usage: ucompiler go|watch [path]')
process.ex... | #!/usr/bin/env node
'use strict'
process.title = 'ucompiler'
require('debug').enable('UCompiler:*')
const UCompiler = require('..')
const knownCommands = ['go', 'watch']
const parameters = process.argv.slice(2)
if (!parameters.length || knownCommands.indexOf(parameters[0]) === -1) {
console.log('Usage: ucompiler go... | Set process title to ucompiler | :new: Set process title to ucompiler
| JavaScript | mit | steelbrain/UCompiler |
73d2239f5edb926e8b8db9f9957f2cf6eaa28186 | lib/htpasswd.js | lib/htpasswd.js | #!/usr/bin/env node
/**
* Now use CoffeeScript.
*/
require('coffee-script/register');
/**
* Importing local modules.
*/
var program = require('./program');
var processor = require('./processor');
var utils = require('./utils');
if (require.main === module ) {
// Parses and processes command line arguments.
pro... | #!/usr/bin/env node
/**
* Now use CoffeeScript.
*/
require('coffee-script/register');
var program, processor, utils;
if (require.main === module ) {
// Parses and processes command line arguments.
program = require('./program');
processor = require('./processor');
program.parse(process.argv);
processor.proces... | Fix native prototype pollution in library mode Since `processor` has the package `colors` as an upstream dependency, String` s prototype would get unexpectedly modified. This commit fixes that issue by only loading `processor` if really needed. | Fix native prototype pollution in library mode
Since `processor` has the package `colors` as an upstream dependency, String` s prototype would get unexpectedly modified.
This commit fixes that issue by only loading `processor` if really needed.
| JavaScript | mit | http-auth/htpasswd,gevorg/htpasswd,CapacitorSet/htpasswd |
9b2efafb62f738f437b8c056ea4bcee26cdd9226 | lib/task-data/tasks/install-coreos.js | lib/task-data/tasks/install-coreos.js | // Copyright 2015, EMC, Inc.
module.exports = {
friendlyName: 'Install CoreOS',
injectableName: 'Task.Os.Install.CoreOS',
implementsTask: 'Task.Base.Os.Install',
options: {
// NOTE: user/pass aren't used by the coreos installer at the moment,
// but they are required values
user... | // Copyright 2015, EMC, Inc.
module.exports = {
friendlyName: 'Install CoreOS',
injectableName: 'Task.Os.Install.CoreOS',
implementsTask: 'Task.Base.Os.Install',
options: {
// NOTE: user/pass aren't used by the coreos installer at the moment,
// but they are required values
user... | Enable CoreOS Install to Disk | Enable CoreOS Install to Disk
| JavaScript | apache-2.0 | AlaricChan/on-tasks,AlaricChan/on-tasks,bbcyyb/on-tasks,nortonluo/on-tasks,nortonluo/on-tasks,bbcyyb/on-tasks |
28956f188fce9f5e2618f84d6d4af7fbbf629383 | project/frontend/src/containers/LandingPage/LandingPage.js | project/frontend/src/containers/LandingPage/LandingPage.js | import React from "react";
import classes from "./LandingPage.module.css";
import LoginButtonSet from "../../components/UI/LoginButtonSet/LoginButtonSet";
const LandingPage = (props) => {
return (
<div className={classes.LandingPageContent}>
<div className={classes.Hero}>
<h1>Who's the next trendse... | import React from "react";
import classes from "./LandingPage.module.css";
import LoginButtonSet from "../../components/UI/LoginButtonSet/LoginButtonSet";
import Illustration from "../../assets/landing_illustration.png";
const LandingPage = (props) => {
return (
<div className={classes.LandingPageContent}>
... | Add illustration to landing page | Add illustration to landing page
| JavaScript | apache-2.0 | googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks |
0ce66fe7c73d99e33f4cb7726a9b2d135b95045a | lib/node_modules/@stdlib/array/uint32/lib/index.js | lib/node_modules/@stdlib/array/uint32/lib/index.js | 'use strict';
/**
* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.
*
* @module @stdlib/array/uint32
*
* @example
* var ctor = require( '@stdlib/array/uint32' );
*
* var arr = new ctor( 10 );
* // returns <Uint32Array>
*/
// MODULES //
... | 'use strict';
/**
* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.
*
* @module @stdlib/array/uint32
*
* @example
* var ctor = require( '@stdlib/array/uint32' );
*
* var arr = new ctor( 10 );
* // returns <Uint32Array>
*/
// MODULES //
... | Refactor to avoid dynamic module resolution | Refactor to avoid dynamic module resolution
| 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 |
b6ddcf46779f0d813daafd34600b2054fce8aed6 | src/common/makeWclUrl.js | src/common/makeWclUrl.js | import makeUrl from './makeUrl';
const API_BASE = process.env.REACT_APP_API_BASE || '';
const WCL_API_KEY = process.env.REACT_APP_WCL_API_KEY;
export default function makeWclUrl(base, queryParams = {}) {
if (!WCL_API_KEY && process.env.NODE_ENV !== 'production') {
const message = 'Invalid API key. You need to e... | import makeUrl from './makeUrl';
const API_BASE = process.env.REACT_APP_API_BASE || '';
const WCL_API_KEY = process.env.REACT_APP_WCL_API_KEY;
// Since the WCL API has a fairly strict request cap, we have implemented a proxy that caches responses. This proxy provides the same functionality as WCL.
export default fun... | Add comment explaining the WCL API proxy | Add comment explaining the WCL API proxy
| JavaScript | agpl-3.0 | fyruna/WoWAnalyzer,mwwscott0/WoWAnalyzer,sMteX/WoWAnalyzer,hasseboulen/WoWAnalyzer,ronaldpereira/WoWAnalyzer,fyruna/WoWAnalyzer,FaideWW/WoWAnalyzer,sMteX/WoWAnalyzer,hasseboulen/WoWAnalyzer,anom0ly/WoWAnalyzer,hasseboulen/WoWAnalyzer,Juko8/WoWAnalyzer,Juko8/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0l... |
dfd213c775a43a4b1f933afb36aaaebb908e0eb5 | src/index.js | src/index.js | /*
* Author: Alexandre Havrileck (Oxyno-zeta)
* Date: 03/07/16
* Licence: See Readme
*/
/* ************************************* */
/* ******** REQUIRE ******** */
/* ************************************* */
const server = require('./server');
/* ************************************* */
/* ******** ... | /*
* Author: Alexandre Havrileck (Oxyno-zeta)
* Date: 03/07/16
* Licence: See Readme
*/
/* ************************************* */
/* ******** REQUIRE ******** */
/* ************************************* */
const server = require('./server');
/* ************************************* */
/* ******** ... | Exit 1 when error detected on main instruction | [Backend] Exit 1 when error detected on main instruction
| JavaScript | mit | oxyno-zeta/crash-reporter-electron,oxyno-zeta/crash-reporter-electron |
1949fb82966f31e1e57f9017fec7776c8dcfcc18 | src/index.js | src/index.js | //
// Add boundary-handling to a Leaflet map
//
// The boundary layer allows exactly one boundary at a time and fires events
// (boundarieschange) when this layer changes.
//
L.Map.include({
boundariesLayer: null,
_initBoundaries: function () {
this.boundariesLayer = L.geoJson(null, {
colo... | //
// Add boundary-handling to a Leaflet map
//
// The boundary layer allows exactly one boundary at a time and fires events
// (boundarieschange) when this layer changes.
//
var mixin = {
boundariesLayer: null,
_initBoundaries: function () {
this.boundariesLayer = L.geoJson(null, {
color:... | Make it so you have to explicitly initialize the mixin | Make it so you have to explicitly initialize the mixin
Also lets you add the mixin to other classes
| JavaScript | agpl-3.0 | 596acres/livinglots.boundaries |
426d476b75c1645f67a01e23fa4ef164d3875a38 | src/index.js | src/index.js | module.exports = function ({Transformer}) {
return new Transformer('minification.removeReactPropTypes', {
Property: {
exit(node) {
if (node.computed || node.key.name !== 'propTypes') {
return;
}
const parent = this.findParent((parent) => {
return parent.type === ... | export default function ({ Plugin, types: t }) {
const visitor = {
Property: {
exit(node) {
if (node.computed || node.key.name !== 'propTypes') {
return;
}
const parent = this.findParent((parent) => {
return parent.type === 'CallExpression';
});
... | Migrate to new plugin api | Migrate to new plugin api
| JavaScript | mit | nkt/babel-plugin-react-remove-prop-types,NogsMPLS/babel-plugin-transform-react-remove-statics,oliviertassinari/babel-plugin-transform-react-remove-prop-types |
e6cfaae4d02a4cc3420fcc615ecd641635146e54 | src/index.js | src/index.js | const get = require('lodash.get');
const forEach = require('lodash.foreach');
const defaultsDeep = require('lodash.defaultsdeep');
const loaderUtils = require('loader-utils');
const parse = require('./parse').default;
const defaultOptions = require('./options');
/**
* ComponentOne Loader
* @param {string} content
*... | const get = require('lodash.get');
const forEach = require('lodash.foreach');
const defaultsDeep = require('lodash.defaultsdeep');
const loaderUtils = require('loader-utils');
const parse = require('./parse').default;
const defaultOptions = require('./options');
/**
* ComponentOne Loader
* @param {string} content
*... | Fix issue with Javascript compilation | Fix issue with Javascript compilation
| JavaScript | mit | digitalie/one-loader |
7b58ced279eafaecd624d3063644377ab7a49bd2 | resources/provision/sparta_utils.js | resources/provision/sparta_utils.js | var _ = require('underscore');
module.exports.toBoolean = function(value) {
var bValue = value;
if (_.isString(bValue)) {
switch (bValue.toLowerCase().trim()) {
case "true":
case "1":
bValue = true;
break;
case "false":
case "0":
case null:
bValue = false;
... | var _ = require('underscore');
module.exports.toBoolean = function(value) {
var bValue = value;
if (_.isString(bValue)) {
switch (bValue.toLowerCase().trim()) {
case "true":
case "1":
bValue = true;
break;
case "false":
case "0":
case null:
bValue = false;
... | Add cfg-response shim for local testing of CustomResources | Add cfg-response shim for local testing of CustomResources
| JavaScript | mit | mweagle/Sparta,mweagle/Sparta,mweagle/Sparta,mweagle/Sparta |
ceaec31d5c34505d13418042551aec70aa1a864c | gulpTasks/tasks/watch.js | gulpTasks/tasks/watch.js | 'use strict';
var gulp = require('gulp');
var watch = require('gulp-watch');
var gulpSequence = require('gulp-sequence');
// var config = require('../config/index');
var templates = require('../config/templates');
var styles = require('../config/styles');
var scripts = require('../config/scripts');
var images = requi... | 'use strict';
var gulp = require('gulp');
var watch = require('gulp-watch');
var gulpSequence = require('gulp-sequence');
// var config = require('../config/index');
var templates = require('../config/templates');
var styles = require('../config/styles');
var scripts = require('../config/scripts');
var images = requi... | Fix task name to start BrowserSync session | Fix task name to start BrowserSync session
| JavaScript | mit | 3runoDesign/setRobot,3runoDesign/setRobot,3runoDesign/setRobot |
b2fa7082d5839472e132735c3ce376b91b6417ba | test/fake/fake-request-session-data.js | test/fake/fake-request-session-data.js | var chance = require('./fake-extension.js'),
glimpse = require('glimpse'),
names = [];
function generateNames() {
var range = chance.integerRange(3, 8);
for (var i = 0; i < range; i++) {
names.push(chance.first());
}
}
function publishSession() {
var item = { id: chance.pick(names), co... | var chance = require('./fake-extension.js'),
glimpse = require('glimpse'),
names = [];
function generateNames() {
var range = chance.integerRange(3, 8);
for (var i = 0; i < range; i++) {
names.push(chance.first());
}
}
function publishSession() {
var item = { id: chance.pick(names), co... | Put bounds on session count for fake data generator | Put bounds on session count for fake data generator
| JavaScript | unknown | Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype |
8e9bfe76508615dd1dfeaddae374e67659b55e5a | client/src/Account/index.js | client/src/Account/index.js | import React from 'react';
import { compose } from 'recompose';
import PasswordChangeForm from '../PasswordChange';
import {
AuthUserContext,
withAuthorization,
withEmailVerification,
} from '../Session';
const AccountPage = () => (
<AuthUserContext.Consumer>
{authUser => (
<div>
<h1>Account... | import React from 'react';
import { compose } from 'recompose';
import { Link } from 'react-router-dom';
import PasswordChangeForm from '../PasswordChange';
import {
AuthUserContext,
withAuthorization,
withEmailVerification,
} from '../Session';
import * as ROUTES from '../constants/routes';
const AccountPage =... | Add button to return to dashboard from account page. | Add button to return to dashboard from account page.
| JavaScript | apache-2.0 | googleinterns/Pictophone,googleinterns/Pictophone,googleinterns/Pictophone,googleinterns/Pictophone |
a8f18a9552ffbbb9aee84067943d24ca4e595a96 | src/Sylius/Bundle/WebBundle/Resources/public/js/backend.js | src/Sylius/Bundle/WebBundle/Resources/public/js/backend.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.
*/
(function ( $ ) {
'use strict';
$(document).ready(function() {
$('.variant-table-toggle i.gly... | /*
* 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.
*/
(function ( $ ) {
'use strict';
$(document).ready(function() {
$('.variant-table-toggle i.gly... | Change $.fn.datepicker format to yyyy-mm-dd. | [WebBundle] Change $.fn.datepicker format to yyyy-mm-dd.
The motivation here is to allow the datetime comparison operators in the
database layer to was done so that native database comparisons can do
their job.
| JavaScript | mit | gruberro/Sylius,Lowlo/Sylius,Arminek/Sylius,xrowkristina/sylius,pentarim/Sylius,Brille24/Sylius,Ma27/Sylius,okwinza/Sylius,bigfoot90/Sylius,peteward/Sylius,xantrix/Sylius,psyray/Sylius,torinaki/Sylius,TristanPerchec/Sylius,kayue/Sylius,jverdeyen-forks/Sylius,PyRowMan/Sylius,xrowgmbh/Sylius,aRn0D/Sylius,nicolasricci/Syl... |
55f9218e86b01db897416799fda4a936ccc37fc8 | src/background.js | src/background.js | if (!document.pictureInPictureEnabled) {
chrome.browserAction.setTitle({ title: 'Picture-in-Picture NOT supported' });
} else {
chrome.browserAction.onClicked.addListener(tab => {
const code = `
(async () => {
const video = document.querySelector('video');
if (video.hasAttribute('... | if (!document.pictureInPictureEnabled) {
chrome.browserAction.setTitle({ title: 'Picture-in-Picture NOT supported' });
} else {
chrome.browserAction.onClicked.addListener(tab => {
const code = `
(async () => {
const video = document.querySelector('video');
if (video.hasAttribute('... | Remove pip attribute when video ends. | Remove pip attribute when video ends.
| JavaScript | apache-2.0 | GoogleChromeLabs/picture-in-picture-chrome-extension,GoogleChromeLabs/picture-in-picture-chrome-extension |
add5d33a8b997ec0caad5d131c183e21857f17c1 | src/app/menu.react.js | src/app/menu.react.js | import Component from '../components/component.react';
import React from 'react-native';
import {logout} from '../auth/actions';
import {
ScrollView,
Text
} from 'react-native';
import styles from './menu.style';
class Menu extends Component {
onItemSelected(item) {
this.props.menuActions.close();
this... | import Component from '../components/component.react';
import React from 'react-native';
import {msg} from '../intl/store';
import {logout} from '../auth/actions';
import {
ScrollView,
Text,
View
} from 'react-native';
import styles from './menu.style';
class Menu extends Component {
onItemSelected(item) {
... | Add in more menu goodies | Add in more menu goodies
| JavaScript | mit | blueberryapps/este,skallet/este,TheoMer/este,robinpokorny/este,GarrettSmith/schizophrenia,syroegkin/mikora.eu,zanj2006/este,langpavel/este,steida/este,TheoMer/este,AugustinLF/este,estaub/my-este,GarrettSmith/schizophrenia,shawn-dsz/este,estaub/my-este,skyuplam/debt_mgmt,SidhNor/este-cordova-starter-kit,sikhote/davidsin... |
8fbbdd6b47b708d2cbb2fbdec5a3e33cf84a418d | src/container-logs.js | src/container-logs.js | /**
* @module lib/container-logs
* @exports {Class} ContainerLogs
*/
'use strict'
var socket = require('./socket')
class ContainerLogs {
/**
* @param {String} dockerHost
* @param {String} dockerContainer
*/
constructor (dockerHost, dockerContainer) {
this._dockerHost = dockerHost
this._dockerC... | /**
* @module lib/container-logs
* @exports {Class} ContainerLogs
*/
'use strict'
var socket = require('./socket')
class ContainerLogs {
/**
* @param {String} dockerHost
* @param {String} dockerContainer
*/
constructor (dockerHost, dockerContainer) {
this._dockerHost = dockerHost
this._dockerC... | Add check if cont-logs output is ctrl sequence and skip | Add check if cont-logs output is ctrl sequence and skip
| JavaScript | mit | cflynn07/runnable-cli |
1beaf7bdbd10681f158e06e5db11293b7b40a06d | js/count.js | js/count.js | document.addEventListener("DOMContentLoaded", function (event) {
// redirect to 7777 port
// ping golang counter
httpGetAsync("http://www.aracki.me:7777", function (res) {
alert(res);
})
});
function httpGetAsync(theUrl, callback) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadysta... | document.addEventListener("DOMContentLoaded", function (event) {
// redirect to 7777 port
// ping golang counter
httpGetAsync("http://www.aracki.me:7777", function (res) {
alert(res);
})
});
function httpGetAsync(theUrl, callback) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadysta... | Add CORS in header xml request | Add CORS in header xml request
| JavaScript | mit | Aracki/aracki.me,Aracki/aracki.me |
d41d4988fcf94c14f36f2b18dd4709feaa61e010 | src/js/api.js | src/js/api.js | var local = 'http://localhost:55881'
var dev = 'https://dev-api-streetsupport.azurewebsites.net'
var staging = 'https://staging-api-streetsupport.azurewebsites.net'
var live = 'https://live-api-streetsupport.azurewebsites.net'
var env = require('./env')
var envs = [local, dev, staging, live]
var domainRoot = envs[en... | var local = 'http://localhost:55881'
var dev = 'https://dev-api-streetsupport.azurewebsites.net'
var staging = 'https://staging-api-streetsupport.azurewebsites.net'
var live = 'https://live-api-streetsupport.azurewebsites.net'
var env = require('./env')
var envs = [local, dev, staging, live]
var domainRoot = envs[en... | Revert "remove redundatn end points" | Revert "remove redundatn end points"
This reverts commit 4703d26683e4b58510ff25c112dbf2a7fef8b689. | JavaScript | mit | StreetSupport/streetsupport-web,StreetSupport/streetsupport-web,StreetSupport/streetsupport-web |
09261ac3445e0cb803e406fd1187e3c0cbf50118 | js/setup.js | js/setup.js | (function($, Fleeting){
$(function(){
var view = new Fleeting.CharactersView({
el : $("body"),
strategy : function(){
this.hidden(true);
},
evaporateTime : 5000
});
(function loop(){
window.setTimeout(loop... | (function($, Fleeting){
$(function(){
var search = window.location.search.slice(1).split("=");
var evaporate = 5000;
var index = search.indexOf('evaporate')
if (index !== -1 && search[index + 1]) {
evaporate = parseInt(search[index + 1]) || evaporate;
}
console.log(evaporate);
var view = new Fl... | Use query string to influence to evaporation time | Use query string to influence to evaporation time
the evaporation time can be set with the '?evaporate=200000' query string
| JavaScript | mit | dvberkel/fleeting-thoughts,dvberkel/fleeting-thoughts |
f95cb9f1330b75b118aa65ef57612be4fb7326f5 | src/components/assets/Emoji.js | src/components/assets/Emoji.js | import React, { PropTypes } from 'react'
import classNames from 'classnames'
const Emoji = (props) => {
const { alt, className, name = 'ello', size, src, title, width, height } = props
const tip = name.replace(/_|-/, ' ')
return (
<img
{...props}
alt={alt || tip}
className={classNames(class... | import React, { PropTypes } from 'react'
import classNames from 'classnames'
const Emoji = (props) => {
const { alt, className, name, size, src, title, width, height } = props
const tip = name.replace(/_|-/, ' ')
return (
<img
{...props}
alt={alt || tip}
className={classNames(className, 'Em... | Fix an error rendering emojis | Fix an error rendering emojis
Some leftovers from the default props updates
[Fixes: #137486597](https://www.pivotaltracker.com/story/show/137486597)
| JavaScript | mit | ello/webapp,ello/webapp,ello/webapp |
89252bfae5749f2c307ae448549f84078a5d21c1 | src/core/fetch/fetch.server.js | src/core/fetch/fetch.server.js | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import Promise from 'bluebird';
import fetch, { Request, H... | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import Promise from 'bluebird';
import fetch, { Request, H... | Use bluebird Promise library in node-fetch > Response | Use bluebird Promise library in node-fetch > Response
| JavaScript | mit | devonzuegel/cosmocat |
32c11e091fcb0e59afc082e504db4bbc078cdb2f | src/helper/log.js | src/helper/log.js | /**
* console.(log|info|error|warn) wrapper
* @param {string} type - Console log type ("log"|"info"|"error"|"warn")
* @param {any} data - Prints to stdout (if specify "error" or "warn" at type param, output stderr)
* @private
*/
export default function(type, ...data) {
if (process.env.NODE_ENV === "test") {
... | /**
* console.(log|info|error|warn) wrapper
* @param {string} type - Console log type ("log"|"info"|"error"|"warn")
* @param {any} data - Prints to stdout (if specify "error" or "warn" at type param, output stderr)
* @private
*/
export default function(type, ...data) {
if (process.env.NODE_ENV === "test") {
... | Use const instead of let | Use const instead of let
| JavaScript | mit | kubosho/kotori,kubosho/kotori |
08047e6e67efa896a0fbab3bd865d8b613b90c30 | src/client/scripts/actions/remove_from_itinerary_action.js | src/client/scripts/actions/remove_from_itinerary_action.js | const REMOVE_FROM_ITINERARY = 'REMOVE_FROM_ITINERARY';
const removeFromItinerary = payload => (
{
type: REMOVE_FROM_ITINERARY,
payload,
}
);
export default removeFromItinerary;
| export const REMOVE_FROM_ITINERARY = 'REMOVE_FROM_ITINERARY';
export function removeFromItinerary(payload) {
return {
type: REMOVE_FROM_ITINERARY,
payload,
};
}
| Refactor 'Remove From Itinerary' action | Refactor 'Remove From Itinerary' action
| JavaScript | mit | theredspoon/trip-raptor,Tropical-Raptor/trip-raptor |
c920c01438207ed825436bb96cf26c21badf055d | jquery.nanoAudioPlayer.js | jquery.nanoAudioPlayer.js | /**
* nanoAudioPlayer plugin for jQuery
* by Lasse Nielsen
* @version 0.1
* 03.02.2013
* http://github.com/nano-entertainment/NanoAudioPlayer
*/
(function($){
$.fn.nanoAudioPlayer = function(){
}
})(jQuery); | /**
* nanoAudioPlayer plugin for jQuery
* by Lasse Nielsen
* @version 0.1
* 03.02.2013
* http://github.com/nano-entertainment/NanoAudioPlayer
*/
(function($){
$.fn.nanoAudioPlayer = function( options ){
var defaults = {
autoplay: false,
element: new Audio()
};
var opts = $.extend(d... | Add defaultoptions and event listener | Add defaultoptions and event listener
| JavaScript | mit | nano-entertainment/NanoAudioPlayer |
820bca8058ee964f7c30e7caf17408822c9bf176 | src/pat/select-option.js | src/pat/select-option.js | /**
* Patterns checkedflag - Add checked flag to checkbox labels
*
* Copyright 2013 Simplon B.V. - Wichert Akkerman
*/
define([
"jquery",
"../registry",
"../utils"
], function($, patterns, utils) {
var select_option = {
name: "select-option",
trigger: "label select",
init: f... | /**
* Patterns checkedflag - Add checked flag to checkbox labels
*
* Copyright 2013 Simplon B.V. - Wichert Akkerman
*/
define([
"jquery",
"../registry",
"../utils"
], function($, patterns, utils) {
var select_option = {
name: "select-option",
trigger: "label select",
init: f... | Use option.text instead of option.label. | Use option.text instead of option.label.
| JavaScript | bsd-3-clause | Patternslib/require-experimental-build |
2686098a723a042626aea50b3cce274d7413e438 | lib/captains.js | lib/captains.js | /**
* Return a default logger which writes to stdout and stderr.
*
* @return {Function} [enhanced log fn]
* @api private
*/
module.exports = function LowLevelLogger ( ) {
var _stdout = console.log.bind(console);
var _stderr = console.error.bind(console);
// Emulate winston's output stream conventions
// (so ... | /**
* Return a default logger which writes to stdout and stderr.
*
* @return {Function} [enhanced log fn]
* @api private
*/
module.exports = function LowLevelLogger ( ) {
var _stdout = console.log.bind(console);
var _stderr = console.error.bind(console);
// Emulate winston's output stream conventions
// (so ... | Debug level no longer uses console.error | Debug level no longer uses console.error
| JavaScript | mit | JibstaMan/captains-log |
d1a35583b746867e974d86c5d103c44ce21b307b | test/tests.js | test/tests.js | import chai, { expect } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import System from 'systemjs';
import '../config.js';
chai.use(sinonChai);
describe('myModule', () => {
let _, myModule;
before(() => {
return System.import('lodash')
.then((lodash) => {
_ = loda... | import chai, { expect } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import System from 'systemjs';
import '../config.js';
chai.use(sinonChai);
describe('myModule', () => {
let _, myModule;
before(() => {
return System.import('lodash')
.then((lodash) => {
_ = loda... | Split out mock test, removed failing test. Verified Travis is working. | Split out mock test, removed failing test. Verified Travis is working.
| JavaScript | mit | curran/jspm-mocha-example |
352a0d8dcd265bf5d0e9e38fd05cc13f62c5544e | jest.config.js | jest.config.js | module.exports = {
transform: {
".ts": "ts-jest"
},
testEnvironment: "node",
testPathIgnorePatterns: [
"/dist/",
"/node_modules/"
],
moduleFileExtensions: [
"ts",
"js",
"json",
"node"
],
/* moduleNameMapper: {
'^src/(.*)$':... | module.exports = {
globals: {
"ts-jest": {
diagnostics: {
warnOnly: true
}
}
},
transform: {
".ts": "ts-jest"
},
testEnvironment: "node",
testPathIgnorePatterns: [
"/dist/",
"/node_modules/"
],
moduleFileExt... | Update jest diagnostics to warn only | Update jest diagnostics to warn only
| JavaScript | mit | tschettler/breeze-odata4,tschettler/breeze-odata4 |
1972ee1039946e98df169b4b228fef96c080b42c | src/getAnnotations.js | src/getAnnotations.js | 'use strict';
var wavelengthToColor = require('./wavelengthToColor');
function getAnnotation(pixel, color, height) {
return {
"pos2": {
"y": height+"px",
"x": pixel-1
},
"fillColor": color,
"type": "rect",
"pos": {
"y": "0px",
... | 'use strict';
var wavelengthToColor = require('./wavelengthToColor');
function getAnnotation(pixel, color, height) {
return {
"fillColor": color,
"type": "rect",
"position": [{
"y": "0px",
"x": pixel+2
},{
"y": height+"px",
"x": pixe... | Update to comply with last release of jsgraph | Update to comply with last release of jsgraph | JavaScript | mit | open-spectro/javascript-helper |
c7f06b72be5362c0731c3461fbfa92880a454e19 | components/manual-source.js | components/manual-source.js | "use strict";
var readFile = require("fs-readfile-promise");
var components = require("server-components");
var domino = require("domino");
var moment = require("moment");
var _ = require("lodash");
var getOembed = require("../get-oembed");
var ManualSource = components.newElement();
ManualSource.createdCallback = f... | "use strict";
var readFile = require("fs-readfile-promise");
var components = require("server-components");
var domino = require("domino");
var moment = require("moment");
var _ = require("lodash");
var getOembed = require("../get-oembed");
function includeOembed(item) {
if (item.oembed) {
return getOemb... | Refactor oembed manual include for clarity | Refactor oembed manual include for clarity
| JavaScript | mit | pimterry/tim.fyi,pimterry/tim.fyi |
ca53eda46eeab0825babf9e26cf2d955dba9e612 | jest.config.js | jest.config.js | // jest.config.js
module.exports = {
verbose: true,
globals: {
__testing__: true
},
roots: ['app/javascript'],
setupFiles: ['./config/jest.setup.js'],
testRegex: '(/__tests__/.*|(\\.|_|/)(test|spec))\\.(jsx?|tsx?)$',
transform: {
'^.+\\.js$': 'babel-jest',
'.(ts|tsx)': 'ts-jest'
},
moduleF... | // jest.config.js
module.exports = {
verbose: true,
globals: {
__testing__: true
},
roots: ['app/javascript'],
setupFiles: ['./config/jest.setup.js'],
testRegex: '(/__tests__/.*|(\\.|_|/)(test|spec))\\.(jsx?|tsx?)$',
transform: {
'^.+\\.jsx?$': 'babel-jest',
'.(ts|tsx)': 'ts-jest'
},
modul... | Enable jsx to be loaded from js tests in jest | Enable jsx to be loaded from js tests in jest
| JavaScript | apache-2.0 | ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic |
dd189385bd3245a71875475851a1194528914b98 | chrome-extension/content.js | chrome-extension/content.js | /* global chrome */
(function () {
document.addEventListener('window.remoteDebug.getDebugSocket', function (e) {
chrome.runtime.sendMessage({
cmd: 'getDebugSocket'
})
})
var s = document.createElement('script')
s.textContent = '(' + function () {
window.remoteDebug = {}
window.remoteDebu... | /* global chrome */
(function () {
document.addEventListener('window.remoteDebug.getDebugSocket', function (e) {
chrome.runtime.sendMessage({
cmd: 'getDebugSocket'
})
})
var s = document.createElement('script')
s.textContent = '(' + function () {
window.remoteDebug = {}
window.remoteDebu... | Make sure initCustomEvent is called properly | Make sure initCustomEvent is called properly | JavaScript | mit | auchenberg/browser-remote,auchenberg/devtools-remote,auchenberg/devtools-remote,auchenberg/browser-remote |
04125c9c0d418a51b21ab6706f49434b4c8cdc8e | config/webpack/rules/css.js | config/webpack/rules/css.js | const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
test: /\.s?css$/i,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: true,
importLoaders: 2,
},
},
{
loader: 'postcss-loader',
options: {... | const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
test: /\.s?css$/i,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: true,
importLoaders: 2,
},
},
{
loader: 'postcss-loader',
options: {... | Fix build with new sass-loader | Fix build with new sass-loader
| JavaScript | agpl-3.0 | Kirishima21/mastodon,im-in-space/mastodon,Kirishima21/mastodon,im-in-space/mastodon,Kirishima21/mastodon,im-in-space/mastodon,glitch-soc/mastodon,Kirishima21/mastodon,glitch-soc/mastodon,im-in-space/mastodon,glitch-soc/mastodon,glitch-soc/mastodon |
98f7db87e2dc773fe1ee74fb65b18b9baced9072 | src/inject/GPMWebView/index.js | src/inject/GPMWebView/index.js | import _ from 'lodash';
import { remote } from 'electron';
import '../generic';
// Initialize the global Logger to forward to the main process.
window.Logger = remote.getGlobal('Logger');
Logger.debug('Renderer process logger initialized.');
// DEV: Hold all Emitter events until the GPM external assets have been loa... | import _ from 'lodash';
import { remote } from 'electron';
import '../generic';
// Initialize the global Logger to forward to the main process.
window.Logger = remote.getGlobal('Logger');
Logger.debug('Renderer process logger initialized.');
// DEV: Hold all Emitter events until the GPM external assets have been loa... | Fix chromecast API not initializing | Fix chromecast API not initializing
| JavaScript | mit | n4k1/Google-Play-Music-Desktop-Player-UNOFFICIAL-,n4k1/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MCManuelLP/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MarshallOfSound/Google-Play-Music-Desktop-Player-U... |
3c17c822904f05eba4f5a5f522ca1e25f7855571 | public/assets/enhancements.js | public/assets/enhancements.js | (function() {
// Feature detection results
const supports = {};
// Detect localStorage support
try {
localStorage.setItem('test', 'test');
localStorage.removeItem('test');
supports.localStorage = true;
} catch (e) {
supports.localStorage = false;
}
// Add ios class to body on iOS device... | (function() {
// Feature detection results
const supports = {};
// Detect localStorage support
try {
localStorage.setItem('test', 'test');
localStorage.removeItem('test');
supports.localStorage = true;
} catch (e) {
supports.localStorage = false;
}
// Detect inline SVG support
support... | Add inline SVG feature detection | Add inline SVG feature detection
| JavaScript | mit | lukechilds/tor-explorer,lukechilds/tor-explorer |
b108555735d8213f682e79a7bd1e1254b40c5ec4 | src/pdf.worker.entry.js | src/pdf.worker.entry.js | /**
* PDF.js Worker entry file.
*
* This file is identical to Mozilla's pdf.worker.entry.js, with one exception being placed inside
* this bundle, not theirs. This file can be safely removed and replaced with Mozilla's after the
* issue mentioned below has been resolved on Parcel's side.
* See: https://github.com... | /**
* PDF.js Worker entry file.
*
* This file is identical to Mozilla's pdf.worker.entry.js, with one exception being placed inside
* this bundle, not theirs.
*/
(typeof window !== 'undefined' ? window : {}).pdfjsWorker = require('pdfjs-dist/legacy/build/pdf.worker');
| Remove mention of Parcel v1 issue ever being resolved in v1 | Remove mention of Parcel v1 issue ever being resolved in v1
| JavaScript | mit | wojtekmaj/react-pdf,wojtekmaj/react-pdf,wojtekmaj/react-pdf |
34e32376c245b243e533f71383a1fec6b4f82dc5 | gulp/config.js | gulp/config.js | var dest = "./build/";
var src = './app/';
module.exports = {
browserSync: {
server: {
baseDir: dest
},
files: [
dest + "**",
// Exclude Map files
"!" + dest + "**.map"
]
},
sass: {
src: src + "sass/**/*.{sass,scss}",
dest: dest
},
icons: {
src: [src + "icons/*"],
dest: [dest + "icons"... | var dest = "./build/";
var src = './app/';
module.exports = {
browserSync: {
open: false, // Stop it from automatically stopping the browser
server: {
baseDir: dest
},
files: [
dest + "**",
// Exclude Map files
"!" + dest + "**.map"
]
},
sass: {
src: src + "sass/**/*.{sass,scss}",
dest: de... | Stop browser-sync from opening a browser automatically | Stop browser-sync from opening a browser automatically
| JavaScript | mit | hawkrives/svg-diplomacy,hawkrives/svg-diplomacy,hawkrives/svg-diplomacy,hawkrives/svg-diplomacy |
dc444b6d7eb2dbb34b5d6c653bc1d3cec0f2d3cd | lib/makeMock.js | lib/makeMock.js | var assert = require('chai').assert;
var deepEqual = require('deep-equal');
var makeMockFunction = require('./makeMockFunction');
module.exports = function makeMock(object, type) {
var args = [];
var mockObj = function mockObj() {};
var prop;
for (prop in object) {
var mocked = getMockForProp(prop, objec... | var assert = require('chai').assert;
var deepEqual = require('deep-equal');
var makeMockFunction = require('./makeMockFunction');
module.exports = function makeMock(object, type) {
var args = [];
var mockObj = function mockObj() {};
var prop;
for (prop in object) {
console.log('Prop: ', prop);
var mo... | Add support for prototype mocking | Add support for prototype mocking
| JavaScript | mit | ganemone/mock-object |
0331354dc986cfb6b52a65b3eb5b2945d1a8db7a | lib/bbc-services.js | lib/bbc-services.js | var EventSource = require("eventsource"),
EventEmitter = require("events").EventEmitter,
utils = require("radiodan-client").utils,
http = require("./http-promise"),
bbcServicesURL = process.env.BBC_SERVICES_URL;
module.exports = { create: create };
function create() {
var ins... | var EventSource = require("eventsource"),
EventEmitter = require("events").EventEmitter,
utils = require("radiodan-client").utils,
http = require("./http-promise"),
bbcServicesURL = process.env.BBC_SERVICES_URL;
module.exports = { create: create };
function create() {
var ins... | Allow one event-stream error before logging | Allow one event-stream error before logging
| JavaScript | apache-2.0 | radiodan/magic-button,radiodan/magic-button |
5770ffde329552577a5adab5cd689ded91b58711 | troposphere/static/js/components/common/Glyphicon.react.js | troposphere/static/js/components/common/Glyphicon.react.js | import React from "react";
export default React.createClass({
displayName: "Glyphicon",
render: function() {
return (
<i className={"glyphicon glyphicon-" + this.props.name} />
);
}
});
| import React from "react";
/**
* NOTE: a cheatsheet of available glyphicons can be found at:
* - http://glyphicons.bootstrapcheatsheets.com/
*
* this becomes reference-able within the app via the
* `bootstrap-sass` module
*/
export default React.createClass({
displayName: "Glyphicon",
render: fun... | Include reference to possible glyphicons | Include reference to possible glyphicons
| JavaScript | apache-2.0 | CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend |
e0648edededd572d5ee9f6366805b3d0536e13ab | lib/console/init.js | lib/console/init.js | 'use strict';
var pathFn = require('path');
var chalk = require('chalk');
var fs = require('hexo-fs');
var tildify = require('tildify');
var spawn = require('hexo-util').spawn;
var assetDir = pathFn.join(__dirname, '../../assets');
var GIT_REPO_URL = 'https://github.com/hexojs/hexo-starter.git';
module.exports = fun... | 'use strict';
var pathFn = require('path');
var chalk = require('chalk');
var fs = require('hexo-fs');
var tildify = require('tildify');
var spawn = require('hexo-util').spawn;
var assetDir = pathFn.join(__dirname, '../../assets');
var GIT_REPO_URL = 'https://github.com/hexojs/hexo-starter.git';
module.exports = fun... | Fix git clone failed because recursive argument error | Fix git clone failed because recursive argument error
| JavaScript | mit | hexojs/hexo-cli,hexojs/hexo-cli,hexojs/hexo-cli |
a7ef4b15ba922d887409ef27eeb7ad61dd0372a6 | lib/data/sequelize.js | lib/data/sequelize.js | Sequelize = require('sequelize')
pg = require('pg').native;
var databaseUrl = process.env.DATABASE_URL;
if (databaseUrl) {
var match = databaseUrl.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/);
var db = new Sequelize(match[5], match[1], match[2], {
dialect: 'postgres',
protocol: 'postgres',
... | var Sequelize = require('sequelize')
var pg = require('pg').native;
var config = require(__dirname+'/../../config/config.js');
var databaseUrl = config.get('DATABASE_URL');
if (databaseUrl) {
var match = databaseUrl.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/);
var db = new Sequelize(match[5], match[... | Read database url from config not environment. | [TASK] Read database url from config not environment.
| JavaScript | isc | xdv/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,crazyquark/gatewayd,crazyquark/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,whotooktwarden/gatewayd |
ab81311d68c8dc17c9033a1d2161f1b24f07ff4e | lib/ui/dashboard.js | lib/ui/dashboard.js | var express = require('express');
var less = require('less-middleware');
var path = require('path');
exports.register = function(application, params) {
params = params || {};
var prefix = params.prefix || '';
prefix = prefix.replace(/\/$/, '');
var topDirectory = path.join(__dirname, '..', '..', '..');
app... | var express = require('express');
var less = require('less-middleware');
var path = require('path');
exports.register = function(application, params) {
params = params || {};
var prefix = params.prefix || '';
prefix = prefix.replace(/\/$/, '');
var topDirectory = path.join(__dirname, '..', '..', '..');
app... | Revert "Update usage of less-middleware" | Revert "Update usage of less-middleware"
This reverts commit d6bbc054f68fc7382ab1b14cb8afaff521548019.
| JavaScript | mit | droonga/express-droonga,KitaitiMakoto/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga |
b2000b73bbbf9089e51b6124f32ed6c94296d4be | frontend/app/components/playlist-edit-table-body.js | frontend/app/components/playlist-edit-table-body.js | import Ember from 'ember';
export default Ember.Component.extend({
tagName: '',
fixWidthHelper: function(e, ui) {
ui.children().each(function() {
$(this).width($(this).width());
});
return ui;
},
updateSortedOrder: function(indices) {
this.beginPropertyChanges();
let tracks = thi... | import Ember from 'ember';
export default Ember.Component.extend({
tagName: '',
fixWidthHelper: function(e, ui) {
ui.children().each(function() {
$(this).width($(this).width());
});
return ui;
},
updateSortedOrder: function(indices) {
this.beginPropertyChanges();
let tracks = thi... | Fix setting new indices of playlist entries. | Fix setting new indices of playlist entries.
* Was giving entries indices from 2...n+1, Now 1...n like you want
| JavaScript | mit | ThreeDRadio/playlists,ThreeDRadio/playlists,ThreeDRadio/playlists |
e63ed6a7e92e3c93183d7ba3863992dab557bbc8 | create/javascript/inject.js | create/javascript/inject.js | var createEditor;
var author;
function injectCreate(id) {
$("#" + id).load("create/html/createHTML", function() {
injectCreateEditor();
// Generate a random number from 1 to 10000
author = Math.floor((Math.random() * 10000) + 1);
});
}
function injectCreateEditor() {
Rang... | var createEditor;
var author;
function injectCreate(id) {
$("#" + id).load("create/html/createHTML", function() {
injectCreateEditor();
// Generate a random number from 1 to 10000
author = Math.floor((Math.random() * 10000) + 1);
});
}
function injectCreateEditor() {
Rang... | Set the editor to RESOLVE mode | Set the editor to RESOLVE mode
| JavaScript | bsd-3-clause | ClemsonRSRG/beginToReason,ClemsonRSRG/beginToReason,ClemsonRSRG/bydesign,ClemsonRSRG/beginToReason,ClemsonRSRG/bydesign |
cddd76f8e270df8a9ade32a2f30166d0b5612e2b | lib/at-video.js | lib/at-video.js | 'use babel';
import {component} from './polymer-es6';
@component('at-video')
export class AtomTwitchVideo {
static properties() {
return { };
}
static listeners() {
return { 'click': 'toggleVideo' };
}
async ready() {
let stream = await navigator.mediaDevices.getUserMedia({video: true, aud... | 'use babel';
import {component} from './polymer-es6';
@component('at-video')
export class AtomTwitchVideo {
static properties() {
return { };
}
static listeners() {
return { 'click': 'toggleVideo' };
}
async toggleVideo() {
if (!this.stream) {
this.stream = await navigator.mediaDevices... | Enable video only when first toggled | Enable video only when first toggled
| JavaScript | mit | paulcbetts/atom-twitch,paulcbetts/atom-twitch |
cc3e14b194bf3b219ca570acd3f9c76b7da76dc1 | lib/metalsmith-plugins.js | lib/metalsmith-plugins.js | var travisUtils = require('./travis-utils');
var socials = {
'facebook-square': 'https://www.facebook.com/romajs.org',
'twitter-square': 'https://twitter.com/roma_js',
'youtube-square': 'https://www.youtube.com/channel/UCFm8OPi5USbFybw9SaTLxeA',
'slack': 'https://romajs.herokuapp.com/',
'github': 'https://gi... | var travisUtils = require('./travis-utils');
var socials = {
'facebook-square': 'https://www.facebook.com/romajs.org',
'twitter-square': 'https://twitter.com/roma_js',
'youtube-square': 'https://www.youtube.com/channel/UCFm8OPi5USbFybw9SaTLxeA',
'slack': 'https://romajs.herokuapp.com/',
'github': 'https://gi... | Add metalsmith basic debug plugin | Add metalsmith basic debug plugin
| JavaScript | mit | Roma-JS/romajs-on-metalsmith,Roma-JS/romajs-on-metalsmith,Roma-JS/romajs-on-metalsmith |
7c0d07ab91790957f6a2345bef422e3724dcde28 | packages/mendel-development/variation-matches.js | packages/mendel-development/variation-matches.js | /* Copyright 2015, Yahoo Inc.
Copyrights licensed under the MIT License.
See the accompanying LICENSE file for terms. */
module.exports = variationMatches;
function variationMatches(variations, path) {
var result;
variations.some(function(variation) {
return variation.chain.some(function(dir) {
... | /* Copyright 2015, Yahoo Inc.
Copyrights licensed under the MIT License.
See the accompanying LICENSE file for terms. */
module.exports = variationMatches;
function variationMatches(variations, path) {
if (path.indexOf('node_modules')) return;
var result;
variations.some(function(variation) {
... | Fix bundles that have mixed node_modules and variations | Fix bundles that have mixed node_modules and variations
| JavaScript | mit | yahoo/mendel,stephanwlee/mendel,yahoo/mendel,stephanwlee/mendel |
3b861a22846fc9608297a94ec57f16e036cf07ed | config/tabs.js | config/tabs.js | export const TABS = [
{
name: 'latest',
urlName: 'siste',
title: 'Enkeltår',
chartKind: 'bar',
year: 'latest'
},
{
name: 'chronological',
urlName: 'historikk',
title: 'Over tid',
chartKind: 'line',
year: 'all'
},
//{
// name: 'map',
// title: 'Kart',
// chartKi... | export const TABS = [
{
name: 'latest',
urlName: 'enkeltaar',
title: 'Enkeltår',
chartKind: 'bar',
year: 'latest'
},
{
name: 'chronological',
urlName: 'historikk',
title: 'Over tid',
chartKind: 'line',
year: 'all'
},
//{
// name: 'map',
// title: 'Kart',
// cha... | Change url name of tab | Change url name of tab
| JavaScript | mit | bengler/imdikator,bengler/imdikator |
eac10b9db3f8b6c2353d6ed3764e52fec48138e5 | models/Room.js | models/Room.js | var mongoose = require('mongoose');
var Message = new mongoose.Schema({
message: String,
sender: {type: mongoose.Schema.Types.ObjectId, ref: 'User'},
mime: {type: String, default: "text/plain"},
});
var Member = new mongoose.Schema({
id: {type: mongoose.Schema.Types.ObjectId, ref: 'User'},
permissions: {
oper... | var mongoose = require('mongoose');
var Message = new mongoose.Schema({
message: String,
sender: {type: mongoose.Schema.Types.ObjectId, ref: 'User'},
mime: {type: String, default: "text/plain"},
});
var Member = new mongoose.Schema({
id: {type: mongoose.Schema.Types.ObjectId, ref: 'User'},
permissions: {
oper... | Add hasUser Returns true/false if a room contains a user | Add hasUser
Returns true/false if a room contains a user
| JavaScript | apache-2.0 | gradymcd/MessageAPI,gradymcd/MessageAPI |
b5259dd902ee12f36748d2d6059680f0e885f744 | lib/utilities/template.js | lib/utilities/template.js | 'use strict'
const fs = require('fs')
const path = require('path')
/**
* Returns the relative path of the template file.
*
* @param {String} name
* @return {String}
*/
function relative (name) {
const relative = path.resolve(__dirname)
return `${relative}/../../templates/${name}.txt`
}
/**
* Check if the ... | 'use strict'
const fs = require('fs')
const path = require('path')
const relative = name => {
const relative = path.resolve(__dirname)
return `${relative}/../../templates/${name}.txt`
}
const exists = name => {
const path = relative(name)
return fs.existsSync(path, 'utf8')
}
const read = name => {
const p... | Remove unnecessary comments and add a new syntax. | Remove unnecessary comments and add a new syntax.
| JavaScript | mit | rhberro/the-react-commander |
4f01f7aeda68e89df16c7f17516395f26f234826 | static/js/check-user.js | static/js/check-user.js | /**
* Show an appriopriate UI based on if we have any users yet.
*
* 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/.
*/
'use strict';
const API = require('./api');
... | /**
* Show an appriopriate UI based on if we have any users yet.
*
* 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/.
*/
'use strict';
const API = require('./api');
... | Use replace instead of set to not mess with browser's back button | Use replace instead of set to not mess with browser's back button
Fix #1072
| JavaScript | mpl-2.0 | mozilla-iot/gateway,mozilla-iot/gateway,moziot/gateway,mozilla-iot/gateway,mozilla-iot/gateway,moziot/gateway,mozilla-iot/gateway,moziot/gateway |
1c877f6b5e2e71c72e173d46732142b9bea8ac6b | lib/adduser.js | lib/adduser.js | var registry = require('./utils/registry')
, ini = require("./utils/ini")
, log = require("./utils/log")
, base64 = require("./utils/base64")
var adduser = function (args, callback) {
var username = args.shift()
, password = args.shift()
, email = args.shift()
if (typeof email === "function") {
c... |
module.exports = adduser
var registry = require('./utils/registry')
, ini = require("./utils/ini")
, log = require("./utils/log")
, base64 = require("./utils/base64")
function adduser (args, cb) {
var username = args.shift()
, password = args.shift()
, email = args.shift()
if (!username || !passwor... | Update to new npm style | Update to new npm style
| JavaScript | artistic-2.0 | kimshinelove/naver-npm,evanlucas/npm,kemitchell/npm,xalopp/npm,DIREKTSPEED-LTD/npm,haggholm/npm,misterbyrne/npm,cchamberlain/npm-msys2,thomblake/npm,midniteio/npm,DaveEmmerson/npm,segrey/npm,rsp/npm,evocateur/npm,yyx990803/npm,cchamberlain/npm,Volune/npm,misterbyrne/npm,evocateur/npm,segment-boneyard/npm,misterbyrne/np... |
3494cee63ca14d3e3cb6af0808815c17bf32e6a4 | qbot/api/app.js | qbot/api/app.js | 'use strict';
let Gpio = require('pigpio').Gpio;
let express = require('express');
let path = require('path');
let gpioService = require('../lib/gpioservice')(Gpio);
let ledHandler = require('../lib/ledhandler')(gpioService);
let motorhandler = require('../lib/motorhandler')(gpioService);
let api = require('../lib/re... | 'use strict';
let Gpio = require('pigpio').Gpio;
let express = require('express');
let path = require('path');
let bodyParser = require('body-parser');
let gpioService = require('../lib/gpioservice')(Gpio);
let ledHandler = require('../lib/ledhandler')(gpioService);
let motorhandler = require('../lib/motorhandler')(g... | Add JSON and urlencoded body parsers. | Add JSON and urlencoded body parsers.
| JavaScript | mit | dennisdunn/botlab,dennisdunn/botlab,dennisdunn/botlab,dennisdunn/botlab,dennisdunn/botlab |
a503dedb91bd74ff75817f4637bf8ac3a5a70f2d | server/app/prod.js | server/app/prod.js | import express from 'express';
import bodyParser from 'body-parser';
import favicon from 'serve-favicon';
import path from 'path';
import helmet from 'helmet';
import fs from 'fs';
import webpackCommonConfig from '../../webpack/config';
import envConfig from '../config';
const app = express();
const outputPath = webpa... | import express from 'express';
import bodyParser from 'body-parser';
import favicon from 'serve-favicon';
import path from 'path';
import helmet from 'helmet';
import fs from 'fs';
import webpackCommonConfig from '../../webpack/config';
import envConfig from '../config';
const app = express();
const outputPath = webpa... | Update server: remove process.env read | Update server: remove process.env read
| JavaScript | mit | hrasoa/react-pwa,hrasoa/react-pwa,hrasoa/react-pwa |
a2220f6929bcbc94ac1e0bc5643bfc9c736b89eb | app/assets/javascripts/errorTracking.js | app/assets/javascripts/errorTracking.js | (function(Modules) {
"use strict";
Modules.TrackError = function() {
this.start = function(component) {
if (!ga) return;
ga(
'send',
'event',
'Error',
$(component).data('error-type'),
$(component).data('error-label')
);
};
};
})(window.GOVUK... | (function(Modules) {
"use strict";
Modules.TrackError = function() {
this.start = function(component) {
if (!('ga' in window)) return;
ga(
'send',
'event',
'Error',
$(component).data('error-type'),
$(component).data('error-label')
);
};
};
}... | Fix exception in track-error js module that broke our re-upload button | Fix exception in track-error js module that broke our re-upload button
| JavaScript | mit | alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin |
0debdbb67f329e3986e3aa516c52a1316447e753 | test/spec.js | test/spec.js | describe('tests', function() {
var username = "USERNAME";
var linksnum = 0;
var links = element.all(by.repeater('link in annotatedlinks'));
browser.get('https://webmaker.org/user/' + username);
it('Should have a title', function() {
expect(browser.getTitle()).toEqual(username + ' | Webmaker');
});
... | describe('tests', function() {
var username = "USERNAME";
var linksnum = 0;
var links = element.all(by.repeater('link in annotatedlinks'));
browser.get('https://webmaker.org/user/' + username);
it('Should have a title', function() {
expect(browser.getTitle()).toEqual(username + ' | Webmaker');
});
... | Test - checking visibitlity of Change Avatar link | Test - checking visibitlity of Change Avatar link
| JavaScript | mpl-2.0 | mozilla/webmaker-profile-2,mozilla/webmaker-profile-2 |
99c51fe4d4dbae59ea7edd1e1d5d548c749006be | pivotal.js | pivotal.js | const fetch = require('node-fetch')
const endpoint = 'https://www.pivotaltracker.com/services/v5/my/notifications?envelope=true'
const api = {
getNotifications({ token }){
return fetch(endpoint, {
headers: {
'X-TrackerToken': token,
},
}).then(response => response.json())
},
getUnrea... | const fetch = require('node-fetch')
const endpoint = 'https://www.pivotaltracker.com/services/v5/my/notifications?envelope=true'
const api = {
getNotifications({ token }){
return fetch(endpoint, {
headers: {
'X-TrackerToken': token,
},
}).then(response => response.json())
},
getUnrea... | Use api instead of this | Use api instead of this
| JavaScript | mit | grsabreu/alexa-pivotal-tracker,grsabreu/alexa-pivotal-tracker |
2493d0770b7d59d5666422eef1c0c0634e896a0e | routes/index.js | routes/index.js |
/*
* GET home page.
*/
var helpers = require('../helpers');
exports.index = function(req, res){
res.render('index', {
title: 'JS Box',
libraryUrls: helpers.getLibraryUrls(),
scriptUrl: req.param('scriptUrl')
});
};
|
/*
* GET home page.
*/
var helpers = require('../helpers');
exports.index = function(req, res){
res.render('index', {
title: 'JS Box',
libraryUrls: helpers.getLibraryUrls(),
scriptUrl: req.query.scriptUrl
});
};
| Use req.query instead of req.param for clarity | Use req.query instead of req.param for clarity
| JavaScript | mit | nicolasmccurdy/jsbox |
99c1091525d8377d701da7aa1bd784403ad75ccb | src/plugins/MockEntryPlugin.js | src/plugins/MockEntryPlugin.js | class MockEntryPlugin {
/**
* Apply the plugin.
*
* @param {Object} compiler
*/
apply(compiler) {
compiler.plugin('done', stats => {
// If no mix.js() call was requested, we'll also need
// to delete the output script for the user. Since we
// won'... | class MockEntryPlugin {
/**
* Handle the deletion of the temporary mix.js
* output file that was generated by webpack.
*
* This file is created when the user hasn't
* requested any JavaScript compilation, but
* webpack still requires an entry.
*
* @param {Object} compiler
... | Delete the mix.js entry file from the console output | Delete the mix.js entry file from the console output
| JavaScript | mit | JeffreyWay/laravel-mix |
f82560529346af876ea1b80352320d45a838eb55 | src/ggrc/assets/javascripts/plugins/can_control.js | src/ggrc/assets/javascripts/plugins/can_control.js | /*!
Copyright (C) 2017 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
*/
(function(can) {
can.extend(can.Control.prototype, {
// Returns a function which will be halted unless `this.element` exists
// - useful for callbacks which depend on the controller's ... | /*!
Copyright (C) 2017 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
*/
(function(can) {
can.extend(can.Control.prototype, {
// Returns a function which will be halted unless `this.element` exists
// - useful for callbacks which depend on the controller's ... | Check element before get an innerHTML | Check element before get an innerHTML
| JavaScript | apache-2.0 | AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,plamut/ggrc-core |
37f7798cb6878a9566280cedd3b1f009c7cb87ad | lib/tasks/watch_sources.js | lib/tasks/watch_sources.js |
module.exports = function(gulp, config) {
return function(done) {
var c = require('better-console')
c.info('watch sources')
var path = require('path')
var glob = [
'**/*.{css,styl,js,jsx,coffee,jade}',
'!' + config.dist_folder + '/**/*'
]
var options = {
base: path.resolve(config.dir, config.... |
module.exports = function(gulp, config) {
return function(done) {
var c = require('better-console')
c.info('watch sources')
var path = require('path')
var glob = [
'**/*.{css,styl,scss,js,jsx,coffee,jade}',
'!' + config.dist_folder + '/**/*'
]
var options = {
base: path.resolve(config.dir, co... | Watch also *.scss sources for rebuild | Watch also *.scss sources for rebuild
| JavaScript | mit | Cactucs/mango-cli,manGoweb/mango-cli,Cactucs/mango-cli,manGoweb/mango-cli |
52fac8dbe55be892eab3c2415ea8d6911e50413d | gulpfile.js | gulpfile.js | var elixir = require('laravel-elixir');
elixir(function(mix) {
mix.sass('app/assets/sass/main.scss')
.styles([
'app/assets/Bower_components/fontawesome/css/font-awesome.min.css',
'public/css/main.css',
], './')
.scripts([
'bower_components/jquery/dist/jquery.min.js',
'bow... | var elixir = require('laravel-elixir');
elixir(function(mix) {
mix.sass('app/assets/sass/main.scss')
.styles([
'app/assets/Bower_components/fontawesome/css/font-awesome.min.css',
'public/css/main.css',
], './')
.scripts([
'bower_components/jquery/dist/jquery.min.js',
'bow... | Correct the rivets file name | Correct the rivets file name
| JavaScript | bsd-3-clause | Mebus/Cachet,ephillipe/Cachet,coupej/Cachet,cachethq/Cachet,displayn/Cachet,katzien/Cachet,karaktaka/Cachet,wakermahmud/Cachet,billmn/Cachet,NossaJureg/Cachet,robglas/Cachet,katzien/Cachet,NossaJureg/Cachet,ematthews/Cachet,ematthews/Cachet,Surventrix/Cachet,g-forks/Cachet,murendie/Cachet,eduardocruz/Cachet,everpay/Cac... |
273abbeaa96a2ce27522eb1e9c84e9ec85f3d052 | resources/js/components/reports/ReportColors.js | resources/js/components/reports/ReportColors.js | /**
* Colors for all reports
*/
const ReportColors = [
'#FFB067', // Orange
'#104210', // Forest green
'#FF7077', // Coral
'#ACEEF3', // Cyan
'#FF4500', // Red orange
'#FF8300', // Darker orange
'#DF362D', // Medium red
'#B7AC44', // Olive green
'#7A871E', // Darker olive green
];
e... | /**
* Colors for all reports
*/
const ReportColors = [
'#FFB067', // Orange
'#FF7077', // Coral
'#ACEEF3', // Cyan
'#FF4500', // Red orange
'#FF8300', // Darker orange
'#DF362D', // Medium red
'#B7AC44', // Olive green
'#7A871E', // Darker olive green
];
export default ReportColors;
| Remove forest green from reports | Remove forest green from reports
| JavaScript | mit | sbine/bdgt,sbine/bdgt,sbine/bdgt |
e65ef4ae2e6c4808aae0fcc99b92b5c990081823 | src/database/DataTypes/VaccineVialMonitorStatus.js | src/database/DataTypes/VaccineVialMonitorStatus.js | /**
* Sustainable Solutions (NZ) Ltd. 2020
* mSupply Mobile
*/
import Realm from 'realm';
export class VaccineVialMonitorStatus extends Realm.Object {}
VaccineVialMonitorStatus.schema = {
name: 'VaccineVialMonitorStatus',
primaryKey: 'id',
properties: {
id: 'string',
description: { type: 'string', o... | /**
* Sustainable Solutions (NZ) Ltd. 2020
* mSupply Mobile
*/
import Realm from 'realm';
export class VaccineVialMonitorStatus extends Realm.Object {}
VaccineVialMonitorStatus.schema = {
name: 'VaccineVialMonitorStatus',
primaryKey: 'id',
properties: {
id: 'string',
description: { type: 'string', o... | Add vvm status bool field | Add vvm status bool field
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
75bbf61f7acdda66c72ebe4401302b9c03682cf5 | src/QueryLoader.js | src/QueryLoader.js | var ImagePreloader = require('./ImagePreloader/');
var Overlay = require('./Overlay/');
function QueryLoader(element, options) {
'use strict';
this.element = element;
this.options = options;
//The default options
this.defaultOptions = {
onComplete: function() {},
onLoadComplete: fu... | var ImagePreloader = require('./ImagePreloader/');
var Overlay = require('./Overlay/');
function QueryLoader(element, options) {
'use strict';
this.element = element;
this.options = options;
//The default options
this.defaultOptions = {
onComplete: function() {},
onLoadComplete: fu... | Create preloader object and set property | Create preloader object and set property
| JavaScript | mit | dwandw/queryloader2,dwandw/queryloader2,Gaya/queryloader2,Gaya/queryloader2 |
5f8ee1462ca4620b67cae41f34813bade158f8d4 | test/typescript.spec.js | test/typescript.spec.js | import * as tt from 'typescript-definition-tester'
describe('TypeScript definitions', function () {
it('should compile against index.d.ts', (done) => {
tt.compileDirectory(
__dirname + '/typescript',
fileName => fileName.match(/\.ts$/),
() => done()
)
})
})
| import * as ts from 'typescript'
import * as tt from 'typescript-definition-tester'
describe('TypeScript definitions', function () {
it('should compile against index.d.ts', (done) => {
tt.compileDirectory(
__dirname + '/typescript',
fileName => fileName.match(/\.ts$/),
// This matches what's in... | Fix TypeScript tests so they fail for errors :) | Fix TypeScript tests so they fail for errors :)
| JavaScript | mit | raisemarketplace/redux-loop |
52d58524d5246ed4615b436753bfe8662362ee4a | lib/message.js | lib/message.js | /**
* `Message` constructor.
*
* @api protected
*/
function Message(queue, message, headers, deliveryInfo) {
// Crane uses slash ('/') separators rather than period ('.')
this.topic = deliveryInfo.routingKey.replace(/\./g, '/');
this.headers = {};
if (deliveryInfo.contentType) { headers['content-type'] = de... | /**
* `Message` constructor.
*
* @api protected
*/
function Message(queue, message, headers, deliveryInfo) {
// Crane uses slash ('/') separators rather than period ('.')
this.topic = deliveryInfo.routingKey.replace(/\./g, '/');
this.headers = headers;
if (deliveryInfo.contentType) { this.headers['content-t... | Fix to set headers correctly. | Fix to set headers correctly.
| JavaScript | mit | jaredhanson/crane-amqp |
17e2175536b87622f2e167a9874ee0fd42362e3f | src/convexpress.js | src/convexpress.js | import {json} from "body-parser";
import {Router} from "express";
import * as validate from "./validate-middleware";
import * as convert from "./convert";
export default function convexpress (options) {
const router = Router().use(json());
router.swagger = {
swagger: "2.0",
host: options.host,... | import {json} from "body-parser";
import {Router} from "express";
import * as validate from "./validate-middleware";
import * as convert from "./convert";
export default function convexpress (options) {
const router = Router().use(json());
router.swagger = {
swagger: "2.0",
host: options.host,... | Allow method chaining after serveSwagger | Allow method chaining after serveSwagger
| JavaScript | mit | staticdeploy/convexpress |
f5b2334d392c748c4a74bd66c9e14489d428c90d | server/lib/parseArtistTitle/kfconfig-default.js | server/lib/parseArtistTitle/kfconfig-default.js | // karaoke-forever string to artist/title parser defaults
module.exports = {
// regex or string; artist/song get split around this match (default='-')
delimiter: '-',
// bool; whether artist is on left side of delimiter (default=true)
artistFirst: true,
// string; override Artist for songs in this file's scop... | // karaoke-forever string to artist/title parser defaults
module.exports = {
// regex or string; artist/song get split around this match (default='-')
delimiter: '-',
// bool; whether artist is on left side of delimiter (default=true)
artistFirst: true,
// string; override Artist for songs in this file's scop... | Improve filename parser regex (hopefully) | Improve filename parser regex (hopefully)
| JavaScript | isc | bhj/karaoke-forever,bhj/karaoke-forever |
cff11fbe74280c66c00323d28fdb9041ded48fcc | test/data.spec.js | test/data.spec.js | 'use strict';
var assert = require('assert');
var data = require('../src/data'),
vlfield = require('../src/field');
describe('getUrl', function() {
//TODO write tests for getUrl
});
describe('getStats', function() {
//TODO write more tests
});
| 'use strict';
var assert = require('assert');
var data = require('../src/data'),
vlfield = require('../src/field');
| Remove tests for things that don’t exist | Remove tests for things that don’t exist | JavaScript | bsd-3-clause | osnr/vega-lite,smartpcr/vega-lite,sandbox/vega-lite,sandbox/vega-lite,jsanch/vega-lite,ellisonbg/vega-lite,Ye-Yong-Chi/vega-lite,vega/vega-lite,mathisonian/vega-lite,vivekratnavel/vega-lite,ioriwellings/vega-lite,uwdata/vega-lite,uwdata/vega-lite,guiquanz/vega-lite,jsanch/vega-lite,mendax-grip/vega-lite,Ye-Yong-Chi/veg... |
29996cdafbf6bb90b28905d0d509a3d05ae8c415 | src/eeh-signalr.js | src/eeh-signalr.js | (function(angular) {
'use strict';
var SignalRService = function ($window, url) {
this.jQuery = $window.jQuery;
this._url = url;
};
SignalRService.prototype.getHub = function (hubName) {
var hub = this.jQuery.connection[hubName];
this.jQuery.connection.hub.url = this._ur... | (function (angular) {
'use strict';
var SignalRService = function (jQuery) {
this.jQuery = jQuery;
};
SignalRService.prototype.getHub = function (hubName) {
return this.jQuery.connection[hubName];
};
var SignalRProvider = function () {
this._url = '/signalr';
th... | Add support for native Angular event broadcasting | Add support for native Angular event broadcasting
| JavaScript | mit | ethanhann/eeh-signalr |
35fa6da2923128d818d56ccf74050f2617d72fbb | ui/src/status/apis/index.js | ui/src/status/apis/index.js | import {get} from 'utils/ajax'
import {fixtureJSONFeed} from 'src/status/fixtures'
// TODO: remove async/await & object return, uncomment get(url) when proxy route implemented
export const fetchJSONFeed = async url => {
return await {data: fixtureJSONFeed}
// get(url)
}
| // import {get} from 'utils/ajax'
import {fixtureJSONFeed} from 'src/status/fixtures'
// TODO: remove async/await & object return, uncomment get(url) when proxy route implemented
// export const fetchJSONFeed = async url => {
export const fetchJSONFeed = async () => {
return await {data: fixtureJSONFeed}
// get(ur... | Comment out linter errors temporarily | Comment out linter errors temporarily
| JavaScript | mit | nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,... |
7f57375c6a1b5534f3721529ca14889707bb8301 | _includes/download-count.js | _includes/download-count.js | var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState === 4) {
var releasesData = JSON.parse(xmlHttp.responseText);
var totalDownloads = releasesData.reduce(
function (total, current) {
return total + current.assets[0].download_count;
},
... |
var totalDownloads = 145579; // pre-GitHub download total
var handleApiResponse = function() {
if (xmlHttp.readyState === 4) {
var releasesData = JSON.parse(xmlHttp.responseText);
totalDownloads += releasesData.reduce(
function (total, current) {
return total + current.assets[0].download_coun... | Fix download count not including more than 30 releases | Fix download count not including more than 30 releases
| JavaScript | mit | LiveSplit/LiveSplit.github.io,LiveSplit/LiveSplit.github.io,LiveSplit/LiveSplit.github.io |
8b5ef7b10fbf7e46c24d5ad601f8b37407f2e9e6 | src/browser/extension/background/contextMenus.js | src/browser/extension/background/contextMenus.js | import openDevToolsWindow from './openWindow';
export default function createMenu() {
const menus = [
{ id: 'devtools-left', title: 'To left' },
{ id: 'devtools-right', title: 'To right' },
{ id: 'devtools-bottom', title: 'To bottom' },
{ id: 'devtools-panel', title: 'Open in a chrome panel (enable i... | import openDevToolsWindow from './openWindow';
export default function createMenu() {
const menus = [
{ id: 'devtools-left', title: 'To left' },
{ id: 'devtools-right', title: 'To right' },
{ id: 'devtools-bottom', title: 'To bottom' },
{ id: 'devtools-panel', title: 'Open in a chrome panel (enable i... | Fix context menu listener when event page becomes inactive | Fix context menu listener when event page becomes inactive
Fix #154.
| JavaScript | mit | zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension |
b345af1d7f6380bb944d74b3b6c558bde913a1c6 | src/ui/main/main.controller.js | src/ui/main/main.controller.js | angular.module('proxtop').controller('MainController', ['$scope', 'ipcManager', '$state', 'notification', '$mdToast', '$translate', 'settings', '$mdDialog', 'open', '$window', 'debounce',
function($scope, ipcManager, $state, notification, $mdToast, $translate, settings, $mdDialog, open, $window, debounce) {
... | angular.module('proxtop').controller('MainController', ['$scope', 'ipcManager', '$state', '$mdToast', '$translate', 'settings',
function($scope, ipcManager, $state, $mdToast, $translate, settings) {
const ipc = ipcManager($scope);
ipc.once('check-login', function(ev, result) {
if(result)... | Fix error in last commit | Fix error in last commit
| JavaScript | mit | kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop |
5750a5fc7e1857135652dfead218eaba58acebb1 | js/chrome-font-bug.js | js/chrome-font-bug.js | jQuery(function() {
jQuery('body').hide().show();
}); | jQuery(function($) {
if (/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())) {
$('body').css('opacity', '1.0')
}
}) | Use another jquery for chrome font bug | Use another jquery for chrome font bug
| JavaScript | mit | philipyoo/philipyoo.github.io,philipyoo/philipyoo.github.io |
f3eab0dc2b6a123bb555e58c2fa06f6c8034f997 | docs/js/viewSourceButton.js | docs/js/viewSourceButton.js | const sheet = document.createElement('style');
sheet.innerHTML = `
@media screen {
#viewSourceHeader.📖-view-source-header {
display: block !important;
}
}
.📖-view-source-header {
display: none;
top: 0;
left: 0;
right: unset;
bottom: unset;
padding: 1em;
background: transparent;
box-shadow: no... | const sheet = document.createElement('style');
sheet.innerHTML = `
@media screen {
#viewSourceHeader.📖-view-source-header {
display: block !important;
}
}
.📖-view-source-header {
display: none;
top: 0;
left: 0;
right: unset;
bottom: unset;
padding: 1em;
background: transparent;
box-shadow: no... | Remove logo from viewSource button | Remove logo from viewSource button
| JavaScript | mit | evnbr/bindery,evnbr/bindery |
a0de5c005117b4de07c7e18f4d640407567cadb9 | src/modules/Router.js | src/modules/Router.js | class GelatoRouter extends Backbone.Router {
execute(callback, args, name) {
if (this.page) {
this.page.remove();
}
this.trigger('navigate:before', args, name);
callback && callback.apply(this, args);
this.trigger('navigate:after', args, name);
}
getQueryString() {
const location ... | class GelatoRouter extends Backbone.Router {
execute(callback, args, name) {
if (this.page) {
this.page.remove();
}
this.trigger('navigate:before', args, name);
callback && callback.apply(this, args);
this.trigger('navigate:after', args, name);
}
getQueryString(name) {
const locat... | Include missing argument in router query string method | Include missing argument in router query string method
| JavaScript | mit | mcfarljw/backbone-gelato,jernung/gelato,mcfarljw/gelato-framework,jernung/gelato,mcfarljw/backbone-gelato,mcfarljw/gelato-framework |
2143c25bcf5b2a2fc485db3969bca44e1670f972 | tests/integration/components/medium-editor-test.js | tests/integration/components/medium-editor-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import { find, fillIn } from 'ember-native-dom-helpers';
import { skip } from 'qunit';
moduleForComponent('medium-editor', 'Integration | Component | medium editor', {
integration: true
});
test('it renders', funct... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import { find } from 'ember-native-dom-helpers';
import MediumEditor from 'medium-editor';
const meClass = '.medium-editor-element';
moduleForComponent('medium-editor', 'Integration | Component | medium editor', {
... | Update tests to test onChange and value. | Update tests to test onChange and value.
| JavaScript | mit | kolybasov/ember-medium-editor,kolybasov/ember-medium-editor |
2ddd41a50432c8b4949420f55432dc2688073404 | web/static/js/prop_types.js | web/static/js/prop_types.js | //
// Reusable, domain-specific prop types
//
import PropTypes from "prop-types"
// could be an enum if this is a fixed set of strings?
export const category = PropTypes.string
export const user = PropTypes.shape({
given_name: PropTypes.string,
online_at: PropTypes.number,
is_facilitator: PropTypes.boolean,
})
... | //
// Reusable, domain-specific prop types
//
import PropTypes from "prop-types"
// could be an enum if this is a fixed set of strings?
export const category = PropTypes.string
export const user = PropTypes.shape({
given_name: PropTypes.string,
online_at: PropTypes.number,
is_facilitator: PropTypes.boolean,
})
... | Add 'votes' to application's proptypes | Add 'votes' to application's proptypes
| JavaScript | mit | stride-nyc/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,samdec11/remote_retro |
34bbeb674a0920ff905a756c86189de6d68ef87d | src/initialization/checkDeliveryService.js | src/initialization/checkDeliveryService.js | const configuration = require('../config')
const fetch = require('node-fetch')
const { URL } = require('url')
async function checkDeliveryService () {
const config = configuration.get()
const { deliveryServiceURL, bot } = config
if (!deliveryServiceURL) {
return
}
const url = new URL(deliveryServiceURL)
... | const configuration = require('../config')
const fetch = require('node-fetch')
const { URL } = require('url')
async function checkDeliveryService () {
const config = configuration.get()
const { deliveryServiceURL } = config
if (!deliveryServiceURL) {
return
}
const url = new URL(deliveryServiceURL)
con... | Remove auth from delivery service health check | Remove auth from delivery service health check
| JavaScript | mit | synzen/Discord.RSS,synzen/Discord.RSS |
036d25053c76af592d67604788a594d5dfc3564c | src/main/resources/ktrack/ui/js/doglist.js | src/main/resources/ktrack/ui/js/doglist.js | function renderThumbNail( data, type, row, meta ) {
if(! window.dogList) {
window.dogList = {};
window.dogList.snapshotUrl = '${SNAPSHOTURL}';
window.dogList.previewfileKey = '${PREVIEWKEY}';
window.dogList.renderSnapshotThumbnail = function(data, type, row, meta) {
var html = '<div class=\"row\"... | function renderThumbNail( data, type, row, meta ) {
if(! window.dogList) {
window.dogList = {};
window.dogList.snapshotUrl = '${SNAPSHOTURL}';
window.dogList.previewfileKey = '${PREVIEWKEY}';
window.dogList.renderSnapshotThumbnail = function(data, type, row, meta) {
var html = '';
var colLeng... | Fix layout of dogs datatable | Fix layout of dogs datatable | JavaScript | apache-2.0 | djays123/KTrack,djays123/KTrack,djays123/KTrack |
3975ffed38b419a7ee6e88846a20de9c06c52c08 | packages/fireplace/lib/model/promise_model.js | packages/fireplace/lib/model/promise_model.js | var get = Ember.get;
FP.PromiseModel = Ember.ObjectProxy.extend(Ember.PromiseProxyMixin, {
// forward on all content's functions where it makes sense to do so
_setupContentForwarding: function() {
var obj = get(this, "content");
if (!obj) { return; }
for (var prop in obj) {
if (!this[prop] && t... | var set = Ember.set,
get = Ember.get,
resolve = Ember.RSVP.resolve;
// reimplemented private method from Ember, but with setting
// _settingFromFirebase so we can avoid extra saves down the line
function observePromise(proxy, promise) {
promise.then(function(value) {
set(proxy, 'isFulfilled', true);
... | Set _settingFromFirebase on the PromiseModel when it's resolved | Set _settingFromFirebase on the PromiseModel when it's resolved | JavaScript | mit | rlivsey/fireplace,rlivsey/fireplace,pk4media/fireplace,pk4media/fireplace |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.