commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
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
--- +++ @@ -2,7 +2,7 @@ import classNames from 'classnames' const Emoji = (props) => { - const { alt, className, name = 'ello', size, src, title, width, height } = props + const { alt, className, name, size, src, title, width, height } = props const tip = name.replace(/_|-/, ' ') return ( <img @@ -30...
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
--- +++ @@ -12,6 +12,7 @@ import { host } from '../../config'; fetch.Promise = Promise; +Response.Promise = Promise; function localUrl(url) { if (url.startsWith('//')) {
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
--- +++ @@ -9,6 +9,6 @@ return; } - let log = Function.prototype.bind.call(console[type], console); + const log = Function.prototype.bind.call(console[type], console); log.apply(this, data); }
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
--- +++ @@ -1,10 +1,8 @@ -const REMOVE_FROM_ITINERARY = 'REMOVE_FROM_ITINERARY'; +export const REMOVE_FROM_ITINERARY = 'REMOVE_FROM_ITINERARY'; -const removeFromItinerary = payload => ( - { +export function removeFromItinerary(payload) { + return { type: REMOVE_FROM_ITINERARY, payload, - } -); - -expor...
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
--- +++ @@ -6,7 +6,30 @@ * http://github.com/nano-entertainment/NanoAudioPlayer */ (function($){ - $.fn.nanoAudioPlayer = function(){ + $.fn.nanoAudioPlayer = function( options ){ + var defaults = { + autoplay: false, + element: new Audio() + }; + + var opts = $.extend(defaults, options)...
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
--- +++ @@ -18,14 +18,14 @@ .trigger("change"); }, - destroy: function($el) { + destroy: function($el) { return $el.off(".pat-select-option"); - }, + }, _onChange: function() { var label = utils.findLabel(this); if (label!==nu...
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
--- +++ @@ -16,7 +16,7 @@ error: _stderr, warn: _stdout, info: _stdout, - debug: _stderr, + debug: _stdout, verbose: _stdout, silly: _stdout, blank: _stdout
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
--- +++ @@ -26,13 +26,12 @@ describe('Module Loading', () => { it('should load', () => { expect(myModule['default']).to.equal('myModuleWorks'); + }); + }); + + describe('Sinon Mocks and Spies', () => { + it('should mock lodash', () => { expect(_.camelCase).to.have.been.calledWith('myModu...
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
--- +++ @@ -1,4 +1,11 @@ module.exports = { + globals: { + "ts-jest": { + diagnostics: { + warnOnly: true + } + } + }, transform: { ".ts": "ts-jest" }, @@ -34,5 +41,5 @@ collectCoverageFrom: [ "src/**/*.{js,ts}", "!**/...
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
--- +++ @@ -5,16 +5,15 @@ function getAnnotation(pixel, color, height) { return { - "pos2": { + "fillColor": color, + "type": "rect", + "position": [{ + "y": "0px", + "x": pixel+2 + },{ "y": height+"px", "x": pixel-1 - }...
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
--- +++ @@ -8,6 +8,16 @@ var getOembed = require("../get-oembed"); +function includeOembed(item) { + if (item.oembed) { + return getOembed(item.oembed.root_url, item.oembed.item_url, 350).then((oembed) => { + return _.merge(item, { description: oembed.html }); + }); + } else { + ...
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
--- +++ @@ -8,11 +8,13 @@ setupFiles: ['./config/jest.setup.js'], testRegex: '(/__tests__/.*|(\\.|_|/)(test|spec))\\.(jsx?|tsx?)$', transform: { - '^.+\\.js$': 'babel-jest', + '^.+\\.jsx?$': 'babel-jest', '.(ts|tsx)': 'ts-jest' }, moduleFileExtensions: [ 'ts', - 'js' + 'tsx', + ...
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
--- +++ @@ -14,7 +14,7 @@ if (window.confirm('Do you want to allow ' + requester + ' to remote debug this tab?')) { // eslint-disable-line no-alert var evt = document.createEvent('CustomEvent') - evt.initCustomEvent('window.remoteDebug.getDebugSocket', true, true) + evt.initCustomEvent...
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
--- +++ @@ -20,7 +20,9 @@ { loader: 'sass-loader', options: { - includePaths: ['app/javascript'], + sassOptions: { + includePaths: ['app/javascript'], + }, implementation: require('sass'), sourceMap: true, },
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...
--- +++ @@ -23,7 +23,7 @@ require('./playback'); require('./interface'); -if (global.DEV_MODE) { +if (remote.getGlobal('DEV_MODE')) { require('electron-chromecast'); }
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
--- +++ @@ -11,6 +11,17 @@ } catch (e) { supports.localStorage = false; } + + // Detect inline SVG support + supports.inlineSVG = (function() { + const div = document.createElement('div'); + div.innerHTML = '<svg/>'; + return ( + typeof SVGRect != 'undefined' + && div.firstChild + ...
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
--- +++ @@ -2,9 +2,7 @@ * 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....
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
--- +++ @@ -3,6 +3,7 @@ module.exports = { browserSync: { + open: false, // Stop it from automatically stopping the browser server: { baseDir: dest },
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
--- +++ @@ -9,8 +9,13 @@ var prop; for (prop in object) { + console.log('Prop: ', prop); var mocked = getMockForProp(prop, object); mockObj[prop] = mocked; + } + + for (prop in object.prototype) { + mockObj.prototype[prop] = makeMockFunction(args, prop); } mockObj.prototype.reset = r...
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
--- +++ @@ -18,14 +18,20 @@ function listenForEvents() { var url = bbcServicesURL+"/stream", - es = new EventSource(url); + es = new EventSource(url), + firstError = true; logger.debug("Connecting to", url); es.onmessage = handleMessage; es.onerror = function() { ...
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
--- +++ @@ -1,5 +1,12 @@ 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({ dis...
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
--- +++ @@ -16,7 +16,9 @@ log.info('Cloning hexo-starter to', chalk.magenta(tildify(target))); - return spawn('git', ['clone', '--recursive ', GIT_REPO_URL, target]).catch(function() { + return spawn('git', ['clone', '--recursive', GIT_REPO_URL, target], { + verbose: true + }).catch(function() { log...
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
--- +++ @@ -1,7 +1,8 @@ -Sequelize = require('sequelize') -pg = require('pg').native; +var Sequelize = require('sequelize') +var pg = require('pg').native; +var config = require(__dirname+'/../../config/config.js'); -var databaseUrl = process.env.DATABASE_URL; +var databaseUrl = config.get('DATABASE_URL'); if (d...
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
--- +++ @@ -15,7 +15,7 @@ application.use(prefix, express.favicon()); application.use(prefix, express.bodyParser()); application.use(prefix, express.methodOverride()); - application.use(prefix, less({ src: path.join(topDirectory, 'public') })); + application.use(prefix, less(path.join(topDirector...
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
--- +++ @@ -16,7 +16,7 @@ let tracks = this.get('model.tracks').forEach((track) => { var index = indices[track.get('id')] +1; if (track.get('index') !== index) { - track.set('index',index+1); + track.set('index',index); track.save(); } });
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
--- +++ @@ -15,7 +15,7 @@ createEditor = ace.edit("editor"); createEditor.setTheme("ace/theme/github"); - createEditor.getSession().setMode("ace/mode/"); + createEditor.getSession().setMode("javascript/mode-resolve"); createEditor.getSession().on('change', removeAllVCMarkers); createEdit...
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
--- +++ @@ -11,13 +11,13 @@ static listeners() { return { 'click': 'toggleVideo' }; } - - async ready() { - let stream = await navigator.mediaDevices.getUserMedia({video: true, audio: false}); - this.$.camera.src = window.URL.createObjectURL(stream); - } - - toggleVideo() { + + async toggleVi...
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
--- +++ @@ -22,7 +22,24 @@ done(); } +function debug(logToConsole) { + return function(files, metalsmith, done) { + if (logToConsole) { + console.log('\nMETADATA:'); + console.log(metalsmith.metadata()); + + for (var f in files) { + console.log('\nFILE:'); + console.log(files[f]...
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
--- +++ @@ -4,6 +4,7 @@ module.exports = variationMatches; function variationMatches(variations, path) { + if (path.indexOf('node_modules')) return; var result; variations.some(function(variation) { return variation.chain.some(function(dir) {
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
--- +++ @@ -1,7 +1,7 @@ export const TABS = [ { name: 'latest', - urlName: 'siste', + urlName: 'enkeltaar', title: 'Enkeltår', chartKind: 'bar', year: 'latest'
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
--- +++ @@ -37,4 +37,13 @@ } }; +Room.methods.hasUser = function (id) { + for (var i = 0; i < this.members.length; i++) { + if (this.members[i].id.toString() == id.toString()) { + return true; + } + } + return false; +}; + module.exports = mongoose.model('Room', Room);
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
--- +++ @@ -3,35 +3,17 @@ 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 = name => { const relative = path.resolve(__dirname) return `${relative...
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
--- +++ @@ -36,7 +36,7 @@ } if (window.location.pathname !== url.split('?')[0]) { - window.location.href = url; + window.location.replace(url); } }); }
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...
--- +++ @@ -1,25 +1,25 @@ + +module.exports = adduser + var registry = require('./utils/registry') , ini = require("./utils/ini") , log = require("./utils/log") , base64 = require("./utils/base64") -var adduser = function (args, callback) { +function adduser (args, cb) { var username = args.shift() ...
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
--- +++ @@ -3,6 +3,7 @@ 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); @@ -13,13 +14,13 @@ api.register...
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
--- +++ @@ -10,6 +10,11 @@ const app = express(); const outputPath = webpackCommonConfig.paths.output; const outputServerPath = webpackCommonConfig.paths.outputServer; + +const serverRenderer = require(path.join(outputServerPath, 'prod.render.js')).default; +const clientStats = require(path.join(outputPath, 'stats...
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
--- +++ @@ -5,7 +5,7 @@ this.start = function(component) { - if (!ga) return; + if (!('ga' in window)) return; ga( 'send',
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
--- +++ @@ -25,5 +25,9 @@ it('Should show login buttton', function() { expect(element(by.buttonText('Log In')).isPresent()).toBe(true); }); - + + it('Should not display change avatar when not logged in', function() { + expect(element(by.binding(' Gravatar | i18n ')).isPresent()).toBe(false); + }); +...
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
--- +++ @@ -11,7 +11,7 @@ }, getUnreadNotications({ token }){ - return this.getNotifications({ token }) + return api.getNotifications({ token }) .then(response) => response.data.notifications.filter(isUnreadNotification)) }, }
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
--- +++ @@ -9,6 +9,6 @@ res.render('index', { title: 'JS Box', libraryUrls: helpers.getLibraryUrls(), - scriptUrl: req.param('scriptUrl') + scriptUrl: req.query.scriptUrl }); };
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
--- +++ @@ -1,19 +1,23 @@ class MockEntryPlugin { /** - * Apply the plugin. + * 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...
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
--- +++ @@ -22,7 +22,7 @@ bindXHRToButton : function(xhr, el, newtext, disable) { // binding of an ajax to a click is something we do manually var $el = $(el); - var oldtext = $el[0].innerHTML; + var oldtext = $el[0] ? $el[0].innerHTML : ''; if(newtext) { $el[0].innerHTM...
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
--- +++ @@ -8,7 +8,7 @@ var path = require('path') var glob = [ - '**/*.{css,styl,js,jsx,coffee,jade}', + '**/*.{css,styl,scss,js,jsx,coffee,jade}', '!' + config.dist_folder + '/**/*' ] @@ -25,6 +25,7 @@ switch(ext) { case '.css': case '.styl': + case '.scss': return gulp.s...
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...
--- +++ @@ -10,7 +10,7 @@ 'bower_components/jquery/dist/jquery.min.js', 'bower_components/bootstrap-sass-official/assets/javascripts/bootstrap.js', 'bower_components/chartjs/Chart.min.js', - 'bower_components/rivets/dist/riverts.bundle.js', + 'bower_components/rivets/dist/rivets.bu...
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
--- +++ @@ -3,7 +3,6 @@ */ const ReportColors = [ '#FFB067', // Orange - '#104210', // Forest green '#FF7077', // Coral '#ACEEF3', // Cyan '#FF4500', // Red orange
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
--- +++ @@ -15,7 +15,7 @@ description: { type: 'string', optional: true }, code: { type: 'string', optional: true }, level: { type: 'double', default: 0 }, - isActive: { type: 'string', default: false }, + isActive: { type: 'bool', default: false }, }, };
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
--- +++ @@ -22,6 +22,7 @@ //children this.overlay = null; + this.preloader = null; if (element !== null) { this.init(); @@ -53,4 +54,9 @@ this.overlay = new Overlay(this.element); }; +QueryLoader.prototype.createPreloader = function () { + 'use strict'; + this.preloader = ...
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
--- +++ @@ -1,3 +1,4 @@ +import * as ts from 'typescript' import * as tt from 'typescript-definition-tester' describe('TypeScript definitions', function () { @@ -5,7 +6,9 @@ tt.compileDirectory( __dirname + '/typescript', fileName => fileName.match(/\.ts$/), - () => done() + // This m...
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
--- +++ @@ -6,8 +6,8 @@ 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'] = deliveryInfo.contentType; ...
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
--- +++ @@ -40,6 +40,7 @@ }; router.serveSwagger = function (path = "/swagger.json") { router.get(path, (req, res) => res.status(200).send(router.swagger)); + return router; }; return router; }
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
--- +++ @@ -13,10 +13,10 @@ replacements: { // applied to input string before split to Artist/Title preSplit: [ - // remove non-digits follwed by digits - /[\D]+[\d]+/i, - // remove digits between non-word characters - /\W*\d+\W*/i, + // at least 2 word chars followed by at least...
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...
--- +++ @@ -3,11 +3,3 @@ 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 -});
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
--- +++ @@ -1,23 +1,16 @@ -(function(angular) { +(function (angular) { 'use strict'; - var SignalRService = function ($window, url) { - this.jQuery = $window.jQuery; - this._url = url; + var SignalRService = function (jQuery) { + this.jQuery = jQuery; }; SignalRService.prot...
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,...
--- +++ @@ -1,8 +1,9 @@ -import {get} from 'utils/ajax' +// 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 = ...
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
--- +++ @@ -1,18 +1,31 @@ -var xmlHttp = new XMLHttpRequest(); -xmlHttp.onreadystatechange = function() { + +var totalDownloads = 145579; // pre-GitHub download total + +var handleApiResponse = function() { if (xmlHttp.readyState === 4) { var releasesData = JSON.parse(xmlHttp.responseText); - var totalDo...
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
--- +++ @@ -23,8 +23,8 @@ contexts: ['all'] }); }); +} - chrome.contextMenus.onClicked.addListener(({ menuItemId }) => { - openDevToolsWindow(menuItemId); - }); -} +chrome.contextMenus.onClicked.addListener(({ menuItemId }) => { + openDevToolsWindow(menuItemId); +});
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
--- +++ @@ -1,5 +1,5 @@ -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, ...
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
--- +++ @@ -1,3 +1,5 @@ -jQuery(function() { - jQuery('body').hide().show(); -}); +jQuery(function($) { + if (/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())) { + $('body').css('opacity', '1.0') + } +})
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
--- +++ @@ -16,15 +16,6 @@ background: transparent; box-shadow: none; } -.📖-logo { - width: 32px; - height: 32px; - background: url(http://evanbrooks.info/bindery/assets/logo.svg) no-repeat; - background-size: contain; - vertical-align: middle; - margin-right: 0.8rem; - display: inline-block; -} `; ...
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
--- +++ @@ -10,7 +10,7 @@ this.trigger('navigate:after', args, name); } - getQueryString() { + getQueryString(name) { const location = window.location; let query = '';
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
--- +++ @@ -1,7 +1,9 @@ import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; -import { find, fillIn } from 'ember-native-dom-helpers'; -import { skip } from 'qunit'; +import { find } from 'ember-native-dom-helpers'; +import MediumEditor from 'medium-editor'; + +const...
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
--- +++ @@ -34,5 +34,7 @@ "closed", ]) +export const votes = PropTypes.arrayOf(PropTypes.object) + export const ideas = PropTypes.arrayOf(idea)
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
--- +++ @@ -4,17 +4,13 @@ async function checkDeliveryService () { const config = configuration.get() - const { deliveryServiceURL, bot } = config + const { deliveryServiceURL } = config if (!deliveryServiceURL) { return } const url = new URL(deliveryServiceURL) const { hostname, port } = url...
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
--- +++ @@ -5,12 +5,14 @@ window.dogList.snapshotUrl = '${SNAPSHOTURL}'; window.dogList.previewfileKey = '${PREVIEWKEY}'; window.dogList.renderSnapshotThumbnail = function(data, type, row, meta) { - var html = '<div class=\"row\">'; + var html = ''; + var colLength = 12 / $(data).length; $.each(da...
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
--- +++ @@ -1,4 +1,22 @@ -var get = Ember.get; +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(...
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
--- +++ @@ -1,8 +1,10 @@ /* global requirejs */ function _hasEmberData() { - let matchRegex = /^ember-data/i; - return !!(Object.keys(requirejs.entries).find(e => !!e.match(matchRegex))); + let matchRegex1 = /^ember-data/i; + let matchRegex2 = /^@ember-data/i; + + return !!(Object.keys(requirejs.entries).fin...
a2d4b2c426fdb294f17f9ad7b357cbb63c1beb27
models/location_model.js
models/location_model.js
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var LocationSchema = new Schema({ name: String, city: String, address: String, img: String, description: String, email: String, sage_uid: String, sage_product_id: String, sage_taxtype_id: String, sage_message: String, datatill_gro...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var LocationSchema = new Schema({ name: String, city: String, address: String, img: String, description: String, email: String, sage_uid: String, sage_product_id: String, sage_taxtype_id: String, sage_message: String, datatill_gro...
Rename location email_header to email_template
Rename location email_header to email_template
JavaScript
mit
10layer/jexpress,10layer/jexpress
--- +++ @@ -18,7 +18,7 @@ community_manager_name: String, community_manager_email: String, community_manager_tel: String, - mail_header: String, + mail_template: String, _deleted: { type: Boolean, default: false, index: true }, });
bf9c652ca37b77d5e3bc8db252b5d37cded3d4cb
lib/Listing.js
lib/Listing.js
'use strict'; const _path = require('path'); class Listing { /** * Create path listing * @param path {string} Filepath */ constructor({path}){ let stat = _path.parse(path); /** * @type {string} */ this._name = stat.name; /** * @type {string} */ this._base = stat...
'use strict'; const _path = require('path'); class Listing { /** * Create path listing * @param path {string} Filepath */ constructor({path}){ let stat = _path.parse(path); /** * @type {string} */ this._name = stat.name; /** * @type {string} */ this._base = stat...
Use getter method for listing path
Use getter method for listing path
JavaScript
mit
Sieabah/namespacer-js
--- +++ @@ -50,7 +50,7 @@ * @return {*|Object} */ require(){ - return require(this._path); + return require(this.path()); } }
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
--- +++ @@ -3,6 +3,7 @@ var AndThen = function(obj, ev) { var args, triggerCallbacks, + objCallback, callbacks = []; triggerCallbacks = function() { @@ -15,12 +16,20 @@ } }; - obj.on(ev, function() { - args = arguments; - triggerCallbacks(); - ...
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
--- +++ @@ -37,7 +37,9 @@ var onError = function(error){ cleanup(); - cb(error); + if(typeof cb === "function"){ + cb(error); + } }; var onConnected = function(){
aa15181c91499d063194767f4d9d097e34951c7d
lib/runner/matcher.js
lib/runner/matcher.js
module.exports = { /** * @param {string} testFilePath - file path of a test * @param {array} tags - tags to match * @returns {boolean} true if specified test matches given tag */ tags: function (testFilePath, tags) { try { test = require(testFilePath); } catch (e) { // could not loa...
module.exports = { /** * @param {string} testFilePath - file path of a test * @param {array} tags - tags to match * @returns {boolean} true if specified test matches given tag */ tags: function (testFilePath, tags) { var test; try { test = require(testFilePath); } catch (e) { //...
Fix jsdoc error due to undeclared variable
Fix jsdoc error due to undeclared variable
JavaScript
mit
lukaszw82/nightwatch,mbixby/nightwatch,campbellwmorgan/nightwatch,LucioFranco/nightwatch,ervinb/nightwatch,sethmcl/nightwatch,CoderK/nightwatch,JonDum/nightwatch,obulisaravanan/nightwatch,Crunch-io/nightwatch,sknopf/nightwatch,vuthelinh/nightwatch,campbellwmorgan/nightwatch,awatson1978/nightwatch,beatfactor/nightwatch,...
--- +++ @@ -5,6 +5,7 @@ * @returns {boolean} true if specified test matches given tag */ tags: function (testFilePath, tags) { + var test; try { test = require(testFilePath);
56facbb756f2a0c5d3a3346d252f5b46a0a82087
seeds/radios.js
seeds/radios.js
var util = require('../src/util/seeds'); exports.seed = function(knex, Promise) { const cities = {}; return knex('cities').select('*') .then(rows => { rows.forEach(city => { cities[city.name] = city.id; }); }) .then(() => util.insertOrUpdate(knex, 'radios', { id: 1, name: 'Rakkauden W...
var util = require('../src/util/seeds'); exports.seed = function(knex, Promise) { const cities = {}; return knex('cities').select('*') .then(rows => { rows.forEach(city => { cities[city.name] = city.id; }); }) .then(() => util.insertOrUpdate(knex, 'radios', { id: 1, name: 'Rakkauden W...
Add stream uri for wappuradio
Add stream uri for wappuradio
JavaScript
mit
futurice/wappuapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,kaupunki-apina/prahapp-backend
--- +++ @@ -14,7 +14,7 @@ id: 1, name: 'Rakkauden Wappuradio', city_id: cities['Tampere'], - stream: null, // TODO + stream: 'http://stream.wappuradio.fi/wappuradio.mp3', website: 'https://wappuradio.fi/', })) .then(() => util.insertOrUpdate(knex, 'radios', {
596378aaaf7b49ee70f3b2adccc7c493cf181bb6
code/js/controllers/AmazonController.js
code/js/controllers/AmazonController.js
;(function() { "use strict"; require("BaseController").init({ siteName: "Amazon Music", playPause: "[playeraction=togglePlay]", playNext: "[playeraction=next]", playPrev: "[playeraction=previous]", mute: "#volumeIcon", playState: "#mp3Player .playing", song: "#nowPlayingSection .title"...
;(function() { "use strict"; var controller = require("BaseController"); controller.init({ siteName: "Amazon Music", playPause: "[playeraction=togglePlay]", playNext: "[playeraction=next]", playPrev: "[playeraction=previous]", mute: "#volumeIcon", like: "#thumbsUp > span", dislike: "#...
Fix Amazon and add Like/Dislike
Fix Amazon and add Like/Dislike
JavaScript
mit
berrberr/streamkeys,alexesprit/streamkeys,nemchik/streamkeys,ovcharik/streamkeys,alexesprit/streamkeys,ovcharik/streamkeys,berrberr/streamkeys,nemchik/streamkeys,berrberr/streamkeys,nemchik/streamkeys
--- +++ @@ -1,14 +1,38 @@ ;(function() { "use strict"; - require("BaseController").init({ + var controller = require("BaseController"); + controller.init({ siteName: "Amazon Music", playPause: "[playeraction=togglePlay]", playNext: "[playeraction=next]", playPrev: "[playeraction=previous]...
1aeb2fd9aa51e2c81b766ae0b616bc302c30f8f7
web_external/Legal/TermsAcceptanceView.js
web_external/Legal/TermsAcceptanceView.js
isic.views.TermsAcceptanceView = isic.View.extend({ events: { 'click #isic-terms-accept': function (event) { if (girder.currentUser) { girder.currentUser.setAcceptTerms(function () { // Refresh page Backbone.history.loadUrl(); ...
isic.views.TermsAcceptanceView = isic.View.extend({ events: { 'click #isic-terms-accept': function (event) { // Disable buttons while request is pending var buttons = this.$('.isic-terms-agreement-button-container button'); buttons.prop('disabled', true); if ...
Disable buttons while request is pending
Disable buttons while request is pending
JavaScript
apache-2.0
ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive
--- +++ @@ -1,12 +1,15 @@ isic.views.TermsAcceptanceView = isic.View.extend({ events: { 'click #isic-terms-accept': function (event) { + // Disable buttons while request is pending + var buttons = this.$('.isic-terms-agreement-button-container button'); + buttons.prop('...
52c3ea24d58172457f8a529ee8ef666fa1957b4a
src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatecontent/nodename/nodename.controller.js
src/Umbraco.Web.UI.Client/src/views/common/tours/umbintrocreatecontent/nodename/nodename.controller.js
(function () { "use strict"; function NodeNameController($scope) { var vm = this; var element = angular.element($scope.model.currentStep.element); vm.error = false; vm.initNextStep = initNextStep; function initNextStep() { if(element.val()...
(function () { "use strict"; function NodeNameController($scope) { var vm = this; var element = angular.element($scope.model.currentStep.element); vm.error = false; vm.initNextStep = initNextStep; function initNextStep() { if(element.val()...
Update validation in Create Content tour
Update validation in Create Content tour
JavaScript
mit
nul800sebastiaan/Umbraco-CMS,robertjf/Umbraco-CMS,arknu/Umbraco-CMS,leekelleher/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,dawoe/Umbraco-CMS,KevinJump/Umbraco-CMS,PeteDuncanson/Umbraco-CMS,rasmuseeg/Umbraco-CMS,robertjf/Umbraco-CMS,abjerner/Umbraco-CMS,tompipe/Umbraco-CMS,madsoulswe/Umbraco-CMS,abjerner/Umbraco-CMS,WebC...
--- +++ @@ -11,7 +11,7 @@ vm.initNextStep = initNextStep; function initNextStep() { - if(element.val().lowerCase() === 'Home') { + if(element.val().toLowerCase() === 'home') { $scope.model.nextStep(); } else { vm.error = true;
2e091bb930f8c1ecc686b97396e40187cabe154f
app/components/PopOver.js
app/components/PopOver.js
import React from 'react'; import * as styles from './PopOver.scss'; const PopOver = ({ next, active, first, last, previous, xPos, yPos, children }) => { if (!active) { return null; } const text = last ? 'End' : 'Next'; return ( <div className={styles.modal} style={{ top: yPos, left: xPos }}> <di...
import React from 'react'; import * as styles from './PopOver.scss'; const PopOver = ({ order, text, xPos, yPos, totalLength, tutorialActive, currentlyDisplayedTutorial, viewNext, viewPrevious, closeTutorial }) => { const first = order === 1; const last = order === totalLength; const active =...
Connect popover to redux store
Connect popover to redux store
JavaScript
mit
ivtpz/brancher,ivtpz/brancher
--- +++ @@ -1,22 +1,34 @@ import React from 'react'; import * as styles from './PopOver.scss'; -const PopOver = ({ next, active, first, last, previous, xPos, yPos, children }) => { +const PopOver = ({ + order, + text, + xPos, + yPos, + totalLength, + tutorialActive, + currentlyDisplayedTutorial, + viewNex...
0d8c8f38187532446c3ae38d0ea88ac02d109201
website/app/application/services/events.js
website/app/application/services/events.js
Application.Services.factory('Events', ['$filter', EventsService]); function EventsService($filter) { var service = { date: '', addConvertedTime: function (project) { project.reviews = service.update(project.open_reviews); project.samples = service.update(project.samples);...
Application.Services.factory('Events', ['$filter', EventsService]); function EventsService($filter) { var service = { date: '', addConvertedTime: function (project) { project.reviews = service.update(project.open_reviews); project.samples = service.update(project.samples);...
Fix method to always return a value.
Fix method to always return a value.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
--- +++ @@ -32,9 +32,8 @@ d.setUTCSeconds(value.mtime.epoch_time); calendar_event.push({title: value.title, start: d}); }); - return calendar_event; } - + return calendar_event; }, updateDate: functio...
5e6d76b5a7bf1c811071024ec5789f625c412b6d
plugins/browserify.js
plugins/browserify.js
'use strict' const Stream = require('stream') const Base = require('./base') let Browserify let Babelify class PluginBrowserify extends Base { constructor() { super() this.registerTag(['Compiler-Browserify'], function(name, value, options) { options.Browserify = value === 'true' }) } compile(c...
'use strict' const Path = require('path') const Stream = require('stream') const Base = require('./base') let Browserify let Babelify class PluginBrowserify extends Base { constructor() { super() this.registerTag(['Compiler-Browserify'], function(name, value, options) { options.Browserify = value === ...
Fix resolution of babel helper module Also Make the ES6 imports refreshable
:bug: Fix resolution of babel helper module Also Make the ES6 imports refreshable
JavaScript
mit
steelbrain/UCompiler
--- +++ @@ -1,5 +1,6 @@ 'use strict' +const Path = require('path') const Stream = require('stream') const Base = require('./base') let Browserify @@ -26,6 +27,7 @@ debug: options.SourceMap, fullPaths: false, filename: options.internal.file.path, + paths: [Path.join(__dirname, '...
0335bb8d41342818e2b4020e3231b5aa500ce17d
src/main/resources/legacyUrlModule.js
src/main/resources/legacyUrlModule.js
/* * Copyright (C) 2015 Glyptodon LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publi...
/* * Copyright (C) 2015 Glyptodon LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publi...
Add required "navigation" module dependency (for ClientIdentifier).
Add required "navigation" module dependency (for ClientIdentifier).
JavaScript
mit
mike-jumper/guacamole-legacy-urls
--- +++ @@ -25,7 +25,8 @@ * legacy-style client URLs (the format used in 0.9.7 and older). */ angular.module('legacyUrl', [ - 'auth' + 'auth', + 'navigation' ]); // Include legacyUrl module in index module dependencies, such that the
74a1f655b6eb6b754a9e9f465f4abe26f7c324b9
app/assets/javascripts/components/post-comment.js
app/assets/javascripts/components/post-comment.js
Hummingbird.PostCommentComponent = Ember.Component.extend({ classNames: ["status-update-panel"], didInsertElement: function() { this.$(".status-form").focus(function() { self.$(".status-form").autosize({append: "\n"}); self.$(".panel-footer").slideDown(200); }); this.$(".status-form").blur(...
Hummingbird.PostCommentComponent = Ember.Component.extend({ classNames: ["status-update-panel"], didInsertElement: function() { var self = this; this.$(".status-form").focus(function() { self.$(".status-form").autosize({append: "\n"}); self.$(".panel-footer").slideDown(200); }); this.$(...
Bring back the post button.
Bring back the post button.
JavaScript
apache-2.0
paladique/hummingbird,xhocquet/hummingbird,hummingbird-me/hummingbird,sidaga/hummingbird,jcoady9/hummingbird,xhocquet/hummingbird,xhocquet/hummingbird,jcoady9/hummingbird,Snitzle/hummingbird,NuckChorris/hummingbird,NuckChorris/hummingbird,xhocquet/hummingbird,jcoady9/hummingbird,astraldragon/hummingbird,saintsantos/hum...
--- +++ @@ -2,6 +2,7 @@ classNames: ["status-update-panel"], didInsertElement: function() { + var self = this; this.$(".status-form").focus(function() { self.$(".status-form").autosize({append: "\n"}); self.$(".panel-footer").slideDown(200);
d37362f99165ff3515642f42317b8af200443b24
app/extensions/brave/content/scripts/navigator.js
app/extensions/brave/content/scripts/navigator.js
// disable experimental navigator.credentials chrome.webFrame.setGlobal("navigator.credentials.get", function () { return new Promise((resolve, reject) => { resolve(false) }) }) chrome.webFrame.setGlobal("navigator.credentials.store", function () { return new Promise((resolve, reject) => { resolve(false) }) }) //...
// disable experimental navigator.credentials chrome.webFrame.setGlobal("navigator.credentials.get", function () { return new Promise((resolve, reject) => { resolve(false) }) }) chrome.webFrame.setGlobal("navigator.credentials.store", function () { return new Promise((resolve, reject) => { resolve(false) }) }) //...
Revert "don’t return an error for `setGlobal` because it will break some scripts and is also a fingerprinting risk"
Revert "don’t return an error for `setGlobal` because it will break some scripts and is also a fingerprinting risk" This reverts commit 56a96a9d4a3c413235a98a2569294e1739122f40.
JavaScript
mpl-2.0
luixxiul/browser-laptop,timborden/browser-laptop,darkdh/browser-laptop,diasdavid/browser-laptop,timborden/browser-laptop,darkdh/browser-laptop,timborden/browser-laptop,timborden/browser-laptop,darkdh/browser-laptop,luixxiul/browser-laptop,luixxiul/browser-laptop,diasdavid/browser-laptop,diasdavid/browser-laptop,darkdh/...
--- +++ @@ -9,9 +9,7 @@ // disable battery status API chrome.webFrame.setGlobal("navigator.getBattery", function () { - return new Promise((resolve, reject) => { - resolve({ charging: false, chargingTime: Infinity, dischargingTime: Infinity, level: 1, onchargingchange: null, onchargingtimechange: null, ondisc...
9ddc3dacd9452d3ddffa6b75f58932cebd2a9e1c
src/bootstrap/package-json.js
src/bootstrap/package-json.js
import { join } from 'path' import json from '../util/json' const saguiScripts = { 'start': 'npm run develop', 'test': 'NODE_ENV=test sagui test', 'test-watch': 'NODE_ENV=test sagui test --watch', 'develop': 'sagui develop', 'build': 'sagui build', 'dist': 'NODE_ENV=production sagui dist' } export default...
import { join } from 'path' import json from '../util/json' const saguiScripts = { 'start': 'npm run develop', 'test': 'NODE_ENV=test karma start', 'test:watch': 'npm test -- --no-single-run --auto-watch', 'develop': 'webpack-dev-server --port 3000 --host 0.0.0.0', 'build': 'webpack', 'dist': 'NODE_ENV=pro...
Update bootstrapped package.json to use Webpack and Karma CLIs
Update bootstrapped package.json to use Webpack and Karma CLIs
JavaScript
mit
saguijs/sagui,saguijs/sagui
--- +++ @@ -3,11 +3,11 @@ const saguiScripts = { 'start': 'npm run develop', - 'test': 'NODE_ENV=test sagui test', - 'test-watch': 'NODE_ENV=test sagui test --watch', - 'develop': 'sagui develop', - 'build': 'sagui build', - 'dist': 'NODE_ENV=production sagui dist' + 'test': 'NODE_ENV=test karma start', +...
0f0cb0d374ac28fa35a15f165065f25d5f5ea5ce
frontend/src/components/watchlist/user.directive.js
frontend/src/components/watchlist/user.directive.js
angular .module('crosswatch') .directive('user', user); function user() { var directive = { link: link, scope: true, template: '<a stop-event dir="auto" href="{{::event.projecturl}}/wiki/User:{{::user | urlEncode}}" target="_blank">{{::user}}</a> ' + '<span dir="auto" ng-if="event.showDiff">' + ...
angular .module('crosswatch') .directive('user', user); function user() { var directive = { link: link, scope: true, template: '<a stop-event dir="auto" href="{{::event.projecturl}}/wiki/User:{{::user | urlEncode}}" target="_blank">{{::user}}</a> ' + '<span dir="auto" ng-if="event.showDiff">' + ...
Fix link to user page and contribs
Fix link to user page and contribs Bug: T107681 Change-Id: I59d749afe282c7b06a0f9a5a391a72a8bd29fb19
JavaScript
isc
wikimedia/labs-tools-crosswatch,wikimedia/labs-tools-crosswatch,wikimedia/labs-tools-crosswatch,wikimedia/labs-tools-crosswatch
--- +++ @@ -20,5 +20,8 @@ } else { scope.user = scope.event.user; } + + var split = scope.user.split(':'); + scope.user = split[split.length - 1] } }
e87629683bbb798611f28e5db45857a7dde5fa7d
pagination/index.js
pagination/index.js
module.exports = Pagination; function Pagination() {} Pagination.prototype.view = __dirname + '/views'; Pagination.prototype.style = __dirname + '/styles'; Pagination.prototype.name = 'pagination'; Pagination.prototype.components = []; require('./operations'); require('./actions'); require('./viewhelpers'); Paginat...
var _ = require('lodash'); module.exports = Pagination; function Pagination() {} Pagination.prototype.view = __dirname + '/views'; Pagination.prototype.style = __dirname + '/styles'; Pagination.prototype.name = 'pagination'; Pagination.prototype.components = []; require('./operations'); require('./actions'); requir...
Add support for end attribute within pagination component
Add support for end attribute within pagination component
JavaScript
mit
BBWeb/d-md-components,BBWeb/d-md-components
--- +++ @@ -1,3 +1,5 @@ +var _ = require('lodash'); + module.exports = Pagination; function Pagination() {} @@ -12,5 +14,16 @@ require('./viewhelpers'); Pagination.prototype.init = function(model) { + if(typeof model.get('end') !== 'undefined') this.initPages(); + model.start('visibleNumbers', 'activePage...
a4542201252d4f90f0bc992737e91a1a1c4c87b7
truffle.js
truffle.js
module.exports = { build: "npm start", networks: { development: { host: "localhost", port: 8545, network_id: "*" }, testnet: { host: "localhost", port: 8545, network_id: 3 }, mainnet: { host: "localhost", port: 8545, network_id: 1 } } }...
module.exports = { build: "npm start", networks: { development: { host: "localhost", port: 8545, network_id: "*" }, testnet: { host: "localhost", port: 8545, network_id: 3 }, mainnet: { host: "localhost", port: 8545, network_id: 1, gas:...
Add gas and deploy account
Add gas and deploy account
JavaScript
mit
makoto/blockparty,makoto/blockparty
--- +++ @@ -14,7 +14,9 @@ mainnet: { host: "localhost", port: 8545, - network_id: 1 + network_id: 1, + gas: 1990000, + from: '0xFa6F2D7cC987d592556ac07392b9d6395bfcc379' } } };
ae25cd63f650edd6c6c3aca12172253b1be17b11
src/App.test.js
src/App.test.js
import React from 'react' import ReactDOM from 'react-dom' import ReactTestUtils from 'react-dom/test-utils' import renderer from 'react-test-renderer' import { App } from './App' it('smoke test', () => { const div = document.createElement('div') ReactDOM.render(<App />, div) }) it('snapshot test', () => { con...
import React from 'react' import ReactDOM from 'react-dom' import ReactTestUtils from 'react-dom/test-utils' import renderer from 'react-test-renderer' import { App } from './App' it('smoke test', () => { const div = document.createElement('div') ReactDOM.render(<App />, div) }) it('snapshot test', () => { con...
Use const in place of let
Use const in place of let
JavaScript
mit
joelgeorgev/react-checkbox-tree,joelgeorgev/react-checkbox-tree
--- +++ @@ -18,10 +18,10 @@ }) it('state change test', () => { - let app = ReactTestUtils.renderIntoDocument(<App />) + const app = ReactTestUtils.renderIntoDocument(<App />) // Get first node with childKeys - let inputElement = ReactTestUtils.scryRenderedDOMComponentsWithTag(app, 'input')[2] + const inp...
26e95b1a4f42056ab7abfec2db00bb43b43d0dff
app/components/Views/Home.js
app/components/Views/Home.js
/** * Poster v0.1.0 * A React webapp to list upcoming movies and maintain a watchlist, powered by TMDb * * Author: Kushal Pandya <kushalspandya@gmail.com> (https://doublslash.com) * Date: 01 June, 2016 * License: MIT * * React App Main Layout Component */ import React from "react"; import Header from "./Head...
/** * Poster v0.1.0 * A React webapp to list upcoming movies and maintain a watchlist, powered by TMDb * * Author: Kushal Pandya <kushalspandya@gmail.com> (https://doublslash.com) * Date: 01 June, 2016 * License: MIT * * React App Main Layout Component */ import React from "react"; import { connect } from "re...
Handle search action using redux.
Handle search action using redux. - Pass search status & results as props to SearchResults when routed. - Call Search action using handleSearch.
JavaScript
mit
kushalpandya/poster,kushalpandya/poster
--- +++ @@ -10,27 +10,82 @@ */ import React from "react"; +import { connect } from "react-redux"; + +import { PosterAction, loadSearch } from "../../actions/poster"; import Header from "./Header/Header"; import Jumbotron from "./Section/Jumbotron"; import Footer from "./Footer/Footer"; -export default cl...
24177bf265b61dc63f0a878735cd0bda352ea59c
src/webcfullscreen.js
src/webcfullscreen.js
(function() { function startup() { var navigatorToolbox = document.getElementById("navigator-toolbox"); navigatorToolbox.iconsize = "small"; navigatorToolbox.setAttribute("iconsize", "small"); var reloadButton = document.getElementById("reload-button"); reloadButton.style.visibility = "visible"; var stopBu...
(function() { function startup() { window.removeEventListener("load", startup, false); var navigatorToolbox = document.getElementById("navigator-toolbox"); navigatorToolbox.iconsize = "small"; navigatorToolbox.setAttribute("iconsize", "small"); var reloadButton = document.getElementById("reload-button"); r...
Allow for switching of tabs automatically
Allow for switching of tabs automatically
JavaScript
mit
Webconverger/webconverger-addon,techlib/kiosek,Webconverger/webconverger-addon
--- +++ @@ -1,5 +1,6 @@ (function() { function startup() { + window.removeEventListener("load", startup, false); var navigatorToolbox = document.getElementById("navigator-toolbox"); navigatorToolbox.iconsize = "small"; navigatorToolbox.setAttribute("iconsize", "small"); @@ -7,7 +8,26 @@ reloadButton.s...
003f43568e574504466df1a869945da5a645ae02
www/sms.js
www/sms.js
var sms = { send: function(phone, message, method, successCallback, failureCallback) { phone = sms.convertPhoneToArray(phone); cordova.exec( successCallback, failureCallback, 'Sms', 'send', [phone, message, method] ); }, convertPhoneToArray: function(phone) { if(typ...
var sms = { send: function(phone, message, method, success, failure) { phone = sms.convertPhoneToArray(phone); cordova.exec( success, failure, 'Sms', 'send', [phone, message, method] ); }, convertPhoneToArray: function(phone) { if(typeof phone === 'string' && phone....
Change callback names in the js
Change callback names in the js
JavaScript
mit
Telerik-Verified-Plugins/SMS,aharris88/phonegap-sms-plugin,DynamoMTL/cordova-sms-plugin,DispatchMe/cordova-sms-plugin,DynamoMTL/cordova-sms-plugin,blocktrail/cordova-sms-plugin,cordova-sms/cordova-sms-plugin,vkeepe/cordova-sms-plugin,cordova-sms/cordova-sms-plugin,kentmw/cordova-sms-plugin,pyxweb/cordova-plugin-mms,Dis...
--- +++ @@ -1,10 +1,10 @@ var sms = { - send: function(phone, message, method, successCallback, failureCallback) { + send: function(phone, message, method, success, failure) { phone = sms.convertPhoneToArray(phone); cordova.exec( - successCallback, - failureCallback, + success, + fa...
33e61d6ef87571e9a3c4964568f677269f3937f8
models/Game.js
models/Game.js
const mongoose = require('mongoose') mongoose.Promise = global.Promise const slug = require('slugs') const gameSchema = new mongoose.Schema({ title: { type: String, trim: true, required: 'Please specify a title' }, slug: String, description: String, release: { type: Date, required: 'Pleas...
const mongoose = require('mongoose') mongoose.Promise = global.Promise const slug = require('slugs') const gameSchema = new mongoose.Schema({ title: { type: String, trim: true, required: 'Please specify a title' }, slug: String, description: String, release: { type: Date, required: 'Pleas...
Fix small bug with slugs
Fix small bug with slugs
JavaScript
mit
vgdates/backend,vgdates/backend
--- +++ @@ -25,7 +25,7 @@ if (!this.isModified('title')) { return next() } - this.slug = slug(this.name) + this.slug = slug(this.title) next() })
be9ba9442824222e01c30134507c17090cb1e364
webpack.config.js
webpack.config.js
const webpack = require('webpack') const PACKAGE = require('./package.json') const TerserPlugin = require('terser-webpack-plugin') module.exports = { entry: { list: './src/index.js', 'list.min': './src/index.js', }, output: { path: __dirname + '/dist', filename: '[name].js', library: 'List', ...
const webpack = require('webpack') const PACKAGE = require('./package.json') const TerserPlugin = require('terser-webpack-plugin') module.exports = { entry: { list: './src/index.js', 'list.min': './src/index.js', }, output: { path: __dirname + '/dist', filename: '[name].js', library: 'List', ...
Remove banner plugin since it don't work with new release strategy
Remove banner plugin since it don't work with new release strategy
JavaScript
mit
javve/list.js,javve/list.js
--- +++ @@ -30,20 +30,7 @@ devServer: { inline: true, }, - plugins: [ - new webpack.BannerPlugin({ - banner: - 'List.js v' + - PACKAGE.version + - ' (' + - PACKAGE.homepage + - ') by ' + - PACKAGE.author.name + - ' (' + - PACKAGE.author.url +...
f7e8c7a747c133a794c7288820b4f00df326e237
web/js/bubble-images.js
web/js/bubble-images.js
/*! * Copyright 2016 Joji Doi * Licensed under the MIT license */ function getMediaFilePath(mediaItem) { return "ext-content/" + mediaItem.dir + '/' + mediaItem.title + mediaItem.file_ext; } function getMediaThumbFilePath(mediaItem) { return "ext-content/" + mediaItem.dir + '/thumbs/' + mediaItem.title + ...
/*! * Copyright 2016 Joji Doi * Licensed under the MIT license */ function getMediaFilePath(mediaItem) { return "ext-content/" + mediaItem.dir + '/' + mediaItem.title + mediaItem.file_ext; } function getMediaThumbFilePath(mediaItem) { return "ext-content/" + mediaItem.dir + '/thumbs/' + mediaItem.title + ...
Use lazyLoadChunks API to load small chunks at a time
[Optimization] Use lazyLoadChunks API to load small chunks at a time
JavaScript
mit
do-i/bubble3,do-i/bubble3,do-i/bubble3
--- +++ @@ -20,20 +20,23 @@ var mediaFiles = $(result).filter(function() { return this.category == "photos"; }); + var datas = []; $.each(mediaFiles, function(i, mediaItem) { - var aTag = $("<a/>", { - "href": getMediaFilePath(mediaItem) + datas.push({ + image: getMediaFilePath(mediaIte...
6b9ad1711a43b62f6da8cf37acac7564d9c38ab3
tasks/requirejs.js
tasks/requirejs.js
/* * grunt-contrib-requirejs * http://gruntjs.com/ * * Copyright (c) 2014 Tyler Kellen, contributors * Licensed under the MIT license. */ module.exports = function(grunt) { 'use strict'; var requirejs = require('requirejs'); // TODO: extend this to send build log to grunt.log.ok / grunt.log.error // by...
/* * grunt-contrib-requirejs * http://gruntjs.com/ * * Copyright (c) 2014 Tyler Kellen, contributors * Licensed under the MIT license. */ module.exports = function(grunt) { 'use strict'; var requirejs = require('requirejs'); var LOG_LEVEL_TRACE = 0, LOG_LEVEL_WARN = 2; // TODO: extend this to send buil...
Set default log level to WARN (or TRACE, for verbose)
Set default log level to WARN (or TRACE, for verbose)
JavaScript
mit
gruntjs/grunt-contrib-requirejs
--- +++ @@ -10,6 +10,7 @@ 'use strict'; var requirejs = require('requirejs'); + var LOG_LEVEL_TRACE = 0, LOG_LEVEL_WARN = 2; // TODO: extend this to send build log to grunt.log.ok / grunt.log.error // by overriding the r.js logger (or submit issue to r.js to expand logging support) @@ -28,7 +29,7 @@ ...
e4e67a2c75eb6c640d7b109732435039de41b014
public/chord.js
public/chord.js
define(function(require) { var module = require("ui/modules").get("kibana-chord"); module.controller("ChordController", function($scope, Private) { $scope.$watch("esResponse", function(response) { $scope.dataDump = JSON.stringify(response, null, 2); }); }); function ChordProvider(Private) { ...
define(function(require) { var module = require("ui/modules").get("kibana-chord"); module.controller("ChordController", function($scope, Private, $element) { var div = $element[0]; $scope.$watch("esResponse", function(response) { $scope.dataDump = JSON.stringify(response, null, 2); }); }); ...
Add hook to get DOM from Angular
Add hook to get DOM from Angular
JavaScript
mit
datavis-tech/kibana-chord,datavis-tech/kibana-chord,datavis-tech/kibana-chord
--- +++ @@ -1,7 +1,9 @@ define(function(require) { var module = require("ui/modules").get("kibana-chord"); - module.controller("ChordController", function($scope, Private) { + module.controller("ChordController", function($scope, Private, $element) { + var div = $element[0]; + $scope.$watch("esRespons...
53256afa94654f204529c5f470c4bcf9388fba32
code.js
code.js
const esprima = require('esprima'); var source = 'answer = 42; hola = 5; isCold = "Si"; answer = 50;'; const tokens = esprima.tokenize(source); //console.log(tokens); var identificadores = tokens.filter(function (el) { return (el.type === "Identifier"); }); console.log("El código es: "); console.log(source); //con...
const esprima = require('esprima'); var source = 'answer = 42; hola = 5; isCold = "Si"; answer = 50;'; const tokens = esprima.tokenize(source); //console.log(tokens); var identificadores = tokens.filter(function (el) { return (el.type === "Identifier"); }); console.log("El código es: "); console.log(source); //c...
Add identifiers function and create an array of identifiers and their number of times they appear
Add identifiers function and create an array of identifiers and their number of times they appear
JavaScript
mit
ManuChalela/code-art.js,ManuChalela/code-art.js
--- +++ @@ -6,18 +6,15 @@ var identificadores = tokens.filter(function (el) { return (el.type === "Identifier"); }); + console.log("El código es: "); console.log(source); + //console.log("Los identificadores son: "); //console.log(identificadores); -function arrayObjectIndexOf(myArray, searchTerm, property...
722c536a135c631608cb48afbd56fc656ae9fa37
runtests.js
runtests.js
var childProcess = require("child_process") var path = require("path") var env = process.env env.NODE_ENV = "test" var options = { env: env, stdio: "inherit", } var command = path.join(".", "node_modules", ".bin", "mocha") if (process.platform == "win32") command += ".cmd" try { childProcess.spawn(command, opti...
var childProcess = require("child_process") var path = require("path") var env = process.env env.NODE_ENV = "test" var options = { env: env } var command = path.join(".", "node_modules", ".bin", "mocha") if (process.platform == "win32") command += ".cmd" var run = childProcess.spawn(command, [], options) run.stdou...
Fix up test runner for windows
Fix up test runner for windows
JavaScript
mit
strugee/node-sql,bgag/node-sql,BeeDi/node-sql,niklabh/node-sql,braddunbar/node-sql,brianc/node-sql,danrzeppa/node-sql
--- +++ @@ -5,12 +5,14 @@ env.NODE_ENV = "test" var options = { - env: env, - stdio: "inherit", + env: env } var command = path.join(".", "node_modules", ".bin", "mocha") if (process.platform == "win32") command += ".cmd" -try { - childProcess.spawn(command, options) -} catch (ex) {} +var run = childProce...
4bd6167022300ecb0a2a7624249db7dfaf14967c
test/test_comfy.js
test/test_comfy.js
"use strict"; var assert = require("assert"); var comfy = require("../src/comfy"); var env = { "REQUIRED_PROP": "required_value", "OPTIONAL_PROP": "optional_value" }; var config = comfy.build(function(c) { c.optional("optional_prop", "not_this"); c.optional("non_existant_optional_prop", "fallback_value"); ...
"use strict"; var assert = require("assert"); var comfy = require("../src/comfy"); var env = { "REQUIRED_PROP": "required_value", "OPTIONAL_PROP": "optional_value" }; var config = comfy.build(function(c) { c.optional("optional_prop", "not_this"); c.optional("non_existant_optional_prop", "fallback_value"); ...
Add checks for preserving the original snake_case version of property names
Add checks for preserving the original snake_case version of property names
JavaScript
mit
filp/comfy
--- +++ @@ -16,7 +16,11 @@ }, env /* use the custom env object instead of process.env */); assert.equal(config.requiredProp, "required_value"); +assert.equal(config.required_prop, "required_value"); + assert.equal(config.optionalProp, "optional_value"); +assert.equal(config.optional_prop, "optional_value"); + a...
fd74385bce73459e6a10af7a0b3a531d95c9ae51
test/unit/model.js
test/unit/model.js
window = {}; var assert = require('assert'); var model = require('../../lib/model')({ memory: true, noConnect: true }); describe('Model', function () { describe('interface', function () { it('should expose expected objects', function () { assert.equal(typeof model.history, 'object'); ...
window = {}; var assert = require('assert'); var model = require('../../lib/model')({ memory: true, noConnect: true }); describe('Model', function () { describe('interface', function () { it('should expose expected objects', function () { assert.equal(typeof model.history, 'object'); ...
Fix unit test assertion for number of pre-included apps
Fix unit test assertion for number of pre-included apps
JavaScript
mpl-2.0
rodmoreno/webmaker-android,alanmoo/webmaker-android,alanmoo/webmaker-android,adamlofting/webmaker-android,vazquez/webmaker-android,gvn/webmaker-android,secretrobotron/webmaker-android,toolness/webmaker-android,cadecairos/webmaker-android,alicoding/webmaker-android,j796160836/webmaker-android,codex8/webmaker-app,j796160...
--- +++ @@ -40,7 +40,7 @@ it('should have the expected apps', function () { // @todo - assert.equal(model.apps.length, 1); + assert.equal(model.apps.length, 0); }); }); });
c4e91bdee36197f18a4ba35dfe514c90ef2ce650
src/reducers/reducer_posts.js
src/reducers/reducer_posts.js
import _ from 'lodash'; import { FETCH_POSTS } from '../actions'; export default function(state = {}, action) { switch (action.type) { case FETCH_POSTS: return _.mapKeys(action.payload.data, 'id'); default: return state; } }
import _ from 'lodash'; import { FETCH_POSTS, FETCH_POST } from '../actions'; export default function(state = {}, action) { switch (action.type) { case FETCH_POST: const post = action.payload.data; // const newState = { ...state }; // newState[post.id] = post; // return newState; ...
Add FETCH_POST case to reducer
Add FETCH_POST case to reducer
JavaScript
mit
unhommequidort/redux_blog,unhommequidort/redux_blog
--- +++ @@ -1,8 +1,15 @@ import _ from 'lodash'; -import { FETCH_POSTS } from '../actions'; +import { FETCH_POSTS, FETCH_POST } from '../actions'; export default function(state = {}, action) { switch (action.type) { + case FETCH_POST: + const post = action.payload.data; + // const newState = { ......
9a281fbd1f8e4db126099a56c964813226fd96d8
elements/editor-viewport.js
elements/editor-viewport.js
Polymer ({ is: "editor-viewport", // member variables properties: { width: { type: Number, value: 0 }, height: { type: Number, value: 0 }, renderer: { type: Object, value: new THREE.WebGLRenderer() }, scene: { type: Object, value: new THREE.Scene() }, camera: { type: Object, value: new THRE...
Polymer ({ is: "editor-viewport", // member variables properties: { width: { type: Number, value: 0 }, height: { type: Number, value: 0 }, renderer: { type: Object, value: new THREE.WebGLRenderer() }, scene: { type: Object, value: new THREE.Scene() }, camera: { type: Object, value: new THRE...
Create a scene to work with.
Create a scene to work with.
JavaScript
mit
metropolislights/webgl-editor,metropolislights/webgl-editor
--- +++ @@ -9,7 +9,8 @@ height: { type: Number, value: 0 }, renderer: { type: Object, value: new THREE.WebGLRenderer() }, scene: { type: Object, value: new THREE.Scene() }, - camera: { type: Object, value: new THREE.PerspectiveCamera() } + camera: { type: Object, value: new THREE.PerspectiveCamer...