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
849148bac1598f1ba1fcc898181650e927b0b4cc
src/components/IconBar/index.js
src/components/IconBar/index.js
/* eslint-disable no-unused-vars*/ import React, { Component, PropTypes } from 'react'; /* eslint-enable no-unused-vars*/ import Icons from 'components/Icons/'; const IconBar = () => { let children = Object.keys(Icons).map(key => { let Icon = Icons[key]; return ( <Icon key={key} style={ { display: 'in...
/* eslint-disable no-unused-vars*/ import React, { Component, PropTypes } from 'react'; /* eslint-enable no-unused-vars*/ import Icons from 'components/Icons/'; import { Grid, Row, Col } from 'react-bootstrap'; const IconBar = () => { let children = Object.keys(Icons).map((key, index) => { let Icon = Icons[key]...
Split icons into responsive grid
Split icons into responsive grid
JavaScript
mit
pl12133/pl12133.github.io,pl12133/pl12133.github.io
7133c3a7ce498b73aded39f8de50df787091e541
test/spec/controllers/formDropArea.js
test/spec/controllers/formDropArea.js
/* global describe: false, expect: false, it: false, inject: false, beforeEach: false */ 'use strict'; describe('Controller: FormDropAreaCtrl', function () { // load the controller's module beforeEach(module('confRegistrationWebApp')); var FormDropAreaCtrl, scope; // Initialize the controller and a mock...
/* global describe: false, expect: false, it: false, inject: false, beforeEach: false */ 'use strict'; describe('Controller: FormDropAreaCtrl', function () { // load the controller's module beforeEach(module('confRegistrationWebApp')); var FormDropAreaCtrl, scope; // Initialize the controller and a mock...
Test the delete block fn
Test the delete block fn
JavaScript
mit
CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web
4a837b9ec7956227d9c856181de4b3b3e5b60737
src/utils/attach-attr.js
src/utils/attach-attr.js
function attachAttr (ele, attr) { for (var a in attr) { ele.setAttribute(a, attr[a]); } return ele; }
/** * Attaches DOM attribles to an elements * @param {object} ele A DOM Element in which to add the CSS to. * @param {object} attrObj Attributes in which to add to the Element in an object * @returns {object} ele Passes the element with attributes attached. * * @example * var x = document.createElement('img...
Add JSDoc info for attachAttr
Add JSDoc info for attachAttr
JavaScript
mit
rockabox/Auxilium.js
77d3124f82c0af43bf7710c04db817471f4ebc15
browser.js
browser.js
'use strict'; const isIp = require('is-ip'); const defaults = { timeout: 5000 }; const urls = { v4: 'https://ipv4.icanhazip.com/', v6: 'https://ipv6.icanhazip.com/' }; function queryHttps(version, opts) { return new Promise((resolve, reject) => { const doReject = () => reject(new Error('Couldn\'t find your IP'...
'use strict'; const isIp = require('is-ip'); const defaults = { timeout: 5000 }; const urls = { v4: 'https://ipv4.icanhazip.com/', v6: 'https://ipv6.icanhazip.com/' }; function queryHttps(version, opts) { return new Promise((resolve, reject) => { const doReject = () => reject(new Error('Couldn\'t find your IP'...
Set XHR properties between open() and send()
Set XHR properties between open() and send() Fixes IE11 compatibility. Thanks @bkonetzny for pointing it out. Fixes: https://github.com/sindresorhus/public-ip/issues/16
JavaScript
mit
sindresorhus/public-ip,sindresorhus/public-ip,sindresorhus/public-ip
e08bc01c335bbcf123507b16e63e0e8c6addafc2
tests/unit/functions/calendar_spec.js
tests/unit/functions/calendar_spec.js
var fs = require("fs"); var path = require("path"); var chai = require("chai"); var expect = chai.expect; var vm = require("vm"); describe("Functions into modules/default/calendar/calendar.js", function() { // Fake for use by calendar.js Module = {} Module.definitions = {}; Module.register = function (name, modu...
var fs = require("fs"); var path = require("path"); var chai = require("chai"); var expect = chai.expect; var vm = require("vm"); describe("Functions into modules/default/calendar/calendar.js", function() { // Fake for use by calendar.js Module = {} Module.definitions = {}; Module.register = function (name, modu...
Fix conflict with test function newsfeed
Fix conflict with test function newsfeed
JavaScript
mit
thobach/MagicMirror,Tyvonne/MagicMirror,morozgrafix/MagicMirror,n8many/MagicMirror,morozgrafix/MagicMirror,MichMich/MagicMirror,heyheyhexi/MagicMirror,roramirez/MagicMirror,berlincount/MagicMirror,thobach/MagicMirror,thobach/MagicMirror,marc-86/MagicMirror,Tyvonne/MagicMirror,vyazadji/MagicMirror,morozgrafix/MagicMirro...
9e1fdd5021b9a38b75a905a2ff97cb07e18576b4
src/events/resize/multigraph.js
src/events/resize/multigraph.js
module.exports = function($, window, errorHandler) { var Multigraph = require('../../core/multigraph.js')($), Point = require('../../math/point.js'); if (typeof(Multigraph.registerResizeEvents)==="function") { return Multigraph; } Multigraph.respondsTo("registerResizeEvents", function (target) { ...
module.exports = function($, window, errorHandler) { var Multigraph = require('../../core/multigraph.js')($), Point = require('../../math/point.js'); if (typeof(Multigraph.registerResizeEvents)==="function") { return Multigraph; } Multigraph.respondsTo("registerResizeEvents", function (target) { ...
Fix scaling issue when a retina-capable device resizes. Will now correctly scale.
Fix scaling issue when a retina-capable device resizes. Will now correctly scale.
JavaScript
mit
henhouse/js-multigraph,multigraph/js-multigraph,multigraph/js-multigraph,henhouse/js-multigraph,multigraph/js-multigraph,henhouse/js-multigraph
e44a46744b04cc89adc231c2b2c50b6a32193b55
snippet.js
snippet.js
// MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE var snippet = { version: "1.0", // Writes out the given text in a monospaced paragraph tag, escaping // & and < so they aren't rendered as HTML. log: function(msg) { if (Object.prototype.toString.call(...
// MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE var snippet = { version: "1.01", // Writes out the given text in a monospaced paragraph tag, escaping // & and < so they aren't rendered as HTML. log: function(msg) { if (Object.prototype.toString.call...
Fix stoopid mistake in log
Fix stoopid mistake in log
JavaScript
mit
tjcrowder/simple-snippets-console,tjcrowder/simple-snippets-console
19413e0a5fc9decff56bbe1429bda4ff82ac3aa5
app/js/modules/tabs/settings/controllers/SettingsCtrl.js
app/js/modules/tabs/settings/controllers/SettingsCtrl.js
(function() { var SettingsCtrl = function($scope, $ionicModal, Auth) { var vm = this $ionicModal .fromTemplateUrl("js/modules/tabs/settings/views/login.html", { scope: $scope, animation: "slide-in-up" }) .then(function(modal) { vm.loginModal = modal; }) ...
(function() { var SettingsCtrl = function($scope, $ionicModal, Auth) { var vm = this $ionicModal .fromTemplateUrl("js/modules/tabs/settings/views/login.html", { scope: $scope, animation: "slide-in-up" }) .then(function(modal) { vm.loginModal = modal; }) ...
Fix bug issue in Settings Ctrl
Fix bug issue in Settings Ctrl
JavaScript
mit
Plateful/plateful-mobile,Plateful/plateful-mobile
fa62ad541d147e740bedd97f470390aafe882e8f
app/js/arethusa.core/directives/foreign_keys.js
app/js/arethusa.core/directives/foreign_keys.js
'use strict'; angular.module('arethusa.core').directive('foreignKeys',[ 'keyCapture', 'languageSettings', function (keyCapture, languageSettings) { return { restrict: 'A', scope: { ngChange: '&', ngModel: '@', foreignKeys: '=' }, link: function (scope, element, ...
'use strict'; angular.module('arethusa.core').directive('foreignKeys',[ 'keyCapture', 'languageSettings', function (keyCapture, languageSettings) { return { restrict: 'A', scope: { ngChange: '&', ngModel: '@', foreignKeys: '=' }, link: function (scope, element, ...
Fix minor mistake in foreignKeys
Fix minor mistake in foreignKeys
JavaScript
mit
latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa
2cc1ca19ac4bf229eb2f7270e711fa3580005063
spec/fixture/model/image.js
spec/fixture/model/image.js
var Model = require('chaos-orm').Model; var ImageTag = require('./image-tag'); var Gallery = require('./gallery'); class Image extends Model { static _define(schema) { schema.column('id', { type: 'serial' }); schema.column('gallery_id', { type: 'integer' }); schema.column('name', { type: 'string', null: ...
var Model = require('chaos-orm').Model; var ImageTag = require('./image-tag'); var Gallery = require('./gallery'); class Image extends Model { static _define(schema) { schema.column('id', { type: 'serial' }); schema.column('gallery_id', { type: 'integer' }); schema.column('name', { type: 'string', null: ...
Apply core changes which define foreign keys to be not null by default.
Apply core changes which define foreign keys to be not null by default.
JavaScript
mit
crysalead-js/chaos-database
d2c0a53b7b4d308739940659ff9915d0ffa7db63
devtools/env.js
devtools/env.js
const path = require('path'); const env = module.exports = {}; env.rootDir = path.join(__dirname, '..'); env.buildDir = path.join(env.rootDir, 'docs'); // we use docs to able publish on gh-pages env.srcDir = path.join(env.rootDir, 'src');
const path = require('path'); const env = module.exports = {}; env.rootDir = path.join(__dirname, '..'); env.buildDir = path.join(env.rootDir, 'docs'); // we use docs to able publish on gh-pages env.srcDir = path.join(env.rootDir, 'src'); env.devServerPort = 3000;
Return missing dev server port
Return missing dev server port
JavaScript
mit
rodmax/react-playground,rodmax/react-playground,rodmax/react-playground,rodmax/react-playground
234f228f7426b8df90907f7e123b9eb0aad238ec
spec/index.js
spec/index.js
describe("Unit: eslint-config-openstack", function() { it("should set espree as the default parser.", function() { var config = require('../index'); expect(config.parser).toEqual('espree'); }); it("should disable all ecma6 features.", function() { var config = require('../index'); var keys = Ob...
describe("Unit: eslint-config-openstack", function() { it("should set espree as the default parser.", function() { var config = require('../index'); expect(config.parser).toEqual('espree'); }); it("should disable all ecma6 features.", function() { var config = require('../index'); var keys = Ob...
Add test to alert for rule replacements.
Add test to alert for rule replacements. Eslint carries forward a replacement list that indicates when a rule is about to be renamed/deprecated. This unit test checks our rules against that list, and will fail if it detects a pending replacement. Change-Id: If1a20c2f6dd198f8ee9e38625977885e29f05303
JavaScript
apache-2.0
openstack/eslint-config-openstack
e00ba70ffba16707d8dcc347bb432a20fc0caee2
modules/librato-cli-config.js
modules/librato-cli-config.js
var filesystem = require('fs'); var config = { baseUrl: 'https://metrics-api.librato.com/v1/' }; try { config = JSON.parse(filesystem.readFileSync('config.json')); } catch (err) { } var saveConfig = function() { var configContents = JSON.stringify(config, null, 2); filesystem.writeFileSync('config.json', configC...
var filesystem = require('fs'); var config = { baseUrl: 'https://metrics-api.librato.com/v1/' }; try { config = JSON.parse(filesystem.readFileSync(__dirname + '/../config.json')); } catch (err) { console.error('Could not read config file at ' + __dirname + '/../config.json'); } var saveConfig = function() { var ...
Fix relative pathing of config file.
Fix relative pathing of config file.
JavaScript
mit
plmwong/librato-cli
a5ce01e766d1c9f453254e3211a1da4b1a0cfbf8
db.js
db.js
const express = require('express'); const mongoose = require('mongoose'); // Connect to MongoDB mongoose.connect('mongodb://localhost/test'); const db = mongoose.connection; // Define product schema for e-commerce demo site let productsSchema = mongoose.Schema({ name: String, description: String, img: String, ...
const express = require('express'); const mongoose = require('mongoose'); // Connect to MongoDB mongoose.connect('mongodb://localhost/test'); const db = mongoose.connection; // Define product schema for e-commerce demo site let productsSchema = mongoose.Schema({ name: String, description: String, img: String, ...
Add flightSchema for travel demo site
Add flightSchema for travel demo site
JavaScript
mit
dshaps10/full-stack-demo-site,dshaps10/full-stack-demo-site
d7afb70d65a16fa6d6a0c4773167f0fcabd622a2
build-config/RequireJS_config_multiple-bundles.js
build-config/RequireJS_config_multiple-bundles.js
// Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // 1. Redistributions of source code must retain the above copyright notice, thi...
// Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // 1. Redistributions of source code must retain the above copyright notice, thi...
Remove references to plugins in multiple bundles config It looks like they don't need to be excluded at all.
Remove references to plugins in multiple bundles config It looks like they don't need to be excluded at all.
JavaScript
bsd-3-clause
bibliolabs/readium-js,looknear/readium-js,bibliolabs/readium-js,ravn-no/readium-js,kivuto/readium-js,readium/readium-js,looknear/readium-js,readium/readium-js,ravn-no/readium-js,kivuto/readium-js
35613f2c36bad1b2f1ee8e9f24c2bdb20bd7d366
webpack-plugin/src/validateOptions.js
webpack-plugin/src/validateOptions.js
/* eslint-disable no-param-reassign, max-len */ // Validates and defaults the options function validateOptions(options) { // Default options to our preferred value options.dest = options.dest || 'carte-blanche'; options.filter = options.filter || /([A-Z][a-zA-Z]*\/index|[A-Z][a-zA-Z]*)\.(jsx?|es6|react\.jsx?)$/;...
/* eslint-disable no-param-reassign, max-len */ // Validates and defaults the options function validateOptions(options) { // Default options to our preferred value options.dest = options.dest || 'carte-blanche'; // HACK: Webpack can embed this regex verbatim and the .? makes it not insert a comment terminator ...
Fix webpack regex embed comment termination
Fix webpack regex embed comment termination Webpack has no protection against inserting */ in the comments it writes when output.pathinfo is true
JavaScript
mit
pure-ui/styleguide,carteb/carte-blanche,pure-ui/styleguide,carteb/carte-blanche
c5b0ab7347530d091d98b9265402b76e5f684738
lib/main.js
lib/main.js
"use babel"; import _ from "lodash"; function isMappedToGrammer(grammar) { return (builder) => { console.log(builder); return _.includes(builder.grammars, grammar); }; } export default { activate() { this.commands = atom.commands.add("atom-workspace", { "gluon:build": () => { this.build(); },...
"use babel"; import _ from "lodash"; function isMappedToGrammer(grammar) { return (builder) => { console.log(builder); return _.includes(builder.grammars, grammar); }; } export default { activate() { this.commands = atom.commands.add("atom-workspace", { "gluon:build": () => { this.build(); },...
Tweak formatting, nesting, and ordering
:art: Tweak formatting, nesting, and ordering
JavaScript
mit
thomasjo/gluon
6187b6471d944d63636b837816dbcb1a2e9cec35
app.js
app.js
const express = require('express'); const app = express(); const server = require('http').createServer(app); const io = require('socket.io')(server); app.use('/public', express.static(__dirname + '/public')); let users = {}; app.get('/', (req, res) => { res.sendFile(__dirname + '/index.html'); }); io.on('connecti...
const express = require('express'); const app = express(); const server = require('http').createServer(app); const io = require('socket.io')(server); app.use('/public', express.static(__dirname + '/public')); let users = {}; app.get('/', (req, res) => { res.sendFile(__dirname + '/index.html'); }); io.on('connecti...
Check whether the user entered a name
Check whether the user entered a name
JavaScript
mit
kpace/basic_chat_server,kpace/basic_chat_server
d93c55ab4ee6976c143962da83507c9d3b0c7b6f
cli.js
cli.js
#!/usr/bin/env node // Copy over the index.html var fs = require("fs"); var path = require("path"); fs.createReadStream(path.join(__dirname, "index.html")) .pipe(fs.createWriteStream("index.html")); // Launch the server. require("./index.js");
#!/usr/bin/env node // Copy over the index.html var fs = require("fs"); var path = require("path"); var mkdirp = require("mkdirp"); fs.createReadStream(path.join(__dirname, "index.html")) .pipe(fs.createWriteStream("index.html")); mkdirp("example-viewer-dist", function (err) { fs.createReadStream(path.join(__dir...
Update CLI script to copy over css, bundle
Update CLI script to copy over css, bundle
JavaScript
mit
curran/example-viewer,curran/example-viewer
4681dd8fa864bc9ce60999c447e112f6065a5fa3
tests/protractor.conf.js
tests/protractor.conf.js
exports.config = { allScriptsTimeout: 11000, specs: [ 'e2e/*.js' ], capabilities: { 'browserName': 'chrome', 'chromeOptions': { 'args': ['load-extension=/Users/adamu/src/screensharing-extensions/chrome/ScreenSharing/', 'auto-select-desktop-capture-source="Entire screen"'] } }, ...
exports.config = { allScriptsTimeout: 11000, specs: [ 'e2e/*.js' ], capabilities: { 'browserName': 'chrome', 'chromeOptions': { 'args': ['load-extension=/Users/adamu/src/screensharing-extensions/chrome/ScreenSharing/', 'auto-select-desktop-capture-source="Entire screen"', 'use-fake-d...
Use fake devices for protractor test
Use fake devices for protractor test
JavaScript
mit
aullman/opentok-meet,opentok/opentok-meet,opentok/opentok-meet,opentok/opentok-meet,aullman/opentok-meet
a8770896c5afcc48f9732c652844ea03efd0b48c
src/config.js
src/config.js
module.exports = { sesRegion: 'us-east-1', sesEndpoint: process.env.SES_ENDPOINT, kinesisRegion: process.env.KINESIS_REGION || 'ap-southeast-2', kinesisEndpoint: process.env.KINESIS_ENDPOINT, accessKeyId: process.env.AWS_ACCESS_KEY_ID || 'FAKE', secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || 'FAKE', ...
module.exports = { sesRegion: process.env.SES_REGION || 'us-east-1', sesEndpoint: process.env.SES_ENDPOINT, kinesisRegion: process.env.KINESIS_REGION || 'ap-southeast-2', kinesisEndpoint: process.env.KINESIS_ENDPOINT, accessKeyId: process.env.AWS_ACCESS_KEY_ID || 'FAKE', secretAccessKey: process.env.AWS_SEC...
Allow the SES region to be overridden from the environment
Allow the SES region to be overridden from the environment
JavaScript
agpl-3.0
rabblerouser/mailer,rabblerouser/mailer
c9efca76015d56f374e11f8d61b9d39b47f1e56a
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var babel = require('gulp-babel'); require("babel-polyfill"); gulp.task('default', function () { return gulp.src('src/superagent-jsonp.js') .pipe(babel({ blacklist: ['strict'] })) .pipe(gulp.dest('dist')); });
var gulp = require('gulp'); var babel = require('gulp-babel'); require("babel-polyfill"); gulp.task('default', function () { return gulp.src('src/superagent-jsonp.js') .pipe(babel()) .pipe(gulp.dest('dist')); });
Remove unused babel 5 option
Remove unused babel 5 option
JavaScript
mit
lamp/superagent-jsonp
1cf4715e477e758d73fbf2943d3cc5605166fb6c
packages/vega-view/src/transforms/Mark.js
packages/vega-view/src/transforms/Mark.js
import {Transform} from 'vega-dataflow'; import {Item, GroupItem} from 'vega-scenegraph'; import {inherits} from 'vega-util'; /** * Bind scenegraph items to a scenegraph mark instance. * @constructor * @param {object} params - The parameters for this operator. * @param {object} params.markdef - The mark definition...
import {Transform} from 'vega-dataflow'; import {Item, GroupItem} from 'vega-scenegraph'; import {inherits} from 'vega-util'; /** * Bind scenegraph items to a scenegraph mark instance. * @constructor * @param {object} params - The parameters for this operator. * @param {object} params.markdef - The mark definition...
Annotate scenegraph group items with runtime context.
Annotate scenegraph group items with runtime context.
JavaScript
bsd-3-clause
vega/vega,vega/vega,vega/vega,lgrammel/vega,vega/vega
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
2f53902981e06ce3fc2eb70b9f8c2ff54d34d1a8
addon/utils/ember-data.js
addon/utils/ember-data.js
/* global requirejs */ function _hasEmberData() { let matchRegex = /^ember-data/i; return !!(Object.keys(requirejs.entries).find(e => !!e.match(matchRegex))); } /** @hide */ export const hasEmberData = _hasEmberData(); /** @hide */ export function isDsModel(m) { return m && typeof m.eachRelationship === 'f...
/* global requirejs */ function _hasEmberData() { let matchRegex1 = /^ember-data/i; let matchRegex2 = /^@ember-data/i; return !!(Object.keys(requirejs.entries).find(e => !!e.match(matchRegex2) || !!e.match(matchRegex1) )); } /** @hide */ export const hasEmberData = _hasEmberData(); /** @hide */ export fun...
Fix regex that checks if ember data is present to allow for difference in namespace
Fix regex that checks if ember data is present to allow for difference in namespace
JavaScript
mit
samselikoff/ember-cli-mirage,samselikoff/ember-cli-mirage,samselikoff/ember-cli-mirage,samselikoff/ember-cli-mirage
3d8d4d29b63b1dd8866e4434ab98351259fb119b
lib/andthen.js
lib/andthen.js
var async = require('async'); var AndThen = function(obj, ev) { var args, triggerCallbacks, callbacks = []; triggerCallbacks = function() { for(var i = 0; i < callbacks.length; ++i) { var callback = callbacks.splice(i)[0]; async.nextTick(function() { ...
var async = require('async'); var AndThen = function(obj, ev) { var args, triggerCallbacks, objCallback, callbacks = []; triggerCallbacks = function() { for(var i = 0; i < callbacks.length; ++i) { var callback = callbacks.splice(i)[0]; async.nex...
Add on method, and addCallback method with do as alias
Add on method, and addCallback method with do as alias
JavaScript
bsd-2-clause
1stvamp/dowhen.js
9982f93e29be38e58414fd3e4885e94b686d8b39
lib/connect.js
lib/connect.js
/* * stompit.connect * Copyright (c) 2013 Graham Daws <graham.daws@gmail.com> * MIT licensed */ var net = require('net'); var util = require('./util'); var Client = require('./client'); function connect(){ var args = net._normalizeConnectArgs(arguments); var options = util.extend({ ...
/* * stompit.connect * Copyright (c) 2013 Graham Daws <graham.daws@gmail.com> * MIT licensed */ var net = require('net'); var util = require('./util'); var Client = require('./client'); function connect(){ var args = net._normalizeConnectArgs(arguments); var options = util.extend({ ...
Check cb is a function before calling it
Check cb is a function before calling it
JavaScript
mit
gdaws/node-stomp