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 |
|---|---|---|---|---|---|---|---|---|---|---|
aa967b9335eb12b9af42abf9ee248b2c7b3aa9d9 | apps/global-game-jam-2021/routes.js | apps/global-game-jam-2021/routes.js | const routeRegex = /^\/(global-game-jam-2021|globalgamejam2021|ggj2021|ggj21)(?:\/.*)?$/;
const githubUrl = 'https://levilindsey.github.io/global-game-jam-2021';
// Attaches the route handlers for this app.
exports.attachRoutes = (server, appPath, config) => {
server.get(routeRegex, handleRequest);
// --- --- /... | const routeRegex = /^\/(global-game-jam-2021|globalgamejam2021|ggj2021|ggj21)(?:\/.*)?$/;
const githubUrl = 'https://levilindsey.github.io/global-game-jam-2021';
// Attaches the route handlers for this app.
exports.attachRoutes = (server, appPath, config) => {
server.get(routeRegex, handleRequest);
// --- --- /... | Fix the ggj route setup | Fix the ggj route setup
| JavaScript | mit | levilindsey/levi.sl,levilindsey/levi.sl | ---
+++
@@ -10,8 +10,8 @@
// Handles a request for this app.
function handleRequest(req, res, next) {
- // Check whether this request was directed to the games subdomain.
- if (config.gamesDomains.indexOf(req.hostname) < 0) {
+ // Check whether this request was directed to the portfolio.
+ if (con... |
e325455147e4a0d9a02c10729a2cc45a66f149e9 | client/js/models/shipment.js | client/js/models/shipment.js | define(['backbone'], function(Backbone) {
return Backbone.Model.extend({
idAttribute: 'SHIPPINGID',
urlRoot: '/shipment/shipments',
/*
Validators for shipment, used for both editables and new shipments
*/
validation: {
SHIPPINGNAME: {
required: true,
pattern:... | define(['backbone'], function(Backbone) {
return Backbone.Model.extend({
idAttribute: 'SHIPPINGID',
urlRoot: '/shipment/shipments',
/*
Validators for shipment, used for both editables and new shipments
*/
validation: {
SHIPPINGNAME: {
required: true,
pattern:... | Add validator for courier name | Add validator for courier name
| JavaScript | apache-2.0 | DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,tcspain/SynchWeb,DiamondLightSource/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb | ---
+++
@@ -32,6 +32,7 @@
DELIVERYAGENT_AGENTNAME: {
required: true,
+ pattern: 'wwsdash'
},
},
|
80e679cd33528d8050097e681bad0020c2cf0a4c | tests/integration/components/search-result-test.js | tests/integration/components/search-result-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('search-result', 'Integration | Component | search result', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('search-result', 'Integration | Component | search result', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
// ... | Fix CI failure due to missing thing the component needs to render | Fix CI failure due to missing thing the component needs to render
[ci skip]
[#PREP-135]
| JavaScript | apache-2.0 | laurenrevere/ember-preprints,pattisdr/ember-preprints,laurenrevere/ember-preprints,baylee-d/ember-preprints,pattisdr/ember-preprints,CenterForOpenScience/ember-preprints,caneruguz/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,hmoco/ember-preprints,baylee-d/ember-preprints,hmoco/ember-pr... | ---
+++
@@ -2,15 +2,19 @@
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('search-result', 'Integration | Component | search result', {
- integration: true
+ integration: true
});
test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Ha... |
75000c3d890987385e0c3a832dc0f8a5bc247146 | app/models/chart.js | app/models/chart.js | import Model from 'ember-data/model';
import DS from 'ember-data';
import { validator, buildValidations } from 'ember-cp-validations';
const Validations = buildValidations({
title: validator('presence', true),
composers: validator('presence', true),
lyricists: validator('presence', true),
arrangers: validator(... | import Model from 'ember-data/model';
import DS from 'ember-data';
import { validator, buildValidations } from 'ember-cp-validations';
import {memberAction} from 'ember-api-actions';
const Validations = buildValidations({
title: validator('presence', true),
composers: validator('presence', true),
lyricists: vali... | Update status and Chart transitions | Update status and Chart transitions
| JavaScript | bsd-2-clause | barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web | ---
+++
@@ -1,6 +1,7 @@
import Model from 'ember-data/model';
import DS from 'ember-data';
import { validator, buildValidations } from 'ember-cp-validations';
+import {memberAction} from 'ember-api-actions';
const Validations = buildValidations({
title: validator('presence', true),
@@ -20,4 +21,20 @@
repe... |
aa58e823ae5f6ce86b71996a1014ad9aca01ea2b | config/strategies/spotify.js | config/strategies/spotify.js | 'use strict';
/**
* Module dependencies.
*/
var passport = require('passport'),
refresh = require('passport-oauth2-refresh'),
SpotifyStrategy = require('passport-spotify').Strategy,
config = require('../config'),
users = require('../../app/controllers/users.server.controller');
module.exports = function() {... | 'use strict';
/**
* Module dependencies.
*/
var passport = require('passport'),
refresh = require('passport-oauth2-refresh'),
SpotifyStrategy = require('passport-spotify').Strategy,
config = require('../config'),
users = require('../../app/controllers/users.server.controller');
module.exports = function() {... | Use profile id if display name is null | Use profile id if display name is null
- closes #54
| JavaScript | mit | mbukosky/SpotifyUnchained,mbukosky/SpotifyUnchained,mbukosky/SpotifyUnchained,mbukosky/SpotifyUnchained | ---
+++
@@ -30,7 +30,7 @@
// Create the user OAuth profile
var providerUserProfile = {
- displayName: profile.displayName,
+ displayName: profile.displayName || profile.id,
username: profile.id,
provider: 'spotify',
providerIdentifierField: 'id', |
b6a7938d97dfcbceca256292ad8f3d68742d576d | tests/content/cookies/6547/issue6547.js | tests/content/cookies/6547/issue6547.js | function runTest()
{
FBTest.sysout("issue6547.START");
FBTest.openNewTab(basePath + "cookies/6547/issue6547.php", function(win)
{
FBTest.openFirebug();
FBTest.selectPanel("net");
FBTestFireCookie.enableCookiePanel();
FBTest.enableNetPanel(function(win)
{
... | function runTest()
{
FBTest.sysout("issue6547.START");
FBTest.openNewTab(basePath + "cookies/6547/issue6547.php", function(win)
{
FBTest.openFirebug();
FBTest.selectPanel("net");
FBTestFireCookie.enableCookiePanel();
FBTest.enableNetPanel(function(win)
{
... | Fix 6547 test case to account for new formatTime return | Fix 6547 test case to account for new formatTime return
| JavaScript | bsd-3-clause | firebug/tracing-console,firebug/tracing-console | ---
+++
@@ -26,7 +26,7 @@
var selector = ".netInfoReceivedCookies .cookieRow .cookieMaxAgeLabel";
var label = panelNode.querySelector(selector);
- FBTest.compare("0", label.textContent, "Max age must be zero");
+ FBTest.compare("0ms", label.textContent... |
644fa033779995474b353d452c4384faaa3917a4 | lib/reduce-statuses.js | lib/reduce-statuses.js | module.exports = function (context, statusChain) {
context.log.debug(`Reducing status chain ${statusChain}`);
const reduced = statusChain.reduce((overallStatus, currentStatus) => {
if (currentStatus === 'error' || overallStatus === 'error') {
return 'error';
}
if (overallStatus === 'failure') {
... | module.exports = function (context, statusChain) {
context.log.debug(`Reducing status chain [${statusChain.join(', ')}]`);
const reduced = statusChain.reduce((overallStatus, currentStatus) => {
if (currentStatus === 'error' || overallStatus === 'error') {
return 'error';
}
if (overallStatus === ... | Improve status chain logging output | Improve status chain logging output
| JavaScript | mit | jarrodldavis/probot-gpg | ---
+++
@@ -1,5 +1,5 @@
module.exports = function (context, statusChain) {
- context.log.debug(`Reducing status chain ${statusChain}`);
+ context.log.debug(`Reducing status chain [${statusChain.join(', ')}]`);
const reduced = statusChain.reduce((overallStatus, currentStatus) => {
if (currentStatus === 'e... |
29b811034c553c20275231167c1c005d619be346 | templates/urls.js | templates/urls.js | "use strict";
var URLS = (function() {
var BASE = 'https://raw.githubusercontent.com/robertpainsi/robertpainsi.github.data/master/';
return {
BASE: BASE,
PROGRAM_STATISTICS: BASE + 'catrobat/statistics/statistics.json'
};
}());
| "use strict";
var URLS = (function() {
var BASE = 'https://raw.githubusercontent.com/robertpainsi/robertpainsi.github.data/master/';
if (location.hostname === 'robertpainsi.localhost.io') {
BASE = 'http://localhost/robertpainsi.github.data/';
}
return {
BASE: BASE,
PROGRAM_STAT... | Add local base url (only used for hostname robertpainsi.localhost.io) | Add local base url (only used for hostname robertpainsi.localhost.io)
| JavaScript | mit | robertpainsi/robertpainsi.github.io,robertpainsi/robertpainsi.github.io | ---
+++
@@ -2,6 +2,9 @@
var URLS = (function() {
var BASE = 'https://raw.githubusercontent.com/robertpainsi/robertpainsi.github.data/master/';
+ if (location.hostname === 'robertpainsi.localhost.io') {
+ BASE = 'http://localhost/robertpainsi.github.data/';
+ }
return {
BASE: BASE, |
b0e05495d46f45bea07de5bbdf359fdf8416c7f3 | test/conjoiner.js | test/conjoiner.js | 'use strict';
var conjoiners = require('../lib/conjoiners');
exports['simple inter-process communication'] = function(test) {
test.expect(3);
var value = 'test_value';
var cj1 = {};
var cj1Name = 'test';
var cj2 = {
onTransenlightenment: function (event) {
test.equal(event.pro... | 'use strict';
var conjoiners = require('../lib/conjoiners');
exports['simple inter-process communication'] = function(test) {
test.expect(3);
var value = 'test_value';
var cj1 = {};
var cj1Name = 'test';
var cj2 = {
onTransenlightenment: function (event) {
test.equal(event.pro... | Test should not rely on setTimeout | Test should not rely on setTimeout | JavaScript | apache-2.0 | conjoiners/conjoiners-node.js | ---
+++
@@ -12,6 +12,8 @@
onTransenlightenment: function (event) {
test.equal(event.property, 'val');
test.equal(this[event.property], value);
+ test.equal(cj2.val, value);
+ test.done();
}
};
@@ -19,10 +21,5 @@
return conjoiners.implan... |
0445f6472b615cd0915ed5b681dff162986e4903 | models/Captions.js | models/Captions.js | var mongoose = require('mongoose');
var captionSchema = new mongoose.Schema({
_id: { type: String, unique: true},
url: String,
captions: [{
start: Number,
dur: Number,
value: String,
extra_data: Array
}]
});
module.exports = mongoose.model('Caption', captionSchema); | var mongoose = require('mongoose');
var captionSchema = new mongoose.Schema({
_id: { type: String, unique: true},
title: String,
url: String,
captions: [{
start: Number,
dur: Number,
value: String,
extra_data: Array
}]
});
module.exports = mongoose.model('Caption', captionSchema); | Add title to mongoose caption schema | Add title to mongoose caption schema
| JavaScript | mit | yaskyj/fastcaption,yaskyj/fastcaption,yaskyj/fastcaptions,yaskyj/fastcaptions | ---
+++
@@ -2,6 +2,7 @@
var captionSchema = new mongoose.Schema({
_id: { type: String, unique: true},
+ title: String,
url: String,
captions: [{
start: Number, |
21e134c3d11e3ce688735bf1b59d37f847c19b3c | core/filter-options/index.js | core/filter-options/index.js | "use strict";
const dedent = require("dedent");
module.exports = filterOptions;
function filterOptions(yargs) {
// Only for 'run', 'exec', 'clean', 'ls', and 'bootstrap' commands
const opts = {
scope: {
describe: "Include only packages with names matching the given glob.",
type: "string",
},
... | "use strict";
const dedent = require("dedent");
module.exports = filterOptions;
function filterOptions(yargs) {
// Only for 'run', 'exec', 'clean', 'ls', and 'bootstrap' commands
const opts = {
scope: {
describe: "Include only packages with names matching the given glob.",
type: "string",
},
... | Allow --private to be configured from file | fix(filter-options): Allow --private to be configured from file
| JavaScript | mit | lerna/lerna,sebmck/lerna,lerna/lerna,kittens/lerna,evocateur/lerna,lerna/lerna,evocateur/lerna | ---
+++
@@ -18,7 +18,7 @@
private: {
describe: "Include private packages.\nPass --no-private to exclude private packages.",
type: "boolean",
- default: true,
+ defaultDescription: "true",
},
since: {
describe: dedent` |
3483929b3b5610bc2ff17369bdcf356c1d05cc9e | cdn/src/app.js | cdn/src/app.js | import express from 'express';
import extensions from './extensions';
const app = express();
app.use('/extensions', extensions);
export default app;
| import express from 'express';
import extensions from './extensions';
const app = express();
app.use('/extensions', extensions);
app.get('/', function (req, res) {
res.send('The CDN is working');
});
export default app;
| Add text to test the server is working | Add text to test the server is working
| JavaScript | mit | worona/worona-dashboard,worona/worona,worona/worona,worona/worona-core,worona/worona-dashboard,worona/worona-core,worona/worona | ---
+++
@@ -4,5 +4,8 @@
const app = express();
app.use('/extensions', extensions);
+app.get('/', function (req, res) {
+ res.send('The CDN is working');
+});
export default app; |
764258718d976aa826e16fd470954f18f8eabf65 | packages/core/src/Rules/CopyTargetsToRoot.js | packages/core/src/Rules/CopyTargetsToRoot.js | /* @flow */
import path from 'path'
import State from '../State'
import File from '../File'
import Rule from '../Rule'
import type { Command, OptionsInterface, Phase } from '../types'
export default class CopyTargetsToRoot extends Rule {
static parameterTypes: Array<Set<string>> = [new Set(['*'])]
static descri... | /* @flow */
import path from 'path'
import State from '../State'
import File from '../File'
import Rule from '../Rule'
import type { Command, OptionsInterface, Phase } from '../types'
export default class CopyTargetsToRoot extends Rule {
static parameterTypes: Array<Set<string>> = [new Set(['*'])]
static descri... | Add comments and check for virtual files | Add comments and check for virtual files
| JavaScript | mit | yitzchak/ouroboros,yitzchak/ouroboros,yitzchak/dicy,yitzchak/dicy,yitzchak/dicy | ---
+++
@@ -15,15 +15,17 @@
static async appliesToParameters (state: State, command: Command, phase: Phase, options: OptionsInterface, ...parameters: Array<File>): Promise<boolean> {
return !!options.copyTargetsToRoot &&
- parameters.every(file => state.targets.has(file.filePath) && path.dirname(file.f... |
a75aa8e8c07652d7e4910b6d2e70e3d7f08fe569 | app/scripts/move-popup/dimItemTag.directive.js | app/scripts/move-popup/dimItemTag.directive.js |
(function() {
'use strict';
angular.module('dimApp').component('dimItemTag', {
controller: ItemTagController,
bindings: {
item: '='
},
template: `
<select ng-options="tag as tag.label | translate for tag in $ctrl.settings.itemTags track by tag.type" ng-model="$ctrl.selected" ng-change=... |
(function() {
'use strict';
angular.module('dimApp').component('dimItemTag', {
controller: ItemTagController,
bindings: {
item: '='
},
template: `
<select ng-options="tag as tag.label | translate for tag in $ctrl.settings.itemTags track by tag.type" ng-model="$ctrl.selected" ng-change=... | Fix tag update when there's no tag | Fix tag update when there's no tag
| JavaScript | mit | chrisfried/DIM,bhollis/DIM,DestinyItemManager/DIM,delphiactual/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM,chrisfried/DIM,48klocs/DIM,bhollis/DIM,bhollis/DIM,DestinyItemManager/DIM,bhollis/DIM,chrisfried/DIM,LouisFettet/DIM,LouisFettet/DIM,48klocs/DIM,delphiactual/DIM,delphiactual/DIM,chrisfried/DIM,48klocs/DIM,d... | ---
+++
@@ -18,7 +18,7 @@
var vm = this;
vm.settings = dimSettingsService;
- $scope.$watch(() => vm.item.dimInfo.tag, function() {
+ $scope.$watch('$ctrl.item.dimInfo.tag', function() {
vm.selected = _.find(vm.settings.itemTags, function(tag) {
return tag.type === vm.item.dimInfo.tag... |
01694cf1a26b9c869960a498e07c358f85cb7c71 | web_app/routes/socket.js | web_app/routes/socket.js | /*
* Serve content over a socket
*/
module.exports = function (socket) {
socket.emit('send:name', {
name: 'Bob'
});
};
| /*
* Serve content over a socket
*/
module.exports = function (socket) {
// socket.emit('send:name', {
// name: 'Bob'
// });
};
| Comment this out for now | Comment this out for now
| JavaScript | mit | projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox,projectweekend/Pi-Jukebox | ---
+++
@@ -3,7 +3,7 @@
*/
module.exports = function (socket) {
- socket.emit('send:name', {
- name: 'Bob'
- });
+ // socket.emit('send:name', {
+ // name: 'Bob'
+ // });
}; |
49f1da05920d4ab335ffcd7d1be9604845f23da5 | lib/logging.js | lib/logging.js | var Tracer = require('tracer');
function Logger (options) {
this.options = options;
this.tracer = this._setupTracer(options.enabled);
}
Logger.prototype.info = function () {
this.tracer.info.apply(this.tracer, arguments);
};
Logger.prototype.error = function (message) {
this.tracer.error(message);
}
Logger.... | 'use strict';
var Tracer = require('tracer');
function Logger (options) {
this.options = options;
this.tracer = this._setupTracer(options.enabled);
}
Logger.prototype.info = function () {
this.tracer.info.apply(this.tracer, arguments);
};
Logger.prototype.error = function (message) {
this.tracer.error(messa... | Make the syntax checker happy | Make the syntax checker happy
| JavaScript | mit | madtrick/spr | ---
+++
@@ -1,3 +1,5 @@
+'use strict';
+
var Tracer = require('tracer');
function Logger (options) {
@@ -11,20 +13,20 @@
Logger.prototype.error = function (message) {
this.tracer.error(message);
-}
+};
Logger.prototype._setupTracer = function (enabled) {
var noopTransport = function () {};
var opti... |
599c9c809d160f0562a5e6ca69d27332585e5bc4 | packages/core/strapi/lib/services/entity-service/attributes/transforms.js | packages/core/strapi/lib/services/entity-service/attributes/transforms.js | 'use strict';
const { getOr, toNumber } = require('lodash/fp');
const bcrypt = require('bcrypt');
const transforms = {
password(value, context) {
const { action, attribute } = context;
if (action !== 'create' && action !== 'update') {
return value;
}
const rounds = toNumber(getOr(10, 'encryp... | 'use strict';
const { getOr, toNumber, isString, isBuffer } = require('lodash/fp');
const bcrypt = require('bcrypt');
const transforms = {
password(value, context) {
const { action, attribute } = context;
if (!isString(value) && !isBuffer(value)) {
return value;
}
if (action !== 'create' && ... | Handle non-string & non-buffer scenarios for the password transform | Handle non-string & non-buffer scenarios for the password transform
| JavaScript | mit | wistityhq/strapi,wistityhq/strapi | ---
+++
@@ -1,11 +1,15 @@
'use strict';
-const { getOr, toNumber } = require('lodash/fp');
+const { getOr, toNumber, isString, isBuffer } = require('lodash/fp');
const bcrypt = require('bcrypt');
const transforms = {
password(value, context) {
const { action, attribute } = context;
+
+ if (!isString... |
f06ce668d3c3fb8e05139cf46e0d714f5e28aa35 | packages/react-jsx-highcharts/test/components/BaseChart/BaseChart.spec.js | packages/react-jsx-highcharts/test/components/BaseChart/BaseChart.spec.js | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import BaseChart from '../../../src/components/BaseChart';
import { createMockChart } from '../../test-utils';
describe('<BaseChart />', function () {
describe('on mount', function () {
let clock;
let chart;
beforeEach(fu... | import React, { Component } from 'react';
import BaseChart from '../../../src/components/BaseChart';
import { createMockChart } from '../../test-utils';
describe('<BaseChart />', function () {
let clock;
let chart;
beforeEach(function () {
chart = createMockChart();
this.chartCreationFunc = sinon.stub(... | Remove unnecessary BaseChart test code | Remove unnecessary BaseChart test code
| JavaScript | mit | whawker/react-jsx-highcharts,whawker/react-jsx-highcharts | ---
+++
@@ -1,48 +1,45 @@
-import React, { PureComponent } from 'react';
-import PropTypes from 'prop-types';
+import React, { Component } from 'react';
import BaseChart from '../../../src/components/BaseChart';
import { createMockChart } from '../../test-utils';
describe('<BaseChart />', function () {
- descr... |
8b15314c71e91b5c6f210915d53fb6c11a5cbce2 | lib/assets/javascripts/cartodb3/deep-insights-integration/legend-manager.js | lib/assets/javascripts/cartodb3/deep-insights-integration/legend-manager.js | var LegendFactory = require('../editor/layers/layer-content-views/legend/legend-factory');
var onChange = function (layerDefModel) {
var styleModel = layerDefModel.styleModel;
var canSuggestLegends = LegendFactory.hasMigratedLegend(layerDefModel);
var fill;
var color;
var size;
if (!styleModel) return;
... | var LegendFactory = require('../editor/layers/layer-content-views/legend/legend-factory');
var onChange = function (layerDefModel) {
var styleModel = layerDefModel.styleModel;
var canSuggestLegends = !LegendFactory.hasMigratedLegend(layerDefModel);
var fill;
var color;
var size;
if (!styleModel) return;
... | Fix bug in legends magic. | Fix bug in legends magic.
| JavaScript | bsd-3-clause | splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb | ---
+++
@@ -2,7 +2,7 @@
var onChange = function (layerDefModel) {
var styleModel = layerDefModel.styleModel;
- var canSuggestLegends = LegendFactory.hasMigratedLegend(layerDefModel);
+ var canSuggestLegends = !LegendFactory.hasMigratedLegend(layerDefModel);
var fill;
var color;
var size;
@@ -13,6 +13... |
881a22edcb6438f9d65a8794b17ae710ee44c089 | listentotwitter/static/js/keyword-box.js | listentotwitter/static/js/keyword-box.js | function redirectKeyword(keyword) {
document.location.href = '/keyword/' + keyword;
}
$(document).ready(function() {
$('#keyword-form #keyword-input').focus();
$('#keyword-form').submit(function() {
redirectKeyword($('#keyword-form #keyword-input').val());
});
$('#keyword-form #keyword-in... | function redirectKeyword(keyword) {
document.location.href = '/keyword/' + keyword;
}
$(document).ready(function() {
$('#keyword-form #keyword-input').focus();
$('#keyword-form').submit(function() {
redirectKeyword($('#keyword-form #keyword-input').val());
});
$('#keyword-form #keyword-in... | Select text instead of move cursor to the end | Select text instead of move cursor to the end
| JavaScript | agpl-3.0 | musalbas/listentotwitter,musalbas/listentotwitter,musalbas/listentotwitter | ---
+++
@@ -10,12 +10,7 @@
});
$('#keyword-form #keyword-input').focus(function() {
- if (this.setSelectionRange) {
- var len = $(this).val().length * 2;
- this.setSelectionRange(len, len);
- } else {
- $(this).val($(this).val());
- }
+ $(this).... |
3a642093d2344c91f1ebdbfcc73cbc2b74125fef | nls/Strings.js | nls/Strings.js | define( function( require, exports, module ) {
'use strict';
module.exports = {
root: true,
de: true,
es: true,
fr: true,
gl: true,
it: true,
sv: true,
uk: true,
ru: true
};
} );
| define( function( require, exports, module ) {
'use strict';
module.exports = {
root: true,
de: true,
es: true,
fr: true,
gl: true,
it: true,
ru: true,
sv: true,
uk: true
};
} );
| Use alphabetic ordering of nls. | Use alphabetic ordering of nls.
| JavaScript | mit | sensuigit/brackets-autoprefixer,sensuigit/brackets-autoprefixer,mikaeljorhult/brackets-autoprefixer,mikaeljorhult/brackets-autoprefixer | ---
+++
@@ -8,8 +8,8 @@
fr: true,
gl: true,
it: true,
+ ru: true,
sv: true,
- uk: true,
- ru: true
+ uk: true
};
} ); |
23644c40350c07a5266d4f1242dd8665a076ee53 | tests/CoreSpec.js | tests/CoreSpec.js | describe("Core Bliss", function () {
"use strict";
before(function() {
fixture.setBase('tests/fixtures');
});
beforeEach(function () {
this.fixture = fixture.load('core.html');
});
// testing setup
it("has the fixture on the dom", function () {
expect($('#fixture-container')).to.not.be.null;
});
it("... | describe("Core Bliss", function () {
"use strict";
before(function() {
fixture.setBase('tests/fixtures');
});
beforeEach(function () {
this.fixture = fixture.load('core.html');
});
// testing setup
it("has the fixture on the dom", function () {
expect($('#fixture-container')).to.not.be.null;
});
it("... | Revert "Check testing environment has appropriate features" | Revert "Check testing environment has appropriate features"
This reverts commit dbb0a79af0c061b1de7acb0d609b05a438d52cae.
| JavaScript | mit | LeaVerou/bliss,LeaVerou/bliss,dperrymorrow/bliss,dperrymorrow/bliss | ---
+++
@@ -14,11 +14,6 @@
expect($('#fixture-container')).to.not.be.null;
});
- it("is a valid testing environment", function () {
- // PhantomJS fails this one by default
- expect(Element.prototype.matches).to.not.be.undefined;
- });
-
it("has global methods and aliases", function() {
expect(Bliss).to... |
574d8ec4bb13661372284f703caa48e7b387feb2 | gulpfile.js/util/pattern-library/lib/parseDocumentation.js | gulpfile.js/util/pattern-library/lib/parseDocumentation.js | var path = require('path')
var marked = require('marked')
var nunjucks = require('nunjucks')
var parseDocumentation = function (files) {
files.forEach(function (file) {
nunjucks.configure([
path.join(__dirname, '..', 'macros'),
path.parse(file.path).dir
])
marked.setOptions({
gfm: fals... | var path = require('path')
var marked = require('marked')
var nunjucks = require('nunjucks')
var parseDocumentation = function (files) {
files.forEach(function (file) {
nunjucks.configure([
path.join(__dirname, '..', 'macros'),
path.parse(file.path).dir
])
var fileContents = [
`{% from... | Use github flavoured markdown as before | Use github flavoured markdown as before
| JavaScript | apache-2.0 | hmrc/assets-frontend,hmrc/assets-frontend,hmrc/assets-frontend | ---
+++
@@ -8,10 +8,6 @@
path.join(__dirname, '..', 'macros'),
path.parse(file.path).dir
])
-
- marked.setOptions({
- gfm: false
- })
var fileContents = [
`{% from 'example.html' import example %}`, |
f7bd33c7211ed3d79f91da700c51379a26e64196 | app/map/map.utils.js | app/map/map.utils.js | function clearEOIMarkers(scope) {
// Remove existing markers.
scope.placesOfInterestMarkers.forEach(function (markerObj) {
scope.map.removeLayer(markerObj.marker);
});
scope.placesOfInterestMarkers = [];
}
function clampWithinBounds(value, lowerBound, upperBound) {
value = Math.max(value, ... | function clearEOIMarkers(scope) {
// Remove existing markers.
scope.placesOfInterestMarkers.forEach(function (markerObj) {
scope.map.removeLayer(markerObj.marker);
});
scope.placesOfInterestMarkers = [];
}
function clampWithinBounds(value, lowerBound, upperBound) {
value = Math.max(value, ... | Set search area circle size to 0 on reset. | Set search area circle size to 0 on reset.
| JavaScript | mit | joseph-iussa/tour-planner,joseph-iussa/tour-planner,joseph-iussa/tour-planner | ---
+++
@@ -33,6 +33,7 @@
if (scope.map.hasLayer(scope.circleOverlay)) {
scope.map.removeLayer(scope.circleOverlay);
scope.radius = 0;
+ scope.circleOverlay.setRadius(0);
scope.$root.$broadcast('searchAreaCleared');
}
} |
483b0240eedfc44bb8105f0bdc218d16f754ccde | conf/buster-coverage.js | conf/buster-coverage.js | module.exports.unit = {
environment: 'node',
rootPath: process.cwd(),
sources: [
'lib/**/*.js'
],
tests: [
'test/**/*.js'
],
extensions: [
require('buster-istanbul')
],
'buster-istanbul': {
outputDirectory: '.bob/report/coverage'
}
};
| module.exports.unit = {
environment: 'node',
rootPath: process.cwd(),
sources: [
'lib/**/*.js'
],
tests: [
'test/**/*.js'
],
extensions: [
require('buster-istanbul')
],
'buster-istanbul': {
outputDirectory: '.bob/report/coverage/buster-istanbul/'
}
};
| Add buster-istanbul subdir as output directory. | Add buster-istanbul subdir as output directory.
| JavaScript | mit | cliffano/bob | ---
+++
@@ -11,6 +11,6 @@
require('buster-istanbul')
],
'buster-istanbul': {
- outputDirectory: '.bob/report/coverage'
+ outputDirectory: '.bob/report/coverage/buster-istanbul/'
}
}; |
5124587953b57db865ec3a63af138e7e43ba6a9a | app/app.js | app/app.js | (function() {
var app = angular.module('notely', [
'ui.router',
'notely.notes',
'notely.notes.service'
]);
function config($urlRouterProvider) {
$urlRouterProvider.otherwise('/notes');
}
config['$inject'] = ['$urlRouterProvider'];
app.config(config);
})();
| (function() {
var app = angular.module('notely', [
'ui.router',
'notely.notes',
'notely.notes.service'
]);
function config($urlRouterProvider) {
$urlRouterProvider.otherwise('/notes/');
}
config['$inject'] = ['$urlRouterProvider'];
app.config(config);
})();
| Update default route to include trailing slash. | Update default route to include trailing slash.
| JavaScript | mit | FretlessBecks/notely,williamrulon/notely-1,FretlessBecks/notely,williamrulon/notely-1 | ---
+++
@@ -6,7 +6,7 @@
]);
function config($urlRouterProvider) {
- $urlRouterProvider.otherwise('/notes');
+ $urlRouterProvider.otherwise('/notes/');
}
config['$inject'] = ['$urlRouterProvider']; |
46d12bb8b5a302922d9ef2c6e305c78a99876701 | app/javascript/app/components/footer/site-map-footer/site-map-footer-data.js | app/javascript/app/components/footer/site-map-footer/site-map-footer-data.js | export const siteMapData = [
{
title: 'Tools',
links: [
{ title: 'Country Profiles', href: '/countries' },
{ title: 'NDCs', href: '/ndcs-content' },
{ title: 'NDC-SDG Linkages', href: '/ndcs-sdg' },
{ title: 'Historical GHG Emissions', href: '/ghg-emissions' },
{ title: 'Pathways... | export const siteMapData = [
{
title: 'Tools',
links: [
{ title: 'Country Profiles', href: '/countries' },
{ title: 'NDCs', href: '/ndcs-content' },
{ title: 'NDC-SDG Linkages', href: '/ndcs-sdg' },
{ title: 'Historical GHG Emissions', href: '/ghg-emissions' },
{ title: 'Pathways... | Correct FAQ link on footer | Correct FAQ link on footer
| JavaScript | mit | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch | ---
+++
@@ -31,7 +31,7 @@
{ title: 'Climate Watch Partners', href: '/about/partners' },
{ title: 'Contact Us & Feedback', href: '/about/contact' },
{ title: 'Permissions & Licensing', href: '/about/permissions' },
- { title: 'FAQ', href: '/about/faq' }
+ { title: 'FAQ', href: '/about/fa... |
2ffb9af2862202068c7dc4c7144a3340bc1dd3df | spec/www/background.js | spec/www/background.js | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
chromespec.registerJasmineTest('chrome.app.runtime');
chromespec.registerJasmineTest('chrome.app.window');
chromespec.registerJasmineTest('chrome.file... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
chromespec.registerJasmineTest('chrome.app.runtime');
chromespec.registerJasmineTest('chrome.app.window');
chromespec.registerJasmineTest('chrome.file... | Remove test.syncFileSystem.js from the load list as it doesn't exist. | Remove test.syncFileSystem.js from the load list as it doesn't exist.
| JavaScript | bsd-3-clause | xiaoyanit/mobile-chrome-apps,wudkj/mobile-chrome-apps,MobileChromeApps/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,guozanhua/mobile-chrome-apps,guozanhua/mobile-chrome-apps,chirilo/mobile-chrome-apps,hgl888/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,hgl888/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,chiril... | ---
+++
@@ -9,5 +9,4 @@
chromespec.registerJasmineTest('chrome.runtime');
chromespec.registerJasmineTest('chrome.storage');
chromespec.registerJasmineTest('chrome.socket');
-chromespec.registerJasmineTest('chrome.syncFileSystem');
chromespec.registerJasmineTest('pageload'); |
e0a85c0e739f1d4b0b82380ec4092893f8fb996c | src/Core/Characters.js | src/Core/Characters.js | // @flow
export opaque type WideBar = "W"
export const WIDE_BAR: WideBar = "W"
export opaque type NarrowBar = "N"
export const NARROW_BAR: NarrowBar = "N"
export opaque type WideSpace = "w"
export const WIDE_SPACE: WideSpace = "w"
export opaque type NarrowSpace = "n"
export const NARROW_SPACE: NarrowSpace = "n"
exp... | // @flow
export opaque type WideBar = "W"
export const WIDE_BAR: WideBar = "W"
export opaque type NarrowBar = "N"
export const NARROW_BAR: NarrowBar = "N"
export opaque type WideSpace = "w"
export const WIDE_SPACE: WideSpace = "w"
export opaque type NarrowSpace = "n"
export const NARROW_SPACE: NarrowSpace = "n"
exp... | Make symbol unions non opaque types | Make symbol unions non opaque types
| JavaScript | mit | mormahr/barcode.js,mormahr/barcode.js | ---
+++
@@ -11,5 +11,5 @@
export opaque type NarrowSpace = "n"
export const NARROW_SPACE: NarrowSpace = "n"
-export opaque type DiscreteSymbologySymbol = WideBar | NarrowBar | WideSpace | WideBar
-export opaque type SymbologySymbol = DiscreteSymbologySymbol
+export type DiscreteSymbologySymbol = WideBar | NarrowB... |
49ad1e4378f81738f8ed59ab94dc603c4d5c1938 | webpack.config.js | webpack.config.js | const path = require("path");
module.exports = {
entry: path.resolve(__dirname, "./source/index.js"),
externals: {
buttercup: "buttercup"
},
module: {
rules : [
{
test: /\.(js|esm)$/,
use: {
loader: "babel-loader",
... | const path = require("path");
module.exports = {
entry: path.resolve(__dirname, "./source/index.js"),
externals: {
argon2: "argon2",
buttercup: "buttercup",
kdbxweb: "kdbxweb"
},
module: {
rules : [
{
test: /\.(js|esm)$/,
use... | Split dependencies out in webpack to reduce bundle size | Split dependencies out in webpack to reduce bundle size
| JavaScript | mit | perry-mitchell/buttercup-importer | ---
+++
@@ -4,7 +4,9 @@
entry: path.resolve(__dirname, "./source/index.js"),
externals: {
- buttercup: "buttercup"
+ argon2: "argon2",
+ buttercup: "buttercup",
+ kdbxweb: "kdbxweb"
},
module: { |
6851efdd1fd5d214c70eb8db093e6d158870eece | webpack.config.js | webpack.config.js | var webpack = require('webpack');
module.exports = {
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/dev-server',
'./scripts/index'
],
output: {
path: __dirname,
filename: 'bundle.js',
publicPath: '/scripts/'
},
plugins: [
new webpack.HotModuleReplacementP... | var webpack = require('webpack');
module.exports = {
devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/dev-server',
'./scripts/index'
],
output: {
path: __dirname,
filename: 'bundle.js',
publicPath: '/scripts/'
},
plugins: [
new webpack.Ho... | Add devtool: 'eval' for Chrome DevTools | Add devtool: 'eval' for Chrome DevTools
| JavaScript | mit | getguesstimate/guesstimate-app | ---
+++
@@ -1,6 +1,7 @@
var webpack = require('webpack');
module.exports = {
+ devtool: 'eval',
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/dev-server', |
485af180a0407d2961e53609ab379bdd3bdb1c67 | webpack.config.js | webpack.config.js | const TerserJsPlugin = require('terser-webpack-plugin');
const serverBuild = {
mode: 'production',
entry: './src/twig.js',
target: 'node',
node: false,
output: {
path: __dirname,
filename: 'twig.js',
library: 'Twig',
libraryTarget: 'umd'
},
optimization: {
... | const TerserJsPlugin = require('terser-webpack-plugin');
const commonModule = {
exclude: /(node_modules)/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"],
plugins: [
"@babel/plugin-transform-modules-commonjs",
"@b... | Add babel preset on serverBuild | Add babel preset on serverBuild
| JavaScript | bsd-2-clause | twigjs/twig.js,justjohn/twig.js,twigjs/twig.js,twigjs/twig.js,justjohn/twig.js,justjohn/twig.js | ---
+++
@@ -1,4 +1,18 @@
const TerserJsPlugin = require('terser-webpack-plugin');
+
+const commonModule = {
+ exclude: /(node_modules)/,
+ use: {
+ loader: "babel-loader",
+ options: {
+ presets: ["@babel/preset-env"],
+ plugins: [
+ "@babel/plugin-transform-m... |
32acbf191be290f0eccf756f5f6dc28067e3c565 | client/sw-precache-config.js | client/sw-precache-config.js | module.exports = {
navigateFallback: '/index.html',
runtimeCaching: [{
urlPattern: /\/api\/search\/.*/,
handler: 'networkFirst',
options: {
cache: {
maxEntries: 100,
name: 'search-cache',
},
},
urlPattern: /\/api\/.*/,
handler: 'networkFirst',
options: {
... | module.exports = {
navigateFallback: '/index.html',
runtimeCaching: [{
urlPattern: /\/api\/search\/.*/,
handler: 'networkFirst',
options: {
cache: {
maxEntries: 100,
name: 'search-cache',
},
},
urlPattern: /\/api\/.*/,
handler: 'fastest',
options: {
cach... | Use fastest method for api calls other than search | Use fastest method for api calls other than search
| JavaScript | apache-2.0 | customelements/v2,webcomponents/webcomponents.org,andymutton/beta,customelements/v2,andymutton/beta,andymutton/v2,andymutton/beta,andymutton/v2,andymutton/beta,webcomponents/webcomponents.org,andymutton/v2,webcomponents/webcomponents.org,andymutton/v2,customelements/v2,customelements/v2 | ---
+++
@@ -10,7 +10,7 @@
},
},
urlPattern: /\/api\/.*/,
- handler: 'networkFirst',
+ handler: 'fastest',
options: {
cache: {
maxEntries: 1000, |
6a15410123e9650f003c7a97ef091e08145dc4eb | src/actions/budgets.js | src/actions/budgets.js | import { ActionTypes } from '../config/constants';
import { ref } from '../config/constants';
export const addItem = payload => {
return {
type: ActionTypes.BUDGETS_ADD_ITEM,
payload,
}
}
export const removeItem = payload => {
return {
type: ActionTypes.BUDGETS_REMOVE_ITEM,
payload,
}
}
export const subs... | import { ActionTypes } from '../config/constants';
import { ref } from '../config/constants';
export const addItem = payload => {
return dispatch => {
const itemRef = ref.child(`items/${payload.item.id}`);
itemRef.set( payload.item );
dispatch({
type: ActionTypes.BUDGETS_ADD_ITEM,
payload,
});
}
}
e... | Update items in Firebase on change | Update items in Firebase on change
Initially only read operators were implemented.
The following write operators are now supported:
- Edit item
- Delete item
- Add item
| JavaScript | mit | nadavspi/UnwiseConnect,nadavspi/UnwiseConnect,nadavspi/UnwiseConnect | ---
+++
@@ -2,16 +2,28 @@
import { ref } from '../config/constants';
export const addItem = payload => {
- return {
- type: ActionTypes.BUDGETS_ADD_ITEM,
- payload,
+ return dispatch => {
+ const itemRef = ref.child(`items/${payload.item.id}`);
+
+ itemRef.set( payload.item );
+
+ dispatch({
+ type: Action... |
818ff925d39f419a290ec46c28c5cea39de23906 | config/ember-try.js | config/ember-try.js | module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-1.13.8',
dependencies: {
'ember': '1.13.8',
'ember-data': '1.13.9'
}
},
{
name: 'ember-release',
dependencies: {
'ember': 'components/ember#relea... | module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-1.13.8',
dependencies: {
'ember': '1.13.8',
'ember-data': '1.13.9'
}
},
{
name: 'ember-release',
dependencies: {
'ember': 'components/ember#relea... | Use 2.x flavor of ember data in canary and beta. | Use 2.x flavor of ember data in canary and beta.
| JavaScript | mit | mixonic/ember-cli-mirage,flexyford/ember-cli-mirage,martinmaillard/ember-cli-mirage,IAmJulianAcosta/ember-cli-mirage,oliverbarnes/ember-cli-mirage,lazybensch/ember-cli-mirage,mydea/ember-cli-mirage,constantm/ember-cli-mirage,oliverbarnes/ember-cli-mirage,IAmJulianAcosta/ember-cli-mirage,HeroicEric/ember-cli-mirage,ronc... | ---
+++
@@ -24,7 +24,8 @@
{
name: 'ember-beta',
dependencies: {
- 'ember': 'components/ember#beta'
+ 'ember': 'components/ember#beta',
+ 'ember-data': 'v2.0.0-beta.2'
},
resolutions: {
'ember': 'beta'
@@ -33,7 +34,8 @@
{
name: 'ember-canary',
... |
826009860e444c74fbb20d668327a4f49e8f678d | public/scripts/chat.js | public/scripts/chat.js | new Vue({
el: '#app',
// Using ES6 string litteral delimiters because
// Go uses {{ . }} for its templates
delimiters: ['${', '}'],
data: {
ws: null,
message: '',
chat: [],
},
created: function() {
let protocol = (window.location.protocol === 'https') ? 'wss' : 'ws'
this.ws = new We... | new Vue({
el: '#app',
// Using ES6 string litteral delimiters because
// Go uses {{ . }} for its templates
delimiters: ['${', '}'],
data: {
ws: null,
message: '',
chat: [],
},
created: function() {
let protocol = (window.location.protocol === 'https:') ? 'wss:' : 'ws:'
this.ws = new... | Set protocol correctly ... oops | Set protocol correctly ... oops
| JavaScript | mit | AntonioVdlC/chat,AntonioVdlC/chat,AntonioVdlC/chat | ---
+++
@@ -12,8 +12,8 @@
},
created: function() {
- let protocol = (window.location.protocol === 'https') ? 'wss' : 'ws'
- this.ws = new WebSocket(`${protocol}://${window.location.host}/ws`)
+ let protocol = (window.location.protocol === 'https:') ? 'wss:' : 'ws:'
+ this.ws = new WebSocket(`${pro... |
c71f6d3aa4807e6d384846519f266a8bdb4c8e72 | create-user.js | create-user.js | 'use strict';
const path = require('path');
const encryptor = require('./src/encryptor');
const argv = process.argv.slice(2);
if(argv.length != 2) {
console.log('Usage: node create-user.js USERNAME PASSWORD');
process.exit(1);
}
encryptor
.encrypt('{}', path.join('./data', `${argv[0]}.dat`), argv[1])
.then((... | 'use strict';
const path = require('path');
const encryptor = require('./src/encryptor');
const argv = process.argv.slice(2);
if(argv.length != 2) {
console.log('Usage: node create-user.js USERNAME PASSWORD');
process.exit(1);
}
encryptor
.encrypt(JSON.stringify({
services: []
}), path.join('./data', `${... | Create user adiciona json básico no arquivo | Create user adiciona json básico no arquivo
| JavaScript | mit | gustavopaes/password-manager,gustavopaes/password-manager,gustavopaes/password-manager | ---
+++
@@ -10,7 +10,9 @@
}
encryptor
- .encrypt('{}', path.join('./data', `${argv[0]}.dat`), argv[1])
+ .encrypt(JSON.stringify({
+ services: []
+ }), path.join('./data', `${argv[0]}.dat`), argv[1])
.then(() => {
console.log('User file created!');
process.exit(0); |
c771edf30259bae85af719dc27fa5d07999160c8 | scripts/dbsetup.js | scripts/dbsetup.js | let db;
try {
db = require("rethinkdbdash")(require("../config").connectionOpts);
} catch (err) {
console.error("You haven't installed rethinkdbdash npm module or you didn't have configured the bot yet! Please do so.");
}
(async function () {
if (!db) return;
const tables = await db.tableList();
if ... | let db;
try {
db = require("rethinkdbdash")(require("../config").connectionOpts);
} catch (err) {
console.error("You haven't installed rethinkdbdash npm module or you didn't have configured the bot yet! Please do so.");
}
(async function () {
if (!db) return;
const tables = await db.tableList();
if ... | Create the phone table when it existn't | Create the phone table when it existn't
| JavaScript | mit | TTtie/TTtie-Bot,TTtie/TTtie-Bot,TTtie/TTtie-Bot | ---
+++
@@ -16,6 +16,7 @@
if (!tables.includes("modlog")) await db.tableCreate("modlog");
if (!tables.includes("extensions")) await db.tableCreate("extensions");
if (!tables.includes("extension_store")) await db.tableCreate("extension_store");
+ if (!tables.includes("phone")) await db.tableCreate("p... |
5620ebe8a3c22927e2bacba2ef7ea12157469b8d | js/mentions.js | js/mentions.js | jQuery(function( $ ) {
var mOptions = $.extend({}, mOpt);
console.log(mOptions);
$('#cmessage').atwho({
at: "@",
displayTpl: "<li>${username}<small> ${name}</small></li>",
insertTpl: "${atwho-at}${username}",
callbacks: {
remoteFilter: function(query, callb... | jQuery(function( $ ) {
var mOptions = $.extend({}, mOpt);
console.log(mOptions);
$('#cmessage').atwho({
at: "@",
displayTpl: "<li>${username}<small> ${name}</small></li>",
insertTpl: "${atwho-at}${username}",
callbacks: {
remoteFilter: function(query, callb... | Set atwho.js minLen param to 1 default was 0. | Set atwho.js minLen param to 1 default was 0.
| JavaScript | agpl-3.0 | arunshekher/mentions,arunshekher/mentions | ---
+++
@@ -12,9 +12,10 @@
console.log('Query: ' + query);
//
+ /*
if(query === null || query.length < 1){
return callback(null);
- }
+ }*/
$.ajax({
url: m... |
6053767e229e18cb4f416a44ede954c2a90ba5ee | src/can-be-asserted.js | src/can-be-asserted.js | import _ from 'lodash';
export default function canBeAsserted(vdom) {
return _.all([].concat(vdom), node =>
node
&& typeof node === 'object'
&& typeof node.type === 'string'
&& (!node.props || typeof node.props === 'object')
);
} | import _ from 'lodash';
import React from 'react';
export default function canBeAsserted(vdom) {
return _.all([].concat(vdom), node =>
React.isValidElement(node) ||
(node
&& typeof node === 'object'
&& typeof node.type === 'string'
&& (!node.props || typeof node.props === 'o... | Add validation for local component classes as well First try the official method, then fall-back to duck typing. | Add validation for local component classes as well
First try the official method, then fall-back to duck typing.
| JavaScript | mit | electricmonk/chai-react-element | ---
+++
@@ -1,10 +1,12 @@
import _ from 'lodash';
+import React from 'react';
export default function canBeAsserted(vdom) {
return _.all([].concat(vdom), node =>
- node
+ React.isValidElement(node) ||
+ (node
&& typeof node === 'object'
&& typeof node.type === 'string'
... |
1d92c984fc1d0876b26378015a33ba1795733404 | lib/EditorInserter.js | lib/EditorInserter.js | 'use babel';
import { TextEditor } from 'atom';
export default class EditorInserter {
setText(text) {
this.insertionText = text;
}
performInsertion() {
if (!this.insertionText) {
console.error("No text to insert.");
return;
}
this.textEditor = atom.... | 'use babel';
import { TextEditor } from 'atom';
export default class EditorInserter {
setText(text) {
this.insertionText = text;
}
performInsertion() {
//Make sure there's actually text to insert before continuing
if (!this.insertionText) {
console.error("No text to in... | Add tabbing to example insertion. | Add tabbing to example insertion.
| JavaScript | mit | Coteh/syntaxdb-atom-plugin | ---
+++
@@ -8,23 +8,41 @@
}
performInsertion() {
+ //Make sure there's actually text to insert before continuing
if (!this.insertionText) {
console.error("No text to insert.");
return;
}
- this.textEditor = atom.workspace.getActiveTextEditor();
- ... |
a1daba2ef60ffb34c73932f68fefb727d45d4568 | src/locale/en/build_distance_in_words_localize_fn/index.js | src/locale/en/build_distance_in_words_localize_fn/index.js | module.exports = function buildDistanceInWordsLocalizeFn () {
var distanceInWordsLocale = {
lessThanXSeconds: {
one: 'less than a second',
other: 'less than ${count} seconds'
},
halfAMinute: 'half a minute',
lessThanXMinutes: {
one: 'less than a minute',
other: 'less than ${c... | module.exports = function buildDistanceInWordsLocalizeFn () {
var distanceInWordsLocale = {
lessThanXSeconds: {
one: 'less than a second',
other: 'less than {{count}} seconds'
},
halfAMinute: 'half a minute',
lessThanXMinutes: {
one: 'less than a minute',
other: 'less than {{... | Use handlebars string format in distanceInWords localize function | Use handlebars string format in distanceInWords localize function
| JavaScript | mit | date-fns/date-fns,js-fns/date-fns,date-fns/date-fns,date-fns/date-fns,js-fns/date-fns | ---
+++
@@ -2,54 +2,54 @@
var distanceInWordsLocale = {
lessThanXSeconds: {
one: 'less than a second',
- other: 'less than ${count} seconds'
+ other: 'less than {{count}} seconds'
},
halfAMinute: 'half a minute',
lessThanXMinutes: {
one: 'less than a minute',
- ... |
e8b3cb735567ebc27a842c275eab9aac306c8ea2 | assets/www/map/js/views/point-view.js | assets/www/map/js/views/point-view.js | var PointView = Backbone.View.extend({
initialize:function (options) {
this.model = options.model;
this.gmap = options.gmap;
this.marker = new google.maps.Marker({
position:this.model.getGLocation(),
poiType:this.model.getPoiType(),
visible:true,
icon:this.model.get('pin'),
... | var PointView = Backbone.View.extend({
initialize:function (options) {
this.model = options.model;
this.gmap = options.gmap;
this.marker = new google.maps.Marker({
position:this.model.getGLocation(),
poiType:this.model.getPoiType(),
visible:true,
icon:this.model.get('pin'),
... | Change position on model location change. | Change position on model location change.
| JavaScript | bsd-3-clause | bwestlin/hermes,bwestlin/hermes,carllarsson/hermes,carllarsson/hermes,bwestlin/hermes,carllarsson/hermes | ---
+++
@@ -10,6 +10,12 @@
visible:true,
icon:this.model.get('pin'),
map:null
+ });
+
+ var self = this;
+
+ this.model.on('change:locations', function () {
+ self.marker.setPosition(self.model.getGLocation());
});
// render the initial point state |
afe38c01e268a04153e8a644b5e64c2fd4897d0e | lib/poolify.js | lib/poolify.js | 'use strict';
const poolified = Symbol('poolified');
const mixFlag = { [poolified]: true };
const duplicate = (factory, n) => (
new Array(n).fill().map(() => {
const instance = factory();
return Object.assign(instance, mixFlag);
})
);
const provide = callback => item => {
setImmediate(() => {
call... | 'use strict';
const poolified = Symbol('poolified');
const mixFlag = { [poolified]: true };
const duplicate = (factory, n) => Array
.from({ length: n }, factory)
.map(instance => Object.assign(instance, mixFlag));
const provide = callback => item => {
setImmediate(() => {
callback(item);
});
};
const p... | Use Array.from({ length: n }, factory) | Use Array.from({ length: n }, factory)
PR-URL: https://github.com/metarhia/metasync/pull/306
| JavaScript | mit | metarhia/MetaSync,DzyubSpirit/MetaSync,DzyubSpirit/MetaSync | ---
+++
@@ -4,12 +4,9 @@
const mixFlag = { [poolified]: true };
-const duplicate = (factory, n) => (
- new Array(n).fill().map(() => {
- const instance = factory();
- return Object.assign(instance, mixFlag);
- })
-);
+const duplicate = (factory, n) => Array
+ .from({ length: n }, factory)
+ .map(instan... |
d9fb86986d77688bfe606dad153b4e0c26125c83 | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
qunit: {
files: ['jstests/index.html']
},
jshint: {
all: [
'Gruntfile.js',
'nbdiff/server/static/*.js'
],
options: {
jshintrc: '.jshintrc'
}
}
})... | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
qunit: {
files: ['jstests/index.html']
},
jshint: {
all: [
'Gruntfile.js',
'jstests/*.js',
'nbdiff/server/static/*.js'
],
options: {
jshintrc: '.jshi... | Add jstests to jshint checks | Add jstests to jshint checks
| JavaScript | mit | tarmstrong/nbdiff,tarmstrong/nbdiff,tarmstrong/nbdiff,tarmstrong/nbdiff | ---
+++
@@ -8,6 +8,7 @@
jshint: {
all: [
'Gruntfile.js',
+ 'jstests/*.js',
'nbdiff/server/static/*.js'
],
options: { |
248053f65310ee9e2702a16678f05b2076ca88f1 | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
});
grunt.loadNpmTasks('grunt-release');
grunt.registerTask('message', function() {
grunt.log.writeln("use grunt release:{patch|minor|major}");
});
grunt.registerTask('defau... | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
release: {
options: {
tagName: 'v<%= version %>'
}
}
});
grunt.loadNpmTasks('grunt-release');
grunt.registerTask('message', function() {
grunt.log.wr... | Use correct tag with grunt-release | Use correct tag with grunt-release
| JavaScript | mit | leszekhanusz/generator-knockout-bootstrap | ---
+++
@@ -2,7 +2,12 @@
// Project configuration.
grunt.initConfig({
- pkg: grunt.file.readJSON('package.json')
+ pkg: grunt.file.readJSON('package.json'),
+ release: {
+ options: {
+ tagName: 'v<%= version %>'
+ }
+ }
});
grunt.loadNpmTasks('grunt-release'); |
2fc93c70a7a674bed8a9d677d5ac5b4afd36e179 | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
shell: {
rebuild: {
command: 'npm install --build-from-source'
}
},
jasmine_node: {
all: ['spec/']
}
});
grunt.loadNpmTasks('grunt-jasmine-node');
grunt.loadNpmTasks('gru... | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
shell: {
rebuild: {
command: 'npm install --build-from-source'
}
},
jasmine_node: {
all: ['spec/']
}
});
grunt.loadNpmTasks('grunt-jasmine-node');
grunt.loadNpmTasks('gru... | Split Grunt tasks into “build” and “test” | Split Grunt tasks into “build” and “test”
| JavaScript | bsd-2-clause | mross-pivotal/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,mross-pivotal/node-gemfire | ---
+++
@@ -12,6 +12,10 @@
});
grunt.loadNpmTasks('grunt-jasmine-node');
grunt.loadNpmTasks('grunt-shell');
- grunt.registerTask('default', ['shell:rebuild', 'jasmine_node:all']);
+
+ grunt.registerTask('build', ['shell:rebuild']);
+ grunt.registerTask('test', ['jasmine_node:all']);
+
+ grunt.registerTas... |
cab2faf71d7b8d0e0c8950b2315879b7f39e835f | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
qunit: {
files: ['test/index.html']
}
});
grunt.loadNpmTasks('grunt-contrib-qunit');
// Default task.
grunt.registerTask('test', 'qunit');
// Travis CI task.
grunt.registerTask('travis', 'test');
};
// vim:ts=2:sw=2:et:
| module.exports = function(grunt) {
grunt.initConfig({
qunit: {
files: ['test/index.html']
},
jshint: {
all: ['Gruntfile.js', 'yt-looper.js', 'test/**/*.js'],
options: {
'-W014': true, // ignore [W014] Bad line breaking
},
},
});
grunt.loadNpmTasks('grunt-contrib-qu... | Add jshint to a test suite | Add jshint to a test suite
| JavaScript | cc0-1.0 | sk4zuzu/yt-looper,sk4zuzu/yt-looper,sk4zuzu/yt-looper,lidel/yt-looper,lidel/yt-looper,lidel/yt-looper | ---
+++
@@ -2,14 +2,21 @@
grunt.initConfig({
qunit: {
files: ['test/index.html']
- }
+ },
+ jshint: {
+ all: ['Gruntfile.js', 'yt-looper.js', 'test/**/*.js'],
+ options: {
+ '-W014': true, // ignore [W014] Bad line breaking
+ },
+ },
});
grunt.loadNpmTasks('gru... |
b32664408a5c57f30a734da5c925ca9453696d1c | js/findermodel.js | js/findermodel.js | 'use strict';
/**
* Finder Model - Main model that uses FinderJS
*
* @constructor
*/
var FinderModel = function (arg) {
// Assign `this` through `riot.observable()`
var self = riot.observable(this);
// Store args
self.args = arg;
// Create an instance of `Applait.Finder`
self.finder = ne... | 'use strict';
/**
* Finder Model - Main model that uses FinderJS
*
* @constructor
*/
var FinderModel = function (arg) {
// Assign `this` through `riot.observable()`
var self = riot.observable(this);
// Store args
self.args = arg;
// Create an instance of `Applait.Finder`
self.finder = ne... | Add a generic load method for routes | Add a generic load method for routes
Signed-off-by: Kaustav Das Modak <ba1ce5b1e09413a89404909d8d270942c5dadd14@yahoo.co.in>
| JavaScript | apache-2.0 | applait/finder,vasuki1996/finder,applait/finder,vasuki1996/finder | ---
+++
@@ -62,4 +62,10 @@
}
});
+ /**
+ * Provide a generic "load" method for routing
+ */
+ self.load = function (path) {
+ self.trigger("load:" + path);
+ };
}; |
b78927680317b26f44008debb33c2abc3db5712b | postcss.config.js | postcss.config.js | 'use strict';
module.exports = {
input: 'src/*.css',
dir: 'dist',
use: [
'postcss-import',
'postcss-import-url',
'postcss-custom-properties',
'postcss-normalize-charset',
'autoprefixer',
'postcss-reporter'
],
'postcss-import': {
plugins: [
require('postcss-copy')({
... | 'use strict';
module.exports = {
input: 'src/*.css',
dir: 'dist',
use: [
'postcss-import',
'postcss-custom-properties',
'postcss-normalize-charset',
'autoprefixer',
'postcss-reporter'
],
'postcss-import': {
plugins: [
require('postcss-import-url'),
require('postcss-... | Change the time of loading external CSS | [change] Change the time of loading external CSS
| JavaScript | mit | seamile4kairi/japanese-fonts-css | ---
+++
@@ -5,7 +5,6 @@
dir: 'dist',
use: [
'postcss-import',
- 'postcss-import-url',
'postcss-custom-properties',
'postcss-normalize-charset',
'autoprefixer',
@@ -13,10 +12,11 @@
],
'postcss-import': {
plugins: [
+ require('postcss-import-url'),
require('post... |
bb76add5adfe95e4b95b004bf64c871cde3aaca5 | reviewboard/static/rb/js/models/diffModel.js | reviewboard/static/rb/js/models/diffModel.js | /*
* A diff to be uploaded to a server.
*
* For now, this is used only for uploading new diffs.
*
* It is expected that parentObject will be set to a ReviewRequest instance.
*/
RB.Diff = RB.BaseResource.extend({
rspNamespace: 'diff',
getErrorString: function(rsp) {
if (rsp.err.code == 207) {
... | /*
* A diff to be uploaded to a server.
*
* For now, this is used only for uploading new diffs.
*
* It is expected that parentObject will be set to a ReviewRequest instance.
*/
RB.Diff = RB.BaseResource.extend({
defaults: {
diff: null,
parentDiff: null,
basedir: ''
},
payloadF... | Enhance RB.Diff to be able to create new diffs. | Enhance RB.Diff to be able to create new diffs.
The existing diff model didn't do very much, and was really meant for dealing
with existing diffs. This change adds some attributes and methods that allow it
to be used to create new diffs.
Testing done:
Used this in another change to create a diff from javascript.
Rev... | JavaScript | mit | reviewboard/reviewboard,davidt/reviewboard,1tush/reviewboard,1tush/reviewboard,custode/reviewboard,1tush/reviewboard,bkochendorfer/reviewboard,davidt/reviewboard,KnowNo/reviewboard,reviewboard/reviewboard,sgallagher/reviewboard,KnowNo/reviewboard,1tush/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,bkochendorf... | ---
+++
@@ -6,6 +6,14 @@
* It is expected that parentObject will be set to a ReviewRequest instance.
*/
RB.Diff = RB.BaseResource.extend({
+ defaults: {
+ diff: null,
+ parentDiff: null,
+ basedir: ''
+ },
+
+ payloadFileKeys: ['path', 'parent_diff_path'],
+
rspNamespace: 'diff... |
f6d6955c6d459717a357872ae68a0b0eabc779bf | app/assets/javascripts/pageflow/media_player/volume_fading.js | app/assets/javascripts/pageflow/media_player/volume_fading.js | //= require_self
//= require_tree ./volume_fading
pageflow.mediaPlayer.volumeFading = function(player) {
if (!pageflow.browser.has('volume control support')) {
return pageflow.mediaPlayer.volumeFading.noop(player);
}
else if (pageflow.audioContext.get()) {
return pageflow.mediaPlayer.volumeFading.webAudi... | //= require_self
//= require_tree ./volume_fading
pageflow.mediaPlayer.volumeFading = function(player) {
if (!pageflow.browser.has('volume control support')) {
return pageflow.mediaPlayer.volumeFading.noop(player);
}
else if (pageflow.audioContext.get() && player.getMediaElement) {
return pageflow.mediaP... | Use Web Audio volume fading only if player has getMediaElement | Use Web Audio volume fading only if player has getMediaElement
`pagefow-vr` player does not support accessing the media element
directly.
| JavaScript | mit | Modularfield/pageflow,Modularfield/pageflow,Modularfield/pageflow,tf/pageflow,codevise/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow,Modularfield/pageflow | ---
+++
@@ -5,7 +5,7 @@
if (!pageflow.browser.has('volume control support')) {
return pageflow.mediaPlayer.volumeFading.noop(player);
}
- else if (pageflow.audioContext.get()) {
+ else if (pageflow.audioContext.get() && player.getMediaElement) {
return pageflow.mediaPlayer.volumeFading.webAudio(
... |
1b20df7e99f846efc6f64c1fae20df5e6fdcd6e5 | backend/app/assets/javascripts/spree/backend/store_credits.js | backend/app/assets/javascripts/spree/backend/store_credits.js | Spree.ready(function() {
$('.store-credit-memo-row').each(function() {
var row = this;
var field = row.querySelector('[name="store_credit[memo]"]')
var textDisplay = row.querySelector('.store-credit-memo-text')
$(row).on('ajax:success', function(event, data) {
row.classList.remove('editing');
... | Spree.ready(function() {
$('.store-credit-memo-row').each(function() {
var row = this;
var field = row.querySelector('[name="store_credit[memo]"]')
var textDisplay = row.querySelector('.store-credit-memo-text')
$(row).on('ajax:success', function(event, data) {
row.classList.remove('editing');
... | Allow admin store credit memo to be changed using rails-ujs | Allow admin store credit memo to be changed using rails-ujs
rails-ujs has a different api handling ajax events than jquery_ujs.
The former passes all the event information into the event.detail object
while the latter accept different parameters. For more details see:
- https://edgeguides.rubyonrails.org/working_wit... | JavaScript | bsd-3-clause | pervino/solidus,pervino/solidus,pervino/solidus,pervino/solidus | ---
+++
@@ -9,9 +9,25 @@
field.defaultValue = field.value;
textDisplay.textContent = field.value;
- show_flash('success', data.message);
+ if (typeof data !== "undefined") {
+ // we are using jquery_ujs
+ message = data.message
+ } else {
+ // we are using rails-ujs... |
2be6aed059542216005f1fbd1b8f0b0ba53af1f4 | examples/scribuntoConsole.js | examples/scribuntoConsole.js | var Bot = require( 'nodemw' ),
readline = require( 'readline' ),
c = require( 'ansi-colors' ),
rl = readline.createInterface( {
input: process.stdin,
output: process.stdout
} ),
client = new Bot( {
protocol: 'https',
server: 'dev.fandom.com',
path: ''
} ),
params = {
action: 'scribunto-console',
ti... | var Bot = require( 'nodemw' ),
readline = require( 'readline' ),
c = require( 'ansicolors' ),
rl = readline.createInterface( {
input: process.stdin,
output: process.stdout
} ),
client = new Bot( {
protocol: 'https',
server: 'dev.fandom.com',
path: ''
} ),
params = {
action: 'scribunto-console',
tit... | Use green for console intro instead | Use green for console intro instead | JavaScript | bsd-2-clause | macbre/nodemw | ---
+++
@@ -1,6 +1,6 @@
var Bot = require( 'nodemw' ),
readline = require( 'readline' ),
- c = require( 'ansi-colors' ),
+ c = require( 'ansicolors' ),
rl = readline.createInterface( {
input: process.stdin,
output: process.stdout
@@ -33,9 +33,9 @@
function session( err, content ) {
params.content = co... |
c01248767fc5f6b2ffb755f02bd32287c21ae8e4 | google-services-list.user.js | google-services-list.user.js | // ==UserScript==
// @name Google Service List
// @namespace wsmwason.google.service.list
// @description List all Google services on support page, and auto redirect to product url.
// @include https://support.google.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @... | // ==UserScript==
// @name Google Services List
// @namespace wsmwason.google.services.list
// @description List all Google services on support page, and auto redirect to product url.
// @include https://support.google.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
//... | Update script name and namespace | Update script name and namespace
| JavaScript | mit | wsmwason/google-services-list | ---
+++
@@ -1,11 +1,11 @@
// ==UserScript==
-// @name Google Service List
-// @namespace wsmwason.google.service.list
+// @name Google Services List
+// @namespace wsmwason.google.services.list
// @description List all Google services on support page, and auto redirect to product url.
// @include... |
58a5b2b5c69343b684ecb6db9cd9e43bb8f37747 | app/plugins/wildflower/jlm/controllers/components/write_new.js | app/plugins/wildflower/jlm/controllers/components/write_new.js | $.jlm.component('WriteNew', 'wild_posts.wf_index, wild_posts.wf_edit, wild_pages.wf_index, wild_pages.wf_edit', function() {
$('#sidebar .add').click(function() {
var buttonEl = $(this);
var formAction = buttonEl.attr('href');
var templatePath = 'posts/new_post';
var pa... | $.jlm.component('WriteNew', 'wild_posts.wf_index, wild_posts.wf_edit, wild_pages.wf_index, wild_pages.wf_edit', function() {
$('#sidebar .add').click(function() {
var buttonEl = $(this);
var formAction = buttonEl.attr('href');
var templatePath = 'posts/new_post';
var pa... | Write new page parent select box bug fixed | Write new page parent select box bug fixed
| JavaScript | mit | klevo/wildflower,klevo/wildflower,klevo/wildflower | ---
+++
@@ -9,6 +9,7 @@
if ($.jlm.params.controller == 'wild_pages') {
templatePath = 'pages/new_page';
parentPageOptions = $('.all-page-parents').html();
+ parentPageOptions = parentPageOptions.replace('[Page]', '[WildPage]');
parentPageOptions = parentPageO... |
86e08d1d638656ff5c655bb9af4d658330907edf | test/idle-timer_test.js | test/idle-timer_test.js | (function($) {
/*
======== A Handy Little QUnit Reference ========
http://docs.jquery.com/QUnit
Test methods:
expect(numAssertions)
stop(increment)
start(decrement)
Test assertions:
ok(value, [message])
equal(actual, expected, [message])
notEqual(actual, expected, [message])
deepEqual(actu... | (function($) {
/*
======== A Handy Little QUnit Reference ========
http://docs.jquery.com/QUnit
Test methods:
expect(numAssertions)
stop(increment)
start(decrement)
Test assertions:
ok(value, [message])
equal(actual, expected, [message])
notEqual(actual, expected, [message])
deepEqual(actu... | Destroy idle timer instance after test has finished | Destroy idle timer instance after test has finished
| JavaScript | mit | thorst/jquery-idletimer,amitabhaghosh197/jquery-idletimer,dpease/jquery-idletimer,amitabhaghosh197/jquery-idletimer,dpease/jquery-idletimer,thorst/jquery-idletimer | ---
+++
@@ -26,6 +26,7 @@
$( document ).on( "idle.idleTimer", function(){
ok( true, "idleTime fires at document by default" );
start();
+ $.idleTimer( "destroy" );
});
$.idleTimer( 100 );
}); |
43906d08af184b3c20bb201dedf1d79de7dd8549 | node-tests/unit/linting-compiler-test.js | node-tests/unit/linting-compiler-test.js | 'use strict';
var assert = require('assert');
var buildTemplateCompiler = require('../helpers/template-compiler');
describe('Ember template compiler', function() {
var templateCompiler;
beforeEach(function() {
templateCompiler = buildTemplateCompiler();
});
it('sanity: compiles templates', function() {
... | 'use strict';
var assert = require('assert');
var _compile = require('htmlbars').compile;
describe('Ember template compiler', function() {
var astPlugins;
function compile(template) {
return _compile(template, {
plugins: {
ast: astPlugins
}
});
}
beforeEach(function() {
astPl... | Fix issues with HTMLBars parser transition. | Fix issues with HTMLBars parser transition.
| JavaScript | mit | rwjblue/ember-cli-template-lint,oriSomething/ember-cli-template-lint,oriSomething/ember-template-lint,rwjblue/ember-cli-template-lint,rwjblue/ember-template-lint,oriSomething/ember-cli-template-lint | ---
+++
@@ -1,18 +1,26 @@
'use strict';
var assert = require('assert');
-var buildTemplateCompiler = require('../helpers/template-compiler');
+var _compile = require('htmlbars').compile;
describe('Ember template compiler', function() {
- var templateCompiler;
+ var astPlugins;
+
+ function compile(template)... |
4cc6f5ff25db2cc61cb153a6d60e6a5d5d4a6588 | lib/install/action/update-linked.js | lib/install/action/update-linked.js | 'use strict'
var path = require('path')
module.exports = function (top, buildpath, pkg, log, next) {
if (pkg.package.version !== pkg.oldPkg.package.version)
log.warn('update-linked', path.relative(top, pkg.path), 'needs updating to', pkg.package.version,
'from', pkg.oldPkg.package.version, "but we can't, a... | 'use strict'
var path = require('path')
module.exports = function (top, buildpath, pkg, log, next) {
if (pkg.package.version !== pkg.oldPkg.package.version) {
log.warn('update-linked', path.relative(top, pkg.path), 'needs updating to', pkg.package.version,
'from', pkg.oldPkg.package.version, "but we can't,... | Fix up style to meet requirements for build | Fix up style to meet requirements for build
| JavaScript | artistic-2.0 | DaveEmmerson/npm,DaveEmmerson/npm,DaveEmmerson/npm | ---
+++
@@ -2,8 +2,9 @@
var path = require('path')
module.exports = function (top, buildpath, pkg, log, next) {
- if (pkg.package.version !== pkg.oldPkg.package.version)
+ if (pkg.package.version !== pkg.oldPkg.package.version) {
log.warn('update-linked', path.relative(top, pkg.path), 'needs updating to', ... |
26e229add96b3fbf67a15bb3465832881ced5023 | infrastructure/table-creation-wait.js | infrastructure/table-creation-wait.js | exports.runWhenTableIs = function (tableName, desiredStatus, db, callback) {
var describeParams = {};
describeParams.TableName = tableName;
db.describeTable(describeParams, function (err, data) {
if (data.Table.TableStatus === desiredStatus) {
callback();
} else{
va... | exports.runWhenTableIs = function (tableName, desiredStatus, db, callback) {
var describeParams = {};
describeParams.TableName = tableName;
db.describeTable(describeParams, function (err, data) {
if (err) {
console.log(err);
} else if (data.Table.TableStatus === desiredStatus) ... | Check for error and print when waiting for a particular table status. | Check for error and print when waiting for a particular table status.
| JavaScript | apache-2.0 | timg456789/musical-octo-train,timg456789/musical-octo-train,timg456789/musical-octo-train | ---
+++
@@ -4,7 +4,9 @@
describeParams.TableName = tableName;
db.describeTable(describeParams, function (err, data) {
- if (data.Table.TableStatus === desiredStatus) {
+ if (err) {
+ console.log(err);
+ } else if (data.Table.TableStatus === desiredStatus) {
cal... |
470b44113fc07de8ada5b10a64a938177961347b | js/locales/bootstrap-datepicker.fi.js | js/locales/bootstrap-datepicker.fi.js | /**
* Finnish translation for bootstrap-datepicker
* Jaakko Salonen <https://github.com/jsalonen>
*/
;(function($){
$.fn.datepicker.dates['fi'] = {
days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai", "sunnuntai"],
daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "... | /**
* Finnish translation for bootstrap-datepicker
* Jaakko Salonen <https://github.com/jsalonen>
*/
;(function($){
$.fn.datepicker.dates['fi'] = {
days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai", "sunnuntai"],
daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "... | Fix Finnish week start to Monday, add format | Fix Finnish week start to Monday, add format
Finns *always* start their week on Mondays.
The d.m.yyyy date format is the most common one. | JavaScript | apache-2.0 | oller/foundation-datepicker-sass,abnovak/bootstrap-sass-datepicker,rocLv/bootstrap-datepicker,rstone770/bootstrap-datepicker,wetet2/bootstrap-datepicker,Azaret/bootstrap-datepicker,osama9/bootstrap-datepicker,zhaoyan158567/bootstrap-datepicker,bitzesty/bootstrap-datepicker,HNygard/bootstrap-datepicker,wetet2/bootstrap-... | ---
+++
@@ -9,6 +9,8 @@
daysMin: ["su", "ma", "ti", "ke", "to", "pe", "la", "su"],
months: ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"],
monthsShort: ["tam", "hel", "maa", "huh", "tou", "kes", "hei", "elo", "syy"... |
caa5746cb434bfa17731d00e25f2272aed89ccd0 | js/locales/bootstrap-datepicker.mk.js | js/locales/bootstrap-datepicker.mk.js | /**
* Macedonian translation for bootstrap-datepicker
* Marko Aleksic <psybaron@gmail.com>
*/
;(function($){
$.fn.datepicker.dates['mk'] = {
days: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота", "Недела"],
daysShort: ["Нед", "Пон", "Вто", "Сре", "Чет", "Пет", "Саб", "Н... | /**
* Macedonian translation for bootstrap-datepicker
* Marko Aleksic <psybaron@gmail.com>
*/
;(function($){
$.fn.datepicker.dates['mk'] = {
days: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота", "Недела"],
daysShort: ["Нед", "Пон", "Вто", "Сре", "Чет", "Пет", "Саб", "Н... | Change month format from 'MM' to 'mm'. | Change month format from 'MM' to 'mm'. | JavaScript | apache-2.0 | christophercaburog/bootstrap-datepicker,huang-x-h/bootstrap-datepicker,wearespindle/datepicker-js,joubertredrat/bootstrap-datepicker,riyan8250/bootstrap-datepicker,otnavle/bootstrap-datepicker,NFC-DITO/bootstrap-datepicker,osama9/bootstrap-datepicker,SimpleUpdates/bootstrap-datepicker,mfunkie/bootstrap-datepicker,defri... | ---
+++
@@ -10,6 +10,6 @@
months: ["Јануари", "Февруари", "Март", "Април", "Мај", "Јуни", "Јули", "Август", "Септември", "Октомври", "Ноември", "Декември"],
monthsShort: ["Јан", "Фев", "Мар", "Апр", "Мај", "Јун", "Јул", "Авг", "Сеп", "Окт", "Ное", "Дек"],
today: "Денес",
- format: "d... |
e087fe25c546b1a142727b56da4751f18c46f2cb | katas/libraries/hamjest/assertThat.js | katas/libraries/hamjest/assertThat.js | import { assertThat, equalTo, containsString } from 'hamjest';
describe('The core function, `assertThat()`', () => {
it('is a function', () => {
const typeOfAssertThat = typeof assertThat;
assertThat(typeOfAssertThat, equalTo('function'));
});
describe('requires at least two params', () => {
it('1st:... | import {
assertThat, equalTo,
containsString, throws, returns,
} from 'hamjest';
describe('The core function, `assertThat()`', () => {
it('is a function', () => {
const typeOfAssertThat = typeof assertThat;
assertThat(typeOfAssertThat, equalTo('function'));
});
describe('requires at least two params'... | Add a little under-the-hood tests. | Add a little under-the-hood tests.
| JavaScript | mit | tddbin/katas,tddbin/katas,tddbin/katas | ---
+++
@@ -1,4 +1,7 @@
-import { assertThat, equalTo, containsString } from 'hamjest';
+import {
+ assertThat, equalTo,
+ containsString, throws, returns,
+} from 'hamjest';
describe('The core function, `assertThat()`', () => {
it('is a function', () => {
@@ -24,4 +27,15 @@
});
});
});
+
+ de... |
b7d600cdf1d870e2ffba4fd7c64a94156fadb5b9 | src/delir-core/tests/project/project-spec.js | src/delir-core/tests/project/project-spec.js | import Project from '../../src/project/project'
import Asset from '../../src/project/asset'
import Composition from '../../src/project/composition'
import TimeLane from '../../src/project/timelane'
import Layer from '../../src/project/layer'
describe('project structure specs', () => {
describe('Project', () => {
... | import Project from '../../src/project/project'
import Asset from '../../src/project/asset'
import Composition from '../../src/project/composition'
import TimeLane from '../../src/project/timelane'
import Clip from '../../src/project/clip'
describe('project structure specs', () => {
describe('Project', () => {
... | Replace `Layer` to `Clip` on Project structure spec` | Replace `Layer` to `Clip` on Project structure spec`
| JavaScript | mit | Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir | ---
+++
@@ -2,7 +2,7 @@
import Asset from '../../src/project/asset'
import Composition from '../../src/project/composition'
import TimeLane from '../../src/project/timelane'
-import Layer from '../../src/project/layer'
+import Clip from '../../src/project/clip'
describe('project structure specs', () => {
d... |
499b227e4ec6bd00899363366c2520c9c2be151c | tests/frontend/index.js | tests/frontend/index.js | module.exports = {
"open index page": function(browser) {
browser
.url(browser.globals.url)
.waitForElementVisible("#index-view", 3000)
.assert.containsText("#header .logo:nth-child(2)", "Color Themes")
.waitForElementVisible(".pending-icon", 100)
... | module.exports = {
"open index page": function(browser) {
browser
.url(browser.globals.url)
.waitForElementVisible("#index-view", 3000)
.assert.containsText("#header .logo:nth-child(2)", "Color Themes")
.waitForElementVisible(".pending-icon", 100)
... | Add new test for opening pages | Add new test for opening pages
| JavaScript | mit | y-a-r-g/color-themes,y-a-r-g/color-themes | ---
+++
@@ -8,5 +8,15 @@
.waitForElementVisible(".preview-list", 5000)
.assert.containsText(".pager .current", "1")
.end();
+ },
+
+ "open next page": function(browser) {
+ browser
+ .url(browser.globals.url)
+ .waitForElementVisible(".page... |
fba049eecf0689317634e892fd2f3c59f221d0f9 | tests/e2e/utils/activate-amp-and-set-mode.js | tests/e2e/utils/activate-amp-and-set-mode.js |
/**
* WordPress dependencies
*/
import { activatePlugin, visitAdminPage } from '@wordpress/e2e-test-utils';
/**
* The allow list of AMP modes.
*/
export const allowedAMPModes = {
standard: 'standard',
transitional: 'transitional',
reader: 'disabled',
};
/**
* Activate AMP and set it to the correct mode.
*
... |
/**
* WordPress dependencies
*/
import { activatePlugin, visitAdminPage } from '@wordpress/e2e-test-utils';
/**
* The allow list of AMP modes.
*/
export const allowedAMPModes = {
primary: 'standard',
secondary: 'transitional',
standard: 'standard',
transitional: 'transitional',
reader: 'disabled',
};
/**
*... | Add aliase for primary and secondary AMP modes. | Add aliase for primary and secondary AMP modes.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | ---
+++
@@ -8,6 +8,8 @@
* The allow list of AMP modes.
*/
export const allowedAMPModes = {
+ primary: 'standard',
+ secondary: 'transitional',
standard: 'standard',
transitional: 'transitional',
reader: 'disabled', |
d2f7499fc65d63769027f2498dccb5d9b4924fd6 | pages/index.js | pages/index.js | import React from 'react'
import Head from 'next/head'
import {MDXProvider} from '@mdx-js/react'
import IndexMDX from './index.mdx'
import CodeBlock from '../doc-components/CodeBlock'
const components = {
pre: props => <div {...props} />,
code: CodeBlock
}
export default () => (
<MDXProvider components={compon... | import React from 'react'
import Head from 'next/head'
import {MDXProvider} from '@mdx-js/react'
import IndexMDX from './index.mdx'
import CodeBlock from '../doc-components/CodeBlock'
const components = {
pre: props => <div {...props} />,
code: CodeBlock
}
export default () => (
<MDXProvider components={compon... | Add canonical url for docs | Add canonical url for docs
| JavaScript | mit | miduga/react-slidy | ---
+++
@@ -20,6 +20,7 @@
name="description"
content="A carousel component for React with the basics. It just works. For minimal setup and needs. Focused on performance ⚡"
/>
+ <link rel="canonical" href="https://react-slidy.midu.dev/" />
</Head>
<IndexMDX />
<style jsx gl... |
d85d4bc34ad869b20b4027d5f32c5ca64e4e4c3e | public/utility.js | public/utility.js | module.exports = {
generateQueryString: function (data) {
var ret = []
for (var d in data)
if (data[d])
ret.push(encodeURIComponent(d) + "=" + encodeURIComponent(data[d]))
return ret.join("&")
},
base64Encoding: function (data) {
return new Buffer(data).toString('base64')
},
ba... | module.exports = {
generateQueryString: function (data) {
var ret = []
for (var d in data)
if (data[d])
ret.push(encodeURIComponent(d) + "=" + encodeURIComponent(data[d]))
return ret.join("&")
},
base64Encoding: function (data) {
return new Buffer(data).toString('base64')
},
ba... | Add Input White List Checker to Utility | Add Input White List Checker to Utility
| JavaScript | mit | Flieral/Publisher-Service,Flieral/Publisher-Service | ---
+++
@@ -21,5 +21,17 @@
stringReplace: function (source, find, replace) {
return source.replace(find, replace)
+ },
+
+ inputChecker: function (reqInput, whiteList) {
+ var input = Object.keys(reqInput)
+ if (input.length != whiteList.length)
+ return false
+
+ for (var i = 0; i < whiteLi... |
be3aab27fb4ec87679a0734335fb5f67b1c691fe | lib/themes/dosomething/paraneue_dosomething/js/url/helpers.js | lib/themes/dosomething/paraneue_dosomething/js/url/helpers.js | /**
* Get a specified segment from the pathname.
*
* @param {String} pathname
* @param {Number} segment
* @return {Boolean}
*/
export function getPathnameSegment(pathname = window.location.pathname, segmentIndex = 0) {
let segments = pathname.split('/');
segments.splice(0,1);
return segments[segmentInde... | /**
* Get a specified segment from the pathname.
*
* @param {String} pathname
* @param {Number} segment
* @return {Boolean}
*/
export function getPathnameSegment(pathname = window.location.pathname, segmentIndex = 0) {
let segments = pathname.split('/');
segmentIndex++;
return segments[segmentIndex];
}
| Update to increase index insted of splicing first item off array. | Update to increase index insted of splicing first item off array.
| JavaScript | mit | DoSomething/dosomething,sergii-tkachenko/phoenix,mshmsh5000/dosomething-1,mshmsh5000/dosomething-1,DoSomething/dosomething,DoSomething/phoenix,sergii-tkachenko/phoenix,DoSomething/dosomething,deadlybutter/phoenix,deadlybutter/phoenix,sergii-tkachenko/phoenix,mshmsh5000/dosomething-1,DoSomething/dosomething,DoSomething/... | ---
+++
@@ -7,8 +7,7 @@
*/
export function getPathnameSegment(pathname = window.location.pathname, segmentIndex = 0) {
let segments = pathname.split('/');
-
- segments.splice(0,1);
+ segmentIndex++;
return segments[segmentIndex];
} |
3c95819895253b77edcfcdd6760a846f590c9210 | src/InputHeader.js | src/InputHeader.js | import React from 'react'
import { Component } from 'react'
class InputHeader extends Component {
focus = () => {
this.refs.inputHeader.focus()
}
blur = () => {
this.refs.inputHeader.blur()
}
render() {
return (
<div className="selectize-input items not-full has-options">
<input t... | import React from 'react'
import { Component } from 'react'
class InputHeader extends Component {
focus = () => {
this._input.focus()
}
blur = () => {
this._input.blur()
}
render() {
return (
<div className="selectize-input items not-full has-options">
<input type="text" classNam... | Change ref from string to callback | Change ref from string to callback
| JavaScript | mit | andynoelker/react-data-select | ---
+++
@@ -3,18 +3,18 @@
class InputHeader extends Component {
focus = () => {
- this.refs.inputHeader.focus()
+ this._input.focus()
}
blur = () => {
- this.refs.inputHeader.blur()
+ this._input.blur()
}
render() {
return (
<div className="selectize-input items not-full ... |
83bea17aff9f4c3d6adcdf88b3f1661be9b92c15 | middleware/protect.js | middleware/protect.js | var UUID = require('./../uuid' );
function forceLogin(keycloak, request, response) {
var host = request.hostname;
var headerHost = request.headers.host.split(':');
var port = headerHost[1] || '';
var protocol = request.protocol;
var redirectUrl = protocol + '://' + host + ( port === '' ? '' : ':' + port ) +... | var UUID = require('./../uuid' );
function forceLogin(keycloak, request, response) {
var host = request.hostname;
var headerHost = request.headers.host.split(':');
var port = headerHost[1] || '';
var protocol = request.protocol;
var redirectUrl = protocol + '://' + host + ( port === '' ? '' : ':' + port ) +... | Use token.hasRole to check for roles of other apps | Use token.hasRole to check for roles of other apps
| JavaScript | apache-2.0 | keycloak/keycloak-nodejs-connect,keycloak/keycloak-nodejs-connect,abstractj/keycloak-nodejs-connect,abstractj/keycloak-nodejs-connect,abstractj/keycloak-nodejs-connect,keycloak/keycloak-nodejs-connect | ---
+++
@@ -16,14 +16,7 @@
}
function simpleGuard(role,token) {
- if ( role.indexOf( "app:" ) === 0 ) {
- return token.hasApplicationRole( role.substring( 4 ) );
- }
- if ( role.indexOf( "realm:" ) === 0 ) {
- return token.hasRealmRole( role.substring( 6 ) );
- }
-
- return false;
+ return token.hasRo... |
1352d718c2229c64dd6e981937efebfe6c3ddf60 | dxr/static/js/panel.js | dxr/static/js/panel.js | $(function() {
var panelContent = $('#panel-content');
/**
* Toggles the ARIA expanded and hidden attributes' state.
*
* @param Object elem The element on which to toggle the attribute.
*/
function toggleAria(elem) {
var expandedState = elem.attr('aria-expanded') === 'true' ? 'f... | $(function() {
var panelContent = $('#panel-content');
/**
* Toggles the ARIA expanded and hidden attributes' state.
*
* @param Object elem The element on which to toggle the attribute.
*/
function toggleAria(elem) {
var expandedState = elem.attr('aria-expanded') === 'true' ? 'f... | Make ARIA attrs actually update. | Make ARIA attrs actually update.
| JavaScript | mit | pombredanne/dxr,pelmers/dxr,gartung/dxr,erikrose/dxr,jbradberry/dxr,jbradberry/dxr,kleintom/dxr,srenatus/dxr,srenatus/dxr,pombredanne/dxr,gartung/dxr,bozzmob/dxr,KiemVM/Mozilla--dxr,jay-z007/dxr,jbradberry/dxr,pombredanne/dxr,bozzmob/dxr,pombredanne/dxr,pelmers/dxr,jay-z007/dxr,nrc/dxr,jay-z007/dxr,kleintom/dxr,nrc/dxr... | ---
+++
@@ -9,8 +9,8 @@
function toggleAria(elem) {
var expandedState = elem.attr('aria-expanded') === 'true' ? 'false' : 'true';
var hiddenState = elem.attr('aria-hidden') === 'true' ? 'false' : 'true';
- elem.attr('aria-hidden', state);
- elem.attr('aria-expanded', state);
+ ... |
cf3d28d03ef9761001799e4224ce38f65c869de4 | src/networking/auth.js | src/networking/auth.js | import * as ACTION_TYPES from '../constants/action_types'
function extractToken(hash, oldToken) {
const match = hash.match(/access_token=([^&]+)/)
let token = !!match && match[1]
if (!token) {
token = oldToken
}
return token
}
export function checkAuth(dispatch, oldToken, location) {
const token = ext... | import * as ACTION_TYPES from '../constants/action_types'
function extractToken(hash, oldToken) {
const match = hash.match(/access_token=([^&]+)/)
let token = !!match && match[1]
if (!token) {
token = oldToken
}
return token
}
export function checkAuth(dispatch, oldToken, location) {
const token = ext... | Remove unnecessary whitespace from url string. | Remove unnecessary whitespace from url string. | JavaScript | mit | ello/webapp,ello/webapp,ello/webapp | ---
+++
@@ -29,13 +29,11 @@
},
})
} else {
- const url = `${ENV.AUTH_DOMAIN}/api/oauth/authorize.html
- ?response_type=token
- &scope=web_app+public
- &client_id=${ENV.AUTH_CLIENT_ID}
- &redirect_uri=${ENV.AUTH_REDIRECT_URI}`
-
- window.location.href = url
+ const urlArr = ... |
41ffe8f6551fcf98eaba292a82e94a6bfa382486 | chrome/background.js | chrome/background.js | /*global chrome, console*/
console.log("background.js");
chrome.runtime.getBackgroundPage(function() {
console.log("getBackgroundPage", arguments);
});
chrome.runtime.onMessageExternal.addListener(function(message, sender, sendResponse) {
console.log("onMessageExternal", arguments);
});
| /*global chrome, console*/
// NOT USED
console.log("background.js");
chrome.runtime.getBackgroundPage(function() {
console.log("getBackgroundPage", arguments);
});
chrome.runtime.onMessageExternal.addListener(function(message, sender, sendResponse) {
console.log("onMessageExternal", arguments);
});
| Add comment to say this file isn't used. | Add comment to say this file isn't used.
| JavaScript | mit | gitgrimbo/settlersonlinesimulator,gitgrimbo/settlersonlinesimulator | ---
+++
@@ -1,4 +1,6 @@
/*global chrome, console*/
+
+// NOT USED
console.log("background.js");
|
975685740c083d4e3d73a238e8220ce7255777f1 | bookmarklet.js | bookmarklet.js | /**
* Download FuckMyDom and call slowly()
**/
(function( window, document, undefined ) {
var stag;
if( !window.FuckMyDom ) {
stag = document.createElement( 'script' );
stag.setAttribute( 'src', 'http://mhgbrown.github.io/fuck-my-dom/fuck-my-dom.js' );
stag.onload = function(){ FuckMyDom.slowly(); }... | /**
* Download FuckMyDom and call slowly()
**/
(function( window, document, undefined ) {
var stag;
if( !window.FuckMyDom ) {
stag = document.createElement( 'script' );
stag.setAttribute( 'src', 'https://mhgbrown.github.io/fuck-my-dom/fuck-my-dom.js' );
stag.onload = function(){ FuckMyDom.slowly(); ... | Load fuck my dom over https | Load fuck my dom over https | JavaScript | mit | mhgbrown/fuck-my-dom | ---
+++
@@ -7,7 +7,7 @@
if( !window.FuckMyDom ) {
stag = document.createElement( 'script' );
- stag.setAttribute( 'src', 'http://mhgbrown.github.io/fuck-my-dom/fuck-my-dom.js' );
+ stag.setAttribute( 'src', 'https://mhgbrown.github.io/fuck-my-dom/fuck-my-dom.js' );
stag.onload = function(){ FuckM... |
cd5790825ab7b3f3b57b1735f699c21c4a82fc35 | bookmarklet.js | bookmarklet.js | javascript:(function(){$("tr.file-diff-line > td.diff-line-num-addition.empty-cell").each(function(index,cell){var line=$(cell).parent().attr('data-line');var path=$(cell).parent().attr('data-path');var repoRoot='/Users/nick/reporoot/';var openInTextmateUrl='txmt://open?url=file://'+repoRoot+path+'&line='+line;$(cell).... | javascript:!function(){$("tr.file-diff-line > td.diff-line-num-addition.empty-cell").each(function(a,b){var c=$(b).parent().attr("data-line"),d=$(b).parent().attr("data-path"),e="/Users/nick/reporoot/",f="txmt://open?url=file://"+e+d+"&line="+c;$(b).html('<a href="'+f+'">Txmt</a>')})}(window,jQuery);
| Use uglifyjs to minify instead | Use uglifyjs to minify instead | JavaScript | mit | nicolasartman/pullmate | ---
+++
@@ -1 +1 @@
-javascript:(function(){$("tr.file-diff-line > td.diff-line-num-addition.empty-cell").each(function(index,cell){var line=$(cell).parent().attr('data-line');var path=$(cell).parent().attr('data-path');var repoRoot='/Users/nick/reporoot/';var openInTextmateUrl='txmt://open?url=file://'+repoRoot+path... |
04ff19fca9ffa556bed81950430b9f2257b13841 | front-end/src/components/shared/Footer.js | front-end/src/components/shared/Footer.js | import React, { Component } from 'react'
import '../../css/style.css'
import FA from 'react-fontawesome'
class Footer extends Component {
render(){
return(
<div className="Footer" >
<br />
<FA
name="linkedin"
border={true}
size=... | import React, { Component } from 'react'
import '../../css/style.css'
import FA from 'react-fontawesome'
class Footer extends Component {
render(){
return(
<div className="Footer" >
<br />
<FA
name="linkedin"
border={true}
size=... | Update for github commit settings | Update for github commit settings
| JavaScript | mit | iankhor/medrefr,iankhor/medrefr | ---
+++
@@ -21,7 +21,7 @@
size="2x"
/>
<br />
- <p>Designed with ❤️ by .this</p>
+ <p>Beautifully designed with ❤️ by .this</p>
</div>
)
} |
ac4c46cf46c6f27bdc26cbbd4a2d37989cc2d0ed | src/ActiveRules.js | src/ActiveRules.js | 'use strict'
const { Fact, Rule, Operator, Engine } = require('json-rules-engine')
class ActiveRules {
constructor () {
this.Fact = Fact
this.Rule = Rule
this.Operator = Operator
this.Engine = Engine
}
}
module.exports = ActiveRules
| 'use strict'
const { Fact, Rule, Operator, Engine } = require('json-rules-engine')
const djv = require('djv');
class ActiveRules {
constructor () {
this.Fact = Fact
this.Rule = Rule
this.Operator = Operator
this.Engine = Engine
this.Validator = djv;
}
}
module.exports = ActiveRules
| Add JSON Validator based on djv | Add JSON Validator based on djv | JavaScript | mit | bwinkers/ActiveRules-Server | ---
+++
@@ -1,6 +1,8 @@
'use strict'
const { Fact, Rule, Operator, Engine } = require('json-rules-engine')
+
+const djv = require('djv');
class ActiveRules {
constructor () {
@@ -8,6 +10,7 @@
this.Rule = Rule
this.Operator = Operator
this.Engine = Engine
+ this.Validator = djv;
}
}
|
a53181a444acf6b91db6ccbc41f5c4dc55c4b2a4 | e2e/e2e.conf.js | e2e/e2e.conf.js | var HtmlReporter = require('protractor-html-screenshot-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'*.js'
],
multiCapabilities: [{
'browserName': 'chrome'
// }, {
// 'browserName': 'firefox'
}],
baseUrl: 'http://localhost:9001/',
framework: 'jasmine',
jasmin... | var HtmlReporter = require('protractor-html-screenshot-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'*.js'
],
sauceUser: 'mkuzak',
sauceKey: '2e7a055d-0a1d-40ce-81dd-f6bff479c555',
multiCapabilities: [{
'browserName': 'chrome',
'version': '39.0',
'platform': 'WIN8_1'... | Use sauce labs for e2e tests | Use sauce labs for e2e tests
| JavaScript | apache-2.0 | NLeSC/PattyVis,NLeSC/PattyVis | ---
+++
@@ -7,10 +7,25 @@
'*.js'
],
+ sauceUser: 'mkuzak',
+ sauceKey: '2e7a055d-0a1d-40ce-81dd-f6bff479c555',
+
multiCapabilities: [{
- 'browserName': 'chrome'
- // }, {
- // 'browserName': 'firefox'
+ 'browserName': 'chrome',
+ 'version': '39.0',
+ 'platform': 'WIN8_1'
+ }, {
+ ... |
da8de07075912bdfa163efdfeac6b5b4237f8928 | src/ProjectInfo.js | src/ProjectInfo.js | import React, { PropTypes } from 'react';
export default function ProjectInfo({ projectData }) {
// console.log('projectData: ', projectData);
const {
urls,
photo,
name
} = projectData;
const url = urls.web.project;
const photoSrc = photo.med;
return (
<div className="project-info">
<... | import React, { PropTypes } from 'react';
export default function ProjectInfo({ projectData }) {
// console.log('projectData: ', projectData);
const {
urls,
photo,
name
} = projectData;
if (!urls || !photo) return null;
return (
<div className="project-info">
<a href={urls.web.project} ... | Handle not having loaded all projectdata yet | Handle not having loaded all projectdata yet
| JavaScript | mit | peteruithoven/KickstarterStatus,peteruithoven/KickstarterStatus,peteruithoven/KickstarterStatus | ---
+++
@@ -7,13 +7,12 @@
photo,
name
} = projectData;
- const url = urls.web.project;
- const photoSrc = photo.med;
+ if (!urls || !photo) return null;
return (
<div className="project-info">
- <a href={url} target="_blank">
+ <a href={urls.web.project} target="_blank">
<di... |
f9025b6288b23cad196aec602d97b8536ccb45ee | ZombieRun4HTML5/js/zombie.js | ZombieRun4HTML5/js/zombie.js | function Zombie(map, location) {
this._map = map;
this._location = location;
var markerimage = new google.maps.MarkerImage(
"res/zombie_meandering.png",
new google.maps.Size(14, 30));
this._marker = new google.maps.Marker({
position:location,
map:map,
title:"Zombie",
ico... | var Zombie = Class.create({
initialize: function(map, location) {
this.map = map;
this.location = location;
var markerimage = new google.maps.MarkerImage(
"res/zombie_meandering.png",
new google.maps.Size(14, 30));
this.marker = new google.maps.Marker({
position:this.locat... | Convert the Zombie to a Prototype class. | Convert the Zombie to a Prototype class. | JavaScript | mit | waynecorbett/z,Arifsetiadi/zombie-run,yucemahmut/zombie-run,waynecorbett/z,malizadehq/zombie-run,malizadehq/zombie-run,mroshow/zombie-run,yucemahmut/zombie-run,tropikhajma/zombie-run,tropikhajma/zombie-run,Arifsetiadi/zombie-run,yucemahmut/zombie-run,mroshow/zombie-run,malizadehq/zombie-run,yucemahmut/zombie-run,Arifse... | ---
+++
@@ -1,20 +1,22 @@
-function Zombie(map, location) {
- this._map = map;
- this._location = location;
+var Zombie = Class.create({
+ initialize: function(map, location) {
+ this.map = map;
+ this.location = location;
- var markerimage = new google.maps.MarkerImage(
- "res/zombie_meandering.... |
3095917c0871ce437b74329f314ba5d65e8ff489 | examples/clear/index.js | examples/clear/index.js | #!/usr/bin/env node
/**
* Like GNU ncurses "clear" command.
* https://github.com/mscdex/node-ncurses/blob/master/deps/ncurses/progs/clear.c
*/
require('../../')(process.stdout)
.eraseData(2)
.goto(1, 1)
| #!/usr/bin/env node
/**
* Like GNU ncurses "clear" command.
* https://github.com/mscdex/node-ncurses/blob/master/deps/ncurses/progs/clear.c
*/
function lf () { return '\n' }
require('../../')(process.stdout)
.write(Array.apply(null, Array(process.stdout.getWindowSize()[1])).map(lf).join(''))
.eraseData(2)
.... | Make 'clear' command work on Windows. | Make 'clear' command work on Windows.
| JavaScript | mit | TooTallNate/ansi.js,kasicka/ansi.js | ---
+++
@@ -5,6 +5,9 @@
* https://github.com/mscdex/node-ncurses/blob/master/deps/ncurses/progs/clear.c
*/
+function lf () { return '\n' }
+
require('../../')(process.stdout)
+ .write(Array.apply(null, Array(process.stdout.getWindowSize()[1])).map(lf).join(''))
.eraseData(2)
.goto(1, 1) |
d2d174a6953c247abad372f804cb5db356244779 | packages/imon-scatter/imon_scatter.js | packages/imon-scatter/imon_scatter.js | Settings = {
chart: {
padding: { right: 40, bottom: 80 },
margins: { top: 30, bottom: 0, right: 35 },
dots: {
size: 5,
color: '#378E00',
opacity: 0.7
}
},
defaultData: {
title: 'Scatter Plot',
x: {
indicator: 'ipr', // Percentage of individuals using the Internet
... | Settings = {
chart: {
padding: { right: 40, bottom: 80 },
margins: { top: 30, bottom: 0, right: 35 },
dots: {
size: 5,
color: '#378E00',
opacity: 0.7
}
},
defaultData: {
title: 'Scatter Plot',
x: {
indicator: 'ipr', // Percentage of individuals using the Internet
... | Change 'Scatter Plot' to 'Scatterplot' | Change 'Scatter Plot' to 'Scatterplot'
| JavaScript | mit | berkmancenter/internet_dashboard,berkmancenter/internet_dashboard,blaringsilence/internet_dashboard,blaringsilence/internet_dashboard,berkmancenter/internet_dashboard | ---
+++
@@ -33,7 +33,7 @@
IMonScatter = {
widget: {
- name: 'Scatter Plot',
+ name: 'Scatterplot',
description: 'Shows a scatterplot of two chosen metrics from the Internet Monitor dataset across all countries',
url: 'https://thenetmonitor.org/sources',
dimensions: { width: 3, height: 2 }, |
3a20e160d532d82895251ca568378bf903ba67c1 | app/users/user-links.directive.js | app/users/user-links.directive.js | {
angular
.module('meganote.users')
.directive('userLinks', [
'CurrentUser',
(CurrentUser) => {
class UserLinksController {
user() {
return CurrentUser.get();
}
signedIn() {
return CurrentUser.signedIn();
}
}
... | {
angular
.module('meganote.users')
.directive('userLinks', [
'AuthToken',
'CurrentUser',
(AuthToken, CurrentUser) => {
class UserLinksController {
user() {
return CurrentUser.get();
}
signedIn() {
return CurrentUser.signedIn()... | Add logout link and method | Add logout link and method
| JavaScript | mit | sbaughman/meganote,sbaughman/meganote | ---
+++
@@ -3,9 +3,10 @@
.module('meganote.users')
.directive('userLinks', [
+ 'AuthToken',
'CurrentUser',
- (CurrentUser) => {
+ (AuthToken, CurrentUser) => {
class UserLinksController {
user() {
@@ -13,6 +14,10 @@
}
signedIn() {
... |
4fa12570580a6c81a1cf3eb64e68aef0966b7b67 | ObjectPoolMaker.js | ObjectPoolMaker.js | (function () {
'use strict';
function ObjectPoolMaker(Constructor, size) {
var objectPool = [],
marker = 0,
poolSize = size || 0;
if (poolSize) {
expandPool(poolSize);
}
function expandPool(newSize) {
var i;
for (i = 0; i < newSize - poolSize; i++) {
obj... | (function () {
'use strict';
function ObjectPoolMaker(Constructor, size) {
var objectPool = [],
nextAvailableIndex = 0,
poolSize = size || 1;
if (poolSize) {
expandPool(poolSize);
}
function expandPool(newSize) {
var i;
for (i = 0; i < newSize - poolSize; i++) {... | Rename "marker" to "nextAvailableIndex" for better readability | Rename "marker" to "nextAvailableIndex" for better readability
* Initialize poolSize with 1 (doubling 0 is not smart :)
| JavaScript | mit | handrus/zombies-game,brunops/zombies-game,brunops/zombies-game | ---
+++
@@ -3,8 +3,8 @@
function ObjectPoolMaker(Constructor, size) {
var objectPool = [],
- marker = 0,
- poolSize = size || 0;
+ nextAvailableIndex = 0,
+ poolSize = size || 1;
if (poolSize) {
expandPool(poolSize);
@@ -22,25 +22,25 @@
return {
create... |
55d2ef6add68fde5914af4a43117000fc31f65a3 | app/models/coordinator.js | app/models/coordinator.js | import EmberObject from '@ember/object';
import Evented from '@ember/object/evented';
import { computed } from '@ember/object';
import ObjHash from './obj-hash';
import { unwrapper } from 'ember-drag-drop/utils/proxy-unproxy-objects';
export default EmberObject.extend(Evented, {
objectMap: computed(function() {
... | import EmberObject from '@ember/object';
import Evented from '@ember/object/evented';
import { computed } from '@ember/object';
import ObjHash from './obj-hash';
import { unwrapper } from 'ember-drag-drop/utils/proxy-unproxy-objects';
export default EmberObject.extend(Evented, {
objectMap: computed(function() {
... | Call directly instead of sending | Call directly instead of sending
| JavaScript | mit | mharris717/ember-drag-drop,mharris717/ember-drag-drop | ---
+++
@@ -14,11 +14,15 @@
var payload = this.get('objectMap').getObj(id);
if (payload.ops.source && !payload.ops.source.isDestroying && !payload.ops.source.isDestroyed) {
- payload.ops.source.send('action', payload.obj);
+ if (typeof payload.ops.source['action'] === 'function') {
+ payl... |
799893651200debc93951818b09526217e4472b8 | lib/ssq.js | lib/ssq.js | var dgram = require('dgram');
module.exports = {}; | /* Source Server Query (SSQ) library
* Author : George Pittarelli
*
* SSQ protocol is specified here:
* https://developer.valvesoftware.com/wiki/Server_queries
*/
// Module imports
var dgram = require('dgram');
// Message request formats, straight from the spec
var A2A_PING = "i"
, A2S_SERVERQUERY_... | Add request constants from spec | Add request constants from spec
| JavaScript | bsd-3-clause | gpittarelli/node-ssq | ---
+++
@@ -1,3 +1,24 @@
+/* Source Server Query (SSQ) library
+ * Author : George Pittarelli
+ *
+ * SSQ protocol is specified here:
+ * https://developer.valvesoftware.com/wiki/Server_queries
+ */
+
+// Module imports
var dgram = require('dgram');
-module.exports = {};
+// Message request formats, straight from ... |
3cdee6c75924c3cd2c0a0a503d2f927ee6e348a0 | https.js | https.js | //@ts-check
const fs = require("fs");
const https = require('https');
const tls = require("tls");
module.exports = function (iface) {
/** @type { import("tls").TlsOptions } Server options object */
const serveroptions = {
key: [fs.readFileSync("tiddlyserver.key")], // server key file
cert: [fs.readFileSync("tid... | //@ts-check
const fs = require("fs");
const https = require('https');
const tls = require("tls");
// use this command to create a new self-signed certificate
// openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt
module.exports = function (iface) {
/** @type { import(... | Add openssl command to generate certificate | Add openssl command to generate certificate
| JavaScript | mit | Arlen22/TiddlyServer,Arlen22/TiddlyServer,Arlen22/TiddlyServer,Arlen22/TiddlyServer | ---
+++
@@ -3,6 +3,8 @@
const https = require('https');
const tls = require("tls");
+// use this command to create a new self-signed certificate
+// openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt
module.exports = function (iface) {
/** @type { import("tls... |
ce3f97ffbb05d83401356bd64b4870559adaaf18 | index.js | index.js | 'use strict';
var normalizeOptions = require('es5-ext/object/normalize-options')
, setPrototypeOf = require('es5-ext/object/set-prototype-of')
, ensureObject = require('es5-ext/object/valid-object')
, ensureStringifiable = require('es5-ext/object/validate-stringifiable-value')
, d ... | 'use strict';
var normalizeOptions = require('es5-ext/object/normalize-options')
, setPrototypeOf = require('es5-ext/object/set-prototype-of')
, ensureObject = require('es5-ext/object/valid-object')
, ensureStringifiable = require('es5-ext/object/validate-stringifiable-value')
, d ... | Support pass of reEvaluateScript options | Support pass of reEvaluateScript options
| JavaScript | mit | medikoo/html-site-tree | ---
+++
@@ -8,12 +8,17 @@
, htmlToDom = require('html-template-to-dom')
, SiteTree = require('site-tree')
- , defineProperty = Object.defineProperty, defineProperties = Object.defineProperties;
+ , defineProperties = Object.defineProperties;
-var HtmlSiteTree = defineProperties(setPro... |
5617c3fd5e2d98b68408ffc5332c6e657613e2cc | index.js | index.js | 'use strict'
var zip = require('zippo')
var State = require('dover')
var Observ = require('observ')
var pipe = require('value-pipe')
var changeEvent = require('value-event/change')
var h = require('virtual-dom/h')
module.exports = ZipInput
function ZipInput (data) {
data = data || {}
var state = State({
valu... | 'use strict'
var zip = require('zippo')
var State = require('dover')
var Observ = require('observ')
var pipe = require('value-pipe')
var changeEvent = require('value-event/change')
var h = require('virtual-dom/h')
module.exports = ZipInput
function ZipInput (data) {
data = data || {}
var state = State({
valu... | Remove placeholder from state atom | Remove placeholder from state atom
| JavaScript | mit | bendrucker/zip-input | ---
+++
@@ -14,7 +14,6 @@
var state = State({
value: Observ(data.value || ''),
valid: Observ(zip.validate(data.value || '')),
- placeholder: Observ(data.placeholder || ''),
channels: {
change: change
}
@@ -34,7 +33,6 @@
type: 'text',
name: 'zip',
value: state.value,
- ... |
5d59dffde1a6d3d5d86dfcbbcdb1f798613870bf | website/src/app/project/experiments/services/experiments-service.service.js | website/src/app/project/experiments/services/experiments-service.service.js | class ExperimentsService {
/*@ngInject*/
constructor(projectsAPI) {
this.projectsAPI = projectsAPI;
}
getAllForProject(projectID) {
return this.projectsAPI(projectID).one('experiments').getList();
}
createForProject(projectID, experiment) {
return this.projectsAPI(proje... | class ExperimentsService {
/*@ngInject*/
constructor(projectsAPI) {
this.projectsAPI = projectsAPI;
}
getAllForProject(projectID) {
return this.projectsAPI(projectID).one('experiments').getList();
}
createForProject(projectID, experiment) {
return this.projectsAPI(proje... | Add call to associate a template with a task. | Add call to associate a template with a task.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | ---
+++
@@ -28,6 +28,11 @@
return this.projectsAPI(projectID).one('experiments', experimentID).one('tasks', taskID).customPUT(task);
}
+ addTemplateToTask(projectID, experimentID, taskID, templateID) {
+ return this.projectsAPI(projectID).one('experiments', experimentID).one('tasks', taskID)... |
4e1a2db67b76238ca22fd5d398f4751b10a25bed | index.js | index.js | module.exports = {
parser: 'babel-eslint',
extends: 'airbnb',
globals: {
before: true,
beforeEach: true,
after: true,
afterEach: true,
describe: true,
it: true,
},
rules: {
'arrow-body-style': ['off'],
'react/jsx-no-bind': ['off'],
'object-shorthand': ['off'],
},
};
| module.exports = {
parser: 'babel-eslint',
extends: 'airbnb',
globals: {
before: true,
beforeEach: true,
after: true,
afterEach: true,
describe: true,
it: true,
xit: true,
xdescribe: true,
},
rules: {
'arrow-body-style': ['off'],
'react/jsx-no-bind': ['off'],
'objec... | Make `xit` and `xdescribe` not complain, they are shown after the test run anyways. | Make `xit` and `xdescribe` not complain, they are shown after the test run anyways.
| JavaScript | mit | crewmeister/eslint-config-crewmeister | ---
+++
@@ -8,6 +8,8 @@
afterEach: true,
describe: true,
it: true,
+ xit: true,
+ xdescribe: true,
},
rules: {
'arrow-body-style': ['off'], |
abf1a63a609375f02957ded2d2d6e2014f44fc7e | index.js | index.js | import { Tracker } from 'meteor/tracker';
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';
checkNpmVersions({
'mobx': '2.3.x'
}, 'space:tracker-mobx-autorun');
const { autorun } = require('mobx');
export default (trackerMobxAutorun) => {
let mobxDisposer = null;
let computation = null;
... | import { Tracker } from 'meteor/tracker';
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';
checkNpmVersions({
'mobx': '2.x'
}, 'space:tracker-mobx-autorun');
const { autorun } = require('mobx');
export default (trackerMobxAutorun) => {
let mobxDisposer = null;
let computation = null;
le... | Change mobx dependency version requirement from 2.3.x to 2.x | Change mobx dependency version requirement from 2.3.x to 2.x
| JavaScript | mit | meteor-space/tracker-mobx-autorun | ---
+++
@@ -2,7 +2,7 @@
import { checkNpmVersions } from 'meteor/tmeasday:check-npm-versions';
checkNpmVersions({
- 'mobx': '2.3.x'
+ 'mobx': '2.x'
}, 'space:tracker-mobx-autorun');
const { autorun } = require('mobx'); |
6285af0cc0cac013c5f3501f4251ee091f2e4ef9 | index.js | index.js | (function(){
"use strict";
var gutil = require('gulp-util'),
through = require('through2'),
multimarkdown = require('multimarkdown');
module.exports = function (options) {
return through.obj(function (file, enc, cb) {
if (file.isNull()) {
this.push(file);
return cb();
}
if (file.isStre... | (function(){
"use strict";
var gutil = require('gulp-util'),
through = require('through2'),
multimarkdown = require('multimarkdown');
module.exports = function (options) {
return through.obj(function (file, enc, cb) {
if (file.isNull()) {
this.push(file);
return cb();
}
if (file.isStre... | Correct plugin name passed to constructor of PluginError. | Correct plugin name passed to constructor of PluginError.
| JavaScript | mit | jjlharrison/gulp-multimarkdown | ---
+++
@@ -12,7 +12,7 @@
}
if (file.isStream()) {
- this.emit('error', new gutil.PluginError('gulp-markdown', 'Streaming not supported'));
+ this.emit('error', new gutil.PluginError('gulp-multimarkdown', 'Streaming not supported'));
return cb();
}
|
cd972400073e154c2e7b6aa483447763ad87947f | schema/me/suggested_artists_args.js | schema/me/suggested_artists_args.js | import { GraphQLBoolean, GraphQLString, GraphQLInt } from "graphql"
export const SuggestedArtistsArgs = {
artist_id: {
type: GraphQLString,
description: "The slug or ID of an artist",
},
exclude_artists_without_forsale_artworks: {
type: GraphQLBoolean,
description: "Exclude artists without for sa... | import { GraphQLBoolean, GraphQLString, GraphQLInt, GraphQLList } from "graphql"
export const SuggestedArtistsArgs = {
artist_id: {
type: GraphQLString,
description: "The slug or ID of an artist",
},
exclude_artists_without_forsale_artworks: {
type: GraphQLBoolean,
description: "Exclude artists w... | Add excluded artist ids to suggested artist arguments | Add excluded artist ids to suggested artist arguments
| JavaScript | mit | artsy/metaphysics,artsy/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,mzikherman/metaphysics-1,mzikherman/metaphysics-1 | ---
+++
@@ -1,4 +1,4 @@
-import { GraphQLBoolean, GraphQLString, GraphQLInt } from "graphql"
+import { GraphQLBoolean, GraphQLString, GraphQLInt, GraphQLList } from "graphql"
export const SuggestedArtistsArgs = {
artist_id: {
@@ -17,6 +17,10 @@
type: GraphQLBoolean,
description: "Exclude artists the u... |
abaa6231fbb1d0e25eb188acd186a8236e901372 | app/lib/Actions.js | app/lib/Actions.js | 'use strict';
var Reflux = require('reflux');
module.exports = function(api, resource) {
var asyncChildren = {
children: ['completed', 'failed'],
};
var Actions = Reflux.createActions({
load: asyncChildren,
create: asyncChildren,
update: asyncChildren,
sort: asyncCh... | 'use strict';
var Reflux = require('reflux');
module.exports = function(api, resource) {
var asyncChildren = {
children: ['completed', 'failed'],
};
var Actions = Reflux.createActions({
load: asyncChildren,
create: asyncChildren,
update: asyncChildren,
sort: asyncCh... | Use data returned from PUT/POST after actions | Use data returned from PUT/POST after actions
Now dates and other derived values should show up ok.
| JavaScript | mit | koodilehto/koodilehto-crm-frontend,bebraw/react-crm-frontend,bebraw/react-crm-frontend,koodilehto/koodilehto-crm-frontend | ---
+++
@@ -24,14 +24,14 @@
Actions.create.listen(function(data) {
api[resource].post(data).then((res) => {
- data.id = res.data.id;
-
- this.completed(data);
+ this.completed(res.data);
}).catch(this.failed);
});
Actions.update.listen(function(dat... |
49fec8ec59fa692f7cb9b04670f6e5a221dc8087 | src/js/store/reducers/settings.js | src/js/store/reducers/settings.js | import { SET_SETTINGS, EDITOR_DECREASE_FONT_SIZE, EDITOR_INCREASE_FONT_SIZE } from '../actions';
const initialState = {};
const MINIMUM_FONT_SIZE = 8;
const settings = (state = initialState, action) => {
// The settings is an object with an arbitrary set of properties.
// The only property we don't want to co... | import { SET_SETTINGS, EDITOR_DECREASE_FONT_SIZE, EDITOR_INCREASE_FONT_SIZE } from '../actions';
const MINIMUM_FONT_SIZE = 8;
const initialState = {
editorFontSize: 14,
};
const settings = (state = initialState, action) => {
// The settings is an object with an arbitrary set of properties.
// The only pr... | Fix editor font size brokenness | Fix editor font size brokenness
| JavaScript | mit | tangrams/tangram-play,tangrams/tangram-play | ---
+++
@@ -1,7 +1,10 @@
import { SET_SETTINGS, EDITOR_DECREASE_FONT_SIZE, EDITOR_INCREASE_FONT_SIZE } from '../actions';
-const initialState = {};
const MINIMUM_FONT_SIZE = 8;
+
+const initialState = {
+ editorFontSize: 14,
+};
const settings = (state = initialState, action) => {
// The settings is an... |
e6a41ab15506da80c954185de2a4cea3e18393fa | index.js | index.js | const express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');
const app = express();
app.set('view engine', 'ejs');
app.set('views', './')
app.get('/serve-seed.html', (req, res) => {
res.render('./serve-seed.ejs', {
url: process.env.APIARY_SEED_URL || 'http://loca... | const express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');
const app = express();
app.set('view engine', 'ejs');
app.set('views', './')
app.use(cors());
app.get('/serve-seed.html', (req, res) => {
res.render('./serve-seed.ejs', {
url: process.env.APIARY_SEED_U... | Enable cors for every route | Enable cors for every route
| JavaScript | mit | apiaryio/apiary-console-seed,apiaryio/console-proxy,apiaryio/apiary-console-seed,apiaryio/console-proxy | ---
+++
@@ -7,6 +7,8 @@
app.set('view engine', 'ejs');
app.set('views', './')
+app.use(cors());
+
app.get('/serve-seed.html', (req, res) => {
res.render('./serve-seed.ejs', {
url: process.env.APIARY_SEED_URL || 'http://localhost:3000'
@@ -14,7 +16,6 @@
});
app.use(bodyParser.json());
-app.use(cors())... |
5ecd628fb0f597811a69a7c8e4cdf02f46497f50 | components/Deck/ContentModulesPanel/ContentHistoryPanel/SlideHistoryPanel.js | components/Deck/ContentModulesPanel/ContentHistoryPanel/SlideHistoryPanel.js | import React from 'react';
import {connectToStores} from 'fluxible-addons-react';
import SlideHistoryStore from '../../../../stores/SlideHistoryStore';
import UserProfileStore from '../../../../stores/UserProfileStore';
import PermissionsStore from '../../../../stores/PermissionsStore';
import {Feed} from 'semantic-ui-... | import React from 'react';
import {connectToStores} from 'fluxible-addons-react';
import SlideHistoryStore from '../../../../stores/SlideHistoryStore';
import UserProfileStore from '../../../../stores/UserProfileStore';
import PermissionsStore from '../../../../stores/PermissionsStore';
import {Feed} from 'semantic-ui-... | Add message for empty slide history | Add message for empty slide history
| JavaScript | mpl-2.0 | slidewiki/slidewiki-platform,slidewiki/slidewiki-platform,slidewiki/slidewiki-platform | ---
+++
@@ -9,11 +9,11 @@
class SlideHistoryPanel extends React.Component {
render() {
- const changes = this.props.SlideHistoryStore.changes ? this.props.SlideHistoryStore.changes.map((change, index) => {
+ const changes = this.props.SlideHistoryStore.changes && this.props.SlideHistoryStore.cha... |
3985a313a544580a829e3ae708b13d578510c2cf | index.js | index.js | "use strict";
const express = require('express');
const twilio = require('twilio');
const bodyParser = require('body-parser');
const app = express();
// Run server to listen on port 5000.
const server = app.listen(5000, () => {
console.log('listening on *:5000');
});
const io = require('socket.io')(server);
app.u... | "use strict";
const express = require('express');
const twilio = require('twilio');
const bodyParser = require('body-parser');
const app = express();
// Run server to listen on port 8000.
const server = app.listen(8000, () => {
console.log('listening on *:8000');
});
const io = require('socket.io')(server);
app.u... | Fix error checking for sentiment analysis | Fix error checking for sentiment analysis
| JavaScript | mit | sagnew/SentimentRocket,sagnew/SentimentRocket | ---
+++
@@ -5,9 +5,9 @@
const app = express();
-// Run server to listen on port 5000.
-const server = app.listen(5000, () => {
- console.log('listening on *:5000');
+// Run server to listen on port 8000.
+const server = app.listen(8000, () => {
+ console.log('listening on *:8000');
});
const io = require('... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.