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 |
|---|---|---|---|---|---|---|---|---|---|---|
077242d046e3e755ff82ba4b29cce2477fd50bea | config/seneca-options.js | config/seneca-options.js | 'use strict';
var senecaOptions = {
transport: {
web: {
port: process.env.PORT || 8080
}
},
apiBaseUrl: process.env.API_BASE_URL || 'http://localhost:3000',
apiSecret: process.env.API_SECRET || ''
};
module.exports = senecaOptions;
| 'use strict';
var senecaOptions = {
transport: {
web: {
port: process.env.BADGES_SERVICE_PORT || 10305
}
},
apiBaseUrl: process.env.API_BASE_URL || 'http://localhost:8080',
apiSecret: process.env.API_SECRET || ''
};
module.exports = senecaOptions;
| Change ports and env variable names | Change ports and env variable names
| JavaScript | mit | CoderDojo/cp-badges-service,bmatthews68/cp-badges-service,CoderDojo/cp-badges-service,bmatthews68/cp-badges-service | ---
+++
@@ -3,10 +3,10 @@
var senecaOptions = {
transport: {
web: {
- port: process.env.PORT || 8080
+ port: process.env.BADGES_SERVICE_PORT || 10305
}
},
- apiBaseUrl: process.env.API_BASE_URL || 'http://localhost:3000',
+ apiBaseUrl: process.env.API_BASE_URL ... |
1bc0febdf56a49d70f61eda1cc81f405a5ba7064 | server/theme/default/libraries/bootstrap/js/bootstrap-ckeditor-fix.js | server/theme/default/libraries/bootstrap/js/bootstrap-ckeditor-fix.js | // bootstrap-ckeditor-fix.js
// hack to fix ckeditor/bootstrap compatiability bug when ckeditor appears in a bootstrap modal dialog
//
// Include this file AFTER both jQuery and bootstrap are loaded.
$.fn.modal.Constructor.prototype.enforceFocus = function() {
modal_this = this
$(document).on('focusin.modal', func... | // bootstrap-ckeditor-fix.js
// hack to fix ckeditor/bootstrap compatiability bug when ckeditor appears in a bootstrap modal dialog
//
// Include this file AFTER both jQuery and bootstrap are loaded.
$.fn.modal.Constructor.prototype.enforceFocus = function() {
modal_this = this
$(document).on('focusin.modal', func... | Patch for CKEditor and IE11 | [cms] Patch for CKEditor and IE11 | JavaScript | agpl-3.0 | alexharrington/xibo-cms,ajiwo/xibo-cms,dasgarner/xibo-cms,gractor/xibo-cms,yashodhank/xibo-cms,jbirdkerr/xibo-cms,guruevi/xibo-cms,gractor/xibo-cms,yashodhank/xibo-cms,xibosignage/xibo-cms,PeterMis/xibo-cms,CourtneyJWhite/xibo-cms,alexharrington/xibo-cms,PeterMis/xibo-cms,CourtneyJWhite/xibo-cms,CourtneyJWhite/xibo-cms... | ---
+++
@@ -7,8 +7,8 @@
modal_this = this
$(document).on('focusin.modal', function (e) {
if (modal_this.$element[0] !== e.target && !modal_this.$element.has(e.target).length
- && !$(e.target.parentNode).hasClass('cke_dialog_ui_input_select')
- && !$(e.target.parentNode).hasClass('cke_dialog_ui_inpu... |
5cbd75f443a87c9a966ffe0320d8258c6691d4ba | blueprints/ember-cli-changelog/files/config/changelog.js | blueprints/ember-cli-changelog/files/config/changelog.js | // jshint node:true
// For details on each option run `ember help release`
module.exports = {
// ember style guide: https://github.com/emberjs/ember.js/blob/master/CONTRIBUTING.md#commit-tagging
// angular style guide: https://github.com/angular/angular.js/blob/v1.4.8/CONTRIBUTING.md#commit
// jquery style guid... | // jshint node:true
// For details on each option run `ember help release`
module.exports = {
// ember style guide: https://github.com/emberjs/ember.js/blob/master/CONTRIBUTING.md#commit-tagging
// angular style guide: https://github.com/angular/angular.js/blob/v1.4.8/CONTRIBUTING.md#commit
// jquery style guid... | Set angular as default in blueprint | Set angular as default in blueprint | JavaScript | mit | runspired/ember-cli-changelog,runspired/ember-cli-changelog | ---
+++
@@ -6,7 +6,7 @@
// ember style guide: https://github.com/emberjs/ember.js/blob/master/CONTRIBUTING.md#commit-tagging
// angular style guide: https://github.com/angular/angular.js/blob/v1.4.8/CONTRIBUTING.md#commit
// jquery style guide: https://contribute.jquery.org/commits-and-pull-requests/#commit-... |
d72326fe7646a6c44d08637141f7df5f7d293fb7 | src/helpers/seeder.js | src/helpers/seeder.js | #!/usr/bin/env node
const storage = require('../storage')
const fixtures = require('./fixtures')
const recipes = fixtures.createRecipes(10)
function save (recipe) {
return storage.put(recipe.id, recipe)
}
storage.connect()
.then(() => {
return Promise.all(recipes.map(recipe => save(recipe)))
})
.then(()... | #!/usr/bin/env node
const storage = require('../storage')
const fixtures = require('./fixtures')
const recipes = fixtures.createRecipes(10)
function save (db, recipe) {
return storage.put(db, recipe.id, recipe)
}
storage.connect(process.env.NODE_ENV)
.then((db) => {
return Promise.all(recipes.map(recipe => ... | Fix issues with the seed script | Fix issues with the seed script
| JavaScript | mit | ruiquelhas/electron-recipes,ruiquelhas/electron-recipes | ---
+++
@@ -5,13 +5,13 @@
const recipes = fixtures.createRecipes(10)
-function save (recipe) {
- return storage.put(recipe.id, recipe)
+function save (db, recipe) {
+ return storage.put(db, recipe.id, recipe)
}
-storage.connect()
- .then(() => {
- return Promise.all(recipes.map(recipe => save(recipe)))
... |
be6bc61e0be6226af1c1b6fbbee0ffbfee38248c | src/services/config/config.service.js | src/services/config/config.service.js | 'use strict';
// Service for the spec config.
// We keep this separate so that changes are kept even if the spec changes.
angular.module('vlui')
.factory('Config', function() {
var Config = {};
Config.data = {};
Config.config = {};
Config.getConfig = function() {
return {};
};
Config... | 'use strict';
// Service for the spec config.
// We keep this separate so that changes are kept even if the spec changes.
angular.module('vlui')
.factory('Config', function() {
var Config = {};
Config.data = {};
Config.config = {};
Config.getConfig = function() {
return {};
};
Config... | Bring back useRawDomain for Voyager2 | Bring back useRawDomain for Voyager2
| JavaScript | bsd-3-clause | uwdata/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,vega/vega-lite-ui | ---
+++
@@ -43,7 +43,7 @@
}
},
overlay: {line: true},
- scale: {useRawDomain: false}
+ scale: {useRawDomain: true}
};
};
|
532fb8e2150c70c627d57f9f72f8232606976a4a | app/javascript/flavours/glitch/reducers/domain_lists.js | app/javascript/flavours/glitch/reducers/domain_lists.js | import {
DOMAIN_BLOCKS_FETCH_SUCCESS,
DOMAIN_BLOCKS_EXPAND_SUCCESS,
DOMAIN_UNBLOCK_SUCCESS,
} from '../actions/domain_blocks';
import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutable';
const initialState = ImmutableMap({
blocks: ImmutableMap(),
});
export default function domainLists... | import {
DOMAIN_BLOCKS_FETCH_SUCCESS,
DOMAIN_BLOCKS_EXPAND_SUCCESS,
DOMAIN_UNBLOCK_SUCCESS,
} from '../actions/domain_blocks';
import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutable';
const initialState = ImmutableMap({
blocks: ImmutableMap({
items: ImmutableOrderedSet(),
}),
}... | Fix error when unmuting a domain without listing muted domains first | Fix error when unmuting a domain without listing muted domains first
| JavaScript | agpl-3.0 | Kirishima21/mastodon,Kirishima21/mastodon,glitch-soc/mastodon,im-in-space/mastodon,glitch-soc/mastodon,Kirishima21/mastodon,glitch-soc/mastodon,Kirishima21/mastodon,im-in-space/mastodon,im-in-space/mastodon,im-in-space/mastodon,glitch-soc/mastodon | ---
+++
@@ -6,7 +6,9 @@
import { Map as ImmutableMap, OrderedSet as ImmutableOrderedSet } from 'immutable';
const initialState = ImmutableMap({
- blocks: ImmutableMap(),
+ blocks: ImmutableMap({
+ items: ImmutableOrderedSet(),
+ }),
});
export default function domainLists(state = initialState, action) { |
08eaac64daa1b7bb5137261967cd7c655b7dbc1f | jquery.sortBy-0.1.js | jquery.sortBy-0.1.js | /* uses schwartzian transform to sort the selected elements in-place */
(function($) {
$.fn.sortBy = function(sortfn) {
var values = [],
$self = this;
this.children().each(function(i,o) {
values.push([ $(o), sortfn($(o)) ]);
});
values.sort(function(a,b) {
return a[1] > b[1] ? 1
: a[1] == b[1]... | /* uses schwartzian transform to sort the selected elements in-place */
(function($) {
$.fn.sortBy = function(sortfn) {
var values = [],
$self = this;
values = this.children().map(function(o) {
return [ $(o), sortfn($(o)) ];
});
$.sort(values, function(a,b) {
return a[1] > b[1] ? 1
: a[1] == b... | Use jQuery helpers for simplification and compat | Use jQuery helpers for simplification and compat
| JavaScript | bsd-2-clause | propcom/jquery-sortBy | ---
+++
@@ -4,11 +4,11 @@
var values = [],
$self = this;
- this.children().each(function(i,o) {
- values.push([ $(o), sortfn($(o)) ]);
+ values = this.children().map(function(o) {
+ return [ $(o), sortfn($(o)) ];
});
- values.sort(function(a,b) {
+ $.sort(values, function(a,b) {
return a[1] ... |
69a349f1865e59c5751e6ec685e41b57bb1b1f9a | js-example/server.js | js-example/server.js | var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(3011, 'localhost', function (err, result) {
if (err) {
... | var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(3000, 'localhost', function (err, result) {
if (err) {
... | Update exampe with new react-filter-box version | Update exampe with new react-filter-box version
| JavaScript | mit | nhabuiduc/react-filter-box,nhabuiduc/react-filter-box,nhabuiduc/react-filter-box | ---
+++
@@ -6,7 +6,7 @@
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
-}).listen(3011, 'localhost', function (err, result) {
+}).listen(3000, 'localhost', function (err, result) {
if (err) {
return console.log(err);
} |
9494ce3faf614483079b6bfe85ae1f48e8373e22 | data/clothing.js | data/clothing.js | const request = require('request');
/**
* Function checks that a string given is string with some number of
* characters
*
* @params {string} str string value to check for validity
* @return true if the string is valid; otherwise, return false
*/
function isValidString(str) {
if ((str === undefined) || (typeo... | const request = require('request');
/**
* Function checks that a string given is string with some number of
* characters
*
* @params {string} str string value to check for validity
* @return true if the string is valid; otherwise, return false
*/
function isValidString(str) {
if ((str === undefined) || (typeo... | Refactor to better define data helper | Refactor to better define data helper
| JavaScript | mit | tsangjustin/CS546-Product_Forum,tsangjustin/CS546-Product_Forum | ---
+++
@@ -14,7 +14,7 @@
return true;
}
-let user = exports = module.exports = {
+let clothing = exports = module.exports = {
retrieveClothingInfo: (clothing_url) => {
return new Promise((accept, reject) => {
if (!isValidString(clothing_url)) {
@@ -30,7 +30,7 @@
}
... |
989a705f204a2a6078475493650d30e569cdaf0d | views/js/helpers/login/loginsubmitter.js | views/js/helpers/login/loginsubmitter.js | /**
* Created by Omnius on 6/27/16.
*/
const submitForm = () => {
// TODO: Supposedly needs sanitation using ESAPI.encoder().encodeForJavascript() or some other sanitation
// mechanism on inputUsername and inputPassword
const username = $('#inputUsername').val();
const password = $('#inputPassword').... | /**
* Created by Omnius on 6/27/16.
*/
const submitForm = () => {
// TODO: Supposedly needs sanitation using ESAPI.encoder().encodeForJavascript() or some other sanitation
// mechanism on inputUsername and inputPassword
const username = $('#inputUsername').val();
const password = $('#inputPassword').... | Fix error in element name for showing unauthorized alert using jQuery | Fix error in element name for showing unauthorized alert using jQuery
| JavaScript | mit | identityclash/hapi-login-test,identityclash/hapi-login-test | ---
+++
@@ -21,7 +21,7 @@
},
error: function (xhr, textStatus, errorThrown) {
if (xhr.status === 401) {
- $('#formUnauthorized').removeClass('hidden');
+ $('#alertUnauthorized').removeClass('hidden');
}
}
}); |
0b36c6109e9a96403d6c779c56c1b1482df0a48f | app/assets/javascripts/vue/fluent_log.js | app/assets/javascripts/vue/fluent_log.js | (function(){
"use strict";
$(function(){
if($('#fluent-log').length === 0) return;
new Vue({
el: "#fluent-log",
paramAttributes: ["logUrl"],
data: {
"autoFetch": false,
"logs": [],
"limit": 30
},
created: function(){
this.fetchLogs();
... | (function(){
"use strict";
$(function(){
if($('#fluent-log').length === 0) return;
new Vue({
el: "#fluent-log",
paramAttributes: ["logUrl"],
data: {
"autoFetch": false,
"logs": [],
"limit": 30,
"processing": false
},
created: function(){
... | Add reaction while fetching logs | Add reaction while fetching logs
| JavaScript | apache-2.0 | fluent/fluentd-ui,mt0803/fluentd-ui,fluent/fluentd-ui,mt0803/fluentd-ui,mt0803/fluentd-ui,fluent/fluentd-ui | ---
+++
@@ -10,7 +10,8 @@
data: {
"autoFetch": false,
"logs": [],
- "limit": 30
+ "limit": 30,
+ "processing": false
},
created: function(){
@@ -33,11 +34,16 @@
methods: {
fetchLogs: function() {
+ if(this.processing) return;
+ ... |
54b9597c9a01ed7904d0b9ed12cb46cbe211e7b8 | packages/@sanity/desk-tool/src/components/Diff.js | packages/@sanity/desk-tool/src/components/Diff.js | import PropTypes from 'prop-types'
import React from 'react'
import {diffJson} from 'diff'
import styles from './styles/Diff.css'
function getDiffStatKey(part) {
if (part.added) {
return 'added'
}
if (part.removed) {
return 'removed'
}
return 'neutral'
}
export default class Diff extends React.PureC... | /**
*
*
*
*
*
*
*
* HEADSUP: This is not in use, but keep for later reference
*
*
*
*
*
*
*
*/
import PropTypes from 'prop-types'
import React from 'react'
import {diffJson} from 'diff'
import styles from './styles/Diff.css'
function getDiffStatKey(part) {
if (part.added) {
return 'added'
}
... | Add a note about keeping unused component for later reference | [desk-tool] Add a note about keeping unused component for later reference
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -1,3 +1,20 @@
+/**
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * HEADSUP: This is not in use, but keep for later reference
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
import PropTypes from 'prop-types'
import React from 'react'
import {diffJson} from 'diff' |
f267bbc9e34282354997720f86f323b76ab47b1d | test/manual-tests/get-data-sources.js | test/manual-tests/get-data-sources.js | var BridgeDb = require('../index.js');
var bridgeDb1 = BridgeDb({
apiUrlStub: 'http://pointer.ucsf.edu/d3/r/data-sources/bridgedb.php',
dataSourcesUrl:
'http://pointer.ucsf.edu/d3/r/data-sources/bridgedb-datasources.php'
});
//*
bridgeDb1.dataSource.getAll()
.each(function(dataSource) {
console.log('Databas... | var BridgeDb = require('../../index.js');
var bridgeDb1 = BridgeDb({
apiUrlStub: 'http://pointer.ucsf.edu/d3/r/data-sources/bridgedb.php',
dataSourcesUrl:
'http://pointer.ucsf.edu/d3/r/data-sources/bridgedb-datasources.php'
});
//*
bridgeDb1.dataSource.getAll()
.each(function(dataSource) {
console.log('Data... | Update location of bridgedb index file. | Update location of bridgedb index file.
| JavaScript | apache-2.0 | egonw/bridgedbjs | ---
+++
@@ -1,4 +1,4 @@
-var BridgeDb = require('../index.js');
+var BridgeDb = require('../../index.js');
var bridgeDb1 = BridgeDb({
apiUrlStub: 'http://pointer.ucsf.edu/d3/r/data-sources/bridgedb.php', |
9956f54a1e34d66f1d2af3a89d245b36681b4d8f | packages/@sanity/util/src/getConfig.js | packages/@sanity/util/src/getConfig.js | import path from 'path'
import get from 'lodash/get'
import merge from 'lodash/merge'
import {loadJsonSync} from './safeJson'
const defaults = {
server: {
staticPath: './static',
port: 3910,
hostname: 'localhost'
}
}
const configContainer = values => ({
get: (dotPath, defaultValue) =>
get(values... | import path from 'path'
import get from 'lodash/get'
import merge from 'lodash/merge'
import {loadJsonSync} from './safeJson'
const defaults = {
server: {
staticPath: './static',
port: 3333,
hostname: 'localhost'
}
}
const configContainer = values => ({
get: (dotPath, defaultValue) =>
get(values... | Change default port to 3333 | Change default port to 3333
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -6,7 +6,7 @@
const defaults = {
server: {
staticPath: './static',
- port: 3910,
+ port: 3333,
hostname: 'localhost'
}
} |
85641e0db06224488dab96f69eed31f0b2a0d4ba | tests/integration/config-ci.js | tests/integration/config-ci.js | // this file is for use in CircleCI continuous integration environment
var browserName = ['chrome', 'firefox', 'internet explorer', 'android'][process.env.CIRCLE_NODE_INDEX];
module.exports = {
seleniumServerURL: {
hostname: 'ondemand.saucelabs.com',
port: 80
},
driverCapabilities: {
'tunnel-identif... | // this file is for use in CircleCI continuous integration environment
var capabilities = [
{browserName: 'chrome'},
{browserName: 'firefox'},
{browserName: 'internet explorer'},
{
deviceName: 'Samsung Galaxy S6 GoogleAPI Emulator',
browserName: 'Chrome',
platformName: 'Android',
platformVersio... | Use a more recent Android for integration tests | Use a more recent Android for integration tests
| JavaScript | agpl-3.0 | openfisca/legislation-explorer | ---
+++
@@ -1,16 +1,26 @@
// this file is for use in CircleCI continuous integration environment
-var browserName = ['chrome', 'firefox', 'internet explorer', 'android'][process.env.CIRCLE_NODE_INDEX];
+var capabilities = [
+ {browserName: 'chrome'},
+ {browserName: 'firefox'},
+ {browserName: 'internet explore... |
2ab41ec1f71f405f7e718db2f11acbc010862b0d | packages/babel/src/transformation/transformers/internal/block-hoist.js | packages/babel/src/transformation/transformers/internal/block-hoist.js | import sortBy from "lodash/collection/sortBy";
export var metadata = {
group: "builtin-trailing"
};
/**
* [Please add a description.]
*
* Priority:
*
* - 0 We want this to be at the **very** bottom
* - 1 Default node position
* - 2 Priority over normal nodes
* - 3 We want this to be at the **very** top
... | import sortBy from "lodash/collection/sortBy";
export var metadata = {
group: "builtin-trailing"
};
/**
* [Please add a description.]
*
* Priority:
*
* - 0 We want this to be at the **very** bottom
* - 1 Default node position
* - 2 Priority over normal nodes
* - 3 We want this to be at the **very** top
... | Break loop as soon as change detected. | Break loop as soon as change detected.
| JavaScript | mit | mcanthony/babel,aalluri-navaratan/babel,iamstarkov/babel,abdulsam/babel,thorikawa/babel,existentialism/babel,greyhwndz/babel,spicyj/babel,zorosteven/babel,sethcall/babel,rn0/babel,hzoo/babel,rn0/babel,codenamejason/babel,andrewwilkins/babel,nmn/babel,moander/babel,plemarquand/babel,guybedford/babel,VukDukic/babel,VukDu... | ---
+++
@@ -26,7 +26,10 @@
var hasChange = false;
for (var i = 0; i < node.body.length; i++) {
var bodyNode = node.body[i];
- if (bodyNode && bodyNode._blockHoist != null) hasChange = true;
+ if (bodyNode && bodyNode._blockHoist != null) {
+ hasChange = true;
+ b... |
29bdb0a226c76279193033bf2d0e777381d2a870 | tests/test.config.circle-ci.js | tests/test.config.circle-ci.js | module.exports = {
store_url: 'http://localhost:8080',
account_user: 'test',
account_password: 'testing',
account_name: 'tester',
container_name: 'test_container',
object_name: 'test_object',
segment_container_name: 'segment_test_container',
segment_object_name: 'segment_test_object',
... | module.exports = {
store_url: 'http://localhost:8080',
account_user: 'test:tester',
account_password: 'testing',
account_name: 'AUTH_test',
container_name: 'test_container',
object_name: 'test_object',
segment_container_name: 'segment_test_container',
segment_object_name: 'segment_test_o... | Fix circleci test config file | Fix circleci test config file
| JavaScript | mit | Tezirg/os2 | ---
+++
@@ -1,8 +1,8 @@
module.exports = {
store_url: 'http://localhost:8080',
- account_user: 'test',
+ account_user: 'test:tester',
account_password: 'testing',
- account_name: 'tester',
+ account_name: 'AUTH_test',
container_name: 'test_container',
object_name: 'test_object',
... |
94558f5dcf5ce15b7b1964dd36e1a7fa26c730fd | packages/purgecss-webpack-plugin/rollup.config.js | packages/purgecss-webpack-plugin/rollup.config.js | import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'
import resolve from 'rollup-plugin-node-resolve'
export default {
entry: './src/index.js',
targets: [
{
dest: './lib/purgecss-webpack-plugin.es.js',
format: 'es'
},
{
... | import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'
import resolve from 'rollup-plugin-node-resolve'
export default {
entry: './src/index.js',
targets: [
{
dest: './lib/purgecss-webpack-plugin.es.js',
format: 'es'
},
{
... | Add fs & path as external | Add fs & path as external
| JavaScript | mit | FullHuman/purgecss,FullHuman/purgecss,FullHuman/purgecss,FullHuman/purgecss | ---
+++
@@ -15,5 +15,5 @@
}
],
plugins: [resolve(), commonjs(), babel()],
- external: ['purgecss', 'webpack-sources']
+ external: ['purgecss', 'webpack-sources', 'fs', 'path']
} |
2343d77cd75492c4b1bda09b4c87d406a8e3a87d | frontend/app/routes/visualize/graph.js | frontend/app/routes/visualize/graph.js | import { inject as service } from '@ember/service';
import fetch from 'fetch';
import Route from '@ember/routing/route';
import ResetScrollPositionMixin from 'frontend/mixins/reset-scroll-position';
export default Route.extend(ResetScrollPositionMixin, {
intl: service(),
session: service(),
queryParams: {
... | import { inject as service } from '@ember/service';
import fetch from 'fetch';
import Route from '@ember/routing/route';
import ResetScrollPositionMixin from 'frontend/mixins/reset-scroll-position';
export default Route.extend(ResetScrollPositionMixin, {
intl: service(),
session: service(),
queryParams: {
... | Send authorization tokens in `fetch` | Send authorization tokens in `fetch`
| JavaScript | mit | roschaefer/rundfunk-mitbestimmen,roschaefer/rundfunk-mitbestimmen,roschaefer/rundfunk-mitbestimmen | ---
+++
@@ -15,11 +15,13 @@
model(params) {
const host = this.store.adapterFor('summarized-statistic').get('host');
let url = new URL(`${host}/chart_data/similarities.json`);
- if (params.specificToUser){
+ let headers = {};
+ if (this.get('session.isAuthenticated') && params.specifi... |
196b1746e17241d764f35d67d257da8b0c111a7c | public/visifile_drivers/ui_components/editorComponent.js | public/visifile_drivers/ui_components/editorComponent.js | function component( args ) {
/*
base_component_id("editorComponent")
load_once_from_file(true)
*/
//alert(JSON.stringify(args,null,2))
var uid = uuidv4()
var uid2 = uuidv4()
var mm = Vue.component(uid, {
data: function () {
return {
text: args.text,
uid2: uid2
... | function component( args ) {
/*
base_component_id("editorComponent")
load_once_from_file(true)
*/
//alert(JSON.stringify(args,null,2))
var uid = uuidv4()
var uid2 = uuidv4()
var mm = Vue.component(uid, {
data: function () {
return {
text: args.text,
uid2: uid2
... | Disable errors in Ace Editor | Disable errors in Ace Editor
I did this as errors always seem to show in the editor and this can be very offputting for the end user
| JavaScript | mit | zubairq/AppShare,zubairq/AppShare,zubairq/yazz,zubairq/AppShare,zubairq/gosharedata,zubairq/gosharedata,zubairq/yazz,zubairq/AppShare | ---
+++
@@ -31,6 +31,8 @@
document.getElementById(uid2).style.height="45vh"
editor.getSession().setValue(mm.text);
+ editor.getSession().setUseWorker(false);
+
editor.getSession().on('change', function() {
mm.text = editor.getSession().getValue(); |
dc74ef87e18cfcb537b93dbc535788cb8893be37 | reducers/file_list.js | reducers/file_list.js | import Cookie from 'js-cookie'
import _ from 'lodash'
import { SAVE_FILE, DELETE_FILE } from '../actions/file_list_actions'
const initialState = Cookie.get('files')
const setState = () => {
const files = Cookie.get('files')
if (files) { return JSON.parse(files) }
return []
}
const saveExistingFile = (state,... | import Cookie from 'js-cookie'
import _ from 'lodash'
import { SAVE_FILE, DELETE_FILE } from '../actions/file_list_actions'
const initialState = Cookie.get('files')
const setState = () => {
const files = Cookie.get('files')
if (files) { return JSON.parse(files) }
return []
}
const saveExistingFile = (state,... | Stop breaking things Raquel, this is why you need tests | Stop breaking things Raquel, this is why you need tests
| JavaScript | mit | raquelxmoss/markdown-writer,raquelxmoss/markdown-writer | ---
+++
@@ -31,9 +31,9 @@
export const fileList = (state = setState(), action) => {
switch (action.type) {
case SAVE_FILE: {
- const fileId = state[action.file.id].id
+ const file = state[action.file.id]
- if (fileId) {
+ if (file) {
return saveExistingFile(state, action.file)
... |
1d9ec16d01ea54dabb046b1b798a64c8ae6279bd | controller/index.js | controller/index.js | var Https = require('https');
var Common = require('./common');
exports.main = {
handler: function (request, reply) {
var params = Common.getRoomParameters(request, null, null, null);
reply.view('index_template', params);
}
};
exports.turn = {
handler: function (request, reply) {
var getOptions = {... | var Https = require('https');
var Common = require('./common');
exports.main = {
handler: function (request, reply) {
var params = Common.getRoomParameters(request, null, null, null);
reply.view('index_template', params);
}
};
exports.turn = {
handler: function (request, reply) {
var getOptions = {... | Change turn rest api endpoint. | Change turn rest api endpoint.
| JavaScript | mit | MidEndProject/node-apprtc,MidEndProject/node-apprtc | ---
+++
@@ -14,7 +14,7 @@
var getOptions = {
host: 'instant.io',
port: 443,
- path: '/rtcConfig',
+ path: '/__rtcConfig__',
method: 'GET'
};
Https.get(getOptions, function (result) { |
96f19a3d8937b075080ad70d304ecfa4136b6ff9 | Libraries/Utilities/RCTLog.js | Libraries/Utilities/RCTLog.js | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const invariant = require('invariant');
const levelsMap = {
log: 'log',
info: 'info',
... | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const invariant = require('invariant');
const levelsMap = {
log: 'log',
info: 'info',
... | Replace YellowBox references with LogBox | Replace YellowBox references with LogBox
Summary:
This diff replaces some YellowBox references with LogBox so we can remove it.
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D19948126
fbshipit-source-id: b26ad1b78d86a8290f7e08396e4a8314fef7a9f3
| JavaScript | bsd-3-clause | hammerandchisel/react-native,arthuralee/react-native,hoangpham95/react-native,facebook/react-native,javache/react-native,facebook/react-native,exponent/react-native,exponentjs/react-native,janicduplessis/react-native,pandiaraj44/react-native,exponent/react-native,javache/react-native,exponent/react-native,myntra/react-... | ---
+++
@@ -29,7 +29,7 @@
if (typeof global.nativeLoggingHook === 'undefined') {
RCTLog.logToConsole(level, ...args);
} else {
- // Report native warnings to YellowBox
+ // Report native warnings to LogBox
if (warningHandler && level === 'warn') {
warningHandler(...args);
... |
c04a3b26c6b1859bf77df6a84936c95b457bf65c | src/generators/background-colors.js | src/generators/background-colors.js | const postcss = require('postcss')
const _ = require('lodash')
function findColor(colors, color) {
const colorsNormalized = _.mapKeys(colors, (value, key) => {
return _.camelCase(key)
})
return _.get(colorsNormalized, _.camelCase(color), color)
}
module.exports = function ({ colors, backgroundColors }) {
... | const postcss = require('postcss')
const _ = require('lodash')
function findColor(colors, color) {
const colorsNormalized = _.mapKeys(colors, (value, key) => {
return _.camelCase(key)
})
return _.get(colorsNormalized, _.camelCase(color), color)
}
module.exports = function ({ colors, backgroundColors }) {
... | Add support for mixed "plain color string" and "color map" background defintitions | Add support for mixed "plain color string" and "color map" background defintitions
Lets you do this:
```
backgroundColors: [
'blue',
'purple',
'pink',
{
primary: 'white',
secondary: 'orange',
},
]
```
| JavaScript | mit | tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindcss/tailwindcss,tailwindlabs/tailwindcss | ---
+++
@@ -11,7 +11,12 @@
module.exports = function ({ colors, backgroundColors }) {
if (_.isArray(backgroundColors)) {
- backgroundColors = _(backgroundColors).map(color => [color, color]).fromPairs()
+ backgroundColors = _(backgroundColors).flatMap(color => {
+ if (_.isString(color)) {
+ re... |
62bffcab761d3ca395e821e1cd259dab9ed60bc5 | blocks/data/index.js | blocks/data/index.js | var Data = require('../../lib/data');
module.exports = {
className: 'data',
template: require('./index.html'),
data: {
name: 'Data',
icon: '/images/blocks_text.png',
attributes: {
label: {
label: 'Header Text',
type: 'string',
... | var Data = require('../../lib/data');
module.exports = {
className: 'data',
template: require('./index.html'),
data: {
name: 'Data',
icon: '/images/blocks_text.png',
attributes: {
label: {
label: 'Header Text',
type: 'string',
... | Resolve style errors on data block | Resolve style errors on data block
| JavaScript | mpl-2.0 | cadecairos/webmaker-android,gvn/webmaker-android,toolness/webmaker-android,j796160836/webmaker-android,k88hudson/webmaker-android,secretrobotron/webmaker-android,secretrobotron/webmaker-android,alicoding/webmaker-android,codex8/webmaker-app,vazquez/webmaker-android,bolaram/webmaker-android,j796160836/webmaker-android,t... | ---
+++
@@ -27,22 +27,27 @@
sortOldest: false
},
- ready: function (){
+ ready: function () {
var self = this;
- if (!self.$data || !self.$data.currentDataSets || self.$data.currentDataSets.length === 0) self.$data.initialDataLoaded = false;
+ if (
+ !self.$da... |
247efe2dfbd2762628415137ac1a2f9023cabbf3 | boot/kernal/index.js | boot/kernal/index.js | var mkdirp = require('mkdirp');
var clicolour = require("cli-color");
var exec = require('child_process').exec;
exports.createTmp = function createTmp(argument) {
mkdirp("./tmp", function(err){
console.log(clicolour.cyanBright('Created ./tmp...')+clicolour.greenBright("OK"));
})
}
exports.clean = function cle... | var mkdirp = require('mkdirp');
var clicolour = require("cli-color");
var exec = require('child_process').exec;
exports.createTmp = function createTmp(argument) {
mkdirp("./tmp", function(err){
console.log(clicolour.cyanBright('Created ./tmp...')+clicolour.greenBright("OK"));
})
}
exports.clean = function cle... | Add cleaning of tmp into nodejs | Add cleaning of tmp into nodejs
| JavaScript | mit | Gum-Joe/boss.js,Gum-Joe/Web-OS,Gum-Joe/boss.js,Gum-Joe/boss.js,Gum-Joe/Web-OS,Gum-Joe/boss.js,Gum-Joe/Web-OS,Gum-Joe/boss.js,Gum-Joe/Web-OS,Gum-Joe/Web-OS,Gum-Joe/Web-OS,Gum-Joe/boss.js,Gum-Joe/Web-OS,Gum-Joe/boss.js | ---
+++
@@ -9,6 +9,8 @@
}
exports.clean = function clean(x) {
- console.log('Cleaning out files');
- console.log('Cleaned out ./tmp...'+clicolour.greenBright("OK"));
+ // clean out ./tmp
+ exec("rm -rfv ./tmp/*", function (error, stdout, stderr) {
+ console.log('Cleaned out ./tmp...'+clicolour.greenBrigh... |
2ada6c33fca5a88ae22411408b7f6e35fd309831 | app/assets/javascripts/angular/controllers/winged_monkey_controllers.js | app/assets/javascripts/angular/controllers/winged_monkey_controllers.js | var wingedMonkeyControllers = angular.module('wingedMonkeyControllers',[]);
wingedMonkeyControllers.controller("ProviderAppsCtrl", function($scope, $filter, ProviderApplication) {
$scope.appsLoaded = false;
$scope.refreshProviderApps = function() {
ProviderApplication.query(function(data){
$scope.provid... | var wingedMonkeyControllers = angular.module('wingedMonkeyControllers',[]);
wingedMonkeyControllers.controller("ProviderAppsCtrl", function($scope, $filter, ProviderApplication) {
$scope.appsLoaded = false;
$scope.refreshProviderApps = function() {
ProviderApplication.query(function(data){
$scope.provid... | Stop functionality wont remove the application untill the refresh occurs | Stop functionality wont remove the application untill the refresh occurs
| JavaScript | apache-2.0 | jtomasek/wingedmonkey,jtomasek/wingedmonkey | ---
+++
@@ -15,9 +15,11 @@
$scope.destroyProviderApp = function(app_id) {
$scope.providerApps.forEach(function(app, index) {
if (app_id === app.id) {
- app.$delete({id: app.id}, function() {
+ // app.$delete({id: app.id}, function() {
+ ProviderApplication.delete({id: app.id}, func... |
b4dbc7fdda88de3c18a2b1d23fb29894ae407903 | app/imports/ui/components/alerts/alert-ending-soon/alert-ending-soon.js | app/imports/ui/components/alerts/alert-ending-soon/alert-ending-soon.js | import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import moment from 'moment';
import './alert-ending-soon.html';
Template.AlertEndingSoon.onCreated(function onCreated() {
const self = this;
self.threshold = moment.duration(20... | import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import moment from 'moment';
import './alert-ending-soon.html';
Template.AlertEndingSoon.onCreated(function onCreated() {
const self = this;
self.threshold = moment.duration(20... | Add event handlers for links in ending soon alert | Add event handlers for links in ending soon alert
| JavaScript | mit | athyuttamre/signmeup,etremel/signmeup,athyuttamre/signmeup,gregcarlin/signmeup,etremel/signmeup,gregcarlin/signmeup,signmeup/signmeup,etremel/signmeup,gregcarlin/signmeup,signmeup/signmeup | ---
+++
@@ -34,3 +34,20 @@
return moment.duration(Template.instance().timeRemaining.get()).humanize();
},
});
+
+Template.AlertEndingSoon.events({
+ 'click .js-edit-end-time'() {
+ $('.modal-queue-edit').modal();
+ },
+
+ 'click .js-end-now'() {
+ const ok = confirm('Are you sure you want to end thi... |
65326a10745b64c6518868a83c5ce0aa7ff8097b | prelim/renderPuzzle.js | prelim/renderPuzzle.js | function renderPuzzle( levelNumber, canvas, width, height ) {
document.body.appendChild(canvas);
canvas.width = width;
canvas.height = height;
canvas.style.backgroundColor = '#333333';
canvas.id = 'gameView';
var levels = new Levels( new XSPRNG(1), 70, new MonochromaticPaletteBuilder())... | function renderPuzzle( levelNumber, canvas, width, height ) {
document.body.appendChild(canvas);
canvas.width = width;
canvas.height = height;
canvas.style.backgroundColor = '#333333';
canvas.id = 'gameView';
var levels = new Levels( new XSPRNG(1), 70, new MonochromaticPaletteBuilder())... | Add touch input to puzzle rendering function | Add touch input to puzzle rendering function
| JavaScript | mit | mnito/factors-game,mnito/factors-game | ---
+++
@@ -18,5 +18,8 @@
var inputController = new InputController( vc );
var keyboardInput = new KeyboardInput(inputController);
+ var touchInput = new TouchInput(inputController, canvas);
+
keyboardInput.listen();
+ touchInput.listen();
} |
de54880d4ef939358cba6687a109b792475e03d0 | conf/server.js | conf/server.js | // This module is the server of my site.
// Require external dependecies.
var http = require('http');
var filed = require('filed');
var path = require('path');
var readFile = require('fs').readFile;
var publish = require('./publish');
// Start the site.
module.exports = function (config) {
var isInvalid
= !conf... | // This module is the server of my site.
// Require external dependecies.
var http = require('http');
var filed = require('filed');
var path = require('path');
var readFile = require('fs').readFile;
var publish = require('./publish');
var bake = require('blake').bake;
// Start the site.
module.exports = function (con... | Add tweet and like interval | Add tweet and like interval
| JavaScript | mit | michaelnisi/troubled,michaelnisi/troubled,michaelnisi/troubled | ---
+++
@@ -6,6 +6,7 @@
var path = require('path');
var readFile = require('fs').readFile;
var publish = require('./publish');
+var bake = require('blake').bake;
// Start the site.
module.exports = function (config) {
@@ -35,5 +36,15 @@
}
req.pipe(filed(file)).pipe(resp);
- }).listen(config.port, ... |
8f89c947b4d12ddc7222843c0fc60300df96e72f | tests/util-tests.js | tests/util-tests.js | var util = require('../js/util');
var assert = require('assert');
describe('Hello World function', function() {
it('should always fail', function() {
assert.equal(false, false);
});
it('should just say hello', function() {
var answer = util.helloWorld();
assert.equal('Hello World... | var util = require('../js/util');
var assert = require('assert');
describe('Hello World function', function() {
it('should always fail', function() {
assert.equal(false, false);
});
it('should just say hello', function() {
var answer = util.helloWorld();
assert.equal('Hello World... | FIX Fix test to match production code | FIX Fix test to match production code
| JavaScript | mit | fhinkel/SimpleChatServer,fhinkel/SimpleChatServer | ---
+++
@@ -10,6 +10,6 @@
it('should just say hello', function() {
var answer = util.helloWorld();
- assert.equal('Hello World\n', answer);
+ assert.equal('Hello World, wie geht es euch?\n', answer);
});
}); |
aecea1524533c36829bc9ebc933a925acb091f74 | config/site.js | config/site.js | module.exports = function(config) {
if(!config.port || !_.isNumber(config.port)) throw new Error('Port undefined or not a number');
var domain = 'changethisfool.com';
var c = {
defaults: {
title: 'Change This Fool',
name: 'change-this-fool',
protocol: 'http',
get host() {
return this.port ? this.... | module.exports = function(config) {
if(!config.port || !_.isNumber(config.port)) throw new Error('Port undefined or not a number');
var domain = 'changethisfool.com';
var c = {
defaults: {
title: 'Change This Fool',
name: 'change-this-fool',
protocol: 'http',
get host() {
return this.port ? this.... | Check for process.env.PORT before using config.port | Check for process.env.PORT before using config.port
| JavaScript | mit | thecodebureau/epiphany | ---
+++
@@ -18,7 +18,7 @@
development: {
hostname: 'localhost',
- port: process.env.EXTERNAL_PORT || config.port
+ port: process.env.EXTERNAL_PORT || process.env.PORT || config.port
},
testing: { |
5a18e7bc20eea459c4cef4fe41aa94b5c6f87175 | controllers/hemera/updateSlackProfile.js | controllers/hemera/updateSlackProfile.js | var hemera = require('./index');
var controller;
/**
* Every time a user posts a message, we update their slack profile so we can stay up to date on their profile
* @param {Object} bot
* @param {Object} message
*/
module.exports = function updateSlackProfile(bot, message) {
controller = hemerga.getController... | var hemera = require('./index');
var controller;
/**
* Every time a user posts a message, we update their slack profile so we can stay up to date on their profile
* @param {Object} bot
* @param {Object} message
*/
module.exports = function updateSlackProfile(bot, message) {
controller = hemera.getController(... | Create a user if they don't exist | Create a user if they don't exist
| JavaScript | mit | tgolen/node-multi-slack | ---
+++
@@ -7,7 +7,7 @@
* @param {Object} message
*/
module.exports = function updateSlackProfile(bot, message) {
- controller = hemerga.getController();
+ controller = hemera.getController();
controller.storage.users.get(message.user, function(err, user) {
if (err) {
return con... |
ba3147083f0d41be4835098a77f988b2d49b545c | www/js/controllers/home_controller.js | www/js/controllers/home_controller.js | controllers.controller('HomeCtrl', function($scope, Settings, AdUtil) {
function showHomeAd() {
if(AdMob){//Because android need this on start up apparently
var platform = Settings.getPlatformSettings();
console.log('<GFF> HomeCtrl showHomeAd Banner AdUnit: ' + platform.developerBanner );
AdUti... | controllers.controller('HomeCtrl', function($scope, Settings, AdUtil) {
function showHomeAd() {
if(AdMob){//Because android need this on start up apparently
var platform = Settings.getPlatformSettings();
console.log('<GFF> HomeCtrl showHomeAd Banner AdUnit: ' + platform.developerBanner );
AdUti... | Add twitter and Facebook links | Add twitter and Facebook links
| JavaScript | mit | flashquartermaster/Give-For-Free,flashquartermaster/Give-For-Free,flashquartermaster/Give-For-Free,flashquartermaster/Give-For-Free,flashquartermaster/Give-For-Free,flashquartermaster/Give-For-Free | ---
+++
@@ -17,10 +17,10 @@
}
$scope.onFacebookTap = function(){
- window.open('http://www.facebook.com', '_system', 'location=yes'); return false;
+ window.open('https://www.facebook.com/Give-For-Free-643061692510804/', '_system', 'location=yes'); return false;
}
$scope.onTwitterTap = functio... |
2caea723c87b1b7726264e7ff03621ad101ec0f9 | main.js | main.js | 'use strict';
var app = require('app');
var mainWindow = null;
var dribbbleData = null;
var menubar = require('menubar')
var mb = menubar({
index: 'file://' + __dirname + '/app/index.html',
icon: __dirname + '/app/assets/HotshotIcon.png',
width: 400,
height: 700,
'max-width': 440,
'min-height': 300,
'm... | 'use strict';
var app = require('app');
var ipc = require('ipc');
var mainWindow = null;
var dribbbleData = null;
var menubar = require('menubar')
var mb = menubar({
index: 'file://' + __dirname + '/app/index.html',
icon: __dirname + '/app/assets/HotshotIcon.png',
width: 400,
height: 700,
'max-width': 440,
... | Add way to quit application via offcanvas menu | Add way to quit application via offcanvas menu
| JavaScript | cc0-1.0 | andrewnaumann/hotshot,andrewnaumann/hotshot | ---
+++
@@ -1,6 +1,6 @@
'use strict';
var app = require('app');
-
+var ipc = require('ipc');
var mainWindow = null;
var dribbbleData = null;
@@ -24,7 +24,11 @@
mb.on('show', function(){
// mb.window.webContents.send('focus');
- mb.window.openDevTools();
+// mb.window.openDevTools();
+});
+
+ipc.on('quit-... |
2df528d81a60e1a8a71d5cdc3fb7ac063d235902 | test/special/index.js | test/special/index.js | 'use strict';
var _ = require('lodash');
var fs = require('fs');
var hljs = require('../../build');
var jsdom = require('jsdom').jsdom;
var utility = require('../utility');
describe('special cases tests', function() {
before(function() {
var blocks,
filename = utility.buildPath('fixtures... | 'use strict';
var _ = require('lodash');
var fs = require('fs');
var hljs = require('../../build');
var jsdom = require('jsdom').jsdom;
var utility = require('../utility');
describe('special cases tests', function() {
before(function(done) {
var filename = utility.buildPath('fixtures', 'index.ht... | Use the async version of readFile | Use the async version of readFile
| JavaScript | bsd-3-clause | lead-auth/highlight.js,StanislawSwierc/highlight.js,MakeNowJust/highlight.js,carlokok/highlight.js,VoldemarLeGrand/highlight.js,Sannis/highlight.js,0x7fffffff/highlight.js,isagalaev/highlight.js,dbkaplun/highlight.js,VoldemarLeGrand/highlight.js,highlightjs/highlight.js,Sannis/highlight.js,isagalaev/highlight.js,sourru... | ---
+++
@@ -7,23 +7,27 @@
var utility = require('../utility');
describe('special cases tests', function() {
- before(function() {
- var blocks,
- filename = utility.buildPath('fixtures', 'index.html'),
- page = fs.readFileSync(filename, 'utf-8');
+ before(function(done) {
+ var filename ... |
a1284f1be70ba643b23b17285b13119488e15bcc | dependument.js | dependument.js | #!/usr/bin/env node
(function() {
"use strict";
const fs = require('fs');
const CONFIG_FILE = "package.json";
console.log(readFile(CONFIG_FILE));
function readFile(path) {
let contents = fs.readFileSync(path);
return JSON.parse(contents);
}
})();
| #!/usr/bin/env node
(function() {
"use strict";
const fs = require('fs');
const CONFIG_FILE = "package.json";
(function() {
let file = readFile(CONFIG_FILE);
let dependencies = getDependencies(file);
console.log(dependencies);
})();
function getDependencies(file) {
let dependencies = f... | Read the dependencies from the file | Read the dependencies from the file
| JavaScript | unlicense | Jameskmonger/dependument,dependument/dependument,dependument/dependument,Jameskmonger/dependument | ---
+++
@@ -6,7 +6,24 @@
const fs = require('fs');
const CONFIG_FILE = "package.json";
- console.log(readFile(CONFIG_FILE));
+ (function() {
+ let file = readFile(CONFIG_FILE);
+
+ let dependencies = getDependencies(file);
+
+ console.log(dependencies);
+ })();
+
+ function getDependencies(file) ... |
9f3ac4bd9932a0d2dc991199e41001ce30f8eecd | lib/plugins/write-file.js | lib/plugins/write-file.js | var fs = require('fs');
module.exports = function(context) {
//
// Write some data to a file.
//
context.writeFile = function(data, file) {
fs.writeFile(file, data, function(err) {
if (err) {
throw err;
}
});
};
};
| var fs = require('fs');
module.exports = function(context) {
//
// Write some data to a file.
// Creates new file with the name supplied if the file doesnt exist
//
context.writeFile = function(data, file) {
fs.open(file, 'a+', function(err, fd) {
if(err) {
throw err;
}
var bu... | Create file if file doesnt exist | Create file if file doesnt exist
| JavaScript | isc | fiveisprime/screpl | ---
+++
@@ -4,12 +4,22 @@
//
// Write some data to a file.
+ // Creates new file with the name supplied if the file doesnt exist
//
context.writeFile = function(data, file) {
- fs.writeFile(file, data, function(err) {
- if (err) {
+ fs.open(file, 'a+', function(err, fd) {
+ if(err) {
... |
590abe07d9af483dea0e82b1ee481e191821edc9 | aura-components/src/main/components/uiExamples/radio/radioController.js | aura-components/src/main/components/uiExamples/radio/radioController.js | /*
* Copyright (C) 2013 salesforce.com, inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | /*
* Copyright (C) 2013 salesforce.com, inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | Remove use of getElement() in example | Remove use of getElement() in example
@rev W-3224090@
@rev goliver@ | JavaScript | apache-2.0 | madmax983/aura,forcedotcom/aura,forcedotcom/aura,forcedotcom/aura,madmax983/aura,forcedotcom/aura,madmax983/aura,forcedotcom/aura,madmax983/aura,madmax983/aura,madmax983/aura | ---
+++
@@ -15,15 +15,13 @@
*/
({
onRadio: function(cmp, evt) {
- var elem = evt.getSource().getElement();
- var selected = elem.textContent;
+ var selected = evt.source.get("v.label");
resultCmp = cmp.find("radioResult");
resultCmp.set("v.value", selected);
},
onGroup: function(cmp, evt) {... |
d458223003e0a110549c03862e7a00984a211719 | packages/@sanity/core/src/actions/dataset/import/getBatchedAssetImporter.js | packages/@sanity/core/src/actions/dataset/import/getBatchedAssetImporter.js | import through from 'through2'
import getAssetImporter from './getAssetImporter'
import promiseEach from 'promise-each-concurrency'
const batchSize = 10
const concurrency = 6
export default options => {
const assetImporter = getAssetImporter(options)
const documents = []
return through.obj(onChunk, onFlush)
... | import through from 'through2'
import getAssetImporter from './getAssetImporter'
import promiseEach from 'promise-each-concurrency'
const batchSize = 10
const concurrency = 6
export default options => {
const assetImporter = getAssetImporter(options)
const documents = []
return through.obj(onChunk, onFlush)
... | Add try/catch around asset importing and emit error to stream | [core] Add try/catch around asset importing and emit error to stream
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -12,7 +12,12 @@
return through.obj(onChunk, onFlush)
async function uploadAssets(stream, cb) {
- await promiseEach(documents, assetImporter.processDocument, {concurrency})
+ try {
+ await promiseEach(documents, assetImporter.processDocument, {concurrency})
+ } catch (err) {
+ cb(... |
14d6dad3991c6a5f37cc801550bbdf4fc1475d75 | connectors/v2/baidu.js | connectors/v2/baidu.js | 'use strict';
/* global Connector */
Connector.playerSelector = '#playPanel > .panel-inner';
Connector.artistSelector = '.artist';
Connector.trackSelector = '.songname';
Connector.isPlaying = function () {
return !$('.play').hasClass('stop');
};
| 'use strict';
/* global Connector */
Connector.playerSelector = '#playPanel > .panel-inner';
Connector.artistSelector = '.artist';
Connector.trackSelector = '.songname';
Connector.currentTimeSelector = '.curTime';
Connector.durationSelector = '.totalTime';
Connector.isPlaying = function () {
return !$('.play').... | Add current time and duration processing to Baidu | Add current time and duration processing to Baidu
| JavaScript | mit | inverse/web-scrobbler,Paszt/web-scrobbler,alexesprit/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,ex47/web-scrobbler,alexesprit/web-scrobbler,carpet-berlin/web-scrobbler,Paszt/web-scrobbler,usdivad/web-scrobbler,david-sabata/web-scrobbler,ex47/web-scrobbler,carpet-berlin/web-scrobbl... | ---
+++
@@ -8,6 +8,10 @@
Connector.trackSelector = '.songname';
+Connector.currentTimeSelector = '.curTime';
+
+Connector.durationSelector = '.totalTime';
+
Connector.isPlaying = function () {
return !$('.play').hasClass('stop');
}; |
88440db50bce90f918beb61c0335294389015f69 | topics/about_scope.js | topics/about_scope.js | module("About Scope (topics/about_scope.js)");
thisIsAGlobalVariable = 77;
test("global variables", function() {
equal(__, thisIsAGlobalVariable, 'is thisIsAGlobalVariable defined in this scope?');
});
test("variables declared inside of a function", function() {
var outerVariable = "outer";
// this is a... | module("About Scope (topics/about_scope.js)");
thisIsAGlobalVariable = 77;
test("global variables", function() {
equal(77, thisIsAGlobalVariable, 'is thisIsAGlobalVariable defined in this scope?');
});
test("variables declared inside of a function", function() {
var outerVariable = "outer";
// this is a... | Complete scope tests to pass | Complete scope tests to pass
| JavaScript | mit | supportbeam/javascript_koans,supportbeam/javascript_koans | ---
+++
@@ -3,7 +3,7 @@
thisIsAGlobalVariable = 77;
test("global variables", function() {
- equal(__, thisIsAGlobalVariable, 'is thisIsAGlobalVariable defined in this scope?');
+ equal(77, thisIsAGlobalVariable, 'is thisIsAGlobalVariable defined in this scope?');
});
test("variables declared inside of a... |
abf3f9d87828d7159c3c04a46b5e6630a6af43b7 | app/scripts/services/resources-service.js | app/scripts/services/resources-service.js | 'use strict';
(function() {
angular.module('ncsaas')
.service('resourcesService', ['RawResource', 'currentStateService', '$q', resourcesService]);
function resourcesService(RawResource, currentStateService, $q) {
var vm = this;
vm.getResourcesList = getResourcesList;
vm.getRawResourcesList = getRa... | 'use strict';
(function() {
angular.module('ncsaas')
.service('resourcesService', ['RawResource', 'currentStateService', '$q', resourcesService]);
function resourcesService(RawResource, currentStateService, $q) {
var vm = this;
vm.getResourcesList = getResourcesList;
vm.getRawResourcesList = getRa... | Remove method update from RawResource service | Remove method update from RawResource service
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -35,9 +35,6 @@
return $resource(
ENV.apiEndpoint + 'api/resources/', {},
{
- update: {
- method: 'PUT'
- }
}
);
} |
ae0e43c40e037a7631efc0e631c7b09a0c930909 | spec/renderer.spec.js | spec/renderer.spec.js | const MarkdownRenderer = require('../src/renderer').MarkdownRenderer
describe ('Renderer', () => {
var renderer
var callback
beforeEach(() => {
callback = jasmine.createSpy('callback')
renderer = new MarkdownRenderer(callback)
})
it('converts a markdown file', (done) => {
const markdownFilePath... | const MarkdownRenderer = require('../src/renderer').MarkdownRenderer
describe ('Renderer', () => {
var renderer
var callback
beforeEach(() => {
callback = jasmine.createSpy('callback')
renderer = new MarkdownRenderer(callback)
})
it('converts a markdown file', (done) => {
const markdownFilePath... | Add failing test for rendering markdown string | Add failing test for rendering markdown string
| JavaScript | unlicense | pfertyk/mauve,pfertyk/mauve | ---
+++
@@ -19,4 +19,15 @@
done()
}, done.fail)
})
+
+ it('converts a markdown string', (done) => {
+ var markdown = '## Hi'
+ const expectedMarkdown = '^[^<>]*<div class="markdown-body"><h2 id="hi">Hi</h2></div>$'
+
+ renderer.load(markdown, callback).then(() => {
+ expect(callback.call... |
25b98d508c2b9eb70a73c363ae6c29c54ad3920f | www/loginchecker.js | www/loginchecker.js | var _IsLoggedIn = undefined;
function checkIfLoggedInAndTriggerEvent(notifyLoggedOutEveryTime){
request({module:"user", type: "IsLoggedIn"}, function(res){
if(_IsLoggedIn === undefined){
$(document).trigger("InitialUserStatus", res.loggedIn);
}
if(res.loggedIn != _IsLoggedIn){
_IsLoggedIn = res.loggedI... | var _IsLoggedIn = undefined;
function checkIfLoggedInAndTriggerEvent(notifyLoggedOutEveryTime){
request({module:"user", type: "IsLoggedIn"}, function(res){
if(_IsLoggedIn === undefined){
$(document).trigger("InitialUserStatus", res.loggedIn);
}
if(res.loggedIn != _IsLoggedIn){
_IsLoggedIn = res.loggedIn... | Fix indefinite event loop on connection error | Fix indefinite event loop on connection error | JavaScript | mit | palantus/mod-user | ---
+++
@@ -1,5 +1,4 @@
var _IsLoggedIn = undefined;
-
function checkIfLoggedInAndTriggerEvent(notifyLoggedOutEveryTime){
request({module:"user", type: "IsLoggedIn"}, function(res){
@@ -21,8 +20,11 @@
}
+var lastIsLoggedInErrorCheck = 0;
$(document).bind('request_error', function(){
- checkIfLoggedInAndT... |
1dc9e07b3eba41f48806cc2545b190f048ab9019 | src/DataLinkMixin.js | src/DataLinkMixin.js | "use strict";
/**
* Since only a single constructor is being exported as module.exports this comment isn't documented.
* The class and module are the same thing, the contructor comment takes precedence.
* @module DataLinkMixin
*/
var EventEmitter = require('wolfy87-eventemitter');
var eventEmitter = new E... | "use strict";
/**
* Since only a single constructor is being exported as module.exports this comment isn't documented.
* The class and module are the same thing, the contructor comment takes precedence.
* @module DataLinkMixin
*/
var EventEmitter = require('wolfy87-eventemitter');
var eventEmitter = new E... | Switch it around, mixin everything that doesn't override a method already on the target. | Switch it around, mixin everything that doesn't override a method already on the target.
| JavaScript | mit | chad-autry/data-chains | ---
+++
@@ -25,7 +25,7 @@
//Copy over everything in EventEmitter to the object
for (var k in eventEmitter) {
- if (eventEmitter.hasOwnProperty(k)) {
+ if (!this.hasOwnProperty(k)) {
this[k] = eventEmitter[k];
}
} |
42fead0aa8484ea83c91781ee4c298248e0cccf2 | dom/Component.js | dom/Component.js | var Class = require('../Class'),
Publisher = require('../Publisher'),
create = require('./create'),
style = require('./style'),
getOffset = require('./getOffset')
module.exports = Class(Publisher, function() {
this.init = function() {
Publisher.prototype.init.apply(this)
}
this.render = function(win) {
th... | var Class = require('../Class'),
Publisher = require('../Publisher'),
create = require('./create'),
style = require('./style'),
getOffset = require('./getOffset')
module.exports = Class(Publisher, function() {
this._tag = 'div'
this.init = function() {
Publisher.prototype.init.apply(this)
}
this.render =... | Allow specifying the tag type of a dom component, and allow passing in the element a component should render in | Allow specifying the tag type of a dom component, and allow passing in the element a component should render in
| JavaScript | mit | ASAPPinc/std.js,marcuswestin/std.js | ---
+++
@@ -6,14 +6,16 @@
module.exports = Class(Publisher, function() {
+ this._tag = 'div'
+
this.init = function() {
Publisher.prototype.init.apply(this)
}
- this.render = function(win) {
+ this.render = function(win, el) {
this._win = win
this._doc = this._win.document
- this._el = create('d... |
02f9e21ff32ddbd4c829ae1a1370fe19e12938bd | lib/helpers/message-parsers.js | lib/helpers/message-parsers.js | module.exports.int = function(_msg) {
if (_msg.properties.contentType === 'application/json') {
return JSON.parse(_msg.content.toString());
}
return _msg.content.toString();
};
module.exports.out = function(content, options) {
if (typeof content === 'object') {
content = JSON.stringify(content);
... | module.exports.in = function(_msg) {
if (_msg.properties.contentType === 'application/json') {
return JSON.parse(_msg.content.toString());
}
return _msg.content.toString();
};
module.exports.out = function(content, options) {
if (typeof content === 'object') {
content = JSON.stringify(content);
o... | FIx bad function naming in message formatter helper | FIx bad function naming in message formatter helper
| JavaScript | mit | dial-once/node-bunnymq | ---
+++
@@ -1,4 +1,4 @@
-module.exports.int = function(_msg) {
+module.exports.in = function(_msg) {
if (_msg.properties.contentType === 'application/json') {
return JSON.parse(_msg.content.toString());
} |
1e90e61bfe9b5fd6b0de0bc83b931bf7034ae885 | src/matchers/index.js | src/matchers/index.js | const _ = require('lodash/fp')
const fs = require('fs')
const path = require('path')
const matchers = _.flow(
_.map(file => path.basename(file, '.js')),
_.without(['index'])
)(fs.readdirSync(__dirname))
module.exports = _.flow(
_.map(matcher => require(`./${matcher}`)),
_.zipObject(matchers)
)(matchers)
| module.exports = {
Given: require('./Given'),
Nested: require('./Nested'),
Prop: require('./Prop'),
Rejects: require('./Rejects'),
Required: require('./Required'),
Resolves: require('./Resolves'),
Returns: require('./Returns'),
Test: require('./Test'),
Throws: require('./Throws')
}
| Use explicit exports for matchers. | Use explicit exports for matchers.
This was causing issues with importing *.test.js files and making this explicit
should also make it easier to convert to ES modules.
| JavaScript | isc | nickmccurdy/purespec | ---
+++
@@ -1,13 +1,11 @@
-const _ = require('lodash/fp')
-const fs = require('fs')
-const path = require('path')
-
-const matchers = _.flow(
- _.map(file => path.basename(file, '.js')),
- _.without(['index'])
-)(fs.readdirSync(__dirname))
-
-module.exports = _.flow(
- _.map(matcher => require(`./${matcher}`)),
- ... |
4b4020d9c2c489b8f113ed817e9b13d8f6003427 | app/components/html-editor.js | app/components/html-editor.js | /* eslint ember/order-in-components: 0 */
import $ from 'jquery';
import { inject as service } from '@ember/service';
import Component from '@ember/component';
import { computed } from '@ember/object';
const defaultButtons = [
'bold',
'italic',
'subscript',
'superscript',
'formatOL',
'formatUL',
'insertL... | /* eslint ember/order-in-components: 0 */
import $ from 'jquery';
import { inject as service } from '@ember/service';
import Component from '@ember/component';
import { computed } from '@ember/object';
const defaultButtons = [
'bold',
'italic',
'subscript',
'superscript',
'formatOL',
'formatUL',
'insertL... | Update our Froala Editor license key | Update our Froala Editor license key
| JavaScript | mit | jrjohnson/frontend,thecoolestguy/frontend,jrjohnson/frontend,djvoa12/frontend,ilios/frontend,dartajax/frontend,ilios/frontend,thecoolestguy/frontend,djvoa12/frontend,dartajax/frontend | ---
+++
@@ -31,7 +31,7 @@
const language = i18n.get('locale');
return {
- key : 'vD1Ua1Mf1e1VSYKa1EPYD==',
+ key : '3A9A5C4A3gC3E3C3E3B7A4A2F4B2D2zHMDUGENKACTMXQL==',
theme : 'gray',
language,
toolbarInline: false, |
22e488049a640d04cc5db19fec3043354ee335db | src/base/UserData.js | src/base/UserData.js | core.Class("lowland.base.UserData", {
construct : function() {
this.__$$userdata = {};
},
members : {
setUserData : function(key, value) {
if (core.Env.getValue("debug")) {
if (!key) {
throw new Error("Parameter key not set");
}
if (!value) {
throw new ... | core.Class("lowland.base.UserData", {
construct : function() {
this.__$$userdata = {};
},
members : {
setUserData : function(key, value) {
if (core.Env.getValue("debug")) {
if (!key) {
throw new Error("Parameter key not set");
}
if (!value) {
console.wa... | Change from error to warn in userdata | Change from error to warn in userdata
| JavaScript | mit | fastner/lowland,fastner/lowland | ---
+++
@@ -10,7 +10,7 @@
throw new Error("Parameter key not set");
}
if (!value) {
- throw new Error("Parameter value not set");
+ console.warn("Parameter value not set for key " + key);
}
}
|
767bb63da813da20d02ba4dc938750d283fb10de | test/integration/fixtures/sampleapp/config/local.js | test/integration/fixtures/sampleapp/config/local.js | module.exports = {
log: {
level: 'silent'
},
views: {
locals: {
foo: '!bar!'
}
},
blueprints: {
defaultLimit: 10
},
models: {
migrate: 'alter'
},
globals: false
};
| module.exports = {
log: {
level: 'silent'
},
views: {
locals: {
foo: '!bar!'
}
},
models: {
migrate: 'alter'
},
globals: false
};
| Remove `defaultLimit` from test fixture app | Remove `defaultLimit` from test fixture app
| JavaScript | mit | rlugojr/sails,balderdashy/sails,rlugojr/sails | ---
+++
@@ -7,9 +7,6 @@
foo: '!bar!'
}
},
- blueprints: {
- defaultLimit: 10
- },
models: {
migrate: 'alter'
}, |
76c587ac9c7619aa9788daf960b7556b323fb08e | config/karma.conf.js | config/karma.conf.js | basePath = '../';
files = [
JASMINE,
JASMINE_ADAPTER,
'app/lib/jquery/jquery-*.js',
'app/lib/angular/angular.js',
'app/lib/angular/angular-*.js',
'app/lib/underscore.js',
'test/lib/angular/angular-mocks.js',
'app/lib/angular-ui/angular-ui-0.4.0/build/**/*.js',
'app/js/directives/*.js',
'app/js/**/*... | basePath = '../';
files = [
JASMINE,
JASMINE_ADAPTER,
'app/lib/jquery/jquery-*.js',
'app/lib/angular/angular.js',
'app/lib/angular/angular-*.js',
'app/lib/underscore.js',
'test/lib/angular/angular-mocks.js',
'app/lib/angular-ui/angular-ui-0.4.0/build/**/*.js',
'app/js/directives/*.js',
'app/js/**/*... | Set karma options up for faster unit tests | Set karma options up for faster unit tests
| JavaScript | mit | DerekDomino/forms-angular,behzad88/forms-angular,behzad88/forms-angular,DerekDomino/forms-angular,forms-angular/forms-angular,b12consulting/forms-angular,forms-angular/forms-angular,b12consulting/forms-angular,forms-angular/forms-angular,DerekDomino/forms-angular | ---
+++
@@ -14,9 +14,9 @@
'test/unit/**/*.js'
];
-autoWatch = false;
+autoWatch = true;
-browsers = ['Chrome'];
+browsers = ['PhantomJS'];
junitReporter = {
outputFile: 'test_out/unit.xml', |
0605156573b379514f243119d20f55fb8ce8b660 | view/dbjs/active-managers-select.js | view/dbjs/active-managers-select.js | 'use strict';
var d = require('d')
, db = require('mano').db
, _ = require('mano').i18n.bind('View: Manager Select');
module.exports = function (descriptor) {
Object.defineProperties(descriptor, {
inputOptions: d({
list: db.User.instances.filterByKey('isManagerActive').toArray(function (a, b) {
return a... | 'use strict';
var d = require('d')
, activeManagers = require('../../users/active-managers')
, _ = require('mano').i18n.bind('View: Manager Select');
module.exports = function (descriptor) {
Object.defineProperties(descriptor, {
inputOptions: d({
list: activeManagers.toArray(function (a, b) {
return a.f... | Use managers list + case insensitive comparison | Use managers list + case insensitive comparison
| JavaScript | mit | egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations | ---
+++
@@ -1,14 +1,14 @@
'use strict';
var d = require('d')
- , db = require('mano').db
+ , activeManagers = require('../../users/active-managers')
, _ = require('mano').i18n.bind('View: Manager Select');
module.exports = function (descriptor) {
Object.defineProperties(descriptor, {
inputOptions: d(... |
7daab629eaccd22f474da04a9d83f560dbeb4685 | src/post/LikesList.js | src/post/LikesList.js | import React, { Component } from 'react';
import { Link } from 'react-router';
import Avatar from '../widgets/Avatar';
import './LikesList.scss';
export default class LikesList extends Component {
constructor(props) {
super(props);
this.state = {
show: 10,
};
}
handleShowMore() {
this.setS... | import React, { Component } from 'react';
import { Link } from 'react-router';
import Avatar from '../widgets/Avatar';
import './LikesList.scss';
export default class LikesList extends Component {
constructor(props) {
super(props);
this.state = {
show: 10,
};
}
handleShowMore() {
this.setS... | Add red color on dislikes | Add red color on dislikes
| JavaScript | mit | ryanbaer/busy,Sekhmet/busy,Sekhmet/busy,ryanbaer/busy,busyorg/busy,busyorg/busy | ---
+++
@@ -33,7 +33,7 @@
</Link>
{ ' ' }
{vote.percent < 0
- ? 'Disliked'
+ ? <span className="text-danger">Disliked</span>
: 'Liked'
}
</div> |
f0678e2e83fbddd440c775742691da408e21367b | plugins/services/src/js/constants/DefaultApp.js | plugins/services/src/js/constants/DefaultApp.js | const DEFAULT_APP_RESOURCES = {cpus: 1, mem: 128};
const DEFAULT_APP_SPEC = Object.assign({instances: 1}, DEFAULT_APP_RESOURCES);
module.exports = {
DEFAULT_APP_RESOURCES,
DEFAULT_APP_SPEC
};
| const DEFAULT_APP_RESOURCES = {cpus: 0.1, mem: 128};
const DEFAULT_APP_SPEC = Object.assign({instances: 1}, DEFAULT_APP_RESOURCES);
module.exports = {
DEFAULT_APP_RESOURCES,
DEFAULT_APP_SPEC
};
| Change CPU default from 1 to 0.1 | Change CPU default from 1 to 0.1
| JavaScript | apache-2.0 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | ---
+++
@@ -1,4 +1,4 @@
-const DEFAULT_APP_RESOURCES = {cpus: 1, mem: 128};
+const DEFAULT_APP_RESOURCES = {cpus: 0.1, mem: 128};
const DEFAULT_APP_SPEC = Object.assign({instances: 1}, DEFAULT_APP_RESOURCES);
module.exports = { |
78ce6d2bf9c2307f322f1d2ea9a28639868445c6 | src/client/js/main.js | src/client/js/main.js | const React = require("react");
const ReactDOM = require("react-dom");
const HeroUnit = require("./components/main.jsx");
const data = require("../../data/schedule.json");
const projectConfig = require("../../../project.config.js");
ReactDOM.render(
React.createElement(HeroUnit, {
homeTeam: projectConfig.homeT... | const React = require("react");
const ReactDOM = require("react-dom");
const HeroUnit = require("./components/main.js");
const data = require("../../data/schedule.json");
const projectConfig = require("../../../project.config.js");
ReactDOM.render(
React.createElement(HeroUnit, {
homeTeam: projectConfig.homeTe... | Update filename for new jsx=>js conversion | Update filename for new jsx=>js conversion
| JavaScript | mit | baer/isThereAFuckingGame | ---
+++
@@ -1,7 +1,7 @@
const React = require("react");
const ReactDOM = require("react-dom");
-const HeroUnit = require("./components/main.jsx");
+const HeroUnit = require("./components/main.js");
const data = require("../../data/schedule.json");
const projectConfig = require("../../../project.config.js"); |
8742599f32274925b24b668e8915ce2966d8ea89 | src/config/package.js | src/config/package.js | 'use strict';
/**
* dependency package versions
*/
export default {
redis: '2.3.0',
sqlite3: '3.1.4',
ejs: '2.3.4',
jade: '1.11.0',
mongodb: '2.0.48',
memjs: '0.8.7',
sockjs: '0.3.15',
nunjucks: '2.2.0',
'socket.io': '1.3.7',
pg: '4.4.3',
'source-map-support': '0.4.0'
}; | 'use strict';
/**
* dependency package versions
*/
export default {
redis: '2.3.0',
sqlite3: '3.1.4',
ejs: '2.3.4',
jade: '1.11.0',
mongodb: '2.0.48',
memjs: '0.8.7',
sockjs: '0.3.15',
nunjucks: '2.2.0',
'socket.io': '1.3.7',
pg: '7.0.1',
'source-map-support': '0.4.0'
}; | Upgrade pg version to 7.0.1 | Upgrade pg version to 7.0.1
| JavaScript | mit | Qihoo360/thinkjs,thinkjs/thinkjs,snadn/thinkjs,75team/thinkjs,75team/thinkjs,75team/thinkjs | ---
+++
@@ -12,6 +12,6 @@
sockjs: '0.3.15',
nunjucks: '2.2.0',
'socket.io': '1.3.7',
- pg: '4.4.3',
+ pg: '7.0.1',
'source-map-support': '0.4.0'
}; |
e197f10b72a8f3dea6d25d06c4c902e6c7d80ad8 | backend/servers/mcapid/lib/dal/files.js | backend/servers/mcapid/lib/dal/files.js | module.exports = function(r) {
const {addFileToDirectoryInProject} = require('./dir-utils')(r);
const uploadFileToProjectDirectory = async(file, projectId, directoryId, userId) => {
let upload = await addFileToDirectoryInProject(file, directoryId, projectId, userId);
return upload;
};
... | module.exports = function(r) {
const {addFileToDirectoryInProject} = require('./dir-utils')(r);
const uploadFileToProjectDirectory = async(file, projectId, directoryId, userId) => {
let upload = await addFileToDirectoryInProject(file, directoryId, projectId, userId);
return upload;
};
... | Throw an error if nothing is changed on a file move | Throw an error if nothing is changed on a file move
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | ---
+++
@@ -8,8 +8,11 @@
};
const moveFileToDirectory = async(fileId, oldDirectoryId, newDirectoryId) => {
- await r.table('datadir2datafile').getAll([oldDirectoryId, fileId], {index: 'datadir_datafile'})
+ let rv = await r.table('datadir2datafile').getAll([oldDirectoryId, fileId], {index: '... |
19faa2f7d98a8a9212bf253668bc0f8ab066d3ee | bundles/ranvier-combat/commands/kill.js | bundles/ranvier-combat/commands/kill.js | 'use strict';
module.exports = (srcPath) => {
const Broadcast = require(srcPath + 'Broadcast');
const Parser = require(srcPath + 'CommandParser').CommandParser;
return {
aliases: ['attack', 'slay'],
command : (state) => (args, player) => {
args = args.trim();
if (!args.length) {
ret... | 'use strict';
module.exports = (srcPath) => {
const Broadcast = require(srcPath + 'Broadcast');
const Parser = require(srcPath + 'CommandParser').CommandParser;
return {
aliases: ['attack', 'slay'],
command : (state) => (args, player) => {
args = args.trim();
if (!args.length) {
ret... | Allow player to engage multiple enemies at once | Allow player to engage multiple enemies at once
| JavaScript | mit | shawncplus/ranviermud | ---
+++
@@ -11,10 +11,6 @@
if (!args.length) {
return Broadcast.sayAt(player, 'Kill whom?');
- }
-
- if (player.isInCombat()) {
- return Broadcast.sayAt(player, "You're too busy fighting!");
}
let target = null; |
cd461531e850fd30cbd5e1903308b25b19460c0a | MarkdownConverter/Resources/Files.js | MarkdownConverter/Resources/Files.js | const Path = require("path");
module.exports = {
SystemStyle: Path.join(__dirname, "css", "styles.css"),
DefaultStyle: Path.join(__dirname, "css", "markdown.css"),
DefaultHighlight: Path.join(__dirname, "css", "highlight.css"),
EmojiStyle: Path.join(__dirname, "css", "emoji.css"),
SystemTemplate: P... | const Path = require("path");
module.exports = {
SystemStyle: Path.join(__dirname, "css", "styles.css"),
DefaultStyle: Path.join(__dirname, "css", "markdown.css"),
DefaultHighlight: Path.join(__dirname, "css", "highlight.css"),
EmojiStyle: Path.join(__dirname, "css", "emoji.css"),
SystemTemplate: P... | Fix the path to the highlight-js directory | Fix the path to the highlight-js directory
| JavaScript | mit | manuth/MarkdownConverter,manuth/MarkdownConverter,manuth/MarkdownConverter | ---
+++
@@ -6,5 +6,5 @@
DefaultHighlight: Path.join(__dirname, "css", "highlight.css"),
EmojiStyle: Path.join(__dirname, "css", "emoji.css"),
SystemTemplate: Path.join(__dirname, "SystemTemplate.html"),
- HighlightJSStylesDir: Path.join(__dirname, "..", "node_modules", "highlightjs", "styles")
+ ... |
dec162c8555fadb12abf8c390f0d899061f5775c | server/models/index.js | server/models/index.js | import fs from 'fs';
import path from 'path';
import Sequelize from 'sequelize';
// import configs from '../config/config';
const basename = path.basename(module.filename);
// const env = process.env.NODE_ENV || 'development';
// const config = configs[env];
const db = {};
let sequelize;
if (process.env.DATABASE_URL... | import fs from 'fs';
import path from 'path';
import Sequelize from 'sequelize';
const basename = path.basename(module.filename);
const db = {};
let sequelize;
if (process.env.DATABASE_URL || process.env.DATABASE_URL_TEST) {
sequelize = new Sequelize(process.env.DATABASE_URL
|| process.env.DATABASE_URL_TEST);
... | Fix app crash on travis CI and heroku | Fix app crash on travis CI and heroku
| JavaScript | apache-2.0 | larrystone/BC-26-More-Recipes,larrystone/BC-26-More-Recipes | ---
+++
@@ -1,17 +1,15 @@
import fs from 'fs';
import path from 'path';
import Sequelize from 'sequelize';
-// import configs from '../config/config';
const basename = path.basename(module.filename);
-// const env = process.env.NODE_ENV || 'development';
-// const config = configs[env];
const db = {};
let s... |
47135b7ca6c91ff4ae7f714d316f15a6ed3d3cc6 | index.js | index.js | 'use strict';
var color = require('color')
, hex = require('text-hex');
/**
* Generate a color for a given name. But be reasonably smart about it by
* understanding name spaces and coloring each namespace a bit lighter so they
* still have the same base color as the root.
*
* @param {String} name The namespace... | 'use strict';
var color = require('color')
, hex = require('text-hex');
/**
* Generate a color for a given name. But be reasonably smart about it by
* understanding name spaces and coloring each namespace a bit lighter so they
* still have the same base color as the root.
*
* @param {String} name The namespace... | Return early when no namespace is used | [minor] Return early when no namespace is used
| JavaScript | mit | bigpipe/colorspace | ---
+++
@@ -13,11 +13,14 @@
* @api private
*/
module.exports = function colorspace(namespace, delimiter) {
- namespace = namespace.split(delimiter || ':');
+ var split = namespace.split(delimiter || ':');
+ var base = hex(split[0]);
- for (var base = hex(namespace[0]), i = 0, l = namespace.length - 1; i < ... |
7b9c2ef3a0b044ea2697848a7f91c9e380878934 | index.js | index.js | var argv = require( 'minimist' )( process.argv.slice( 2 ) );
var downloadSite = require( './download' );
if ( ! argv.site ) {
console.error( 'Provide a site with the --site option' );
process.exit( 1 );
}
var wpcom = require( 'wpcom' )();
var site = wpcom.site( argv.site );
// TODO: verify we connected
if ( argv.... | var parseArgs = require( 'minimist' );
var downloadSite = require( './download' );
var argv = parseArgs( process.argv.slice( 2 ), {
boolean: true
} );
if ( ! argv.site ) {
console.error( 'Provide a site with the --site option' );
process.exit( 1 );
}
if ( ! argv.download && ! argv.upload ) {
console.error( 'Eith... | Make sure --download or --upload are specified | Make sure --download or --upload are specified
| JavaScript | mit | sirbrillig/wordpress-warp,sirbrillig/wordpress-warp | ---
+++
@@ -1,8 +1,17 @@
-var argv = require( 'minimist' )( process.argv.slice( 2 ) );
+var parseArgs = require( 'minimist' );
var downloadSite = require( './download' );
+
+var argv = parseArgs( process.argv.slice( 2 ), {
+ boolean: true
+} );
if ( ! argv.site ) {
console.error( 'Provide a site with the --site... |
187269cfc24909ee5c21d33d9680f7d1467ab03b | app/components/Settings/components/notifications-panel.js | app/components/Settings/components/notifications-panel.js | import React from 'react';
import PropTypes from 'prop-types';
import { RadioGroup, Radio, Checkbox } from '@blueprintjs/core';
import { NotificationTypes } from 'enums';
const NotificationsPanel = ({
notificationType,
onSettingsChange,
setNotificationType,
continuousMode,
setContinuousMode
}) => (
<div c... | import React from 'react';
import PropTypes from 'prop-types';
import { RadioGroup, Radio, Checkbox } from '@blueprintjs/core';
import { NotificationTypes } from 'enums';
const NotificationsPanel = ({
notificationType,
onSettingsChange,
setNotificationType,
continuousMode,
setContinuousMode
}) => (
<div c... | Remove label and just show checkbox | feat: Remove label and just show checkbox
| JavaScript | mit | builtwithluv/ZenFocus,builtwithluv/ZenFocus | ---
+++
@@ -12,7 +12,6 @@
setContinuousMode
}) => (
<div className="mt-1">
- <label className="pt-label">Continuous Mode</label>
<Checkbox
label="Ask for confirmation before moving onto the next phase"
checked={continuousMode} |
dbd5d56fe2fa39c89d063bfbbf0f0fdfedae8168 | packages/lesswrong/server/mapsUtils.js | packages/lesswrong/server/mapsUtils.js | import { getSetting } from 'meteor/vulcan:core';
import googleMaps from '@google/maps'
const googleMapsApiKey = getSetting('googleMaps.serverApiKey', null)
let googleMapsClient = null
if (googleMapsApiKey) {
googleMapsClient = googleMaps.createClient({
key: googleMapsApiKey,
Promise: Promise
});
} else {
... | import { getSetting } from 'meteor/vulcan:core';
import googleMaps from '@google/maps'
const googleMapsApiKey = getSetting('googleMaps.serverApiKey', null)
let googleMapsClient = null
if (googleMapsApiKey) {
googleMapsClient = googleMaps.createClient({
key: googleMapsApiKey,
Promise: Promise
});
} else {
... | Improve error handling without API key | Improve error handling without API key
| JavaScript | mit | Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope | ---
+++
@@ -10,10 +10,15 @@
});
} else {
// eslint-disable-next-line no-console
- console.log("No Google maps API key provided, please provide one for proper geocoding")
+ console.log("No Server-side Google maps API key provided, please provide one for proper timezone handling")
}
export async function g... |
4961e4c984cee1c13f15966b670fccb0360391ee | src/main/web/js/app/pym-interactive.js | src/main/web/js/app/pym-interactive.js |
$(function() {
$('div.pym-interactive').each(function(index, element) {
new pym.Parent($(element).attr('id'), $(element).data('url'));
});
});
|
$(function() {
$('div.pym-interactive').each(function(index, element) {
var pymParent = new pym.Parent($(element).attr('id'), $(element).data('url'));
pymParent.onMessage('height', function(height) {
addIframeHeightToEmbedCode($(this), height);
});
});
});
function addIfram... | Build embed code including height attrbute on height message from pym child | Build embed code including height attrbute on height message from pym child
| JavaScript | mit | ONSdigital/babbage,ONSdigital/babbage,ONSdigital/babbage,ONSdigital/babbage | ---
+++
@@ -1,6 +1,25 @@
$(function() {
$('div.pym-interactive').each(function(index, element) {
- new pym.Parent($(element).attr('id'), $(element).data('url'));
+ var pymParent = new pym.Parent($(element).attr('id'), $(element).data('url'));
+ pymParent.onMessage('height', function(heigh... |
91c61c8d9ad1fc6ed7561f95de347334ea387f04 | app/assets/javascripts/frontend.js | app/assets/javascripts/frontend.js | // Frontend manifest
//= require transactions
//= require media-player-loader
//= require checkbox-filter
//= require support
//= require live-search
//= require shared_mustache
//= require templates
//= require track-external-links
//= require search
| // Frontend manifest
// Note: The ordering of these JavaScript includes matters.
//= require transactions
//= require media-player-loader
//= require checkbox-filter
//= require support
//= require live-search
//= require shared_mustache
//= require templates
//= require track-external-links
//= require search
| Add comment: explain JS deps ordering matters | Add comment: explain JS deps ordering matters
Make it clear to others looking at the frontend.js file that the
ordering of the JS includes matters.
| JavaScript | mit | alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend | ---
+++
@@ -1,4 +1,5 @@
// Frontend manifest
+// Note: The ordering of these JavaScript includes matters.
//= require transactions
//= require media-player-loader
//= require checkbox-filter |
e781a6a037ae7f7888b84d6f83801305bf2d1205 | plugins/auth/flat_file.js | plugins/auth/flat_file.js | // Auth against a flat file
exports.register = function () {
this.inherits('auth/auth_base');
}
exports.hook_capabilities = function (next, connection) {
// don't allow AUTH unless private IP or encrypted
if (!net_utils.is_rfc1918(connection.remote_ip) && !connection.using_tls) return next();
var conf... | // Auth against a flat file
var net_utils = require('./net_utils');
exports.register = function () {
this.inherits('auth/auth_base');
}
exports.hook_capabilities = function (next, connection) {
// don't allow AUTH unless private IP or encrypted
if (!net_utils.is_rfc1918(connection.remote_ip) && !connectio... | Fix ReferenceError: net_utils is not defined reported on IRC | Fix ReferenceError: net_utils is not defined reported on IRC | JavaScript | mit | craigslist/Haraka,hiteshjoshi/my-haraka-config,AbhilashSrivastava/haraka_sniffer,Synchro/Haraka,danucalovj/Haraka,hatsebutz/Haraka,typingArtist/Haraka,hatsebutz/Haraka,pedroaxl/Haraka,craigslist/Haraka,MignonCornet/Haraka,MignonCornet/Haraka,fredjean/Haraka,MignonCornet/Haraka,typingArtist/Haraka,Dexus/Haraka,slattery/... | ---
+++
@@ -1,4 +1,5 @@
// Auth against a flat file
+var net_utils = require('./net_utils');
exports.register = function () {
this.inherits('auth/auth_base'); |
67830a4214f33ee1e9c94fdfc5dd27747563579e | src/app/api/Actions.js | src/app/api/Actions.js | import {
REQUESTING,
RECEIVE_TOP_RATED,
RECEIVE_NOW_SHOWING,
RECEIVE_POPULAR
} from "./ActionTypes"
export function request() {
return {
type: REQUESTING
}
}
export function receivedNowShowing(data) {
return {
type: RECEIVE_NOW_SHOWING,
data
}
}
export function receivedPopular(data) {
return {
type:... | import {
REQUESTING,
RECEIVE_TOP_RATED,
RECEIVE_NOW_SHOWING,
RECEIVE_POPULAR
} from "./ActionTypes"
export function request() {
return {
type: REQUESTING
}
}
export function receivedNowShowing(data) {
return {
type: RECEIVE_NOW_SHOWING,
data
}
}
export function receivedPopular(data) {
return {
type:... | Use proper action type for different movies | Use proper action type for different movies
| JavaScript | mit | Guru107/test_app | ---
+++
@@ -20,14 +20,14 @@
export function receivedPopular(data) {
return {
- type: RECEIVE_NOW_SHOWING,
+ type: RECEIVE_POPULAR,
data
}
}
export function receivedTopRated(data) {
return {
- type: RECEIVE_NOW_SHOWING,
+ type: RECEIVE_TOP_RATED,
data
}
} |
b0bc5f4bbef6c297119146f3528bfdb15138a4fd | test/minify/config.js | test/minify/config.js | // just to make sure this file is being minified properly
var foobar = (function() {
var anotherLongVariableName = "foo";
var baz = "baz";
return anotherLongVariableName + baz;
}());
System.paths.foo = "bar";
| // just to make sure this file is being minified properly
// this code is a noop meant to force UglifyJS to include the
// `anotherLongVariableName` (with the mangle flag off) in the minified code
// for testing purposes
var anotherLongVariableName;
function funcName(firstLongName, lastLongName) {
anotherLongVariab... | Adjust code to workaround UglifyJS dead code removal | Adjust code to workaround UglifyJS dead code removal
| JavaScript | mit | stealjs/steal-tools,stealjs/steal-tools | ---
+++
@@ -1,8 +1,14 @@
// just to make sure this file is being minified properly
-var foobar = (function() {
- var anotherLongVariableName = "foo";
- var baz = "baz";
- return anotherLongVariableName + baz;
-}());
+
+// this code is a noop meant to force UglifyJS to include the
+// `anotherLongVariableName` (with ... |
5124396ada1aa788d80403b4056c675b6324ba34 | src/client/app/boot.js | src/client/app/boot.js | import Application from './components/application';
import logger from 'debug';
import React from 'react';
import { Provider } from 'react-redux';
import startRouter from './router';
import { configureStore } from './store.js';
import en from './locales/en';
import fr from './locales/fr';
const debug = logger('app:bo... | import Application from './components/application';
import logger from 'debug';
import React from 'react';
import { Provider } from 'react-redux';
import startRouter from './router';
import { configureStore } from './store.js';
import en from './locales/en';
import fr from './locales/fr';
const debug = logger('app:bo... | Set allowMissing based on environment | Set allowMissing based on environment
| JavaScript | mit | jsilvestre/tasky,jsilvestre/tasky,jsilvestre/tasky | ---
+++
@@ -27,7 +27,10 @@
// Initialize polyglot object with phrases.
const Polyglot = require('node-polyglot');
- const polyglot = new Polyglot({locale: locale});
+ const polyglot = new Polyglot({
+ allowMissing: process.env.NODE_ENV === 'production',
+ locale: locale,
+ });
... |
5807a4997fb651adba6665ccf9f7edf1517c86d8 | test/registry.spec.js | test/registry.spec.js | import test from 'ava';
test.todo('Write test for Registry');
| import test from 'ava';
import Registry from '../src/registry';
test('Registry returns a registry', t => {
let registry = Registry([document.body]);
t.deepEqual(registry, {
current: [],
elements: [document.body],
handlers: { enter: [], exit: [] },
singles: { enter: [], exit: [] ... | Add initial tests for Registry | Add initial tests for Registry
| JavaScript | mit | kudago/in-view,camwiegert/in-view | ---
+++
@@ -1,3 +1,12 @@
import test from 'ava';
+import Registry from '../src/registry';
-test.todo('Write test for Registry');
+test('Registry returns a registry', t => {
+ let registry = Registry([document.body]);
+ t.deepEqual(registry, {
+ current: [],
+ elements: [document.body],
+ ... |
67d8f92bc99e95ec0c567250eae0f8aca5cadd76 | app/components/organization/Welcome.js | app/components/organization/Welcome.js | import React from 'react';
import PipelineIcon from '../icons/Pipeline';
class Welcome extends React.Component {
static propTypes = {
organization: React.PropTypes.string.isRequired
}
render() {
return (
<div className="center p4">
<PipelineIcon />
<h1 className="h3 m0 mt2 mb4">Cr... | import React from 'react';
import PipelineIcon from '../icons/Pipeline';
class Welcome extends React.Component {
static propTypes = {
organization: React.PropTypes.string.isRequired
}
render() {
return (
<div className="center p4">
<PipelineIcon />
<h1 className="h3 m0 mt2 mb4">Cr... | Make 'example pipelines' link the same blue link | Make 'example pipelines' link the same blue link
| JavaScript | mit | fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend | ---
+++
@@ -13,7 +13,7 @@
<PipelineIcon />
<h1 className="h3 m0 mt2 mb4">Create your first pipeline</h1>
<p className="mx-auto" style={{ maxWidth: "30em" }}>Pipelines define the tasks to be run on your agents. It’s best to keep each pipeline focussed on a single part of your delivery pipeli... |
ebccc846b56b4591a011666953a6ad75ef35fabc | src/components/Head.js | src/components/Head.js | import React from 'react'
export default class Head extends React.Component {
render() {
return (
<head>
<meta charSet="utf-8"/>
<meta httpEquiv="X-UA-compatible" content="IE=edge, chrome=1"/>
<meta name="viewport" content="width=device-width, initial-s... | import React from 'react'
export default class Head extends React.Component {
render() {
return (
<head>
<meta charSet="utf-8"/>
<meta httpEquiv="X-UA-compatible" content="IE=edge, chrome=1"/>
<meta name="viewport" content="width=device-width, initial-s... | Add type text/css to stylesheet | Add type text/css to stylesheet
| JavaScript | mit | mlcdf/website,mlcdf/website | ---
+++
@@ -12,7 +12,7 @@
<meta name="theme-color" content="#333"/>
<title>{this.props.title}</title>
<link rel="manifest" href="/manifest.json"/>
- <link rel="stylesheet" href="/styles.css"/>
+ <link rel="stylesheet" type="text/css" href="/styles... |
fab4325bf85c8aa4386464b09781d385b07f5c77 | src/browser_tools/chrome_new_tab_pretty.user.js | src/browser_tools/chrome_new_tab_pretty.user.js | // ==UserScript==
// @name Chrome New Tab Prettify.
// @namespace https://github.com/kilfu0701
// @version 0.1
// @description Prettify UI on Chrome new tab.
// @author kilfu0701
// @match /^http[s]?:\/\/www.google*/
// @run-at document-ready
// @include /^http[s]?:\/\/www.googl... | // ==UserScript==
// @name Chrome New Tab Prettify.
// @namespace https://github.com/kilfu0701
// @version 0.1
// @description Prettify UI on Chrome new tab.
// @author kilfu0701
// @match /^http[s]?:\/\/www.google*/
// @run-at document-ready
// @include /^http[s]?:\/\/www.googl... | Hide logo and search bar in chrome new tab. | Hide logo and search bar in chrome new tab.
| JavaScript | mit | kilfu0701/thk-user-script | ---
+++
@@ -13,4 +13,6 @@
if(location.pathname === "/_/chrome/newtab") {
$('.mv-hide').hide();
+ $('#lga').hide();
+ $('#f').hide();
} |
6cf484c9a3ce5aa141363ae67c58fa94d055a105 | app/assets/javascripts/app/views/bookmarklet_view.js | app/assets/javascripts/app/views/bookmarklet_view.js | app.views.Bookmarklet = Backbone.View.extend({
separator: ' - ',
initialize: function(opts) {
// init a standalone publisher
app.publisher = new app.views.Publisher({standalone: true});
app.publisher.on('publisher:add', this._postSubmit, this);
app.publisher.on('publisher:sync', this._postSuccess,... | app.views.Bookmarklet = Backbone.View.extend({
separator: ' - ',
initialize: function(opts) {
// init a standalone publisher
app.publisher = new app.views.Publisher({standalone: true});
app.publisher.on('publisher:add', this._postSubmit, this);
app.publisher.on('publisher:sync', this._postSuccess,... | Make sure publisher is totally hidden in bookmarklet after post success | Make sure publisher is totally hidden in bookmarklet after post success
| JavaScript | agpl-3.0 | geraspora/diaspora,jhass/diaspora,Flaburgan/diaspora,diaspora/diaspora,Amadren/diaspora,diaspora/diaspora,geraspora/diaspora,despora/diaspora,Amadren/diaspora,Amadren/diaspora,Muhannes/diaspora,SuperTux88/diaspora,jhass/diaspora,KentShikama/diaspora,spixi/diaspora,jhass/diaspora,SuperTux88/diaspora,SuperTux88/diaspora,... | ---
+++
@@ -35,6 +35,7 @@
_postSuccess: function(evt) {
this.$('h4').text(Diaspora.I18n.t('bookmarklet.post_success'));
app.publisher.close();
+ this.$("#publisher").addClass("hidden");
_.delay(window.close, 2000);
},
|
829082a9fdb07be6892b9fc552e874e9b1eeb81c | addon/components/data-visual.js | addon/components/data-visual.js | import Ember from 'ember';
import layout from '../templates/components/data-visual';
import Stage from '../system/stage';
export default Ember.Component.extend({
classNames: [ 'data-visual' ],
layout,
width: 300,
height: 150,
stage: null,
initializeGraphicsContext() {
var element = this.element;
... | import Ember from 'ember';
import Stage from '../system/stage';
export default Ember.Component.extend({
classNames: [ 'data-visual' ],
width: 300,
height: 150,
stage: null,
initializeGraphicsContext() {
var element = this.element;
var fragment = document.createDocumentFragment();
Stage.stage... | Remove explicit layout; too eager | Remove explicit layout; too eager | JavaScript | mit | ming-codes/ember-cli-d3,ming-codes/ember-cli-d3 | ---
+++
@@ -1,11 +1,9 @@
import Ember from 'ember';
-import layout from '../templates/components/data-visual';
import Stage from '../system/stage';
export default Ember.Component.extend({
classNames: [ 'data-visual' ],
- layout,
width: 300,
height: 150, |
f073042945f2f876cccc35c59c4eff0b0cfb4535 | app/assets/javascripts/bootstrap-dropdown-submenu.js | app/assets/javascripts/bootstrap-dropdown-submenu.js | $(document).ready(function () {
$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function (event) {
event.preventDefault();
event.stopPropagation();
$(this).parent().addClass('open');
var menu = $(this).parent().find("ul");
var menupos = menu.offset();
if ((menupos.left + menu.width(... | $(document).ready(function () {
function openSubMenu(event) {
if (this.pathname === '/') {
event.preventDefault();
}
event.stopPropagation();
$(this).parent().addClass('open');
var menu = $(this).parent().find("ul");
var menupos = menu.offset();
if ((menupos.left + menu.width()) +... | Enable menu access on hover and links from section titles | Enable menu access on hover and links from section titles
| JavaScript | bsd-3-clause | openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean | ---
+++
@@ -1,6 +1,9 @@
$(document).ready(function () {
- $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function (event) {
- event.preventDefault();
+
+ function openSubMenu(event) {
+ if (this.pathname === '/') {
+ event.preventDefault();
+ }
event.stopPropagation();
$(this).par... |
70b62a39c353ff3ebe4847868feb24907d27cea3 | app/assets/javascripts/lga_filter.js | app/assets/javascripts/lga_filter.js | $(function() {
$('#lga_filter').keyup(function(ev) {
var list = $('#lga_list');
var filter = $(this).val();
if (filter === '') {
// Show all when the filter is cleared
list.find('div.lga').show();
} else {
// Hide all LGAs that don't match the filter
var filterRegexp = new Reg... | $(function() {
function strip(from) {
if(from !== undefined) {
from = from.replace(/^\s+/, '');
for (var i = from.length - 1; i >= 0; i--) {
if (/\S/.test(from.charAt(i))) {
from = from.substring(0, i + 1);
break;
}
}
return from;
} else ... | Fix filter bugs for council list filter | Fix filter bugs for council list filter
| JavaScript | apache-2.0 | NSWPlanning/data-verification-tool,NSWPlanning/data-verification-tool,NSWPlanning/data-verification-tool | ---
+++
@@ -1,7 +1,22 @@
$(function() {
- $('#lga_filter').keyup(function(ev) {
+ function strip(from) {
+ if(from !== undefined) {
+ from = from.replace(/^\s+/, '');
+ for (var i = from.length - 1; i >= 0; i--) {
+ if (/\S/.test(from.charAt(i))) {
+ from = from.substring(0, i + ... |
10ce33fdc1035c764f27c69562b8f2a409e419fa | src/server/routes.js | src/server/routes.js | const listenerUser = require ('./listenerUser');
const listenerApp = require ('./listenerApp');
// Initialize routes.
function init (app) {
listenerUser.init ();
listenerApp.init ();
app.post ('/api/login', listenerUser.login);
app.post ('/api/logout', listenerUser.logout);
app.get ('/api/verifylogin', list... | const listenerUser = require ('./listenerUser');
const listenerApp = require ('./listenerApp');
// Initialize routes.
function init (app) {
listenerUser.init ();
listenerApp.init ();
app.post ('/api/login', listenerUser.login);
app.post ('/api/logout', listenerUser.logout);
app.get ('/api/verifylogin', list... | Correct return handling for authentication middleware function | Correct return handling for authentication middleware function
| JavaScript | mit | fcc-joemcintyre/pollster,fcc-joemcintyre/pollster,fcc-joemcintyre/pollster | ---
+++
@@ -23,9 +23,10 @@
// authenticate, if passing continue, otherwise return 401 (auth failure)
function isAuthenticated (req, res, next) {
if (req.isAuthenticated ()) {
- next ();
+ return next ();
+ } else {
+ return res.status (401).json ({});
}
- res.status (401).json ({});
}
exports.i... |
344b2d6018ba63f139da4529978587e209d9566b | lib/run_cmd.js | lib/run_cmd.js | 'use strict'
var path = require('path')
var async = require('async')
var config = require('./config')
var child_process = require('child_process')
function runCmd (cwd, argv) {
var scripts = argv._.slice(1)
var pkg = require(path.join(cwd, 'package.json'))
if (!scripts.length) {
var availableScripts = Obje... | 'use strict'
var path = require('path')
var async = require('async')
var config = require('./config')
var child_process = require('child_process')
var assign = require('object-assign')
function runCmd (cwd, argv) {
var scripts = argv._.slice(1)
var pkg = require(path.join(cwd, 'package.json'))
if (!scripts.len... | Refactor env in run command | Refactor env in run command
| JavaScript | mit | alexanderGugel/ied,alexanderGugel/mpm | ---
+++
@@ -4,6 +4,7 @@
var async = require('async')
var config = require('./config')
var child_process = require('child_process')
+var assign = require('object-assign')
function runCmd (cwd, argv) {
var scripts = argv._.slice(1)
@@ -15,8 +16,11 @@
return
}
- var env = Object.create(process.env)
-... |
e7477b991a2f452d25ac35475e8adecceb7fac85 | 2017/01.js | 2017/01.js | // Part 1
[...document.body.textContent.trim()].reduce((s,c,i,a)=>(c==a[(i+1)%a.length])*c+s,0)
// Part 2
[...document.body.textContent.trim()].reduce((s,c,i,a)=>(l=>c==a[(i+l/2)%l])(a.length)*c+s,0)
| // Part 1
[...document.body.innerText.trim()].reduce((s,c,i,a)=>(c==a[(i+1)%a.length])*c+s,0)
// Part 2
[...document.body.innerText.trim()].reduce((s,c,i,a)=>(l=>c==a[(i+l/2)%l])(a.length)*c+s,0)
| Use body.innerText instead of textContent | Use body.innerText instead of textContent
| JavaScript | mit | yishn/adventofcode,yishn/adventofcode | ---
+++
@@ -1,5 +1,5 @@
// Part 1
-[...document.body.textContent.trim()].reduce((s,c,i,a)=>(c==a[(i+1)%a.length])*c+s,0)
+[...document.body.innerText.trim()].reduce((s,c,i,a)=>(c==a[(i+1)%a.length])*c+s,0)
// Part 2
-[...document.body.textContent.trim()].reduce((s,c,i,a)=>(l=>c==a[(i+l/2)%l])(a.length)*c+s,0)
+[.... |
fce850eeb8b91f00d4cdeaf7cfa3d74e7b47b4c0 | lib/cli/src/generators/WEB-COMPONENTS/template-csf/.storybook/preview.js | lib/cli/src/generators/WEB-COMPONENTS/template-csf/.storybook/preview.js | /* global window */
import {
configure,
addParameters,
// setCustomElements,
} from '@storybook/web-components';
// import customElements from '../custom-elements.json';
// setCustomElements(customElements);
addParameters({
docs: {
iframeHeight: '200px',
},
});
// configure(require.context('../storie... | // import { setCustomElements } from '@storybook/web-components';
// import customElements from '../custom-elements.json';
// setCustomElements(customElements);
| Fix project template for web-components | CLI: Fix project template for web-components
| JavaScript | mit | storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook | ---
+++
@@ -1,30 +1,3 @@
-/* global window */
-
-import {
- configure,
- addParameters,
- // setCustomElements,
-} from '@storybook/web-components';
-
+// import { setCustomElements } from '@storybook/web-components';
// import customElements from '../custom-elements.json';
-
// setCustomElements(customElements)... |
702c888a12716d96f7382fbf2d995fbaf4243a4a | store/search/quick-search/index.js | store/search/quick-search/index.js | let SearchStore = require('../search-store');
/**
* Class standing for all advanced search information.
* The state should be the complete state of the page.
*/
class QuickSearchStore extends SearchStore{
constructor(conf){
conf = conf || {};
conf.definition = {
query: 'query',
scope: 'scope',
... | let SearchStore = require('../search-store');
/**
* Class standing for all advanced search information.
* The state should be the complete state of the page.
*/
class QuickSearchStore extends SearchStore{
constructor(conf){
conf = conf || {};
conf.definition = {
query: 'query',
scope: 'scope',
... | Add missing property, the facets (used for group counts) | [quick-search-store] Add missing property, the facets (used for group counts)
| JavaScript | mit | Jerom138/focus,KleeGroup/focus-core,Jerom138/focus,Jerom138/focus | ---
+++
@@ -10,6 +10,7 @@
query: 'query',
scope: 'scope',
results: 'results',
+ facets: 'facets',
totalCount: 'totalCount'
};
conf.identifier = 'QUICK_SEARCH'; |
8599b9c74d4273843cb5ae4f11a5799c2f1f8cc5 | koans/AboutPromises.js | koans/AboutPromises.js | describe("About Promises", function () {
describe("Asynchronous Flow", function () {
it("should understand promise declaration usage", function () {
});
});
});
| describe("About Promises", function () {
describe("Asynchronous Flow", function () {
it("should understand promise usage", function () {
function isZero(number) {
return new Promise(function(resolve, reject) {
if(number === 0) {
resolve();
} else {
reje... | Add type test for promises | feat: Add type test for promises
| JavaScript | mit | tawashley/es6-javascript-koans,tawashley/es6-javascript-koans,tawashley/es6-javascript-koans | ---
+++
@@ -2,8 +2,20 @@
describe("Asynchronous Flow", function () {
- it("should understand promise declaration usage", function () {
-
+ it("should understand promise usage", function () {
+
+ function isZero(number) {
+ return new Promise(function(resolve, reject) {
+ if(numbe... |
bf32038659afa4a77cdd79c59c52d9a9adb9b1d8 | lathe/js/box-colors.js | lathe/js/box-colors.js | /* eslint-env es6 */
/* global THREE */
window.applyBoxVertexColors = (function() {
'use strict';
return function vertexColors( geometry ) {
const red = new THREE.Color( '#f00');
const green = new THREE.Color( '#0f0' );
const blue = new THREE.Color( '#00f' );
geometry.faces.forEach( face => {
... | /* eslint-env es6 */
/* global THREE, Indices */
window.applyBoxVertexColors = (function() {
'use strict';
function setFaceVertexColor( face, index, color ) {
if ( face.a === index ) {
face.vertexColors[ 0 ] = color;
}
if ( face.b === index ) {
face.vertexColors[ 1 ] = color;
}
if... | Add BoxGeometry vertex colors helper. | lathe[cuboid}: Add BoxGeometry vertex colors helper.
| JavaScript | mit | razh/experiments-three.js,razh/experiments-three.js | ---
+++
@@ -1,17 +1,57 @@
/* eslint-env es6 */
-/* global THREE */
+/* global THREE, Indices */
window.applyBoxVertexColors = (function() {
'use strict';
- return function vertexColors( geometry ) {
- const red = new THREE.Color( '#f00');
- const green = new THREE.Color( '#0f0' );
- const blue = new ... |
41e40acc7a7afe8d5bde99ed41a730cd88d73e86 | reddit/old-reddit-hide-offline-presence.user.js | reddit/old-reddit-hide-offline-presence.user.js | // ==UserScript==
// @name Hide offline presence dot on old reddit
// @namespace https://mathemaniac.org
// @version 1.0
// @description Hides the offline presence dot from old reddit. Only hides offline presence, so you notice if you're displayed as online. https://old.reddit.com/r/changelog/comments/... | // ==UserScript==
// @name Hide offline presence dot on old reddit
// @namespace https://mathemaniac.org
// @version 1.0.1
// @description Hides the offline presence dot from old reddit. Only hides offline presence, so you notice if you're displayed as online. https://old.reddit.com/r/changelog/comment... | Make script run on document start to help on dot flashes | Make script run on document start to help on dot flashes
| JavaScript | mit | Eckankar/userscripts,Eckankar/userscripts | ---
+++
@@ -1,12 +1,13 @@
// ==UserScript==
// @name Hide offline presence dot on old reddit
// @namespace https://mathemaniac.org
-// @version 1.0
+// @version 1.0.1
// @description Hides the offline presence dot from old reddit. Only hides offline presence, so you notice if you're displaye... |
838745ae7fea6685498bab8b66a043090a582774 | server/channels/__tests__/authAdmin.js | server/channels/__tests__/authAdmin.js | jest.mock('../../models/meeting');
jest.mock('../../utils');
const { emit, broadcast } = require('../../utils');
const { createGenfors } = require('../../models/meeting');
const { generateGenfors, generateSocket } = require('../../utils/generateTestData');
const { createGenfors: createGenforsListener } = require('../au... | jest.mock('../../models/meeting');
jest.mock('../../utils');
const { emit, broadcast } = require('../../utils');
const { createGenfors } = require('../../models/meeting');
const { generateGenfors, generateSocket } = require('../../utils/generateTestData');
const { createGenfors: createGenforsListener } = require('../au... | Make mocked admin password be a constant | Make mocked admin password be a constant
| JavaScript | mit | dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta | ---
+++
@@ -5,10 +5,13 @@
const { generateGenfors, generateSocket } = require('../../utils/generateTestData');
const { createGenfors: createGenforsListener } = require('../auth');
+
+const MOCK_PW = 'correct';
+
const generateData = data => Object.assign({}, data);
beforeEach(() => {
- process.env.SDF_GENFOR... |
dcecb81dba5a938beb7be702f2ab2012f0545594 | server/controllers/hotel-controller.js | server/controllers/hotel-controller.js | "use strict";
const HotelData = require("../data").hotel;
const UserData = require("../data").users;
const breedsData = require("../data/models/breeds");
function loadRegisterPage(req, res) {
if(!req.isAuthenticated()){
return res.redirect("../auth/login");
}
var user = req.user;
res.render("hotel/re... | "use strict";
const HotelData = require("../data").hotel;
const UserData = require("../data").users;
const breedsData = require("../data/models/breeds");
function loadRegisterPage(req, res) {
if (!req.isAuthenticated()) {
return res.redirect("../auth/login");
}
var user = req.user;
... | Fix redirect to home when add hotel. | Fix redirect to home when add hotel.
| JavaScript | mit | ilian1902/Team-D-Animals-Hotel,ilian1902/Team-D-Animals-Hotel,knmitrofanov/animalshotel,knmitrofanov/animalshotel | ---
+++
@@ -5,46 +5,45 @@
const breedsData = require("../data/models/breeds");
function loadRegisterPage(req, res) {
- if(!req.isAuthenticated()){
- return res.redirect("../auth/login");
- }
- var user = req.user;
- res.render("hotel/register", {
- breeds: breedsData,
- user: user
- });
+ if (!req.isAuthent... |
e457d0dcb9af16528f6d84ff7b5c726edb2f1478 | prolific.syslog/syslog.argv.js | prolific.syslog/syslog.argv.js | /*
___ usage ___ en_US ___
usage: prolific syslog <options>
-a, --application <string>
The application name to display in the syslog record. Defaults to
the value of `process.title` which will always be `node`.
-h, --hostname <string>
The hostname to display... | /*
___ usage ___ en_US ___
usage: prolific syslog <options>
-a, --application <string>
The application name to display in the syslog record. Defaults to
the value of `process.title` which will always be `node`.
-h, --hostname <string>
The hostname to display... | Add flag for new module loader. | Add flag for new module loader.
| JavaScript | mit | bigeasy/prolific,bigeasy/prolific | ---
+++
@@ -40,3 +40,5 @@
}
return response
}))
+
+module.exports.isProlific = true |
651bc5ecf574d4716683343c9f543d88263fd4cb | models/base.js | models/base.js | var Arrow = require('arrow');
module.exports = Arrow.createModel('base', {
connector: 'appc.redis',
fields: { },
expire: function expire(seconds, callback){
return this.getConnector().expire(this.getModel(), this, seconds, callback);
},
expireAt: function expireAt(date, callback){
... | var Arrow = require('arrow');
var Base = Arrow.Model.extend('base', {
connector: 'appc.redis',
fields: { },
expire: function expire(seconds, callback){
return this.getConnector().expire(this.getModel(), this, seconds, callback);
},
expireAt: function expireAt(date, callback){
re... | Switch out 'createModel' for 'extend' | Switch out 'createModel' for 'extend'
| JavaScript | apache-2.0 | titanium-forks/appcelerator.appc.redis | ---
+++
@@ -1,6 +1,6 @@
var Arrow = require('arrow');
-module.exports = Arrow.createModel('base', {
+var Base = Arrow.Model.extend('base', {
connector: 'appc.redis',
@@ -27,3 +27,5 @@
}
});
+
+module.exports = Base; |
a25dadd4f4078965e647ec34265cdfe5fd879826 | client/src/components/LastVotes.js | client/src/components/LastVotes.js | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import css from './LastVotes.css';
import { voteWithNameSelector } from '../selectors/voting';
const LastVotes = ({ votes }) => (
<div className={css.component}>
<h3>Siste stemmer</h3>
{ votes.length > 0 ? v... | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import css from './LastVotes.css';
import { voteWithNameSelector } from '../selectors/voting';
import { activeIssueExists, getOwnVote, getIssueKey } from '../selectors/issues';
const LastVotes = ({ votes, hideVotes })... | Hide last votes unless there is an active issue with public votes and user has voted | Hide last votes unless there is an active issue with public votes and
user has voted
| JavaScript | mit | dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta | ---
+++
@@ -3,30 +3,42 @@
import { connect } from 'react-redux';
import css from './LastVotes.css';
import { voteWithNameSelector } from '../selectors/voting';
+import { activeIssueExists, getOwnVote, getIssueKey } from '../selectors/issues';
-const LastVotes = ({ votes }) => (
- <div className={css.component}>... |
ea7cba4da1698273cb0023c30ae4f00268129e1c | lib/tests/dashboard.js | lib/tests/dashboard.js | var Mocha = require('mocha'),
_ = require('underscore'),
moduleTest = require('./module');
module.exports = function (browser, dashboard, suite, config) {
suite = Mocha.Suite.create(suite, dashboard.title);
suite.beforeAll(function () {
return browser.get(config.baseUrl + dashboard.slug)
.$('bo... | var Mocha = require('mocha'),
_ = require('underscore'),
moduleTest = require('./module');
module.exports = function (browser, dashboard, suite, config) {
suite = Mocha.Suite.create(suite, dashboard.title);
suite.beforeAll(function () {
return browser.get(config.baseUrl + dashboard.slug)
.setWi... | Set window size to desktop display dimensions | Set window size to desktop display dimensions
Some tests were failing because the default window dimensions cause the site to display in "mobile" format, truncating some elements and causing tests to fail.
| JavaScript | mit | alphagov/cheapseats | ---
+++
@@ -8,6 +8,7 @@
suite.beforeAll(function () {
return browser.get(config.baseUrl + dashboard.slug)
+ .setWindowSize(1024, 800)
.$('body.ready', 5000)
// if a dashboard isn't ready after 5s then there's probably a failed module
// run module tests to help establish which |
07d763d5ce597abba1193cccee3ad7fca0d4cd97 | plugins/cloudimport/templates/load_buttons.js | plugins/cloudimport/templates/load_buttons.js | PluginsAPI.Dashboard.addNewTaskButton(
["cloudimport/build/ImportView.js"],
function(args, ImportView) {
return React.createElement(ImportView, {
onNewTaskAdded: args.onNewTaskAdded,
projectId: args.projectId,
apiURL: "{{ api_url }}",
});
}
);
PluginsA... | PluginsAPI.Dashboard.addNewTaskButton(
["cloudimport/build/ImportView.js"],
function(args, ImportView) {
return React.createElement(ImportView, {
onNewTaskAdded: args.onNewTaskAdded,
projectId: args.projectId,
apiURL: "{{ api_url }}",
});
}
);
PluginsA... | Fix to show task button | Fix to show task button
| JavaScript | agpl-3.0 | pierotofy/WebODM,OpenDroneMap/WebODM,pierotofy/WebODM,pierotofy/WebODM,pierotofy/WebODM,OpenDroneMap/WebODM,OpenDroneMap/WebODM,OpenDroneMap/WebODM,OpenDroneMap/WebODM,pierotofy/WebODM | ---
+++
@@ -11,18 +11,20 @@
PluginsAPI.Dashboard.addTaskActionButton(
["cloudimport/build/TaskView.js"],
- function(args, ImportView) {
+ function(args, TaskView) {
+ var reactElement;
$.ajax({
url: "{{ api_url }}/projects/" + args.task.project + "/tasks/" + args.task.id + "/checkforurl",
dataType: '... |
70b72554e264bb3d06f6116080252c20b19bce25 | take-002-nodejs-server-clone/server.js | take-002-nodejs-server-clone/server.js | var express = require('express'),
mongoose = require('mongoose'),
app = express()
app.set('port', process.env.PORT || 3000)
app.set('mongodb-url', process.env.MONGODB_URL || 'mongodb://localhost/hangman')
if ('test' === app.get('env')) {
app.set('port', 9000)
app.set('mongodb-url', 'mongodb://localhost/ha... | var express = require('express'),
mongoose = require('mongoose'),
util = require('util'),
_ = require('lodash'),
app = express()
app.set('port', process.env.PORT || 3000)
app.set('mongodb-url', process.env.MONGODB_URL || 'mongodb://localhost/hangman')
if ('test' === app.get('env')) {
app.set('port',... | Create User document after POST /me | [take-002] Create User document after POST /me
| JavaScript | mit | gabrielelana/hangman-http-kata | ---
+++
@@ -1,5 +1,7 @@
var express = require('express'),
mongoose = require('mongoose'),
+ util = require('util'),
+ _ = require('lodash'),
app = express()
app.set('port', process.env.PORT || 3000)
@@ -12,14 +14,35 @@
mongoose.connect(app.get('mongodb-url'))
+var User = mongoose.model('User'... |
1a573086b88669d8edf4097201d4df7ff53427ee | gulp/utils/notify.js | gulp/utils/notify.js | var notifier = new require("node-notifier")({});
var extend = require("extend");
var path = require("path");
var CFG = require("./config.js");
var pkg = require(path.join("..", "..", CFG.FILE.config.pkg));
module.exports = {
defaults: {
title: pkg.name
},
showNotification: function (options)... | var notifier = new require("node-notifier");
var extend = require("extend");
var path = require("path");
var CFG = require("./config.js");
var pkg = require(path.join("..", "..", CFG.FILE.config.pkg));
module.exports = {
defaults: {
title: pkg.name
},
showNotification: function (options) {
... | Update node-notifier initialization as per the new version. | Update node-notifier initialization as per the new version.
| JavaScript | mit | rishabhsrao/remember,rishabhsrao/remember,rishabhsrao/remember | ---
+++
@@ -1,4 +1,4 @@
-var notifier = new require("node-notifier")({});
+var notifier = new require("node-notifier");
var extend = require("extend");
var path = require("path");
var CFG = require("./config.js"); |
cde94167d2bb18a2873a943c7df25dd8258e117f | client/components/FileDescription.js | client/components/FileDescription.js | import React from 'react';
export default class FileDescription extends React.Component {
render() {
return <div className="file-description">
<span className="file-name">{this.props.file.name}</span>
<span className="file-size">{this.props.file.size}</span>
<span className="file-type">{this.p... | import React from 'react';
export default class FileDescription extends React.Component {
render() {
return <div className="file-description">
<span className="file-name">{this.props.file.name}</span>
</div>;
}
}
| Remove file size and type descriptors. | Remove file size and type descriptors.
| JavaScript | bsd-3-clause | gramakri/filepizza,bradparks/filepizza_javascript_send_files_webrtc,hanford/filepizza,Ribeiro/filepizza,pquochoang/filepizza,jekrb/filepizza,codevlabs/filepizza,codebhendi/filepizza | ---
+++
@@ -5,8 +5,6 @@
render() {
return <div className="file-description">
<span className="file-name">{this.props.file.name}</span>
- <span className="file-size">{this.props.file.size}</span>
- <span className="file-type">{this.props.file.type}</span>
</div>;
}
|
930860fb4f12b720a15536b52685ba3beffa47c6 | client/src/loading/loadingActions.js | client/src/loading/loadingActions.js | /*
* Copyright (c) 2017 Bonnie Schulkin. All Rights Reserved.
*
* This file is part of BoxCharter.
*
* BoxCharter is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, either version 3 of the License, ... | /*
* Copyright (c) 2017 Bonnie Schulkin. All Rights Reserved.
*
* This file is part of BoxCharter.
*
* BoxCharter is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, either version 3 of the License, ... | Add TODO for clear loading upon refresh | Add TODO for clear loading upon refresh
| JavaScript | agpl-3.0 | flyrightsister/boxcharter,flyrightsister/boxcharter | ---
+++
@@ -26,6 +26,9 @@
import { CANCEL_ALL_LOADING } from './loadingActionTypes';
+// TODO: call this upon page refresh
+// (where? get funny routing errors if I make App a connected component...)
+
/**
* Return CANCEL_ALL_LOADING action.
* @function clearLoadingEvents |
9ff4f729ba2970cd1407f47d7d1ceecc52dd7f61 | lib/common/annotate.js | lib/common/annotate.js | define(['../is', '../array/last', '../functional'], function(is, last, functional) {
var map = functional.map;
var filter = functional.filter;
var forEach = functional.forEach;
function annotate() {
var args = Array.prototype.slice.call(arguments);
var fn = args.shift();
if(is.... | define(['../is', '../array/last', '../functional'], function(is, last, functional) {
var map = functional.map;
var filter = functional.filter;
var forEach = functional.forEach;
function annotate() {
var args = Array.prototype.slice.call(arguments);
var fn = args.shift();
var doc... | Attach metadata to the right function | Attach metadata to the right function
| JavaScript | mit | bebraw/funkit,bebraw/funkit | ---
+++
@@ -6,18 +6,20 @@
function annotate() {
var args = Array.prototype.slice.call(arguments);
var fn = args.shift();
+ var doc;
+ var invariants;
if(is.string(last(args))) {
- fn._doc = args.pop();
+ doc = args.pop();
}
forE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.