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 |
|---|---|---|---|---|---|---|---|---|---|---|
a5468c3b575dfe2d04e03d72bcec34b8e353e9b7 | src/lb/lb.base.js | src/lb/lb.base.js | /*
* Namespace: lb.base
* Adapter Modules for Base JavaScript Library
*
* Authors:
* o Eric Bréchemier <github@eric.brechemier.name>
* o Marc Delhommeau <marc.delhommeau@legalbox.com>
*
* Copyright:
* Eric Bréchemier (c) 2011, Some Rights Reserved
* Legal-Box SAS (c) 2010-2011, All Rights Reserved
*
* L... | /*
* Namespace: lb.base
* Adapter Modules for Base JavaScript Library
*
* Authors:
* o Eric Bréchemier <github@eric.brechemier.name>
* o Marc Delhommeau <marc.delhommeau@legalbox.com>
*
* Copyright:
* Eric Bréchemier (c) 2011-2013, Some Rights Reserved
* Legal-Box SAS (c) 2010-2011, All Rights Reserved
*... | Add implementation of no(), copied from nada project (CC0) | Add implementation of no(), copied from nada project (CC0)
| JavaScript | bsd-3-clause | eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp | ---
+++
@@ -7,7 +7,7 @@
* o Marc Delhommeau <marc.delhommeau@legalbox.com>
*
* Copyright:
- * Eric Bréchemier (c) 2011, Some Rights Reserved
+ * Eric Bréchemier (c) 2011-2013, Some Rights Reserved
* Legal-Box SAS (c) 2010-2011, All Rights Reserved
*
* License:
@@ -15,7 +15,7 @@
* http://creativecommon... |
97fc9bbf3ddeeec0d3f3fbae0a08346e6fad0987 | app/assets/javascripts/modules/moj.submit-once.js | app/assets/javascripts/modules/moj.submit-once.js | (function () {
'use strict';
moj.Modules.SubmitOnce = {
el: '.js-SubmitOnce',
init: function () {
this.cacheEls();
this.bindEvents();
this.options = {
alt: this.$el.data('alt') || 'Please wait…'
};
},
cacheEls: function () {
this.$el = $(this.el);
this... | (function () {
'use strict';
moj.Modules.SubmitOnce = {
el: '.js-SubmitOnce',
init: function () {
this.cacheEls();
this.bindEvents();
this.options = {
alt: this.$el.data('alt') || 'Please wait…'
};
},
cacheEls: function () {
this.$el = $(this.el);
this... | Fix tagName selection for IE8 | Fix tagName selection for IE8 | JavaScript | mit | ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public | ---
+++
@@ -23,7 +23,14 @@
},
disable: function () {
- this.$submit[this.$submit[0].tagName === 'INPUT' ? 'val' : 'text'](this.options.alt);
+ switch(this.$submit[0].tagName) {
+ case 'INPUT':
+ case 'BUTTON':
+ this.$submit.val(this.options.alt);
+ break;
+ ... |
47382b8696201a939ce1394586701d1715e28ffa | src/js/plugin.js | src/js/plugin.js | // Save the other cropper
Cropper.other = $.fn.cropper;
// Register as jQuery plugin
$.fn.cropper = function (options) {
var args = toArray(arguments, 1),
result;
this.each(function () {
var $this = $(this),
data = $this.data('cropper'),
fn;
if (!data) {
... | // Save the other cropper
Cropper.other = $.fn.cropper;
// Register as jQuery plugin
$.fn.cropper = function (options) {
var args = toArray(arguments, 1),
result;
this.each(function () {
var $this = $(this),
data = $this.data('cropper'),
fn;
if (!data) {
... | Break destroy calling when not initialized | Break destroy calling when not initialized
| JavaScript | mit | Paulyoufu/cropper,samudiogo/cropper,shinygang/cropper,99designs/cropper,liuyan5258/cropper,ashokpant/cropper,iacdingping/cropper,OddPrints/cropper,mesnilgr/cropper,FuYung/cropper,tekinaggul/cropper,bercanozcan/cropper,tekinaggul/cropper,websdotcom/cropper,liuyan5258/cropper,iacdingping/cropper,VANITAX/cropper,itxd/crop... | ---
+++
@@ -12,6 +12,10 @@
fn;
if (!data) {
+ if (/destroy/.test(options)) {
+ return;
+ }
+
$this.data('cropper', (data = new Cropper(this, options)));
}
|
d58d68a2990c6effd98093957bb7520814508fcd | web/static/js/battle_snake/board_viewer.js | web/static/js/battle_snake/board_viewer.js | import Mousetrap from "mousetrap";
import $ from "jquery";
import socket from "../socket"
import "../empties/modal";
const logError = resp => {
console.error("Unable to join", resp)
};
const init = (gameId) => {
if(typeof gameId === "undefined") {
return;
}
const boardViewerChannel = socket.channel(`boar... | import Mousetrap from "mousetrap";
import socket from "../socket"
import "../empties/modal";
const logError = resp => {
console.error("Unable to join", resp)
};
const init = (gameId) => {
if(typeof gameId === "undefined") {
return;
}
const boardViewerChannel = socket.channel(`board_viewer:${gameId}`, {co... | Optimize dom replacement for board viewer | Optimize dom replacement for board viewer
This one line cuts down the "loading" slice from the chrome timeline from 25% to
3%. jQuery.html performs a very expensive html validation before inserting to
into the dom.
Because we *hope* that we're sending valid html before hand we don't need to do
this.
This leaves page... | JavaScript | agpl-3.0 | Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake | ---
+++
@@ -1,5 +1,4 @@
import Mousetrap from "mousetrap";
-import $ from "jquery";
import socket from "../socket"
import "../empties/modal";
@@ -16,7 +15,7 @@
const gameAdminChannel = socket.channel(`game_admin:${gameId}`);
boardViewerChannel.on("tick", ({content}) => {
- $("#board-viewer").html()
+ ... |
df039b068a097624e99755199ff86d3d4c6365be | app/components/organization/SettingsSection.js | app/components/organization/SettingsSection.js | import React from 'react';
import Relay from 'react-relay';
import SettingsMenu from './SettingsMenu';
const SettingsSection = (props) =>
<div className="twbs-container">
<div className="clearfix mxn2">
<div className="md-col md-col-3 px2">
<SettingsMenu organization={props.organization} />
... | import React from 'react';
import Relay from 'react-relay';
import PageWithMenu from '../shared/PageWithMenu';
import SettingsMenu from './SettingsMenu';
const SettingsSection = (props) => <PageWithMenu>
<SettingsMenu organization={props.organization} />
{props.children}
</PageWithMenu>
SettingsSection.propTypes... | Use the new PageWithMenu component | Use the new PageWithMenu component
| JavaScript | mit | buildkite/frontend,buildkite/frontend,fotinakis/buildkite-frontend,fotinakis/buildkite-frontend | ---
+++
@@ -1,19 +1,13 @@
import React from 'react';
import Relay from 'react-relay';
+import PageWithMenu from '../shared/PageWithMenu';
import SettingsMenu from './SettingsMenu';
-const SettingsSection = (props) =>
- <div className="twbs-container">
- <div className="clearfix mxn2">
- <div className... |
978425c95077c11682d9f01a378f0e2fd7513f63 | src/middleware.js | src/middleware.js | import interceptor from "express-interceptor";
import SVGO from "svgo";
/**
* SVGO middleware: optimize any SVG response.
*/
export function svgo(options) {
const svgo = new SVGO(options);
return interceptor((req, res) => {
return {
isInterceptable: function() {
return /image\/svg\+xml(;|$)/.te... | import interceptor from "express-interceptor";
import SVGO from "svgo";
/**
* SVGO middleware: optimize any SVG response.
*/
export function svgo(options) {
const svgo = new SVGO(options);
return interceptor((req, res) => {
return {
isInterceptable: function() {
return /image\/svg\+xml(;|$)/.te... | Fix HEAD requests breaking SVG responses | Fix HEAD requests breaking SVG responses
| JavaScript | mit | exogen/badge-matrix,exogen/badge-matrix,exogen/badge-matrix | ---
+++
@@ -12,9 +12,13 @@
return /image\/svg\+xml(;|$)/.test(res.get("content-type"));
},
intercept: function(body, send) {
- svgo.optimize(body, (result) => {
- send(result.data);
- });
+ if (body) {
+ svgo.optimize(body, (result) => {
+ send(... |
98bdcd0c819a5845a9bd02a636f46a96bca851fb | andreystar/portfolio/src/main/webapp/script.js | andreystar/portfolio/src/main/webapp/script.js | function addRandomQuote() {
const quotes = [
`Now. Say my name. Heisenberg. You're god damn right`,
'I am the danger.',
'You see, but you do not observe.',
'There’s a woman lying dead. Perfectly sound analysis but I was hoping you’d go deeper.',
'You\'re treading on some mighty thin ice here.'
]... | function addRandomQuote() {
const quotes = [
`Now. Say my name. Heisenberg. You're god damn right`,
'I am the danger.',
'You see, but you do not observe.',
'There’s a woman lying dead. Perfectly sound analysis but I was hoping you’d go deeper.',
`You're treading on some mighty thin ice here.`
];... | Remove character escape with template string. | Remove character escape with template string.
| JavaScript | apache-2.0 | googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020 | ---
+++
@@ -4,7 +4,7 @@
'I am the danger.',
'You see, but you do not observe.',
'There’s a woman lying dead. Perfectly sound analysis but I was hoping you’d go deeper.',
- 'You\'re treading on some mighty thin ice here.'
+ `You're treading on some mighty thin ice here.`
];
// Pick a rando... |
c04bab344d7aa2eb6c25e0bcb5492b1405657f07 | lib/av-extra.js | lib/av-extra.js | 'use strict';
var AV = require('avoscloud-sdk');
var crypto = require('crypto');
AV._config.disableCurrentUser = true;
AV.Promise.setPromisesAPlusCompliant(true);
// 调用 API 时增加 prod 信息
if (!AV._old_request) {
AV._old_request = AV._request;
AV._request = function (route, className, objectId, method, dataObject, se... | 'use strict';
var AV = require('avoscloud-sdk');
var crypto = require('crypto');
AV._config.disableCurrentUser = true;
AV.Promise.setPromisesAPlusCompliant(true);
AV._config.applicationProduction = AV.Cloud.__prod;
AV.Object.prototype.disableBeforeHook = function() {
this.set('__before', signDisableHook('__before_f... | Set API prod by AV._config.applicationProduction. | Set API prod by AV._config.applicationProduction.
| JavaScript | mit | sdjcw/leanengine-node-sdk,leancloud/leanengine-node-sdk,aisk/leanengine-node-sdk | ---
+++
@@ -4,18 +4,7 @@
AV._config.disableCurrentUser = true;
AV.Promise.setPromisesAPlusCompliant(true);
-
-// 调用 API 时增加 prod 信息
-if (!AV._old_request) {
- AV._old_request = AV._request;
- AV._request = function (route, className, objectId, method, dataObject, sessionToken) {
- if (!dataObject) {
- d... |
e63728b2392051b0d8d5535ae76ccb85c94ea052 | src/ui/Styles.js | src/ui/Styles.js | import StyleConstants from './StyleConstants';
export default {
input: {
borderColor: StyleConstants.colorBorder,
borderWidth: 1,
borderRadius: 5,
borderStyle: 'solid',
paddingTop: 8,
paddingRight: 8,
paddingBottom: 8,
paddingLeft: 8,
},
hoverBox: { // gray border and box shadow
... | import StyleConstants from './StyleConstants';
export default {
input: {
borderColor: StyleConstants.colorBorder,
borderWidth: 1,
borderRadius: 5,
borderStyle: 'solid',
paddingTop: 8,
paddingRight: 8,
paddingBottom: 8,
paddingLeft: 8,
},
hoverBox: { // gray border and box shadow
... | Fix chat with us on intercom text wrapping | Fix chat with us on intercom text wrapping
fbshipit-source-id: 498ec09
| JavaScript | mit | exponentjs/xde,exponentjs/xde | ---
+++
@@ -18,7 +18,7 @@
borderWidth: 1,
boxShadow: `0 5px 10px rgba(0, 0, 0, 0.2)`,
color: StyleConstants.colorText,
- minWidth: 170,
+ minWidth: 180,
},
errorMessage: {
color: StyleConstants.colorError, |
ebf4e082acced0793e56506afd6ab747b3dc382d | src/utils/dom.js | src/utils/dom.js | class Dom {
constructor(el) {
this.el = el;
this.style = window.getComputedStyle(el, '');
}
set text(val) {
if ('textContent' in this.el) {
this.el.textContent = val;
} else if ('innerText' in this.el) {
this.el.innerText = val;
} else {
throw new Error('The browser does not... | class Dom {
constructor(el) {
this.el = el;
this.style = window.getComputedStyle(el, '');
}
set text(val) {
if ('textContent' in this.el) {
this.el.textContent = val;
} else if ('innerText' in this.el) {
this.el.innerText = val;
} else {
throw new Error('The browser does not... | Return 0 if an element height is not detected | Return 0 if an element height is not detected
| JavaScript | mit | ktsn/truncator,ktsn/truncator | ---
+++
@@ -15,7 +15,7 @@
}
get height() {
- return parseFloat(this.style.getPropertyValue('height'));
+ return parseFloat(this.style.getPropertyValue('height')) || 0;
}
get lineHeight() { |
9762b789a4e94d2f4ab7fbb553f1a3d08dcd07df | src/App/Body/AboutButton.js | src/App/Body/AboutButton.js | import React from 'react';
import { version } from 'root/package.json';
import RaisedButton from 'material-ui/lib/raised-button';
import FlatButton from 'material-ui/lib/flat-button';
import Dialog from 'material-ui/lib/dialog';
export default class AboutButton extends React.Component {
state = {
dialogIsOpen: f... | import React from 'react';
import { version } from 'root/package.json';
import RaisedButton from 'material-ui/lib/raised-button';
import FlatButton from 'material-ui/lib/flat-button';
import Dialog from 'material-ui/lib/dialog';
export default class AboutButton extends React.Component {
state = {
dialogIsOpen: f... | Change one more CAPTIVA to Intelligent Capture | Change one more CAPTIVA to Intelligent Capture
| JavaScript | cc0-1.0 | ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer | ---
+++
@@ -31,7 +31,7 @@
onRequestClose={this.closeDialog}
modal={false}
>
- <p>CAPTIVA License Decoder (version {version})</p>
+ <p>Intelligent Capture License Decoder (version {version})</p>
<p>
{'Concept and specifications by Jim Smith. Desi... |
6c8951dd0021a5d2d740627541fb78635d29d237 | guefile.js | guefile.js | const gue = require('./index.js');
gue.task('default', ['lint','test']);
gue.task('test', () => {
return gue.shell('nyc mocha test/**/*.test.js');
});
gue.task('lint', () => {
return gue.shell('jscs index.js bin/gue.js lib/Util.js');
});
gue.task('docs', () => {
var command = '/bin/rm -f README.md';
command... | const gue = require('./index.js');
gue.task('default', ['lint','test']);
gue.task('test', ['clean'], () => {
return gue.shell('nyc --reporter lcov --reporter text ' +
'mocha test/**/*.test.js');
});
gue.task('lint', () => {
return gue.shell('jscs index.js bin/gue.js lib/Util.js');
});
gue.task('docs', () => {... | Improve clean task / save lcov data | Improve clean task / save lcov data
| JavaScript | mit | skarfacegc/Gue,skarfacegc/Gue | ---
+++
@@ -2,8 +2,9 @@
gue.task('default', ['lint','test']);
-gue.task('test', () => {
- return gue.shell('nyc mocha test/**/*.test.js');
+gue.task('test', ['clean'], () => {
+ return gue.shell('nyc --reporter lcov --reporter text ' +
+ 'mocha test/**/*.test.js');
});
gue.task('lint', () => {
@@ -20,5 +2... |
af0958d59bc9d28fffcefc95054afc1c5fadd177 | lib/validate.js | lib/validate.js | 'use babel'
/* @flow */
import type {Provider, Declaration} from './types'
export function validateDeclarations(declarations: Array<Declaration>) {
}
export function validateProvider(provider: Provider) {
}
| 'use babel'
/* @flow */
import type {Provider, Declaration} from './types'
export function validateDeclarations(declarations: Array<Declaration>) {
if (Array.isArray(declarations)) {
const length = declarations.length
for (let i = 0; i < length; ++i) {
const entry = declarations[i]
let message
... | Validate declarations and providers properly | :no_entry: Validate declarations and providers properly
| JavaScript | mit | steelbrain/declarations | ---
+++
@@ -5,9 +5,39 @@
import type {Provider, Declaration} from './types'
export function validateDeclarations(declarations: Array<Declaration>) {
-
+ if (Array.isArray(declarations)) {
+ const length = declarations.length
+ for (let i = 0; i < length; ++i) {
+ const entry = declarations[i]
+ l... |
629ae1c460dc08f7f00b9e87a19e6f97f36c5aa1 | lib/xorshift.js | lib/xorshift.js | module.exports = class XorShift {
_hex2seed (size, hex) {
const arr = new Array(size)
for (let i = 0; i < size; ++i) {
arr[i] = parseInt(hex.slice(i * 8, (i + 1) * 8), 16) >>> 0
}
return arr
}
randomInt64 (_enc) {
throw new Error('Not implemented!')
}
random () {
const x = this... | module.exports = class XorShift {
_hex2seed (size, hex) {
const arr = new Array(size)
for (let i = 0; i < size; ++i) {
arr[i] = parseInt(hex.slice(i * 8, (i + 1) * 8), 16) >>> 0
}
return arr
}
randomInt64 (_enc) {
throw new Error('Not implemented!')
}
random () {
const x = this... | Fix wrong fix randomBytes for new Buffer | Fix wrong fix randomBytes for new Buffer
| JavaScript | mit | fanatid/xorshift.js,fanatid/xorshift.js | ---
+++
@@ -17,7 +17,7 @@
}
randomBytes (size) {
- const bufSize = Math.max(size >>> 3, 1) << 3
+ const bufSize = ((size >>> 3) << 3) + 8
const buffer = Buffer.allocUnsafe(bufSize)
for (let offset = 0; offset < size; offset += 8) {
const x = this.randomInt64() |
f59aaaa5b309248dbc3460c262af66ea99915f66 | package.js | package.js | Package.describe({
name: 'aramk:file-upload',
summary: 'Simple file uploads.',
version: '0.4.0'
});
Npm.depends({
'mime': '1.3.4'
})
Package.onUse(function(api) {
api.versionsFrom('METEOR@0.9.0');
api.use([
'coffeescript',
'underscore',
'templating',
'less',
'aramk:q@1.0.1_1',
'ara... | Package.describe({
name: 'aramk:file-upload',
summary: 'Simple file uploads.',
version: '0.4.0'
});
Npm.depends({
'mime': '1.3.4'
})
Package.onUse(function(api) {
api.versionsFrom('METEOR@1.2.0.1');
api.use([
'coffeescript',
'underscore',
'templating',
'less',
'aramk:q@1.0.1_1',
'a... | Add support for Meteor 1.2 | Add support for Meteor 1.2
| JavaScript | mit | aramk/meteor-file-upload,aramk/meteor-file-upload | ---
+++
@@ -9,7 +9,7 @@
})
Package.onUse(function(api) {
- api.versionsFrom('METEOR@0.9.0');
+ api.versionsFrom('METEOR@1.2.0.1');
api.use([
'coffeescript',
'underscore', |
244520b237d4d35c0052bf5e5ea18be746b0c535 | src/components/video_list.js | src/components/video_list.js | import React from 'react';
import VideoListItem from './video_list_item';
const VideoList = (props) => {
const videoItems = props.videos.map((video) => {
return <VideoListItem video={video} />
});
return (
<ul className="col-md-4 lsit-group">
{videoItems}
</ul>
);
};
export default VideoList; | Create video list component and load in the video list item component. | Create video list component and load in the video list item component.
| JavaScript | mit | JosephLeon/redux-simple-starter-tutorial,JosephLeon/redux-simple-starter-tutorial | ---
+++
@@ -0,0 +1,16 @@
+import React from 'react';
+import VideoListItem from './video_list_item';
+
+const VideoList = (props) => {
+ const videoItems = props.videos.map((video) => {
+ return <VideoListItem video={video} />
+ });
+
+ return (
+ <ul className="col-md-4 lsit-group">
+ {videoItems}
+ </ul>
+ );
... | |
3be7abc361260753be74490fa4fd0ec2c99caff0 | injectChrome.js | injectChrome.js | (function() {
window.stop();
const IS_LOCAL = false,
URL_REMOTE = "https://rawgit.com/ultratype/UltraTypeBot/master/OUT/OUT.js",
URL_OUT = IS_LOCAL ? chrome.extension.getURL('OUT/OUT.js') : URL_REMOTE,
SCRIPT_OUT = "<script src='" + URL_OUT + "'></script>\n";
let loader = new... | (function() {
window.stop();
document.documentElement.innerHTML = null;
const IS_LOCAL = false,
URL_REMOTE = "https://rawgit.com/ultratype/UltraTypeBot/master/OUT/OUT.js",
URL_OUT = IS_LOCAL ? chrome.extension.getURL('OUT/OUT.js') : URL_REMOTE,
SCRIPT_OUT = "<script src='... | Remove document contents on injection | Remove document contents on injection
| JavaScript | mit | ultratype/UltraTypeBot,ultratype/UltraTypeBot,ultratype/UltraTypeBot | ---
+++
@@ -1,6 +1,7 @@
(function() {
window.stop();
-
+ document.documentElement.innerHTML = null;
+
const IS_LOCAL = false,
URL_REMOTE = "https://rawgit.com/ultratype/UltraTypeBot/master/OUT/OUT.js",
URL_OUT = IS_LOCAL ? chrome.extension.getURL('OUT/OUT.js') : URL_REMOTE, |
0ea6a328654399c5b8f21508913f362fbcb99e06 | tests/tests.js | tests/tests.js | var path = require('path');
var root = path.dirname(__filename);
require.paths.unshift(path.join(root, '../build/default'));
require.paths.unshift(path.join(root, '../lib'));
var sys = require('sys');
var Buffer = require('buffer').Buffer;
var archive = require('archive');
var ar = new archive.ArchiveReader();
var b... | var path = require('path');
var root = path.dirname(__filename);
require.paths.unshift(path.join(root, '../build/default'));
require.paths.unshift(path.join(root, '../lib'));
var sys = require('sys');
var Buffer = require('buffer').Buffer;
var archive = require('archive');
var ar = new archive.ArchiveReader();
var b... | Use relative path for the test tarfile | Use relative path for the test tarfile
| JavaScript | apache-2.0 | pquerna/node-archive,pquerna/node-archive | ---
+++
@@ -9,7 +9,7 @@
var ar = new archive.ArchiveReader();
-var buf = new Buffer(8000);
+var buf = new Buffer(1600);
ar.addListener('ready', function() {
sys.log('In ready function....');
@@ -49,7 +49,7 @@
});
});
-ar.openFile("nofile.tar.gz", function(err){
+ar.openFile(path.join(root, "nofile.ta... |
bc25ae335ec40367fa5229c6228a79ddc21c3b90 | views/components/statusbar-container.android.js | views/components/statusbar-container.android.js | import React from "react-native";
import VersionCodes from "../../modules/version-codes";
const {
Platform,
StyleSheet,
View
} = React;
const styles = StyleSheet.create({
statusbar: {
height: 25 // offset for statusbar height
}
});
class StatusbarContainer extends React.Component {
render() {
return (
<... | import React from "react-native";
import VersionCodes from "../../modules/version-codes";
const {
Platform,
StyleSheet,
View
} = React;
const styles = StyleSheet.create({
statusbar: {
height: 25 // offset for statusbar height
}
});
class StatusbarContainer extends React.Component {
render() {
return (
<... | Fix comment in statusbar container | Fix comment in statusbar container
| JavaScript | unknown | scrollback/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods | ---
+++
@@ -30,5 +30,5 @@
statusbarStyle: React.PropTypes.any
};
-// The app pans to show the Keyboard below Kitkat (We set it to resize from Kitkat to upwards)
+// Versions below KitKat don't have translucent statusbar
export default Platform.OS === "android" && Platform.Version < VersionCodes.KITKAT ? View : ... |
5e9343acc0eb6b9834afe558d8df7d1606930f28 | tools/phantom.js | tools/phantom.js | var page = require('webpage').create()
page.onConsoleMessage = function(arg) {
var parts = arg.split('`')
var msg = parts[1] || '[LOG] ' + arg
console.log(color(msg, parts[0]))
if (msg === 'END') {
var result = page.evaluate(function() {
return result
})
if (result.error.count + result.fai... | var page = require('webpage').create()
page.onConsoleMessage = function(arg) {
var parts = arg.split('`')
var msg = parts[1] || '[LOG] ' + arg
console.log(color(msg, parts[0]))
if (msg === 'END') {
var result = page.evaluate(function() {
return result
})
if (result.error.count + result.fai... | Modify script to allow warnings | Modify script to allow warnings
| JavaScript | mit | wenber/seajs,tonny-zhang/seajs,zaoli/seajs,LzhElite/seajs,lee-my/seajs,AlvinWei1024/seajs,lianggaolin/seajs,seajs/seajs,moccen/seajs,yern/seajs,lovelykobe/seajs,jishichang/seajs,AlvinWei1024/seajs,judastree/seajs,121595113/seajs,ysxlinux/seajs,zaoli/seajs,baiduoduo/seajs,JeffLi1993/seajs,eleanors/SeaJS,tonny-zhang/seaj... | ---
+++
@@ -11,7 +11,7 @@
return result
})
- if (result.error.count + result.fail.count + result.warn.count) {
+ if (result.error.count + result.fail.count) {
phantom.exit(1)
} else {
phantom.exit(0) |
ab13f32c1c42d72982ee78bb0d51111cca664044 | src/validation/rules/ArgumentsOfCorrectType.js | src/validation/rules/ArgumentsOfCorrectType.js | /* @flow */
/**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
i... | /* @flow */
/**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
i... | Fix accidental logic error in argument checking | Fix accidental logic error in argument checking
| JavaScript | mit | graphql/graphql-js,tgriesser/graphql-js,baer/graphql-js,graphql/graphql-js,enaqx/graphql-js,sogko/graphql-js,baer/graphql-js,jjergus/graphql-js,josephsavona/graphql-js,jjergus/graphql-js,sogko/graphql-js,gabelevi/graphql-js,josephsavona/graphql-js,gabelevi/graphql-js,josephsavona/graphql-js,graphql/graphql-js,sogko/gra... | ---
+++
@@ -38,17 +38,17 @@
var argDef = context.getArgument();
if (argDef) {
var errors = isValidLiteralValue(argDef.type, argAST.value);
- }
- if (errors.length) {
- return new GraphQLError(
- badValueMessage(
- argAST.name.value,
- argDef.type,... |
a91b6aa9cb9d3d37fccdf90610dbf692b0d86cdd | test/EventBus.js | test/EventBus.js | "use strict";
var EventBus = require('../lib/messages/EventBus');
describe('Event Bus', function () {
it("should publish an event", function () {
var eventBus = new EventBus(),
subscriber = {
action: function (data) {
}
};
spyOn(subscriber,... | "use strict";
var EventBus = require('../lib/messages/EventBus');
describe('Event Bus', function () {
it("should publish an event", function () {
var eventBus = new EventBus(),
subscriber = {
action: function (data) {
}
};
spyOn(subscriber,... | Add test to event bus with different types of events | Add test to event bus with different types of events
| JavaScript | mit | mtfranchetto/bunnycry | ---
+++
@@ -19,4 +19,19 @@
expect(subscriber.action).toHaveBeenCalledWith({test: 10});
expect(subscriber.action.calls.count()).toBe(1);
});
+
+ it("should not receive the event if wrong type of event", function () {
+ var eventBus = new EventBus(),
+ subscriber = {
+ ... |
cd3025a56d13aff29e009f88a601b500199687cb | knexfile.js | knexfile.js | const config = require('./config')
module.exports = {
web: {
client: 'mssql',
connection: {
host: config.DATABASE_SERVER,
user: config.WEB_APP_DATABASE_USERNAME,
password: config.WEB_APP_DATABASE_PASSWORD,
database: config.DATABASE,
options: {
encrypt: true
}
}... | const config = require('./config')
module.exports = {
web: {
client: 'mssql',
connection: {
host: config.DATABASE_SERVER,
user: config.WEB_APP_DATABASE_USERNAME,
password: config.WEB_APP_DATABASE_PASSWORD,
database: config.DATABASE,
options: {
encrypt: true
}
}... | Update the max pool size from 10 to 500 | Update the max pool size from 10 to 500
| JavaScript | mit | ministryofjustice/wmt-web,ministryofjustice/wmt-web | ---
+++
@@ -12,7 +12,10 @@
encrypt: true
}
},
- debug: false
+ debug: false,
+ pool: {
+ max: 500
+ }
},
integrationTests: {
client: 'mssql', |
805c32a765292c8f76d9c07ae2c426cc2748fd37 | knexfile.js | knexfile.js | // Update with your config settings.
module.exports = {
development: {
client: 'sqlite3',
connection: {
filename: './database.sqlite3',
},
seeds: {
directory: './seeds/knex',
},
useNullAsDefault: true,
},
test: {
client: 'sqlite3',
connection: {
filename: ':mem... | // Update with your config settings.
module.exports = {
development: {
// client: 'postgres',
client: 'sqlite3',
connection: {
// database: 'fortress_dev',
filename: './database.sqlite3',
},
seeds: {
directory: './seeds/knex',
},
useNullAsDefault: true,
},
test: {
... | Add commented out lines for easy postgres testing. | Add commented out lines for easy postgres testing.
| JavaScript | mit | andymeneely/dev-fortress-server | ---
+++
@@ -3,8 +3,10 @@
module.exports = {
development: {
+ // client: 'postgres',
client: 'sqlite3',
connection: {
+ // database: 'fortress_dev',
filename: './database.sqlite3',
},
seeds: { |
4332487bb2ae15a36252d4cf59af7077bb7aebc7 | packages/redux-simple-auth/test/utils/testStorage.js | packages/redux-simple-auth/test/utils/testStorage.js | export default (initialData = {}) => {
let data = initialData
return {
reset: () => (data = initialData),
getData: () => data,
persist: d => (data = d),
restore: jest.fn(() => data)
}
}
| export default (initialData = {}) => {
let data = initialData
return {
reset: () => (data = initialData),
getData: () => data,
persist: d => (data = d),
restore: () => data
}
}
| Remove mock around test storage restore | Remove mock around test storage restore
| JavaScript | mit | jerelmiller/redux-simple-auth | ---
+++
@@ -5,6 +5,6 @@
reset: () => (data = initialData),
getData: () => data,
persist: d => (data = d),
- restore: jest.fn(() => data)
+ restore: () => data
}
} |
3acac48bf0622b6d5e492f3b098d850a9c6c69ae | lib/game.js | lib/game.js | const $ = require('jquery');
const board = require('./board');
const Piece = require('./piece');
function Game(players, board) {
this.players = players;
this.turn = 0;
this.winner = null;
this.over = false;
this.board = board;
}
Game.prototype.start = function(){
var square0 = this.board.squar... | const $ = require('jquery');
const board = require('./board');
const Piece = require('./piece');
function Game(players, board) {
this.players = players;
this.turn = 0;
this.winner = null;
this.over = false;
this.board = board;
}
Game.prototype.start = function(){
welcomePlayers(this.players);
... | Refactor placing of first four pieces | Refactor placing of first four pieces
I wanted this to be a separate function.
| JavaScript | mit | androidgrl/othello,androidgrl/othello | ---
+++
@@ -11,10 +11,15 @@
}
Game.prototype.start = function(){
- var square0 = this.board.squares[27];
- var square1 = this.board.squares[28];
- var square2 = this.board.squares[35];
- var square3 = this.board.squares[36];
+ welcomePlayers(this.players);
+ placeFirstFourPieces(this.board);
+};... |
8363401bc728d83bddc2ec8839ea0d432a26e091 | listener.js | listener.js | // Listen for keydown events on the main document
// Note: Will not trigger if focused on an element within an iframe
document.addEventListener('keydown', keyListener, false);
// Keyboard listener callback
function keyListener(e) {
var key = e.keyCode || e.charCode;
var space = (key == 8 || key == 46);
var contr... | // Listen for keydown events on the main document
// Note: Will not trigger if focused on an element within an iframe
document.addEventListener('keydown', keyListener, false);
// Keyboard listener callback
function keyListener(e) {
var key = e.keyCode || e.charCode;
var space = (key == 8 || key == 46);
var contr... | Fix issue with Facebook text input elements. | Fix issue with Facebook text input elements.
| JavaScript | mit | DeathIsUnknown/back-to-back | ---
+++
@@ -11,7 +11,7 @@
if(space && !controlKeys) {
// Make sure we're not trying to delete text
var tag = e.target.tagName.toLowerCase();
- if (tag != 'input' && tag != 'textarea') {
+ if (tag != 'input' && tag != 'textarea' && != 'span') {
window.history.back();
}
} |
b2a99e91d887b9b3849116ce07dc1e2f1c7c37bb | apps/publisher/themes/default/js/view-asset.js | apps/publisher/themes/default/js/view-asset.js | $(document).ready(function(){
$('.image-display').click(function(){
messages.modal_pop({content:'<img src="'+$(this).attr('src')+'" />'});
});
});
| $(document).ready(function () {
var image = $('.image-display');
image.click(function () {
messages.modal_pop({content: '<img src="' + $(this).attr('src') + '" />'});
});
image.error(
function () {
$(this).unbind("click").css("cursor", "default")
});
});
| Fix for STORE-1324: Update JS to prevent onclick action when the image link is broken | Fix for STORE-1324: Update JS to prevent onclick action when the image link is broken
| JavaScript | apache-2.0 | Rajith90/carbon-store,daneshk/carbon-store,wso2/carbon-store,splinter/carbon-store,daneshk/carbon-store,madawas/carbon-store,prasa7/carbon-store,wso2/carbon-store,jeradrutnam/carbon-store,jeradrutnam/carbon-store,madawas/carbon-store,cnapagoda/carbon-store,thushara35/carbon-store,wso2/carbon-store,splinter/carbon-store... | ---
+++
@@ -1,5 +1,10 @@
-$(document).ready(function(){
- $('.image-display').click(function(){
- messages.modal_pop({content:'<img src="'+$(this).attr('src')+'" />'});
+$(document).ready(function () {
+ var image = $('.image-display');
+ image.click(function () {
+ messages.modal_pop({content:... |
272663e414e951584b65fbcbbe957a865d0a0d7a | .eslintrc.js | .eslintrc.js | module.exports = {
extends: 'airbnb-base',
rules: {
// Turning off errors about using console, since this is a Node app,
// as recommended here: http://eslint.org/docs/rules/no-console#when-not-to-use-it
'no-console': 'off',
},
};
| 'use strict';
module.exports = {
root: true,
extends: 'airbnb-base',
rules: {
// Turning off errors about using console, since this is a Node app,
// as recommended here: http://eslint.org/docs/rules/no-console#when-not-to-use-it
'no-console': 'off',
strict: ['error', 'global'],
},
parserOpti... | Set ESLint to allow global strict directives. | Set ESLint to allow global strict directives.
The airbnb rules expect es6 modules but with node we don't use them. This
change sets the `sourceType` to "script", and enforces to have a directive
"strict" in any global scope (i.e. file).
More info: http://eslint.org/docs/rules/strict
Signed-off-by: Arnau Siches <d0f8... | JavaScript | mit | ustwo/wordy-slack-bot | ---
+++
@@ -1,8 +1,18 @@
+'use strict';
+
module.exports = {
+ root: true,
extends: 'airbnb-base',
rules: {
// Turning off errors about using console, since this is a Node app,
// as recommended here: http://eslint.org/docs/rules/no-console#when-not-to-use-it
'no-console': 'off',
+ strict: [... |
6f3ac539478417204864c8e542d8279b8d2ad743 | packages/react-server-website/pages/homepage.js | packages/react-server-website/pages/homepage.js | import React from 'react';
import HomepageBody from '../components/homepage-body';
import './homepage.less';
export default class Homepage {
getTitle() {
return "React Server";
}
getElements() {
return (
<div className="homepage">
<HomepageBody />
</div>
);
}
}
| import React from 'react';
import HomepageBody from '../components/homepage-body';
import './homepage.less';
export default class Homepage {
getTitle() {
return "React Server - Fast Server and Client Side Rendering";
}
getElements() {
return (
<div className="homepage">
<HomepageBody />
</div>
);
... | Change title for home page | Change title for home page
To get more SEO traffic, we should adjust the title for what people
search for. Change recommended by Joe Lei.
| JavaScript | apache-2.0 | redfin/react-server,redfin/react-server,emecell/react-server,szhou8813/react-server,szhou8813/react-server,emecell/react-server,lidawang/react-server,lidawang/react-server | ---
+++
@@ -5,7 +5,7 @@
export default class Homepage {
getTitle() {
- return "React Server";
+ return "React Server - Fast Server and Client Side Rendering";
}
getElements() { |
edd900413a3973c52e65f816f9da68dbc1a1ee34 | bloggify.js | bloggify.js | "use strict";
const isProduction = process.env.NODE_ENV === "production";
module.exports = {
metadata: {
siteTitle: "Bloggify"
, description: "We make publishing easy."
, domain: isProduction ? "https://bloggify.org" : "http://localhost:8080"
, twitter: "Bloggify"
}
, theme: {
... | "use strict";
const isProduction = process.env.NODE_ENV === "production";
module.exports = {
metadata: {
siteTitle: "Bloggify"
, description: "We make publishing easy."
, domain: isProduction ? "https://bloggify.org" : "http://localhost:8080"
, twitter: "Bloggify"
}
, theme: {
... | Load the analytics and mongoose only in the production mode. | Load the analytics and mongoose only in the production mode.
| JavaScript | mit | Bloggify/newww,Bloggify/newww | ---
+++
@@ -42,8 +42,8 @@
"bloggify-viewer"
].concat(
isProduction
- ? []
- : ["bloggify-analytics", "bloggify-mongoose"]
+ ? ["bloggify-analytics", "bloggify-mongoose"]
+ : []
)
}
} |
fb66d1dff3f4ce359199b07a6911c131cdc03841 | ui/src/components/SuggestAlert/SuggestAlert.js | ui/src/components/SuggestAlert/SuggestAlert.js | import React, { PureComponent } from 'react';
import connect from 'react-redux/es/connect/connect';
import {Callout, Tag} from '@blueprintjs/core';
import {FormattedMessage} from 'react-intl';
import SearchAlert from 'src/components/SearchAlert/SearchAlert';
import {selectAlerts, selectSession} from 'src/selectors';
c... | import React, { PureComponent } from 'react';
import connect from 'react-redux/es/connect/connect';
import {Callout, Tag} from '@blueprintjs/core';
import {FormattedMessage} from 'react-intl';
import SearchAlert from 'src/components/SearchAlert/SearchAlert';
import {selectAlerts, selectSession} from 'src/selectors';
c... | Change language a tiny bit. | Change language a tiny bit.
| JavaScript | mit | alephdata/aleph,alephdata/aleph,pudo/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph | ---
+++
@@ -15,7 +15,7 @@
return (<Callout>
<FormattedMessage
id="alert.suggest.text"
- defaultMessage={`or get notified {alertComponent} when {queryText} related data will be added.`}
+ defaultMessage={`Get notified {alertComponent} when data related to {queryText} is added.`}
... |
591001d48e2191e73091df20b13e6bf31d7a2bc0 | eloquent_js/chapter03/ch03_ex03.js | eloquent_js/chapter03/ch03_ex03.js | function countBs(s) {
let count = 0;
for (let i = 0; i < s.length; ++i) {
if (s[i] == "B") ++count;
}
return count;
}
function countChar(s, c) {
let count = 0;
for (let i = 0; i < s.length; ++i) {
if (s[i] == c) ++count;
}
return count;
}
console.log(countBs("BBC"));
//... | function countChar(s, c) {
let count = 0;
for (let i = 0; i < s.length; ++i) {
if (s[i] == c) ++count;
}
return count;
}
function countBs(s) {
return countChar(s, "B");
}
| Add chapter 3, exercise 3 | Add chapter 3, exercise 3
| JavaScript | mit | bewuethr/ctci | ---
+++
@@ -1,20 +1,12 @@
-function countBs(s) {
- let count = 0;
- for (let i = 0; i < s.length; ++i) {
- if (s[i] == "B") ++count;
- }
- return count;
+function countChar(s, c) {
+ let count = 0;
+ for (let i = 0; i < s.length; ++i) {
+ if (s[i] == c) ++count;
+ }
+
+ return count;
}
-functio... |
a39c9c8871162bd1ef2963b8faed51db25358ecd | src/browser-frontend/model/shared-prop-types.js | src/browser-frontend/model/shared-prop-types.js | /*
Copyright 2016 Mozilla
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
u... | /*
Copyright 2016 Mozilla
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
u... | Remove unused shared prop types | Remove unused shared prop types
Signed-off-by: Victor Porof <4f672cb979ca45495d0cccc37abaefc8713fcc24@gmail.com>
| JavaScript | apache-2.0 | victorporof/tofino,victorporof/tofino | ---
+++
@@ -13,18 +13,8 @@
import { PropTypes } from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
-import DomainPageModel from './domain-page-model';
-import DomainPageTransientModel from './domain-page-transient-model';
-
export const Client = PropTypes.shape({
send: PropTypes.func.is... |
56d5988bab49598a3be49a99e8e04fff94efc30a | examples/simple/triggers/primeStateTriggers.js | examples/simple/triggers/primeStateTriggers.js | // TODO: Switch this out with a proper import from the module when it's ready.
import { createTrigger, addTrigger } from '../../../src';
import { checkNextPrimeAction } from '../middleware/primesMiddleware';
const REMOVE_FROM_QUEUE = 'REMOVE_FROM_QUEUE';
function queueMatcher( state ) {
const { queue } = state.prime... | // TODO: Switch this out with a proper import from the module when it's ready.
import { addTrigger } from '../../../src';
import { checkNextPrimeAction } from '../middleware/primesMiddleware';
const REMOVE_FROM_QUEUE = 'REMOVE_FROM_QUEUE';
function queueMatcher( state ) {
const { queue } = state.primeState;
console... | Remove createTrigger import from triggers file | Remove createTrigger import from triggers file
The primeStateTriggers file still had an import for createTrigger.
This removes it.
| JavaScript | mit | coderkevin/redux-trigger | ---
+++
@@ -1,5 +1,5 @@
// TODO: Switch this out with a proper import from the module when it's ready.
-import { createTrigger, addTrigger } from '../../../src';
+import { addTrigger } from '../../../src';
import { checkNextPrimeAction } from '../middleware/primesMiddleware';
const REMOVE_FROM_QUEUE = 'REMOVE_FR... |
23b3260e6029f4dcd829e7141d5b23a4ede66a83 | webapp/src/components/disease/referenceCell.js | webapp/src/components/disease/referenceCell.js | import React from 'react';
const ReferenceCell = (refs) => {
return refs.map((ref) => {
if (ref.pubMedId && ref.pubMedUrl) {
return <a href={ref.pubMedUrl}>{ref.pubMedId}</a>;
} else {
return <span>{ref.publicationModId}</span>;
}
})
.reduce((prev, curr) => [prev, ', ', curr]);
};
export... | import React from 'react';
const ReferenceCell = (refs) => {
return refs && refs.map((ref) => {
if (ref.pubMedId && ref.pubMedUrl) {
return <a href={ref.pubMedUrl}>{ref.pubMedId}</a>;
} else {
return <span>{ref.publicationModId}</span>;
}
})
.reduce((prev, curr) => [prev, ', ', curr]);
};... | Handle case where reference list is undefined due to filtering | Handle case where reference list is undefined due to filtering
| JavaScript | mit | nathandunn/agr,alliance-genome/agr,alliance-genome/agr,alliance-genome/agr_prototype,nathandunn/agr,nathandunn/agr,alliance-genome/agr,alliance-genome/agr_prototype,nathandunn/agr,alliance-genome/agr | ---
+++
@@ -1,7 +1,7 @@
import React from 'react';
const ReferenceCell = (refs) => {
- return refs.map((ref) => {
+ return refs && refs.map((ref) => {
if (ref.pubMedId && ref.pubMedUrl) {
return <a href={ref.pubMedUrl}>{ref.pubMedId}</a>;
} else { |
772948724dcd63c2f8df1f1beb64254fbedc4a39 | js/application.js | js/application.js | ;(function(lander, undefined){
var display = document.getElementById('display');
var horizon = new Array(display.width);
var horizon_height = 50;
horizon[0] = horizon_height;
for (var index = 1; index < display.width; index++){
horizon[index] = horizon_height;
}
var model = {
... | ;(function(lander, undefined){
var display = document.getElementById('display');
var horizon = new Array(display.width);
var horizon_height = 50;
horizon[0] = horizon_height;
for (var index = 1; index < display.width; index++){
horizon[index] = horizon_height;
}
var model = {
... | Monitor if the lander is crashed | Monitor if the lander is crashed
| JavaScript | mit | darwins-challenge/moonlander-game,darwins-challenge/moonlander-game | ---
+++
@@ -25,6 +25,7 @@
model.lander.y = moonLander.x.y;
model.lander.orientation = moonLander.o.angle() - Math.PI/2;
model.lander.radius = simulation.params.landerRadius;
+ model.lander.crashed = moonLander.crashed;
}
var simulation = new lander.simulation.Simulation(w... |
a933b68be4f8c89ac61f50b85dfc8f0d6dd5bccc | react/gameday2/components/embeds/EmbedDacast.js | react/gameday2/components/embeds/EmbedDacast.js | import React from 'react'
import { webcastPropType } from '../../utils/webcastUtils'
const EmbedDacast = (props) => {
const channel = props.webcast.channel
const file = props.webcast.file
const iframeSrc = `https://static.viewer.dacast.com/b/${channel}/c/${file}`
return (
<iframe
src={iframeSrc}
... | import React from 'react'
import { webcastPropType } from '../../utils/webcastUtils'
const EmbedDacast = (props) => {
const channel = props.webcast.channel
const file = props.webcast.file
const iframeSrc = `https://static.viewer.dacast.com/b/${channel}/c/${file}`
return (
<iframe
src={iframeSrc}
... | Allow full screen on dacast embeds | [GD2] Allow full screen on dacast embeds
| JavaScript | mit | bdaroz/the-blue-alliance,fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,the-blue-alliance/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopreiato/the-blue-alliance... | ---
+++
@@ -12,6 +12,7 @@
height="100%"
frameBorder="0"
scrolling="no"
+ allowFullScreen
/>
)
} |
595aec1a409d2f0b068e625f6a53f354c0584535 | lib/junction/filters/dump.js | lib/junction/filters/dump.js | /**
* Dump outgoing stanzas to the console.
*
* This filter prints XML stanzas to the console. This is useful to inspect
* stanzas as they are transmitted on the wire, and aids in debugging. It is
* not recommended to use this filter in a production environment.
*
* Examples:
*
* app.use(junction.filter... | /**
* Dump outgoing stanzas to the console.
*
* This filter prints XML stanzas to the console. This is useful to inspect
* stanzas as they are transmitted on the wire, and aids in debugging. It is
* not recommended to use this filter in a production environment.
*
* Examples:
*
* app.filter(junction.fil... | Call `filter` and not `use` for filters. | Call `filter` and not `use` for filters. | JavaScript | mit | jaredhanson/junction | ---
+++
@@ -7,9 +7,9 @@
*
* Examples:
*
- * app.use(junction.filters.dump());
+ * app.filter(junction.filters.dump());
*
- * app.use(junction.filters.dump({ prefix: 'XMIT: ' }));
+ * app.filter(junction.filters.dump({ prefix: 'XMIT: ' }));
*
* @param {Object} options
* @return {Funct... |
a7d6fc81e04f3bde5b05516f0f0a5cf4e58811a0 | js/main.js | js/main.js | jQuery(document).ready(function($){
var timelineBlocks = $('.cd-timeline-block'),
offset = 0.8;
//hide timeline blocks which are outside the viewport
hideBlocks(timelineBlocks, offset);
//on scolling, show/animate timeline blocks when enter the viewport
$(window).on('scroll', function(){
(!window.requestAnim... | jQuery(document).ready(function($){
var timelineBlocks = $('.cd-timeline-block'),
offset = 0.8;
// hide timeline blocks which are outside the viewport
hideBlocks(timelineBlocks, offset);
// on scolling, show/animate timeline blocks when enter the viewport
$(window).on('scroll', function(){
(!window.requestAn... | Extend time lenght of animations | Extend time lenght of animations
Extend time lenght of animations to show blocks | JavaScript | apache-2.0 | soujava/historia,soujava/historia | ---
+++
@@ -2,13 +2,13 @@
var timelineBlocks = $('.cd-timeline-block'),
offset = 0.8;
- //hide timeline blocks which are outside the viewport
+ // hide timeline blocks which are outside the viewport
hideBlocks(timelineBlocks, offset);
- //on scolling, show/animate timeline blocks when enter the viewport
+ ... |
8c656e4f14aa04f8a05ec5d5c00c1c83f845a017 | lib/shared/provider/index.js | lib/shared/provider/index.js | 'use strict';
var alter = require('./alter');
var batoto = require('./batoto');
var kissmanga = require('./kissmanga');
var mangafox = require('./mangafox');
/**
* Retrieves a series.
* @param {string} address
* @return {Series}
*/
module.exports = function (address) {
var series = batoto(address) || kissmanga... | 'use strict';
var alter = require('./alter');
var batoto = require('./batoto');
var kissmanga = require('./kissmanga');
var mangafox = require('./mangafox');
var providers = [batoto, kissmanga, mangafox];
/**
* Retrieves a series.
* @param {string} address
* @return {Series}
*/
module.exports = function (address) ... | Enable runtime addition of third party providers. | Enable runtime addition of third party providers.
| JavaScript | mit | kenpeter/mangarack.js,kenpeter/mangarack.js | ---
+++
@@ -3,6 +3,7 @@
var batoto = require('./batoto');
var kissmanga = require('./kissmanga');
var mangafox = require('./mangafox');
+var providers = [batoto, kissmanga, mangafox];
/**
* Retrieves a series.
@@ -10,7 +11,11 @@
* @return {Series}
*/
module.exports = function (address) {
- var series ... |
3b79034d68b983a3d2250c9c2b25eefa93c1a335 | js/misc.js | js/misc.js | var round = function(num)
{
return (num + 0.5) | 0
}
var floor = function(num)
{
return num | 0
}
var ceil = function(num)
{
return (num | 0) == num ? num | 0 : (num + 1) | 0
}
var abs = Math.abs
var sqrt = Math.sqrt
var log = function(num)
{
var result = Math.log(num)
return result
}
var signed_log = func... | var round = function(num)
{
return (num + 0.5) | 0
}
var floor = function(num)
{
return num | 0
}
var ceil = function(num)
{
return (num | 0) == num ? num | 0 : (num + 1) | 0
}
var abs = Math.abs
var sqrt = Math.sqrt
var log = function(num)
{
var result = Math.log(num)
return result
}
var signed_log = func... | Add a die function to quickly throw errors | Add a die function to quickly throw errors
| JavaScript | artistic-2.0 | atrodo/fission_engine,atrodo/fission_engine | ---
+++
@@ -68,3 +68,8 @@
{
console.log.apply(console, arguments)
}
+
+var die = function(e)
+{
+ throw new Error(e)
+} |
7ec7b9e6c088d28d9521ccf3408a6a741cbd744f | src/client/modules/Events/EventDetails/tasks.js | src/client/modules/Events/EventDetails/tasks.js | import { apiProxyAxios } from '../../../components/Task/utils'
import { transformResponseToEventDetails } from '../transformers'
export const getEventDetails = (eventId) =>
apiProxyAxios
.get(`/api-proxy/v3/event/${eventId}`)
.then(({ data }) => transformResponseToEventDetails(data))
| import { apiProxyAxios } from '../../../components/Task/utils'
import { transformResponseToEventDetails } from '../transformers'
export const getEventDetails = (eventId) =>
apiProxyAxios
.get(`/api-proxy/v4/event/${eventId}`)
.then(({ data }) => transformResponseToEventDetails(data))
| Update the event endpoint from v3 to v4 | Update the event endpoint from v3 to v4
| JavaScript | mit | uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 | ---
+++
@@ -3,5 +3,5 @@
export const getEventDetails = (eventId) =>
apiProxyAxios
- .get(`/api-proxy/v3/event/${eventId}`)
+ .get(`/api-proxy/v4/event/${eventId}`)
.then(({ data }) => transformResponseToEventDetails(data)) |
94491a2ac736637c92ccee8c758551bf78a49d79 | src/browser/page-title.js | src/browser/page-title.js | const lag = require('./lag');
module.exports = (user, pings) => {
const original = document.title;
user.events.on('read', () => {
document.title = `${original} (${lag.humanize(pings.currentLag())})`;
});
};
| const lag = require('./lag');
module.exports = (user, pings) => {
const original = document.title;
user.events.on('read', () => {
document.title = `${lag.humanize(pings.currentLag())} - ${original}`;
});
};
| Increase the chances of seeing the actual lag when on narrow page tabs | Increase the chances of seeing the actual lag when on narrow page tabs
| JavaScript | mit | frosas/lag,frosas/lag,frosas/lag | ---
+++
@@ -3,6 +3,6 @@
module.exports = (user, pings) => {
const original = document.title;
user.events.on('read', () => {
- document.title = `${original} (${lag.humanize(pings.currentLag())})`;
+ document.title = `${lag.humanize(pings.currentLag())} - ${original}`;
});
}; |
ab57fd3f55334c6765c2cbd223d0d69e3dcf7923 | app/assets/javascripts/supervisor_autocomplete.js | app/assets/javascripts/supervisor_autocomplete.js | $(document).ready(function() {
var supervisor_provider = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: '/employees?q=%QUERY'
});
supervisor_provider.initialize();
$('.typeahead-supervisor').typeahead(null, ... | var supervisor_autocomplete = function() {
var supervisor_provider = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: '/employees?q=%QUERY'
});
supervisor_provider.initialize();
$('.typeahead-supervisor').type... | Move supervisor autocomplete into function | Move supervisor autocomplete into function
Change-Id: Iebcd27893f1801084ab8b39753b9c779bab16ead
| JavaScript | agpl-3.0 | Opensoftware/USI-Core,Opensoftware/USI-Core,Opensoftware/USI-Core | ---
+++
@@ -1,4 +1,4 @@
-$(document).ready(function() {
+var supervisor_autocomplete = function() {
var supervisor_provider = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
@@ -27,5 +27,8 @@
});
$('.typeahead.input-s... |
2f24b195620a4a8e559bde0424806fead3437957 | lib/collections/betImages.js | lib/collections/betImages.js | var imageStore = new FS.Store.GridFS('images')
Images = new FS.Collection('images', {
stores: [imageStore]
});
Images.allow({
'insert' : function(){
return true;
},
'update' : function(){
return true;
}
}); | var imageStore = new FS.Store.GridFS('images')
Images = new FS.Collection('images', {
stores: [imageStore]
});
Images.allow({
'insert' : function(){
return true;
},
'update' : function(){
return true;
},
'download' : function(){
return true;
}
}); | Set permission to download photo from CFS | Set permission to download photo from CFS
| JavaScript | mit | nmmascia/webet,nmmascia/webet | ---
+++
@@ -10,5 +10,8 @@
},
'update' : function(){
return true;
+ },
+ 'download' : function(){
+ return true;
}
}); |
313c74aba8324a32eac65554d22df73e5d2c374d | lib/composable-middleware.js | lib/composable-middleware.js |
/*
* composable-middleware
* https://github.com/randymized/composable-middleware
*
* Copyright (c) 2013 Randy McLaughlin
* Licensed under the MIT license.
*/
'use strict';
module.exports= function composable_middleware(components) {
var stack= [];
function middleware(req,res,out) {
var layer= 0;
v... |
/*
* composable-middleware
* https://github.com/randymized/composable-middleware
*
* Copyright (c) 2013 Randy McLaughlin
* Licensed under the MIT license.
*/
'use strict';
module.exports= function composable_middleware(components) {
var stack= [];
function middleware(req,res,out) {
var layer= 0;
v... | Test reaching end of stack | Test reaching end of stack
| JavaScript | mit | randymized/composable-middleware | ---
+++
@@ -17,7 +17,7 @@
var stacklength= stack.length;
(function next(err) {
var fn= stack[layer++];
- if (!fn) {
+ if (fn == null) {
return out(err);
}
else { |
bbc6c4b1a37719e4271cd2a1844b81ca198fb945 | addon/transforms/ol-geometry.js | addon/transforms/ol-geometry.js | import DS from 'ember-data';
export default DS.Transform.extend({
deserialize(serialized) {
return serialized;
},
serialize(deserialized) {
return deserialized;
}
});
| import DS from 'ember-data';
const format = new ol.format.GeoJSON()
export default DS.Transform.extend({
deserialize(serialized) {
return format.readGeometry(serialized);
},
serialize(deserialized) {
return format.writeGeometry(deserialized);
}
});
| Add GeoJSON transform for geometry | Add GeoJSON transform for geometry
| JavaScript | mit | bjornharrtell/ember-ol,bjornharrtell/ember-ol | ---
+++
@@ -1,11 +1,12 @@
import DS from 'ember-data';
+
+const format = new ol.format.GeoJSON()
export default DS.Transform.extend({
deserialize(serialized) {
- return serialized;
+ return format.readGeometry(serialized);
},
-
serialize(deserialized) {
- return deserialized;
+ return format.... |
149ed4b0f9ffb9b1774d2e7fd5b020fefe916354 | app/containers/container_viewContainer.js | app/containers/container_viewContainer.js | import React, { Component, PropTypes, StyleSheet, Text, View } from 'react-native';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import getLocationToSave from '../actions/action_dropNewPin.js';
import updatePins from '../actions/action_updatePins.js';
import deletePin from '../act... | import React, { Component, PropTypes, StyleSheet, Text, View } from 'react-native';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import getLocationToSave from '../actions/action_dropNewPin';
import updatePins from '../actions/action_updatePins';
import deletePin from '../actions/a... | Remove .js suffix in imports for consistency | Remove .js suffix in imports for consistency
| JavaScript | mit | InterruptedLobster/ARO | ---
+++
@@ -1,12 +1,12 @@
import React, { Component, PropTypes, StyleSheet, Text, View } from 'react-native';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
-import getLocationToSave from '../actions/action_dropNewPin.js';
-import updatePins from '../actions/action_updatePins.j... |
1fd1f157d9a2605bf7b02a290adbf9ecdd6b98ea | frontend/src/constants/database.js | frontend/src/constants/database.js | /**
* This file specifies the database collection and field names.
*/
export const COLLECTION_TRIPS = 'trips';
export const TRIPS_NAME = 'name';
export const TRIPS_DESCRIPTION = 'description';
export const TRIPS_DESTINATION = 'destination';
export const TRIPS_COLLABORATORS = 'collaborators';
export const TRIPS_START_... | /**
* This file specifies the database collection and field names.
*/
export const COLLECTION_TRIPS = 'trips';
export const TRIPS_TITLE = 'title';
export const TRIPS_DESCRIPTION = 'description';
export const TRIPS_DESTINATION = 'destination';
export const TRIPS_COLLABORATORS = 'collaborators';
export const TRIPS_STAR... | Update timestamp and trip title fields to better naming convention. | Update timestamp and trip title fields to better naming convention.
| JavaScript | apache-2.0 | googleinterns/SLURP,googleinterns/SLURP,googleinterns/SLURP | ---
+++
@@ -2,13 +2,13 @@
* This file specifies the database collection and field names.
*/
export const COLLECTION_TRIPS = 'trips';
-export const TRIPS_NAME = 'name';
+export const TRIPS_TITLE = 'title';
export const TRIPS_DESCRIPTION = 'description';
export const TRIPS_DESTINATION = 'destination';
export co... |
6187667b8225ba629bc898c77322634cde9e6d44 | lib/node_modules/@stdlib/time/now/lib/index.js | lib/node_modules/@stdlib/time/now/lib/index.js | 'use strict';
/**
* Time in seconds since the epoch.
*
* @module @stdlib/time/now
*
* @example
* var now = require( '@stdlib/time/now' );
*
* var ts = now();
* // returns <number>
*/
// MODULES //
var bool = require( './detect.js' );
// MAIN //
var now;
if ( bool ) {
now = require( './now.js' );
} else {
now = ... | 'use strict';
/**
* Time in seconds since the epoch.
*
* @module @stdlib/time/now
*
* @example
* var now = require( '@stdlib/time/now' );
*
* var ts = now();
* // returns <number>
*/
// MODULES //
var bool = require( './detect.js' );
var main = require( './now.js' );
var polyfill = require( './polyfill.js' );
// M... | Refactor to avoid dynamic module resolution | Refactor to avoid dynamic module resolution
| JavaScript | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | ---
+++
@@ -15,15 +15,17 @@
// MODULES //
var bool = require( './detect.js' );
+var main = require( './now.js' );
+var polyfill = require( './polyfill.js' );
// MAIN //
var now;
if ( bool ) {
- now = require( './now.js' );
+ now = main;
} else {
- now = require( './polyfill.js' );
+ now = polyfill;
}
... |
fd5f2489ad9c376c2c8fb15b3fec4d03b8700566 | src/javascript/binary_japan/trade_japan/portfolio.js | src/javascript/binary_japan/trade_japan/portfolio.js | const State = require('../../binary/base/storage').State;
const Client = require('../../binary/base/client').Client;
const PortfolioWS = require('../../binary/websocket_pages/user/account/portfolio/portfolio.init').PortfolioWS;
const JapanPortfolio = (function() {
let $portfolio,
isPortfolioActive = false... | const State = require('../../binary/base/storage').State;
const Client = require('../../binary/base/client').Client;
const PortfolioWS = require('../../binary/websocket_pages/user/account/portfolio/portfolio.init').PortfolioWS;
const JapanPortfolio = (function() {
let $portfolio,
isPortfolioActive = false... | Fix portolio tab loading when loaded by pjax | Fix portolio tab loading when loaded by pjax
| JavaScript | apache-2.0 | raunakkathuria/binary-static,raunakkathuria/binary-static,ashkanx/binary-static,binary-com/binary-static,negar-binary/binary-static,kellybinary/binary-static,fayland/binary-static,fayland/binary-static,4p00rv/binary-static,kellybinary/binary-static,binary-com/binary-static,negar-binary/binary-static,binary-static-deplo... | ---
+++
@@ -37,6 +37,7 @@
if (isTradePage() && isPortfolioActive) {
PortfolioWS.onUnload();
isPortfolioActive = false;
+ $portfolio = undefined;
}
}
|
c65d1cee1b5dc23991726b208174f82f989cedd6 | assets/src/dashboard/app/api/wpAdapter.js | assets/src/dashboard/app/api/wpAdapter.js | /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Use `_method=DELETE` instead for deletion | Use `_method=DELETE` instead for deletion
| JavaScript | apache-2.0 | GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp | ---
+++
@@ -15,6 +15,11 @@
*/
/**
+ * External dependencies
+ */
+import queryString from 'query-string';
+
+/**
* WordPress dependencies
*/
import apiFetch from '@wordpress/api-fetch';
@@ -28,11 +33,21 @@
method: 'POST',
});
+// `apiFetch` by default turns `DELETE` requests into `POST` requests
+... |
18803808f895cc6776fb5cb0b8e1d22c8a4b9905 | src/end.js | src/end.js | })();
|
/**
* This is the default configuration for the layout algorithm. It results in
* a grid-like layout. A perfect grid when the number of elements to layout
* is a perfect square. Otherwise the last couple of elements will be
* stretched.
*/
var defaultConfig = {
itemSize: function(item) { return ... | Add some wrapper code which defines the public API. | Add some wrapper code which defines the public API.
* There is now also a default configuration for the algorithm. Which is for
now the only one.
| JavaScript | mit | bbroeksema/d3-treemap | ---
+++
@@ -1 +1,89 @@
+
+ /**
+ * This is the default configuration for the layout algorithm. It results in
+ * a grid-like layout. A perfect grid when the number of elements to layout
+ * is a perfect square. Otherwise the last couple of elements will be
+ * stretched.
+ */
+ var defaultConfig = {
+ ... |
5b97687c3ccbbafa72daba26109fcebd1b26c052 | app/account/views/cards-list.js | app/account/views/cards-list.js | module.exports = Zeppelin.CollectionView.extend({
tagName: 'ol',
className: 'cards-list list-unstyled clearfix',
subscriptions: {
'cardsList:layout': 'triggerLayout'
},
itemView: function(model) {
return require('account/views/' + model.get('type'));
},
collection: function() {
return App.... | module.exports = Zeppelin.CollectionView.extend({
tagName: 'ol',
className: 'cards-list list-unstyled clearfix',
subscriptions: {
'cardsList:layout': 'triggerLayout'
},
itemView: function(model) {
return require('account/views/' + model.get('type'));
},
collection: function() {
return App.... | Reduce grid layout logic delay. | Reduce grid layout logic delay.
| JavaScript | agpl-3.0 | GetBlimp/boards-web,jessamynsmith/boards-web,jessamynsmith/boards-web | ---
+++
@@ -30,7 +30,7 @@
},
triggerLayout: function() {
- _.delay(this.layout, 10);
+ _.delay(this.layout, 1);
},
layout: function() { |
33a3a86f224f9c75bf5d1cbadf2444eb71c84db7 | app/controllers/balances.js | app/controllers/balances.js | RippleTransaction = require("../models/ripple_transaction");
var async = require("async");
module.exports = (function(){
function userIndex(req, res) {
req.user.balances(function(err, balances) {
res.send({ error: err, balances: balances });
});
}
return {
userIndex: userIndex
}
})();
| RippleTransaction = require("../models/ripple_transaction");
var async = require("async");
module.exports = (function(){
function index(req, res) {
req.user.balances(function(err, balances) {
res.send({ error: err, balances: balances });
});
}
return {
index: index
}
})();
| Rename userIndex controller action to index. | [FEATURE] Rename userIndex controller action to index.
| JavaScript | isc | zealord/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,xdv/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd | ---
+++
@@ -2,13 +2,13 @@
var async = require("async");
module.exports = (function(){
- function userIndex(req, res) {
+ function index(req, res) {
req.user.balances(function(err, balances) {
res.send({ error: err, balances: balances });
});
}
return {
- userIndex: userIndex
+ in... |
b12465e783d9fc3b4d99e2f87ab924d5b60fabc4 | app/routes/accept-invite.js | app/routes/accept-invite.js | import Route from '@ember/routing/route';
import ajax from 'ember-fetch/ajax';
export default Route.extend({
async model(params) {
try {
await ajax(`/api/v1//me/crate_owner_invitations/accept/${params.token}`, { method: 'PUT', body: '{}' });
this.set('response', { accepted: true });
return { re... | import Route from '@ember/routing/route';
import ajax from 'ember-fetch/ajax';
export default Route.extend({
async model(params) {
try {
await ajax(`/api/v1/me/crate_owner_invitations/accept/${params.token}`, { method: 'PUT', body: '{}' });
this.set('response', { accepted: true });
return { res... | Remove extra slash in URL | Remove extra slash in URL
| JavaScript | apache-2.0 | rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io | ---
+++
@@ -4,7 +4,7 @@
export default Route.extend({
async model(params) {
try {
- await ajax(`/api/v1//me/crate_owner_invitations/accept/${params.token}`, { method: 'PUT', body: '{}' });
+ await ajax(`/api/v1/me/crate_owner_invitations/accept/${params.token}`, { method: 'PUT', body: '{}' });
... |
370bc7beddcdb22eb54e89d795a54e3ac05af71a | web_client/js/views/annotationSelectorWidget.js | web_client/js/views/annotationSelectorWidget.js | histomicstk.views.AnnotationSelectorWidget = histomicstk.views.Panel.extend({
events: _.extend(histomicstk.views.Panel.prototype.events, {
'click .h-annotation > span': 'toggleAnnotation'
}),
setItem: function (item) {
if (this.collection) {
this.stopListening(this.collection);
... | histomicstk.views.AnnotationSelectorWidget = histomicstk.views.Panel.extend({
events: _.extend(histomicstk.views.Panel.prototype.events, {
'click .h-annotation > span': 'toggleAnnotation'
}),
initialize: function () {
this.listenTo(girder.eventStream, 'g:event.job_status', function (evt) {
... | Update annotation list on job completion | Update annotation list on job completion
| JavaScript | apache-2.0 | DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK | ---
+++
@@ -2,6 +2,13 @@
events: _.extend(histomicstk.views.Panel.prototype.events, {
'click .h-annotation > span': 'toggleAnnotation'
}),
+ initialize: function () {
+ this.listenTo(girder.eventStream, 'g:event.job_status', function (evt) {
+ if (evt.data.status > 2) {
+ ... |
40ee6a7448bdad262cf62fdab69a44a14b6d2352 | app/js/services/modalhandler.js | app/js/services/modalhandler.js | 'use strict';
/*
* Simple wrapper around $ionicPopup for modals and alerts and such
*/
var modalhandler = angular.module('modalhandler', []);
modalhandler.factory('modalFactory', function(i$ionicPopup) {
return {}
});
| 'use strict';
/*
* Simple wrapper around $ionicPopup for modals and alerts and such
*/
var modalhandler = angular.module('modalhandler', []);
modalhandler.factory('modalFactory', function(i$ionicPopup) {
return {
alert: function (title, template) {
return $ionicPopup.alert({
... | Add alert functionality to modal handler | Add alert functionality to modal handler
| JavaScript | mit | learning-layers/sardroid,learning-layers/sardroid,learning-layers/sardroid | ---
+++
@@ -7,6 +7,13 @@
var modalhandler = angular.module('modalhandler', []);
modalhandler.factory('modalFactory', function(i$ionicPopup) {
- return {}
+ return {
+ alert: function (title, template) {
+ return $ionicPopup.alert({
+ title : title,
+ templa... |
f76a836f196bec69e0ebc3bc50f0676d0f24d2b8 | draft-js-embed-plugin/src/modifiers/addEmbed.js | draft-js-embed-plugin/src/modifiers/addEmbed.js | import {
Entity,
EditorState,
AtomicBlockUtils
} from 'draft-js'
export default (editorState, url) => {
const urlType = 'embed'
const entityKey = Entity.create(urlType, 'IMMUTABLE', { src: url })
const newEditorState = AtomicBlockUtils.insertAtomicBlock(
editorState,
entityKey,
' '
)
return... | import {
Entity,
EditorState,
AtomicBlockUtils
} from 'draft-js'
export default (editorState, url) => {
const urlType = 'embed'
const entityKey = Entity.create(urlType, 'IMMUTABLE', { src: url })
const newEditorState = AtomicBlockUtils.insertAtomicBlock(
editorState,
entityKey,
' '
)
return... | Move cursor after embed when inserting | Move cursor after embed when inserting
Right now, when you insert an embed the cursor is afterwards _above_ the embed, rather than below it. With this fix the cursor is correctly moved after the embed, which makes for a much nicer writing experience.
Reference `image-plugin` PR with the same fix: https://github.com... | JavaScript | mit | vacenz/last-draft-js-plugins,vacenz/last-draft-js-plugins | ---
+++
@@ -14,6 +14,6 @@
)
return EditorState.forceSelection(
newEditorState,
- editorState.getCurrentContent().getSelectionAfter()
+ newEditorState.getCurrentContent().getSelectionAfter()
)
} |
5c6f950fcfba27fc913af5392d222400dcceee2f | node-iterator-shim.js | node-iterator-shim.js | export default function createNodeIterator(root, whatToShow, filter = null) {
var iter = _create.call(window.document, root, whatToShow, filter, false);
return typeof(iter.referenceNode) === 'undefined' ? shim(iter, root) : iter;
}
function shim(iter, root) {
var _referenceNode = root;
var _pointerBeforeRefer... | export default function createNodeIterator(root, whatToShow, filter = null) {
let document = root.ownerDocument;
var iter = document.createNodeIterator(root, whatToShow, filter, false);
return typeof(iter.referenceNode) === 'undefined' ? shim(iter, root) : iter;
}
function shim(iter, root) {
var _referenceNod... | Fix bad invocation of old, dead code | Fix bad invocation of old, dead code
| JavaScript | mit | tilgovi/node-iterator-shim,tilgovi/dom-node-iterator | ---
+++
@@ -1,5 +1,6 @@
export default function createNodeIterator(root, whatToShow, filter = null) {
- var iter = _create.call(window.document, root, whatToShow, filter, false);
+ let document = root.ownerDocument;
+ var iter = document.createNodeIterator(root, whatToShow, filter, false);
return typeof(iter.r... |
6a9feafbbeeb758ccbd84e48d0664d102eecc52a | src/marionette.component.js | src/marionette.component.js | // Marionette.Component
// --------------------
// An object to represent an application component, typically
// something visual, encapsulated in to an object that can be
// instantiated and dispalyed on screen as needed.
//
// Marionette.Component can optionally have a `region`, `model`,
// and/or `collection` pass... | // Marionette.Component
// --------------------
// An object to represent an application component, typically
// something visual, encapsulated in to an object that can be
// instantiated and dispalyed on screen as needed.
//
// Marionette.Component can optionally have a `region`, `model`,
// and/or `collection` pass... | Generalize and internalize view methods | Generalize and internalize view methods
| JavaScript | isc | jfairbank/marionette.component | ---
+++
@@ -19,16 +19,16 @@
},
show: function() {
- this.showLayout();
+ this._showView();
},
- showLayout: function() {
- var layout = this.layout = this.getLayout();
+ _showView: function() {
+ var view = this.view = this._getView();
- this.listenTo(layout, 'show', function() {
- ... |
91bfb006306ff5e712fd3016d1373859b9106049 | models/Tweet.js | models/Tweet.js | var mongoose = require('mongoose');
var COLLECTION_NAME = 'tweet';
var tweetSchema = new mongoose.Schema({
id: {type: String, required: true},
text: {type: String, required: true},
user: {
id: {type: String, required: true}
},
media: [{
url: {type: String, required: true}
}],
coordinates: {
... | var mongoose = require('mongoose');
var COLLECTION_NAME = 'tweet';
var tweetSchema = new mongoose.Schema({
id: {type: String, required: true},
text: {type: String},
user: {
id: {type: String, required: true}
},
media: [{
url: {type: String, required: true}
}],
coordinates: {
latitude: {type:... | Add date updated, remove required from text | Add date updated, remove required from text
| JavaScript | mit | magomimmo/snaptkite-engine,magomimmo/snaptkite-engine,RachBLondon/react-essentials-tutorial,Snapkite/snapkite-engine | ---
+++
@@ -4,7 +4,7 @@
var tweetSchema = new mongoose.Schema({
id: {type: String, required: true},
- text: {type: String, required: true},
+ text: {type: String},
user: {
id: {type: String, required: true}
},
@@ -14,7 +14,8 @@
coordinates: {
latitude: {type: String, required: false},
... |
3955739938bca7feb4e75aed5a6dab84898d26f6 | GruntFile.js | GruntFile.js | module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
nodeunit: {
unit: ['test/unit/test*.js'],
integration: ['test/integration/test*.js']
},
release: {
options: {
file: 'package.json',
... | module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
nodeunit: {
unit: ['test/unit/test*.js'],
integration: ['test/integration/test*.js']
},
release: {
options: {
file: 'package.json',
... | Add integration tests to standard `grunt test` | Add integration tests to standard `grunt test`
| JavaScript | mit | steveukx/git-js,steveukx/git-js | ---
+++
@@ -32,6 +32,6 @@
});
grunt.registerTask('default', ['patch']);
- grunt.registerTask('test', ['nodeunit:unit']);
+ grunt.registerTask('test', ['nodeunit:unit', 'nodeunit:integration']);
}; |
bbbf4f9e185aa09abdbcc710417df7acd6249f56 | assets/javascript/script.js | assets/javascript/script.js | angular.module('OpenMining', [])
.value('API_URL', '/process.json?')
.controller('Process',
function($scope, $http, $location, API_URL) {
for (var key in $location.search()){
API_URL += key + "=" + $location.search()[key] + "&";
}
$scope.loading = true;
$http({method: 'POST', url: API_URL}).
... | angular.module('OpenMining', [])
.controller('Process',
function($scope, $http, $location) {
$scope.loading = true;
$scope.init = function(slug) {
API_URL = "/process/" + slug + ".json?";
for (var key in $location.search()){
API_URL += key + "=" + $location.search()[key] + "&";
};
... | Use dynamic process (json) ajax load | Use dynamic process (json) ajax load
| JavaScript | mit | jgabriellima/mining,chrisdamba/mining,mining/mining,avelino/mining,mlgruby/mining,AndrzejR/mining,chrisdamba/mining,AndrzejR/mining,avelino/mining,mlgruby/mining,mlgruby/mining,mining/mining,jgabriellima/mining,seagoat/mining,seagoat/mining | ---
+++
@@ -1,16 +1,18 @@
angular.module('OpenMining', [])
-.value('API_URL', '/process.json?')
+.controller('Process',
+ function($scope, $http, $location) {
+ $scope.loading = true;
+ $scope.init = function(slug) {
+ API_URL = "/process/" + slug + ".json?";
+ for (var key in $location.search()){
+... |
5b43248bc50450d0b46f4f98a373168e27cb3d26 | generators/jekyll/templates/build.js | generators/jekyll/templates/build.js | 'use strict';
const gulp = require('gulp');
const shell = require('shelljs');
const size = require('gulp-size');
const argv = require('yargs').argv;
// 'gulp jekyll:tmp' -- copies your Jekyll site to a temporary directory
// to be processed
gulp.task('site:tmp', () =>
gulp.src(['src/**/*', '!src/assets/**/*', '!src/... | 'use strict';
const gulp = require('gulp');
const shell = require('shelljs');
const size = require('gulp-size');
const argv = require('yargs').argv;
// 'gulp jekyll:tmp' -- copies your Jekyll site to a temporary directory
// to be processed
gulp.task('site:tmp', () =>
gulp.src(['src/**/*', '!src/assets/**/*', '!src/... | Include dotfiles when copying the site | Include dotfiles when copying the site
Part one of fixing issue #141.
| JavaScript | mit | sondr3/generator-jekyllized,sondr3/generator-jekyllized,sondr3/generator-jekyllized | ---
+++
@@ -7,7 +7,7 @@
// 'gulp jekyll:tmp' -- copies your Jekyll site to a temporary directory
// to be processed
gulp.task('site:tmp', () =>
- gulp.src(['src/**/*', '!src/assets/**/*', '!src/assets'])
+ gulp.src(['src/**/*', '!src/assets/**/*', '!src/assets'], {dot: true})
.pipe(gulp.dest('.tmp/src'))
... |
6af99b14bdb5d52199e02724316dab6d7f89bccc | app/components/bd-arrival.js | app/components/bd-arrival.js | import Ember from 'ember';
import moment from 'moment';
import stringToHue from 'bus-detective/utils/string-to-hue';
var inject = Ember.inject;
export default Ember.Component.extend({
tagName: 'li',
clock: inject.service(),
attributeBindings: ['style'],
classNames: ['arrival'],
classNameBindings: ['isPast:ar... | import Ember from 'ember';
import moment from 'moment';
import stringToHue from 'bus-detective/utils/string-to-hue';
var inject = Ember.inject;
export default Ember.Component.extend({
tagName: 'li',
clock: inject.service(),
attributeBindings: ['style'],
classNames: ['arrival'],
classNameBindings: ['isPast:ar... | Format how time from now is displayed | Format how time from now is displayed
| JavaScript | mit | bus-detective/web-client,bus-detective/web-client | ---
+++
@@ -11,7 +11,7 @@
classNameBindings: ['isPast:arrival--past'],
timeFromNow: Ember.computed('clock.time', function() {
- return moment(this.get('arrival.time')).fromNow();
+ return moment(this.get('arrival.time')).fromNow('mm');
}),
isPast: Ember.computed('clock.time', function() { |
b78f0d309bb99255aa229d9f99c94eac5b5b28d5 | Gruntfile.js | Gruntfile.js | 'use strict';
module.exports = function (grunt) {
// Load the project's grunt tasks from a directory
require('grunt-config-dir')(grunt, {
configDir: require('path').resolve('tasks')
});
/*
* Register group tasks
*/
//npm install
grunt.registerTask('npm_install', 'install d... | 'use strict';
module.exports = function (grunt) {
// Load the project's grunt tasks from a directory
require('grunt-config-dir')(grunt, {
configDir: require('path').resolve('tasks')
});
/*
* Register group tasks
*/
//npm install
grunt.registerTask('npm_install', 'install d... | Update the zip task to dist and correct api task | Update the zip task to dist and correct api task
| JavaScript | cc0-1.0 | LinuxBozo/hmda-edit-check-api,cfpb/hmda-edit-check-api,porterbot/hmda-edit-check-api,cfpb/hmda-edit-check-api,LinuxBozo/hmda-edit-check-api | ---
+++
@@ -34,6 +34,6 @@
grunt.registerTask('clean_all', [ 'clean:node_modules', 'clean:coverage', 'npm_install' ]);
grunt.registerTask('test', ['env:test', 'clean:coverage', 'jshint', 'mocha_istanbul']);
grunt.registerTask('coverage', ['test', 'open_coverage']);
- grunt.registerTask('zip', ['compr... |
05e6a2d1a58f00a68e61daf0a770fc708835583f | Gruntfile.js | Gruntfile.js | "use strict";
module.exports = function (grunt) {
grunt.initConfig({
bump: {
options: {
files: ["package.json"],
commit: true,
commitMessage: "Release %VERSION%",
commitFiles: ["-a"],
createTag: true,
... | "use strict";
module.exports = function (grunt) {
grunt.initConfig({
bump: {
options: {
files: ["package.json"],
commit: true,
commitMessage: "Release %VERSION%",
commitFiles: ["-a"],
createTag: true,
... | Clean up node_modules after updating them | Clean up node_modules after updating them
| JavaScript | bsd-2-clause | silverwind/droppy,jhliberty/droppy,jhliberty/droppy,silverwind/droppy,silverwind/droppy | ---
+++
@@ -28,14 +28,17 @@
},
update: {
command: "npm-check-updates -u"
+ },
+ modules: {
+ command: "rm -rf node_modules && npm install"
}
}
});
- grunt.registerTask("update", "shell:update");
+ grunt.... |
a8f422db6e5bf535eee25785b646db9d83352adc | lib/core-components/famous-tests/webgl/custom-shader/fragment/fragment.js | lib/core-components/famous-tests/webgl/custom-shader/fragment/fragment.js | FamousFramework.scene('famous-tests:webgl:custom-shader:fragment', {
behaviors: {
'.sphere': {
'size': [200, 200],
'align': [0.5, 0.5],
'mount-point': [0.5, 0.5],
'base-color': {
'name': 'sphereFragment',
'glsl': 'vec4(0.0, 1.0,... | FamousFramework.scene('famous-tests:webgl:custom-shader:fragment', {
behaviors: {
'.sphere': {
'size': [200, 200],
'align': [0.5, 0.5],
'mount-point': [0.5, 0.5],
'base-color': {
'name': 'sphereFragment',
'glsl': 'vec4((v_normal... | Update to use v_normals for color | examples: Update to use v_normals for color
| JavaScript | mit | infamous/framework,jeremykenedy/framework,jeremykenedy/framework,infamous/framework,ildarsamit/framework,tbossert/framework,woltemade/framework,SvitlanaShepitsena/shakou,SvitlanaShepitsena/framework-1,infamous/famous-framework,woltemade/framework,colllin/famous-framework,SvitlanaShepitsena/framework,Famous/framework,tb... | ---
+++
@@ -6,7 +6,7 @@
'mount-point': [0.5, 0.5],
'base-color': {
'name': 'sphereFragment',
- 'glsl': 'vec4(0.0, 1.0, 1.0, 1.0);',
+ 'glsl': 'vec4((v_normal + 1.0) * 0.5, 1.0);',
'output': 4,
},
'geome... |
a1a20c06648c54a0990e15e532ea7c8bed0b75de | website/src/app/project/experiments/experiment/mc-experiment.component.js | website/src/app/project/experiments/experiment/mc-experiment.component.js | import {Experiment, ExperimentStep} from './experiment.model';
angular.module('materialscommons').component('mcExperiment', {
templateUrl: 'app/project/experiments/experiment/mc-experiment.html',
controller: MCExperimentComponentController
});
/*@ngInject*/
function MCExperimentComponentController($scope, mov... | import {Experiment, ExperimentStep} from './experiment.model';
angular.module('materialscommons').component('mcExperiment', {
templateUrl: 'app/project/experiments/experiment/mc-experiment.html',
controller: MCExperimentComponentController
});
/*@ngInject*/
function MCExperimentComponentController($scope, mov... | Hide the sidebar by default. | Hide the sidebar by default.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | ---
+++
@@ -10,7 +10,7 @@
let ctrl = this;
ctrl.currentStep = null;
ctrl.currentNode = null;
- ctrl.showSidebar = true;
+ ctrl.showSidebar = false;
// Create the initial hard coded experiment
ctrl.experiment = new Experiment('test experiment'); |
540f0080e15daca76e32ab953d832e3ee057f5e1 | src/programs/city/reboot.js | src/programs/city/reboot.js | 'use strict'
/**
* Attempts to prevent stalled rooms by launching filler creeps at 300 energy.
*/
class CityReboot extends kernel.process {
constructor (...args) {
super(...args)
this.priority = PRIORITIES_CITY_REBOOT
}
main () {
if (!Game.rooms[this.data.room]) {
return this.suicide()
... | 'use strict'
/**
* Attempts to prevent stalled rooms by launching filler creeps at 300 energy.
*/
class CityReboot extends kernel.process {
constructor (...args) {
super(...args)
this.priority = PRIORITIES_CITY_REBOOT
}
main () {
if (!Game.rooms[this.data.room]) {
return this.suicide()
... | Reboot when there are no fillers (as opposed to no creeps at all) | Reboot when there are no fillers (as opposed to no creeps at all)
| JavaScript | mit | ScreepsQuorum/screeps-quorum | ---
+++
@@ -15,7 +15,8 @@
return this.suicide()
}
this.room = Game.rooms[this.data.room]
- if (this.room.find(FIND_MY_CREEPS).length <= 0) {
+ const fillers = this.room.find(FIND_MY_CREEPS, {filter: (creep) => creep.name.startsWith('filler')})
+ if (fillers.length <= 0) {
this.launchC... |
dc16bf8c7824869d86dada016d975f1b8f47370a | simple_model/index.js | simple_model/index.js | function simulateNumericDecision(fleet1, fleet2){
if (fleet1.ships > fleet2.ships) return fleet1;
if (fleet1.ships < fleet2.ships) return fleet2;
return null;
}
const orion = {
name: 'orion',
ships: 295
}
const commonwealth = {
name: 'commonwealth',
ships: 300
}
console.log('simulateNumericDecision \nw... | function simulateNumericDecision(fleet1, fleet2){
if (fleet1.ships > fleet2.ships) return fleet1;
if (fleet1.ships < fleet2.ships) return fleet2;
return null;
}
const orion = {
name: 'orion',
ships: 295
}
const commonwealth = {
name: 'commonwealth',
ships: 300
}
const hasle = {
name: 'commonwealth',
... | Add additional simulations to show different results | Add additional simulations to show different results
| JavaScript | mit | julianbei/CollisionModel | ---
+++
@@ -14,4 +14,11 @@
ships: 300
}
-console.log('simulateNumericDecision \nwinner:', simulateNumericDecision(orion, commonwealth));
+const hasle = {
+ name: 'commonwealth',
+ ships: 300
+}
+
+console.log('simulateNumericDecision fight: 1\nwinner:', simulateNumericDecision(orion, commonwealth));
+console.... |
b1a2874921524c6ce40c588b114a0109ffc4a0b6 | imports/modules/documents/lib/document-editor.js | imports/modules/documents/lib/document-editor.js | /* eslint-disable no-undef */
import { Bert } from 'meteor/themeteorchef:bert';
import { upsertDocument } from '/imports/api/documents/methods';
import '/imports/lib/validation';
let component;
const handleUpsert = () => {
const { doc, history } = component.props;
const confirmation = doc && doc._id ? 'Document m... | /* eslint-disable no-undef */
import { Bert } from 'meteor/themeteorchef:bert';
import { upsertDocument } from '/imports/api/documents/methods';
import '/imports/lib/validation';
let component;
const handleUpsert = () => {
const { doc, history } = component.props;
const confirmation = doc && doc._id ? 'Document m... | Correct french translation module documents | Correct french translation module documents
| JavaScript | mit | ggallon/rock,ggallon/rock | ---
+++
@@ -7,7 +7,7 @@
const handleUpsert = () => {
const { doc, history } = component.props;
- const confirmation = doc && doc._id ? 'Document mise à jour !' : 'Document ajouté !';
+ const confirmation = doc && doc._id ? 'Document mis à jour !' : 'Document ajouté !';
const upsert = {
title: document... |
f7d2e4b0acf849e850c26f2f45ac5f0850f0bcd1 | api/resolver.js | api/resolver.js | module.exports = function(req, res) {
console.log('req.body', req.body)
var data = JSON.parse(req.body.params);
if (!data) {
res.status(403 /* Unauthorized */ ).send('Invalid params');
return;
}
var width = data.width > 600 ? 600 : data.width;
var html = '<p><img style="max-width:100%;" src="' + da... | module.exports = function(req, res) {
console.log('req.body', req.body)
var data = JSON.parse(req.body.params);
if (!data) {
res.status(403 /* Unauthorized */ ).send('Invalid params');
return;
}
var width = data.width > 600 ? 600 : data.width;
var html = '<img style="max-width:100%;" src="' + data.... | Remove paragraph that adds too much padding. | Remove paragraph that adds too much padding. | JavaScript | mit | mixmaxhq/giphy-mixmax-app,mixmaxhq/giphy-mixmax-app | ---
+++
@@ -7,8 +7,9 @@
}
var width = data.width > 600 ? 600 : data.width;
- var html = '<p><img style="max-width:100%;" src="' + data.src + '" width="' + width + '"/></p>';
+ var html = '<img style="max-width:100%;" src="' + data.src + '" width="' + width + '"/>';
res.json({
body: html
+ // Add ... |
b7da2c005034388176b73e3b38dd4e06912e6ce3 | demo-projects/blog/app/lib/init-apollo.js | demo-projects/blog/app/lib/init-apollo.js | import { ApolloClient, InMemoryCache } from 'apollo-boost';
import { createUploadLink } from 'apollo-upload-client';
import fetch from 'isomorphic-unfetch';
let apolloClient = null;
let isBrowser = typeof window !== 'undefined';
function create(initialState) {
return new ApolloClient({
connectToDevTools: isBro... | import { ApolloClient, InMemoryCache } from 'apollo-boost';
import { createUploadLink } from 'apollo-upload-client';
import fetch from 'isomorphic-unfetch';
let apolloClient = null;
let isBrowser = typeof window !== 'undefined';
function create(initialState) {
// TODO: server-side requests must have an absolute UR... | Fix apollo client in SSR mode | Fix apollo client in SSR mode
| JavaScript | mit | keystonejs/keystone,keystonejs/keystone,keystonejs/keystone | ---
+++
@@ -7,10 +7,15 @@
let isBrowser = typeof window !== 'undefined';
function create(initialState) {
+ // TODO: server-side requests must have an absolute URI. We should find a way
+ // to make this part of the project config, seems highly opinionated here
+ const uriHost = !isBrowser ? 'http://localhost:3... |
dd0e909385711d3f0ab20e9d0aba3c3b04a2a3bb | assets/js/util/escape-uri.js | assets/js/util/escape-uri.js | /**
* Escape URI components utility.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE... | /**
* Escape URI components utility.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE... | Update jsdoc type for values param of the escapeURI function. | Update jsdoc type for values param of the escapeURI function.
Co-authored-by: Evan Mattson <04b4a59aa52dbba0fe4139b6afe8885fd3fa41ec@10up.com> | JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | ---
+++
@@ -22,7 +22,7 @@
* @since n.e.x.t
*
* @param {string[]} strings The array of static strings in the template.
- * @param {...any} values The array of expressions used in the template.
+ * @param {...*} values The array of expressions used in the template.
* @return {string} Escaped URI string.
*/
e... |
46ae84b8945d2c3ce8585da29e5aedb387421bef | app/prelude2.js | app/prelude2.js | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};var R=(e)=>{var n=t[o][1][e];return s(n?n:e)};R.resolve=(m)=>{console.log('... | //based on https://github.com/substack/browser-pack/blob/01d39894f7168983f66200e727cdaadf881cd39d/prelude.js
// modules are defined as an array
// [ module function, map of requireuires ]
//
// map of requireuires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
/... | Add verbose prelude from browser-pack | Add verbose prelude from browser-pack
| JavaScript | mit | deathcap/nodeachrome,deathcap/nodeachrome,deathcap/nodeachrome | ---
+++
@@ -1 +1,44 @@
-(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};var R=(e)=>{var n=t[o][1][e];return s(n?n:e)};R.r... |
35fc0b0e4289b2487b485b908b888e584479d71e | modules/random.js | modules/random.js | module.exports = {
commands: {
random: {
help: 'Selects a random choice or number',
command: function (bot, msg) {
if (msg.args.length > 2) {
msg.args.shift()
return msg.args[Math.floor(Math.random() * msg.args.length)]
} else if (msg.args.length === 2) {
... | module.exports = {
commands: {
random: {
help: 'Selects a random choice or number',
command: function (bot, msg) {
if (msg.args.length > 2) {
msg.args.shift()
return msg.args[Math.floor(Math.random() * msg.args.length)]
} else if (msg.args.length === 2) {
... | Fix things the linter doesn't like | Fix things the linter doesn't like
| JavaScript | isc | zuzakistan/civilservant,zuzakistan/civilservant | ---
+++
@@ -17,8 +17,8 @@
},
coin: {
help: 'Flips a coin',
- command: function (bot, msg) {
- var faces = ["Heads!", "Tails!"]
+ command: function () {
+ var faces = ['Heads!', 'Tails!']
return faces[Math.floor(Math.random() * faces.length)]
}
} |
2a75acbd9f980e625949ae5238b5959e97b65ed6 | lib/client/app/serverslist/serverslist.ctrl.js | lib/client/app/serverslist/serverslist.ctrl.js | class ServersListCtrl {
constructor($scope, Servers, Socket) {
this.$scope = $scope;
this.Servers = Servers;
this.socket = Socket;
this.init();
}
init() {
this.servers = [];
this.Servers.list()
.then((servers) => {
this.servers = servers;
this.socket.on('server-creat... | class ServersListCtrl {
constructor($scope, Servers, Socket) {
this.$scope = $scope;
this.Servers = Servers;
this.socket = Socket;
this.init();
}
init() {
this.servers = [];
this.Servers.list()
.then((servers) => {
this.servers = servers;
this.socket.on('server-creat... | Update servers list on remove | Update servers list on remove
| JavaScript | mit | adonescunha/monithub,adonescunha/monithub | ---
+++
@@ -15,6 +15,12 @@
this.servers.push(data.server);
this.$scope.$digest();
});
+ this.socket.on('server-removed', (data) => {
+ _.remove(this.servers, (server) => {
+ return server.hostname == data.server.hostname;
+ });
+ this.$scope.... |
90aee5473e1911d7572d7af7b4d589d40c294039 | test/unit/main.js | test/unit/main.js | 'use strict';
describe('controllers', function(){
var scope;
beforeEach(module('wallet'));
beforeEach(inject(function($rootScope) {
scope = $rootScope.$new();
}));
it('should define more than 5 awesome things', inject(function($controller) {
expect(scope.awesomeThings).toBeUndefined();
$contro... | 'use strict';
describe('controllers', function () {
var scope, ctrl;
beforeEach(module('wallet'));
describe('WalletCtrl', function () {
beforeEach(inject(function ($rootScope, $controller) {
scope = $rootScope.$new();
ctrl = $controller('WalletCtrl', {
$scope: scope
});
}));
... | Add a couple of unit tests. | Add a couple of unit tests.
| JavaScript | mit | tvararu/wallet | ---
+++
@@ -1,22 +1,28 @@
'use strict';
-describe('controllers', function(){
- var scope;
+describe('controllers', function () {
+ var scope, ctrl;
beforeEach(module('wallet'));
- beforeEach(inject(function($rootScope) {
- scope = $rootScope.$new();
- }));
+ describe('WalletCtrl', function () {
+ ... |
cdf59e599720db5f2d66d7f1a76fe6034cabe0d0 | src/deep-todo/tests/e2e/Tests/TaskEditing.spec.js | src/deep-todo/tests/e2e/Tests/TaskEditing.spec.js | 'use strict';
var TaskList = require('../POMs/TasksList.js');
describe('Check that task name can be updated', function() {
beforeAll(function() {
TaskList.actionsBeforeAll();
});
it('Adding new task', function() {
TaskList.addTask('protractor test task1');
//wait untill all task will be loaded
... | /* global browser */
/* global protractor */
'use strict';
var TaskList = require('../POMs/TasksList.js');
var config = require('../protractor.config.js');
describe('Check that task name can be updated', function() {
beforeAll(function() {
TaskList.actionsBeforeAll();
});
it('Adding new task', function(... | Fix hound issues: [ci full] | Fix hound issues: [ci full]
| JavaScript | mit | MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todo-app,MitocGroup/deep-microservices-todo-app,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todo-app | ---
+++
@@ -1,6 +1,11 @@
+/* global browser */
+/* global protractor */
+
'use strict';
var TaskList = require('../POMs/TasksList.js');
+var config = require('../protractor.config.js');
+
describe('Check that task name can be updated', function() {
|
7c049bc980375a3514fbe1091aa23b4eb6cd7e46 | node/src/main/vcap-parser.js | node/src/main/vcap-parser.js |
'use strict';
function Parser(plugins) {
var filterPluginsForServices = function(serviceNames) {
return plugins.filter(function (plugin) {
return serviceNames.findIndex(function (serviceName) {
return plugin.name === serviceName;
}) !== -1;
});
}... |
'use strict';
function Parser(plugins) {
var filterPluginsForServices = function(serviceNames) {
return plugins.filter(function (plugin) {
return serviceNames.findIndex(function (serviceName) {
return plugin.name === serviceName;
}) !== -1;
});
}... | Refactor selecting the plugins to use for parsing. | Refactor selecting the plugins to use for parsing.
| JavaScript | mit | mattunderscorechampion/vcap-services-parser | ---
+++
@@ -10,25 +10,37 @@
});
};
+ var filterPluginsForService = function(serviceNames) {
+ return plugins.filter(function (plugin) {
+ return plugin.name === serviceNames;
+ });
+ };
+
+ var selectPlugins = function (serviceNames) {
+ if (typeof serviceN... |
8f29607f0e34a4b3aca69bf51ec4a81dc9a2e4c5 | src/main/webapp/js_src/gitana/GitanaAutoConfig.js | src/main/webapp/js_src/gitana/GitanaAutoConfig.js | (function(window)
{
// if we're running on the Cloud CMS hosted platform, we can auto-acquire the client key that we should use
(function() {
var uri = window.location.href;
var z1 = uri.indexOf(window.location.pathname);
z1 = uri.indexOf("/", z1 + 2);
if (z1 > -1)
{
... | (function(window)
{
// if we're running on the Cloud CMS hosted platform, we can auto-acquire the client key that we should use
(function() {
// check to make sure location exists (only available in browsers)
if (typeof window.location != "undefined")
{
var uri = window.loc... | Check for window.location undefined on auto config setup | Check for window.location undefined on auto config setup
| JavaScript | apache-2.0 | gitana/gitana-javascript-driver,gitana/gitana-javascript-driver,gitana/gitana-javascript-driver | ---
+++
@@ -3,17 +3,21 @@
// if we're running on the Cloud CMS hosted platform, we can auto-acquire the client key that we should use
(function() {
- var uri = window.location.href;
- var z1 = uri.indexOf(window.location.pathname);
- z1 = uri.indexOf("/", z1 + 2);
- if (z1 > -... |
933531dd67dbb8c77e204418dc23149549b14863 | javascript/ExternalContent.jquery.js | javascript/ExternalContent.jquery.js |
/**
* jQuery functionality used on the external content admin page
*/
;(function ($, pt) {
$().ready(function () {
// bind the upload form
$('#Form_EditForm_Migrate').click(function () {
// we don't want this to be submitted via the edit form, as we want to do an ajax postback for this
// and not tie up ... |
/**
* jQuery functionality used on the external content admin page
*/
;(function ($, pt) {
$().ready(function () {
// bind the upload form
$('#Form_EditForm_Migrate').livequery(function () {
$(this).click(function () {
// we don't want this to be submitted via the edit form, as we want to do an ajax pos... | Make sure to livequery the migrate button... | BUGFIX: Make sure to livequery the migrate button...
| JavaScript | bsd-3-clause | nyeholt/silverstripe-external-content,nyeholt/silverstripe-external-content | ---
+++
@@ -6,38 +6,40 @@
;(function ($, pt) {
$().ready(function () {
// bind the upload form
- $('#Form_EditForm_Migrate').click(function () {
- // we don't want this to be submitted via the edit form, as we want to do an ajax postback for this
- // and not tie up the response.
+ $('#Form_EditForm_Migra... |
2e5d48c7ef82bac81dde484c9be6f8c0f3bd7993 | mrq/dashboard/static/js/config.js | mrq/dashboard/static/js/config.js | // Set the require.js configuration for your application.
require.config({
// Initialize the application with the main application file.
deps: ["main"],
paths: {
// Libraries.
circliful: "/static/js/vendor/jquery.circliful.min",
jquery: "/static/js/vendor/jquery-2.1.0.min",
underscore: "/static... | // Set the require.js configuration for your application.
require.config({
// Initialize the application with the main application file.
deps: ["main"],
paths: {
// Libraries.
circliful: "/static/js/vendor/jquery.circliful.min",
jquery: "/static/js/vendor/jquery-2.1.0.min",
underscore: "/static... | Disable cache busting for dashboard | Disable cache busting for dashboard
| JavaScript | mit | pricingassistant/mrq,pricingassistant/mrq,pricingassistant/mrq,pricingassistant/mrq | ---
+++
@@ -19,8 +19,7 @@
sparkline: "/static/js/vendor/jquery.sparkline.min"
},
- urlArgs: "bust=" + (new Date()).getTime(),
-
+ // urlArgs: "bust=" + (new Date()).getTime(),
shim: {
|
0590c42aa8bc9992e49802863510f4e1a9b03910 | server/db/models/UserUrl.js | server/db/models/UserUrl.js | var Sequelize = require("sequelize");
module.exports = function(sequelize, tableConfig) {
return sequelize.define('UserUrl', {
email: {
type: Sequelize.STRING,
allowNull: false
},
webImage: {
type: Sequelize.STRING
},
cropImage: {
type: Sequelize.STRING,
allowNull: f... | var Sequelize = require("sequelize");
module.exports = function(sequelize, tableConfig) {
return sequelize.define('UserUrl', {
email: {
type: Sequelize.STRING,
allowNull: false
},
webImage: {
type: Sequelize.STRING
},
cropImage: {
type: Sequelize.STRING,
allowNull: f... | Set status to default to true | [Refactor] Set status to default to true
| JavaScript | mit | TheBlankArrays/Scrapinit,TheBlankArrays/Scrapinit,Nayigiziki/Scrapinit,chrisgrovers/loveBiscuits,Nayigiziki/Scrapinit,chrisgrovers/loveBiscuits | ---
+++
@@ -29,7 +29,10 @@
type: Sequelize.INTEGER,
allowNull: false
},
- status: Sequelize.BOOLEAN,
+ status: {
+ type: Sequelize.BOOLEAN,
+ defaultValue: true
+ },
frequency: {
type: Sequelize.INTEGER,
defaultValue: 5 |
3d7ed00f30f86d4c7bd49fa442111b4668bc1719 | packages/@sanity/cli/src/commands/init/initCommand.js | packages/@sanity/cli/src/commands/init/initCommand.js | import lazyRequire from '@sanity/util/lib/lazyRequire'
const helpText = `
Options
-y, --yes Use unattended mode, accepting defaults and using only flags for choices
--project <projectId> Project ID to use for the studio
--dataset <dataset> Dataset name for the studio
--output-path <path> Path to write studio p... | import lazyRequire from '@sanity/util/lib/lazyRequire'
const helpText = `
Options
-y, --yes Use unattended mode, accepting defaults and using only flags for choices
--project <projectId> Project ID to use for the studio
--dataset <dataset> Dataset name for the studio
--output-path <path> Path to write studio p... | Improve help text on init command | [cli] Improve help text on init command
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -9,14 +9,25 @@
--template <template> Project template to use [default: "clean"]
Examples
+ # Initialize a new project, prompt for required information along the way
+ sanity init
+
+ # Initialize a new plugin
+ sanity init plugin
+
+ # Initialize a project with the given project ID and dataset t... |
17168c992d498dba4ef80a23c0897d741e704a2e | frontend/js/components/icons/issueType.js | frontend/js/components/icons/issueType.js | import React from "react";
export const default_icon = "fa fa-circle-o";
export const un_ocha_icon_mapping = {
"core-relief-item": "core-relief-item",
shelter: "shelter",
health: "health",
nutrition: "nutrition",
"sanitation-water-hygiene": "sanitation-water-hygiene",
logistics: "logistics",
protection: ... | import React from "react";
export const default_icon = "fa fa-circle-o";
export const un_ocha_icon_mapping = {
"core-relief-item": "core-relief-item",
shelter: "shelter",
health: "health",
nutrition: "nutrition",
"sanitation-water-hygiene": "sanitation-water-hygiene",
logistics: "logistics",
protection: ... | Add correct icon class to issuetype | Add correct icon class to issuetype | JavaScript | mit | mcallistersean/b2-issue-tracker,mcallistersean/b2-issue-tracker,mcallistersean/b2-issue-tracker | ---
+++
@@ -38,7 +38,7 @@
const ToucanIcon = ({ issue_type }) => {
return (
<span
- className={getIconClassForIssueType(issue_type)}
+ className={"icon " + getIconClassForIssueType(issue_type)}
title={issue_type.name}
/>
); |
e245acf55cfd96a2207c16e0d574953234c2cb9e | src/lwc/geFormRenderer/geFormRendererHelper.js | src/lwc/geFormRenderer/geFormRendererHelper.js | export function flatten(obj) {
let flatObj = {};
for (const [key, value] of Object.entries(obj)) {
if (value !== null && value !== undefined && value.hasOwnProperty('value')) {
flatObj[key] = value.value;
} else {
flatObj[key] = value;
}
}
return flatObj;
... | /**
* @description Helper function used to convert an object that has key value pairs where
* the value is an object with a value property, i.e. {value: {value:'', displayValue:''}},
* into an object that has primitives as values: {value: ''}.
* @param obj The object that has value objects.
* @returns An object th... | Add description to flatten function | Add description to flatten function
| JavaScript | bsd-3-clause | SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus | ---
+++
@@ -1,3 +1,11 @@
+/**
+ * @description Helper function used to convert an object that has key value pairs where
+ * the value is an object with a value property, i.e. {value: {value:'', displayValue:''}},
+ * into an object that has primitives as values: {value: ''}.
+ * @param obj The object that has value o... |
5c98a2c1f036a9e9da5555ab7dc8346d84f27a41 | public/js/mconsole.js | public/js/mconsole.js | var initMenu=function(){var e="li:not(.toggle-blade-helper)",n=function(e,t){var a=[];return e.children(t).map(function(e,o){var l={key:$(o).data("key")};$(o).children("ul").length>0&&(l.children=n($(o).children("ul"),t)),a.push(l)}),a},t=$("#main-menu");t.sortable({items:e,stop:function(a){var o=n(t,e);console.log(o),... | var initMenu=function(){var e="li:not(.toggle-blade-helper)",n=function(e,t){var a=[];return e.children(t).map(function(e,o){var l={key:$(o).data("key")};$(o).children("ul").length>0&&(l.children=n($(o).children("ul"),t)),a.push(l)}),a},t=$("#main-menu");t.sortable({containment:"parent",items:e,stop:function(a){var o=n... | Sort menus only in parent containment | Sort menus only in parent containment
| JavaScript | mit | misterpaladin/mconsole,misterpaladin/mconsole,misterpaladin/mconsole | ---
+++
@@ -1 +1 @@
-var initMenu=function(){var e="li:not(.toggle-blade-helper)",n=function(e,t){var a=[];return e.children(t).map(function(e,o){var l={key:$(o).data("key")};$(o).children("ul").length>0&&(l.children=n($(o).children("ul"),t)),a.push(l)}),a},t=$("#main-menu");t.sortable({items:e,stop:function(a){var o... |
b94dc0ab580fe2c64e2cfad253b64fc041314b08 | packages/sproutcore-runtime/tests/system/run_loop/run_test.js | packages/sproutcore-runtime/tests/system/run_loop/run_test.js | // ==========================================================================
// Project: SproutCore Runtime
// Copyright: ©2011 Strobe Inc. and contributors.
// License: Licensed under MIT license (see license.js)
// ==========================================================================
module('system/run_loop... | // ==========================================================================
// Project: SproutCore Runtime
// Copyright: ©2011 Strobe Inc. and contributors.
// License: Licensed under MIT license (see license.js)
// ==========================================================================
module('system/run_loop... | Add unit test for SC.run passing extra arguments to the method. | Add unit test for SC.run passing extra arguments to the method.
| JavaScript | mit | amk221/ember.js,patricksrobertson/ember.js,KevinTCoughlin/ember.js,balinterdi/ember.js,omurbilgili/ember.js,szines/ember.js,mdehoog/ember.js,jackiewung/ember.js,zenefits/ember.js,rodrigo-morais/ember.js,emberjs/ember.js,nickiaconis/ember.js,wecc/ember.js,kiwiupover/ember.js,michaelBenin/ember.js,chadhietala/mixonic-emb... | ---
+++
@@ -7,12 +7,14 @@
module('system/run_loop/run_test');
test('SC.run invokes passed function, returning value', function() {
- var obj = {
- foo: function() { return [this.bar, 'FOO']; },
- bar: 'BAR'
+ var obj = {
+ foo: function() { return [this.bar, 'FOO']; },
+ bar: 'BAR',
+ checkArg... |
2d96d1d6ab1622a3dd75e6c9cc046c27e40aa6a5 | src/utils/isSurroundedBy.js | src/utils/isSurroundedBy.js | import findCounterpartCharacter from './findCounterpartCharacter';
/**
* Determines whether a node is surrounded by a matching pair of grouping
* characters.
*
* @param {Object} node
* @param {string} left
* @returns {boolean}
*/
export default function isSurroundedBy(node, left, source) {
if (source[node.ran... | import findCounterpartCharacter from './findCounterpartCharacter';
/**
* Determines whether a node is surrounded by a matching pair of grouping
* characters.
*
* @param {Object} node
* @param {string} left
* @param {string} source
* @returns {boolean}
*/
export default function isSurroundedBy(node, left, sourc... | Add a missing param doc. | Add a missing param doc.
| JavaScript | mit | lunks/decaffeinate,alangpierce/decaffeinate,alangpierce/decaffeinate,greyhwndz/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate,eventualbuddha/decaffeinate,netei/decaffeinate,edi9999/decaffeinate,lunks/decaffeinate,eventualbuddha/decaffeinate,netei/decaffeinate | ---
+++
@@ -6,6 +6,7 @@
*
* @param {Object} node
* @param {string} left
+ * @param {string} source
* @returns {boolean}
*/
export default function isSurroundedBy(node, left, source) { |
65048ea8efaab4a556347dfa47f5d449c578dace | bin/emblem2hbs.js | bin/emblem2hbs.js | #!/usr/bin/env node
require('coffee-script').register()
var fs = require('fs'),
indentation = require('../lib/indentation'),
buf, emblemFile, hbsFile, output;
if (process.argv.length < 3) {
if (process.stdin.isTTY) {
console.log('USAGE: emblem2hbs filetoconvert.emblem or in piped format `pbcopy | emble... | #!/usr/bin/env node
require('coffee-script').register()
var fs = require('fs'),
indentation = require('../lib/indentation'),
buf, emblemFile, hbsFile, output;
if (process.argv.length < 3) {
if (process.stdin.isTTY) {
console.log('USAGE: emblem2hbs filetoconvert.emblem or in piped format `pbcopy | emble... | Allow for 2nd argument to be destination filename | Allow for 2nd argument to be destination filename
| JavaScript | mit | patientslikeme/emblem2hbs | ---
+++
@@ -9,14 +9,13 @@
if (process.argv.length < 3) {
if (process.stdin.isTTY) {
console.log('USAGE: emblem2hbs filetoconvert.emblem or in piped format `pbcopy | emblem2hbs | pbpaste`');
- return;
}
else {
processFromPipe();
}
} else {
emblemFile = process.argv[2];
- hbsFile = emblem... |
9fa3bb738ec5261c8cfd263c6d8aa1d3d109c9d5 | bin/massive.js | bin/massive.js | #!/usr/bin/env node
var repl = require("repl");
var massive = require("../index");
var program = require('commander');
var assert = require("assert");
program
.version('0.0.1')
.option('-d, --database', 'The local db you want to connect to ')
.option('-c, --connection', 'The full connection string')
.parse(pr... | #!/usr/bin/env node
var repl = require("repl");
var massive = require("../index");
var program = require('commander');
var assert = require("assert");
program
.version('0.0.1')
.option('-d, --database', 'The local db you want to connect to ')
.option('-c, --connection', 'The full connection string')
.parse(pr... | Add error handling to initial connection in repl | Add error handling to initial connection in repl | JavaScript | bsd-3-clause | robconery/massive-js | ---
+++
@@ -24,6 +24,10 @@
if(connectionString){
massive.connect({connectionString : connectionString}, function(err,db){
+ if(err) {
+ console.log("Failed loading Massive: "+err);
+ process.exit(1);
+ }
var context = repl.start({
prompt: "db > ",
}).context; |
ab4d3f32db159b0c82cd0b734419755ddf738601 | public/app/controllers/todo-list.controller.js | public/app/controllers/todo-list.controller.js | (function () {
'use strict';
angular
.module('todoList')
.controller('todoListCtrl', todoListCtrl);
todoListCtrl.$inject = ['TodoListService'];
function todoListCtrl(TodoListService) {
var vm = this;
var corkboard;
vm.addTodo = addTodo;
// Set up the draggable corkboard
TodoLis... | (function () {
'use strict';
angular
.module('todoList')
.controller('todoListCtrl', todoListCtrl);
todoListCtrl.$inject = ['TodoListService'];
function todoListCtrl(TodoListService) {
var vm = this;
var corkboard;
vm.addTodo = addTodo;
// Set up the draggable corkboard
TodoLis... | Fix cursor position on scroll | Fix cursor position on scroll
| JavaScript | mit | kennethk91/To-Do-List,kennethk91/To-Do-List | ---
+++
@@ -22,8 +22,7 @@
function addTodo(e) {
- console.log(e.clientX, corkboard.pointerX);
- console.log(e.clientY, corkboard.pointerY);
+ corkboard.update();
var todo = {
UserID: '666', |
3f3b198723c96cba46e64379813ad455ad6ae972 | ajax.js | ajax.js | (function(window){
window.ajax = function(route, options) {
var data = options.data || {},
success = options.success || function(response){},
error = options.error || function(response){},
request = new XMLHttpRequest();
request.open(route.method, route.u... | (function(window){
window.ajax = function(route, options) {
var data = options.data || {},
success = options.success || function(response){},
error = options.error || function(response){},
request = new XMLHttpRequest();
request.open(route.method, route.u... | Send post data as form-urlencoded | Send post data as form-urlencoded | JavaScript | mit | marceloemanoel/desafioCeJs2014 | ---
+++
@@ -16,6 +16,7 @@
});
if(route.method === 'POST') {
+ request.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=UTF-8");
request.send(data);
}
else { |
75ae2b1388669a299ceff0e95ef19f6b522a7205 | conf/webpack.prod.config.js | conf/webpack.prod.config.js | var webpack = require("webpack");
var Config = require("webpack-config").Config;
module.exports = new Config().extend("conf/webpack.base.config.js").merge({
devtool: "#source-map",
plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.... | var webpack = require("webpack");
var Config = require("webpack-config").Config;
module.exports = new Config().extend("conf/webpack.base.config.js").merge({
devtool: "#source-map",
plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.... | Disable Mangling as it does not play well with paralleljs | Disable Mangling as it does not play well with paralleljs
| JavaScript | mit | MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example | ---
+++
@@ -8,9 +8,8 @@
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ // Seems to break worker source maps
sourceMap: true,
- mangle: {
- except: ["global"] // do not mangle global paralleljs env
- }
+ ... |
c12adbc809d4a3038be5be5cd72cab65ed236e93 | src/app/templates/ts/react/config/webpack.prod.js | src/app/templates/ts/react/config/webpack.prod.js | const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const commonConfig = require('./webpack.common.js');
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
module.exports = webpackMerge(commonConfig, {
devtool: 'source-map',
externals: {
'react': 'React',... | const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const commonConfig = require('./webpack.common.js');
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
module.exports = webpackMerge(commonConfig, {
devtool: 'source-map',
externals: {
'react': 'React',... | Fix duplicate key in webpack config | Fix duplicate key in webpack config
Fix that `compress` key appears twice in
`webpack.optimize.UglifyJsPlugin` params.
| JavaScript | mit | OfficeDev/generator-office | ---
+++
@@ -18,7 +18,6 @@
plugins: [
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
- compress: true,
mangle: {
screw_ie8: true,
keep_fnames: true |
9ea68515b1371990d5353d7657444f7bf324d5a7 | js/GameInit.js | js/GameInit.js | /*
* Object that contains Game initialization data.
*/
export default class {
constructor(canvasWidth, canvasHeight) {
this.gameInits = {};
this._generateInitialSettings(canvasWidth, canvasHeight);
}
_generateInitialSettings(canvasWidth, canvasHeight) {
this.gameInits.paddle = (()=> {
let w... | /*
* Object that contains Game initialization data.
*/
export default class {
constructor(canvasWidth, canvasHeight) {
this.gameInits = {};
this._generateInitialSettings(canvasWidth, canvasHeight);
}
_generateInitialSettings(canvasWidth, canvasHeight) {
this.gameInits.paddle = (()=> {
let w... | Make ball start by flying upwards | Make ball start by flying upwards
| JavaScript | mit | BAJ-/robot-breakout,BAJ-/robot-breakout | ---
+++
@@ -26,7 +26,7 @@
x: canvasWidth / 2,
y: canvasHeight - 30,
velocityX: 1,
- velocityY: 1,
+ velocityY: -1,
color: '#555555',
radius: 10,
}; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.