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 |
|---|---|---|---|---|---|---|---|---|---|---|
123177c3f7f70b1c8a6dce1b852545892a41df8c | lib/index.js | lib/index.js | var canvas = document.getElementById('game');
var context = canvas.getContext('2d');
var Ball = function(x, y, radius, context) {
this.x = x;
this.y = y;
this.radius = radius || 10;
this.startAngle = 0;
this.endAngle = (Math.PI / 180) * 360;
this.context = context
}
Ball.prototype.draw = function () {
c... | var canvas = document.getElementById('game');
var context = canvas.getContext('2d');
var Ball = function(x, y, radius, context) {
this.x = x;
this.y = y;
this.radius = radius || 10;
this.startAngle = 0;
this.endAngle = (Math.PI / 180) * 360;
this.context = context
this.speed = 0
}
Ball.prototype.draw = ... | Add ball speed and change move function | Add ball speed and change move function
| JavaScript | mit | brennanholtzclaw/game_time,brennanholtzclaw/game_time | ---
+++
@@ -8,6 +8,7 @@
this.startAngle = 0;
this.endAngle = (Math.PI / 180) * 360;
this.context = context
+ this.speed = 0
}
Ball.prototype.draw = function () {
@@ -18,13 +19,14 @@
};
Ball.prototype.move = function () {
- if (this.x < canvas.width - this.radius){
- this.x++;
+ if (this.x < can... |
f567d423ca0b94f236a38c45e51958d203582fd1 | src/controller/templates/Controller.js | src/controller/templates/Controller.js | 'use strict'
const Controller = require('trails-controller')
/**
* @module <%= name %>Controller
* @description Generated Trails.js Controller.
*/
module.exports = class <%= name %>Controller extends Controller {
}
| 'use strict'
/**
* @module <%= name %>Controller
* @description Generated Trails.js Controller.
*/
module.exports = class <%= name %>Controller {
}
| Remove controller extends on template file | Remove controller extends on template file
| JavaScript | mit | jaumard/generator-trails,tnunes/generator-trails,konstantinzolotarev/generator-trails | ---
+++
@@ -1,12 +1,10 @@
'use strict'
-
-const Controller = require('trails-controller')
/**
* @module <%= name %>Controller
* @description Generated Trails.js Controller.
*/
-module.exports = class <%= name %>Controller extends Controller {
+module.exports = class <%= name %>Controller {
}
|
3474af3e09940dd7a9e25f308bf4e3467ab4159c | resources/assets/components/DropdownFilter/index.js | resources/assets/components/DropdownFilter/index.js | import React from 'react';
import { map } from 'lodash';
class DropdownFilter extends React.Component {
constructor() {
super();
this.change = this.change.bind(this);
}
componentDidMount() {
const type = this.props.options.type;
const defaultValue = this.props.options.default;
this.props.u... | import React from 'react';
import { map } from 'lodash';
import PropTypes from 'prop-types';
class DropdownFilter extends React.Component {
constructor() {
super();
this.change = this.change.bind(this);
}
componentDidMount() {
const type = this.props.options.type;
const defaultValue = this.prop... | Add proptype validation to DropDownFilter component | Add proptype validation to DropDownFilter component
| JavaScript | mit | DoSomething/rogue,DoSomething/rogue,DoSomething/rogue | ---
+++
@@ -1,5 +1,6 @@
import React from 'react';
import { map } from 'lodash';
+import PropTypes from 'prop-types';
class DropdownFilter extends React.Component {
constructor() {
@@ -23,19 +24,33 @@
render() {
return (
- <div className="container__block -third">
- <h2 className="he... |
ffa4315f48f5c5eed70d215000afdf794c6014cd | lib/utils.js | lib/utils.js | "use strict";
function resolveHttpError(response, message) {
if (response.statusCode < 400) {
return;
}
message = message
? message + " "
: "";
message += "Status code " + response.statusCode + " (" + response.statusMessage + ").";
if (response.body) {
message += ... | "use strict";
function resolveHttpError(response, message) {
if (response.statusCode < 400) {
return;
}
message = message
? message + " "
: "";
message += "Status code " + response.statusCode + " (" + response.statusMessage + "). See the response property for details.";
v... | Remove response body from error message. Hide HTTP error resolver. | Remove response body from error message.
Hide HTTP error resolver.
| JavaScript | mit | itsananderson/kudu-api,itsananderson/kudu-api | ---
+++
@@ -9,11 +9,7 @@
? message + " "
: "";
- message += "Status code " + response.statusCode + " (" + response.statusMessage + ").";
-
- if (response.body) {
- message += " " + response.body;
- }
+ message += "Status code " + response.statusCode + " (" + response.statusMessa... |
c918f8c8de92f663b3407aa7f70a902cc15419c6 | tasks/browser_extension.js | tasks/browser_extension.js | /*
* grunt-browser-extension
* https://github.com/addmitriev/grunt-browser-extension
*
* Copyright (c) 2015 Aleksey Dmitriev
* Licensed under the MIT license.
*/
'use strict';
var util = require('util');
var path = require('path');
var fs = require('fs-extra');
module.exports = function (grunt) {
var Brows... | /*
* grunt-browser-extension
* https://github.com/addmitriev/grunt-browser-extension
*
* Copyright (c) 2015 Aleksey Dmitriev
* Licensed under the MIT license.
*/
'use strict';
var util = require('util');
var path = require('path');
var fs = require('fs-extra');
module.exports = function (grunt) {
var Brows... | Check config and show what required options not exists | Check config and show what required options not exists
| JavaScript | mit | Tuguusl/grunt-browser-extension,Tuguusl/grunt-browser-extension | ---
+++
@@ -22,7 +22,7 @@
for(var required_options_id in required_options){
if(required_options_id){
var required_option = required_options[required_options_id];
- if(!options[required_option]){
+ if(!util.isString(options[requir... |
836c37f9975c3dc41db447d7a73e8c4c888574c4 | app/routes/project/posts/post.js | app/routes/project/posts/post.js | import Ember from 'ember';
export default Ember.Route.extend({
session: Ember.inject.service(),
model(params) {
let projectId = this.modelFor('project').id;
let queryParams = {
projectId: projectId,
number: params.number
};
let userId = this.get('session.session.authenticated.user_id'... | import Ember from 'ember';
export default Ember.Route.extend({
session: Ember.inject.service(),
model(params) {
let projectId = this.modelFor('project').id;
let queryParams = {
projectId: projectId,
number: params.number
};
let userId = this.get('session.session.authenticated.user_id'... | Simplify behavior for comment reload | Simplify behavior for comment reload
| JavaScript | mit | eablack/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember,eablack/code-corps-ember | ---
+++
@@ -34,23 +34,12 @@
saveComment(comment) {
let route = this;
comment.save().then(() => {
- // TODO: Not sure if we want to reload all comments here, or just push the new one
- // reloading for now
- route.send('reloadComments', comment);
+ route.refresh();
... |
f57d452412b70a051f2c183b7aa4a6688fc683bc | Brocfile.js | Brocfile.js | /* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
dotEnv: {
clientAllowedKeys: ['CDN_HOST']
},
fingerprint: {
prepend: 'drwikejswixhx.cloudfront.net/'
}
});
// Use `app.import` to add additional libraries to the generated
// output files... | /* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
dotEnv: {
clientAllowedKeys: ['CDN_HOST']
},
fingerprint: {
prepend: 'http://drwikejswixhx.cloudfront.net/'
}
});
// Use `app.import` to add additional libraries to the generated
// outpu... | Add full path for CDN | Add full path for CDN
| JavaScript | mit | bus-detective/web-client,bus-detective/web-client | ---
+++
@@ -7,7 +7,7 @@
clientAllowedKeys: ['CDN_HOST']
},
fingerprint: {
- prepend: 'drwikejswixhx.cloudfront.net/'
+ prepend: 'http://drwikejswixhx.cloudfront.net/'
}
});
|
1d629a166c2005cc7a06708e123c652520bcd8ed | app/main.js | app/main.js | 'use strict';
(() => {
const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
let win = null;
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
// Avoid the slow performance issue when renderer... | 'use strict';
(() => {
const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
let win = null;
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
// Avoid the slow performance issue when renderer... | Change default window width 600px to 850px | Change default window width 600px to 850px
| JavaScript | mit | emsk/redmine-now,emsk/redmine-now,emsk/redmine-now | ---
+++
@@ -17,7 +17,7 @@
app.on('ready', () => {
win = new BrowserWindow({
- width: 600,
+ width: 850,
height: 600
});
|
951de450da79c33bc1134e851d7a422ce5a78d15 | sashimi-webapp/test/unit/specs/logic/formatter/documentFormatter.spec.js | sashimi-webapp/test/unit/specs/logic/formatter/documentFormatter.spec.js | import documentFormatter from 'src/logic/documentPackager/documentFormatter';
import base64OfSimplePdf from './reference/base64OfSimplePdf';
describe('DocumentFormatter', () => {
it('should returns the same data for \'html viewMode\'', () => {
const viewMode = 'html';
const inputData = '<div>This is a HTML c... | import documentFormatter from 'src/logic/documentPackager/documentFormatter';
import base64OfSimplePdf from './reference/base64OfSimplePdf';
describe('DocumentFormatter', () => {
it('should returns the same data for \'html viewMode\'', () => {
const viewMode = 'html';
const inputData = '<div>This is a HTML c... | Fix documentFormatter comment about jsPDF | Fix documentFormatter comment about jsPDF
| JavaScript | mit | nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note | ---
+++
@@ -17,7 +17,7 @@
const thatPromise = documentFormatter.getPdfBlob(inputData);
thatPromise.then((outputData) => {
- // pdfJS does not give deterministic outputData
+ // jsPDF does not give deterministic outputData
// around 5 characters will always be different in the output
... |
dac26ebe783468a1ce6e9d44cbab5a9ff1ae3262 | app/assets/javascripts/theme/cbpAnimatedHeader.js | app/assets/javascripts/theme/cbpAnimatedHeader.js | /**
* cbpAnimatedHeader.js v1.0.0
* http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2013, Codrops
* http://www.codrops.com
*/
var cbpAnimatedHeader = (function() {
var docElem = document.documentElement,
header = document.queryS... | /**
* cbpAnimatedHeader.js v1.0.0
* http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2013, Codrops
* http://www.codrops.com
*/
var cbpAnimatedHeader = (function() {
var docElem = document.documentElement,
header = document.queryS... | Fix bug with animation on index page | Fix bug with animation on index page
| JavaScript | mit | kossgreim/ysa-activity,kossgreim/ysa-activity | ---
+++
@@ -13,7 +13,7 @@
var docElem = document.documentElement,
header = document.querySelector( '.navbar-default' ),
didScroll = false,
- changeHeaderOn = 300;
+ changeHeaderOn = 200;
function init() {
window.addEventListener( 'scroll', function( event ) { |
e33324c93f33d8060903bb04dc7c422a43278842 | lib/componentHelper.js | lib/componentHelper.js | var
fs = require('fs'),
mkdirp = require('mkdirp'),
Builder = require('component-builder'),
config = require('../config'),
installDir = config.componentInstallDir,
utils = require('./utils'),
options = {
dest : installDir
},
component;
component = !config.useMocks ?
r... | var
fs = require('fs'),
mkdirp = require('mkdirp'),
rimraf = require('rimraf'),
Builder = require('component-builder'),
config = require('../config'),
installDir = config.componentInstallDir,
utils = require('./utils'),
options = {
dest : installDir
},
component;
... | Remove component installation dir when getting new | Remove component installation dir when getting new
| JavaScript | mit | web-audio-components/web-audio-components-service | ---
+++
@@ -1,6 +1,7 @@
var
fs = require('fs'),
mkdirp = require('mkdirp'),
+ rimraf = require('rimraf'),
Builder = require('component-builder'),
config = require('../config'),
installDir = config.componentInstallDir,
@@ -17,7 +18,11 @@
exports.install = function (data, callba... |
5edb856e5b0d624d794cefee42a1e7d385610e14 | lib/findProjectRoot.js | lib/findProjectRoot.js | import fs from 'fs';
import path from 'path';
function findRecursive(directory) {
if (directory === '/') {
throw new Error('No project root found, looking for a directory with a package.json file.');
}
const pathToPackageJson = path.join(directory, 'package.json');
if (fs.existsSync(pathToPackageJson)) {... | import fs from 'fs';
import path from 'path';
function findRecursive(directory) {
if (directory === '/') {
throw new Error('No project root found, looking for a directory with a package.json file.');
}
const pathToPackageJson = path.join(directory, 'package.json');
if (fs.existsSync(pathToPackageJson)) {... | Use path.isAbsolute for Windows compatibility | Use path.isAbsolute for Windows compatibility
Replaced `pathToFile.startsWith('/')` with `path.isAbsolute`
Closes #397 | JavaScript | mit | trotzig/import-js,trotzig/import-js,trotzig/import-js,Galooshi/import-js | ---
+++
@@ -16,7 +16,7 @@
}
function makeAbsolute(pathToFile) {
- if (pathToFile.startsWith('/')) {
+ if (path.isAbsolute(pathToFile)) {
return pathToFile;
}
|
cb53120e408cb76bd991a0c4c12f4e5228a05fdc | common/models/sec-membership.js | common/models/sec-membership.js | "use strict";
const timestampMixin = require('loopback-ds-timestamp-mixin/time-stamp');
const shortid = require('shortid');
module.exports = function (SecMembership) {
timestampMixin(SecMembership);
SecMembership.definition.rawProperties.id.default =
SecMembership.definition.properties.id.default = function () {... | "use strict";
const timestampMixin = require('loopback-ds-timestamp-mixin/time-stamp');
const shortid = require('shortid');
module.exports = function (SecMembership) {
timestampMixin(SecMembership);
SecMembership.definition.rawProperties.id.default =
SecMembership.definition.properties.id.default = function () {... | Remove unnecessary uniqueness of userId scoped to roleId for membership model | Remove unnecessary uniqueness of userId scoped to roleId for membership model
| JavaScript | mit | taoyuan/nsec | ---
+++
@@ -11,7 +11,6 @@
return shortid();
};
- SecMembership.validatesUniquenessOf('userId', {scopedTo: ['roleId']});
SecMembership.validatesUniquenessOf('userId', {scopedTo: ['scope', 'scopeId']});
return SecMembership; |
f33326c73dd0b938bd0ac2475f9245e24aec3411 | package.js | package.js | Package.describe({
summary: "Google's Material Design based Bootstrap 3 theme.",
version: "0.1.0",
// git: "https://github.com/FezVrasta/bootstrap-material-design.git"
});
Package.onUse(function(api) {
api.versionsFrom('METEOR@0.9.3');
api.use(['mizzao:bootstrap-3@3.2.0', 'jquery'], 'client');
api.addFile... | Package.describe({
summary: "Google's Material Design based Bootstrap 3 theme.",
version: "0.1.2",
name: 'html5cat:bootstrap-material-design',
git: 'https://github.com/html5cat/bootstrap-material-design.git'
// git: "https://github.com/FezVrasta/bootstrap-material-design.git"
});
Package.onUse(function(api) ... | Add name and git url | Add name and git url
| JavaScript | mit | html5cat/bootstrap-material-design | ---
+++
@@ -1,6 +1,8 @@
Package.describe({
summary: "Google's Material Design based Bootstrap 3 theme.",
- version: "0.1.0",
+ version: "0.1.2",
+ name: 'html5cat:bootstrap-material-design',
+ git: 'https://github.com/html5cat/bootstrap-material-design.git'
// git: "https://github.com/FezVrasta/bootstrap-m... |
6fc3bd8206268bf97a078c127d3dad053ea775ff | package.js | package.js | Package.describe({
name: 'klaussner:svelte',
version: '0.0.1',
summary: 'Use the magical disappearing UI framework in Meteor',
git: 'https://github.com/klaussner/svelte'
});
Package.registerBuildPlugin({
name: 'svelte-compiler',
use: ['caching-compiler@1.1.9', 'babel-compiler@6.13.0'],
sources: [
'pl... | Package.describe({
name: 'klaussner:svelte',
version: '0.0.1',
summary: 'Use the magical disappearing UI framework in Meteor',
git: 'https://github.com/klaussner/meteor-svelte.git'
});
Package.registerBuildPlugin({
name: 'svelte-compiler',
use: ['caching-compiler@1.1.9', 'babel-compiler@6.13.0'],
sources... | Fix link to Git repository | Fix link to Git repository
| JavaScript | mit | meteor-svelte/meteor-svelte | ---
+++
@@ -2,7 +2,7 @@
name: 'klaussner:svelte',
version: '0.0.1',
summary: 'Use the magical disappearing UI framework in Meteor',
- git: 'https://github.com/klaussner/svelte'
+ git: 'https://github.com/klaussner/meteor-svelte.git'
});
Package.registerBuildPlugin({ |
f0cdce0bf9bbb2e0b9f68cb521bd91de33ec8985 | lib/tempFileHandler.js | lib/tempFileHandler.js | const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const {
checkAndMakeDir,
getTempFilename
} = require('./utilities');
module.exports = function(options, fieldname, filename) {
const dir = path.normalize(options.tempFileDir || process.cwd() + '/tmp/');
const tempFilePath... | const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const {
checkAndMakeDir,
getTempFilename
} = require('./utilities');
module.exports = function(options, fieldname, filename) {
const dir = path.normalize(options.tempFileDir || process.cwd() + '/tmp/');
const tempFilePath... | Use debug log for logging. | Use debug log for logging. | JavaScript | mit | richardgirges/express-fileupload,richardgirges/express-fileupload | ---
+++
@@ -21,13 +21,7 @@
writeStream.write(data);
hash.update(data);
fileSize += data.length;
- if (options.debug) {
- return console.log( // eslint-disable-line
- `Uploaded ${data.length} bytes for `,
- fieldname,
- filename
- );
- }
+ de... |
853be53e6c0524f5d2130ef2ec50f893894aa3ad | lib/text-decoration.js | lib/text-decoration.js | var _ = require('lodash')
var fs = require('fs')
var gzip = require('gzip-size')
var filesize = require('filesize')
var cssstats = require('cssstats')
var module = require('tachyons-text-decoration/package.json')
var moduleCss = fs.readFileSync('node_modules/tachyons-text-decoration/tachyons-text-decoration.min.css', ... | var _ = require('lodash')
var fs = require('fs')
var gzip = require('gzip-size')
var filesize = require('filesize')
var cssstats = require('cssstats')
var module = require('tachyons-text-decoration/package.json')
var moduleCss = fs.readFileSync('node_modules/tachyons-text-decoration/tachyons-text-decoration.min.css', ... | Update with reference to global nav partial | Update with reference to global nav partial
| JavaScript | mit | matyikriszta/moonlit-landing-page,topherauyeung/portfolio,topherauyeung/portfolio,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio,cwonrails/tachyons,getfrank/tachyons,fenderdigital/css-utilities,fenderdigital/css-utilities,tachyons-css/tachyons | ---
+++
@@ -10,6 +10,8 @@
var moduleSize = filesize(moduleObj.gzipSize)
var srcCSS = fs.readFileSync('./src/_text-decoration.css', 'utf8')
+var navDocs = fs.readFileSync('./templates/nav_docs.html', 'utf8')
+
var template = fs.readFileSync('./templates/docs/text-decoration/index.html', 'utf8')
var tpl = _.tem... |
034b008f8dfd297b6d5a7ccc64839647e0caa29e | addon/array-pauser.js | addon/array-pauser.js | import Em from 'ember';
import { ArrayController } from 'ember-legacy-controllers';
const get = Em.get;
const copy = Em.copy;
const ArrayPauser = ArrayController.extend({
isPaused: false,
buffer: Em.computed(function () {
return Em.A();
}),
addToBuffer: function (idx, removedCount, added) {
const buffer = ge... | import Em from 'ember';
import { ArrayController } from 'ember-legacy-controllers';
const ArrayPauser = ArrayController.extend({
isPaused: false,
buffer: Em.computed(function () {
return Em.A();
}),
addToBuffer: function (idx, removedCount, added) {
const buffer = this.get('buffer');
buffer.pushObject([idx... | Remove unnecessary aliases for Ember utils | Remove unnecessary aliases for Ember utils
| JavaScript | mit | j-/ember-cli-array-pauser,j-/ember-cli-array-pauser | ---
+++
@@ -1,7 +1,5 @@
import Em from 'ember';
import { ArrayController } from 'ember-legacy-controllers';
-const get = Em.get;
-const copy = Em.copy;
const ArrayPauser = ArrayController.extend({
isPaused: false,
@@ -11,13 +9,13 @@
}),
addToBuffer: function (idx, removedCount, added) {
- const buffer =... |
1479e514d857ca8dab0bccbe0ef52999e397a330 | app/assets/javascripts/modules/moj.wordcount.js | app/assets/javascripts/modules/moj.wordcount.js | /* global jQuery */
jQuery(function ($){
'use strict';
var $limitedTextAreas = $('textarea[data-limit]');
if( $limitedTextAreas.length > 0 ){
$limitedTextAreas.each(function (i, o){
var updateCounter = function (){
var charsLeft = limit - $textarea.val().length;
if( charsLeft > 0 ){
... | /* global jQuery */
jQuery(function ($){
'use strict';
var $limitedTextAreas = $('textarea[data-limit]');
if( $limitedTextAreas.length > 0 ){
$limitedTextAreas.each(function (i, o){
var updateCounter = function (){
var charsLeft = limit - $textarea.val().length;
if( charsLeft > 0 ){
... | Add copy to word count that it includes new lines | Add copy to word count that it includes new lines
| JavaScript | mit | ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder | ---
+++
@@ -21,7 +21,7 @@
var limit = $textarea.data('limit');
var $counterBox = $(
'<p class="textarea-word-count form-hint">' +
- 'Maximum ' + limit + ' characters, including spaces. ' +
+ 'Maximum ' + limit + ' characters, including spaces and new lines. ' +
'<span cla... |
7de83d749393913835cc6b537bf44596771f3bb6 | backend/app/assets/javascripts/spree/backend/components/sortable_table.js | backend/app/assets/javascripts/spree/backend/components/sortable_table.js | //= require solidus_admin/Sortable
Spree.ready(function() {
var sortable_tables = document.querySelectorAll('table.sortable');
_.each(sortable_tables, function(table) {
var url = table.getAttribute('data-sortable-link');
var tbody = table.querySelector('tbody');
var sortable = Sortable.create(tbody,{
... | //= require solidus_admin/Sortable
Spree.ready(function() {
var sortable_tables = document.querySelectorAll('table.sortable');
_.each(sortable_tables, function(table) {
var url = table.getAttribute('data-sortable-link');
var tbody = table.querySelector('tbody');
var sortable = Sortable.create(tbody,{
... | Use dataType: json for sortable tables | Use dataType: json for sortable tables
| JavaScript | bsd-3-clause | pervino/solidus,pervino/solidus,pervino/solidus,pervino/solidus | ---
+++
@@ -19,7 +19,7 @@
});
Spree.ajax({
type: 'POST',
- dataType: 'script',
+ dataType: 'json',
url: url,
data: positions,
}); |
e404e0799273c743bf671997bf525e67239abb7e | app/assets/javascripts/voluntary/application.js | app/assets/javascripts/voluntary/application.js | //= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require jquery-ui-bootstrap
//= require jquery.tokeninput
//= require_tree . | //= require jquery
//= require jquery_ujs
//= require jquery-ui-bootstrap
//= require twitter/bootstrap
//= require jquery.tokeninput
//= require_tree . | Load jquery before twitter bootstrap. | Load jquery before twitter bootstrap.
| JavaScript | mit | volontariat/voluntary,jasnow/voluntary,jasnow/voluntary,jasnow/voluntary,volontariat/voluntary,volontariat/voluntary,jasnow/voluntary,volontariat/voluntary | ---
+++
@@ -1,6 +1,6 @@
//= require jquery
//= require jquery_ujs
+//= require jquery-ui-bootstrap
//= require twitter/bootstrap
-//= require jquery-ui-bootstrap
//= require jquery.tokeninput
//= require_tree . |
926adb00a1d7ec21a9cc2b798560d4cd4961b1f8 | src/Parser/VengeanceDemonHunter/CONFIG.js | src/Parser/VengeanceDemonHunter/CONFIG.js | import SPECS from 'common/SPECS';
import CombatLogParser from './CombatLogParser';
import TALENT_DESCRIPTIONS from './TALENT_DESCRIPTIONS';
export default {
spec: SPECS.VENGEANCE_DEMON_HUNTER,
maintainer: '@mamtooth',
parser: CombatLogParser,
talentDescriptions: TALENT_DESCRIPTIONS,
};
| import SPECS from 'common/SPECS';
import CombatLogParser from './CombatLogParser';
import TALENT_DESCRIPTIONS from './TALENT_DESCRIPTIONS';
export default {
spec: SPECS.VENGEANCE_DEMON_HUNTER,
maintainer: '@Mamtooth',
parser: CombatLogParser,
talentDescriptions: TALENT_DESCRIPTIONS,
};
| Update contributor discord name (last time) | Update contributor discord name (last time) | JavaScript | agpl-3.0 | Juko8/WoWAnalyzer,enragednuke/WoWAnalyzer,anom0ly/WoWAnalyzer,yajinni/WoWAnalyzer,hasseboulen/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,enragednuke/WoWAnalyzer,enragednuke/WoWAnalyzer,Yuyz0112/WoWAnalyzer,sMteX/WoWAnalyzer,yajinni/WoWAnalyzer,FaideWW/WoWAnalyzer,fyruna/WoWAnalyzer,FaideWW/WoWAnalyzer,fyruna/WoWAnalyzer,hasse... | ---
+++
@@ -5,7 +5,7 @@
export default {
spec: SPECS.VENGEANCE_DEMON_HUNTER,
- maintainer: '@mamtooth',
+ maintainer: '@Mamtooth',
parser: CombatLogParser,
talentDescriptions: TALENT_DESCRIPTIONS,
}; |
ddd91b0e388fc87f732a94a9bd7a5aa084f4c86d | tests/tests.js | tests/tests.js | /**
PSPDFKit
Copyright (c) 2015-2016 PSPDFKit GmbH. All rights reserved.
THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT ... | /**
PSPDFKit
Copyright (c) 2015-2016 PSPDFKit GmbH. All rights reserved.
THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT ... | Add manual document launch test | Test: Add manual document launch test
| JavaScript | mit | PSPDFKit/Cordova-Android,PSPDFKit/Cordova-Android | ---
+++
@@ -25,15 +25,20 @@
it('should exist', function () {
expect(window.PSPDFKit.showDocumentFromAssets).toBeDefined();
});
-
- it('should open a document from assets', function(done) {
- window.PSPDFKit.showDocumentFromAssets("www/Guide.pdf", fu... |
7842bc06a6a2199566cc43bc70c377e987ed77cc | packages/custom/icu/public/components/profile-page/profile-page.js | packages/custom/icu/public/components/profile-page/profile-page.js | 'use strict';
angular.module('mean.icu.ui.profile', [])
.controller('ProfileController', function($scope, $state, me, UsersService) {
$scope.me = me;
$scope.avatar = $scope.me.profile.avatar || 'http://placehold.it/250x250';
$scope.hash = new Date().getTime();
$scope.uploadAvatar = function(files) {
... | 'use strict';
angular.module('mean.icu.ui.profile', [])
.controller('ProfileController', function($scope, $state, me, UsersService) {
$scope.me = me;
if (!$scope.me.profile) {
$scope.me.profile = {};
}
$scope.avatar = $scope.me.profile.avatar || 'http://placehold.it/250x250';
$scope.hash ... | Fix error when profile is not present | Fix error when profile is not present
| JavaScript | mit | hamdiceylan/icu,linnovate/icu,linnovate/icu,linnovate/icu,hamdiceylan/icu | ---
+++
@@ -3,6 +3,11 @@
angular.module('mean.icu.ui.profile', [])
.controller('ProfileController', function($scope, $state, me, UsersService) {
$scope.me = me;
+
+ if (!$scope.me.profile) {
+ $scope.me.profile = {};
+ }
+
$scope.avatar = $scope.me.profile.avatar || 'http://placehold.it/250x2... |
9975e1d92da690ced12402cb51ed04f4cad2d54e | server.js | server.js | 'use strict';
const express = require('express'),
sassMiddleware = require('node-sass-middleware'),
webpack = require('webpack'),
webpackMiddleware = require('webpack-dev-middleware'),
path = require('path'),
app = express(),
default_port = (process.env.PORT || 3000);
app.use(sassM... | 'use strict';
const express = require('express'),
sassMiddleware = require('node-sass-middleware'),
webpack = require('webpack'),
webpackMiddleware = require('webpack-dev-middleware'),
path = require('path'),
app = express(),
default_port = (process.env.PORT || 3000);
app.use(sassM... | Add sourceMap in node-sass-middleware for dev | Add sourceMap in node-sass-middleware for dev
| JavaScript | mit | AusDTO/citizenship-appointment-client,AusDTO/citizenship-appointment-client,AusDTO/citizenship-appointment-client | ---
+++
@@ -12,7 +12,8 @@
src: path.join(__dirname, 'sass'),
dest: path.join(__dirname, 'dist'),
debug: true,
- outputStyle: 'nested'
+ outputStyle: 'nested',
+ sourceMap: path.join(__dirname, 'dist', 'bundle.css.map')
}));
app.use(webpackMiddleware(webpack(require('./webpack.config')), { |
e0c9aa962132838ef04566fa5ab3f61862e6cea0 | server.js | server.js | var http = require('http');
var express = require('express');
var app = express();
app.set('view engine', 'ejs');
// Setup the index page view
app.get('/', function(req, res) {
res.render('pages/index');
});
app.listen(8080);
/*
* Returns a fomatted date as a String in brackets, for logging purposes
*/
function g... | var http = require('http');
var express = require('express');
var app = express();
app.set('view engine', 'ejs');
// Setup the index page view
app.get('/', function(req, res) {
res.render('pages/index');
// Defines error handling
app.use(function(req, res, next) {
res.status(404);
// Respond... | Define 404 error handling functions | Define 404 error handling functions
| JavaScript | mit | jamestaylr/portfolio-website,jamestaylr/portfolio-website | ---
+++
@@ -7,9 +7,36 @@
// Setup the index page view
app.get('/', function(req, res) {
res.render('pages/index');
+ // Defines error handling
+ app.use(function(req, res, next) {
+ res.status(404);
+
+ // Respond with HTML page
+ if (req.accepts('html')) {
+ res.render('404'... |
5edecd0734bf8cebc0ca81ef7b0bd660edc40b27 | server.js | server.js | var express = require('express'),
OpenedCaptions = require('opened-captions');
// Make the server
var app = express();
var server = require('http').Server(app);
var io = require('socket.io')(server);
// Serve static content from "public" directory
app.use(express.static(__dirname + '/public'));
server.listen(8080)... | var express = require('express'),
OpenedCaptions = require('opened-captions');
// Make the server
var app = express();
var server = require('http').Server(app);
var io = require('socket.io')(server);
// Serve static content from "public" directory
app.use(express.static(__dirname + '/public'));
server.listen(8080)... | Use HTTP stream rather than HTTPS | Use HTTP stream rather than HTTPS
| JavaScript | mit | slifty/opened-captions-example,slifty/opened-captions-example | ---
+++
@@ -16,7 +16,7 @@
});
oc.addStream('server', {
- host: 'https://openedcaptions.com',
- port: 443,
- description: "CSPAN"
+ host: 'http://openedcaptions.media.mit.edu',
+ port: 8080,
+ description: "C-SPAN"
}); |
a3e6a580d964a134d885e6ec5bbf298507ae489d | app/modules/login/index.js | app/modules/login/index.js | import angular from 'angular';
import uiRouter from 'angular-ui-router';
import view from './view';
//====================================================================
export default angular.module('xoWebApp.login', [
uiRouter,
])
.config(function ($stateProvider) {
$stateProvider.state('login', {
u... | import angular from 'angular';
import uiRouter from 'angular-ui-router';
import view from './view';
//====================================================================
export default angular.module('xoWebApp.login', [
uiRouter,
])
.config(function ($stateProvider) {
$stateProvider.state('login', {
u... | Fix incorrect redirection after log in. | Fix incorrect redirection after log in.
| JavaScript | agpl-3.0 | vatesfr/xo-web,LamaDelRay/xo-web,LamaDelRay/xo-web,vatesfr/xo-web,borestad/xo-web,lmcro/xo-web,fbeauchamp/xo-web,fbeauchamp/xo-web,lmcro/xo-web,lmcro/xo-web,borestad/xo-web | ---
+++
@@ -18,10 +18,10 @@
.controller('LoginCtrl', function($scope, $state, $rootScope, xoApi) {
var toState, toStateParams;
{
- let state = $rootScope._login;
- if (state && (state = state.state)) {
- toState = state.name;
- toStateParams = state.stateParams;
+ let tmp = $... |
4efe6aee4943ff785496e4fe2a8078b746d629e0 | app/widgets/Rooms/rooms.js | app/widgets/Rooms/rooms.js | var Rooms = {
anonymous_room: false,
refresh: function() {
var items = document.querySelectorAll('#rooms_widget ul li:not(.subheader)');
var i = 0;
while(i < items.length)
{
if(items[i].dataset.jid != null) {
items[i].onclick = function(e) {
... | var Rooms = {
anonymous_room: false,
refresh: function() {
var items = document.querySelectorAll('#rooms_widget ul li:not(.subheader)');
var i = 0;
while(i < items.length)
{
if(items[i].dataset.jid != null) {
items[i].onclick = function(e) {
... | Fix missing notifications in Rooms | Fix missing notifications in Rooms
| JavaScript | agpl-3.0 | edhelas/movim,Ppjet6/movim,edhelas/movim,Ppjet6/movim,movim/movim,Ppjet6/movim,movim/movim,movim/movim,edhelas/movim,edhelas/movim | ---
+++
@@ -20,6 +20,8 @@
i++;
}
+
+ Notification_ajaxGet();
},
/**
@@ -52,7 +54,6 @@
}
MovimWebsocket.attach(function() {
- Rooms.refresh();
Rooms.anonymousInit();
Rooms_ajaxDisplay();
}); |
404c1d932e022b077da796c873764d8716a71e88 | testem.js | testem.js | module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'Chrome'
],
launch_in_dev: [
'Chrome'
],
browser_args: {
Chrome: {
ci: [
// --no-sandbox is needed when running Chrome inside a container
process.env.CI ? '--no-sandbox' :... | module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'Chrome'
],
launch_in_dev: [
'Chrome'
],
browser_args: {
Chrome: {
ci: [
// --no-sandbox is needed when running Chrome inside a container
process.env.CI ? '--no-sandbox' :... | Remove --disable-gpu flag when starting headless chrome | Remove --disable-gpu flag when starting headless chrome
The `--disable-gpu` flag is [no longer
necessary](https://bugs.chromium.org/p/chromium/issues/detail?id=737678) and, at
least in some cases, is [causing
issues](https://bugs.chromium.org/p/chromium/issues/detail?id=982977).
This flag has already been [remov... | JavaScript | mit | lytics/ember-data-model-fragments,lytics/ember-data-model-fragments,lytics/ember-data.model-fragments | ---
+++
@@ -13,7 +13,6 @@
// --no-sandbox is needed when running Chrome inside a container
process.env.CI ? '--no-sandbox' : null,
'--headless',
- '--disable-gpu',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio', |
78de692471579b9722f066d469ad87f910ab1da4 | testem.js | testem.js | /* eslint-disable */
module.exports = {
"framework": "qunit",
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
"launch_in_ci": [
"Chrome"
],
"launch_in_dev": [
"Chrome"
]
};
| /* eslint-disable */
module.exports = {
"framework": "qunit",
"test_page": "tests/index.html?hidepassed&nocontainer",
"disable_watching": true,
"launch_in_ci": [
"Chrome"
],
"launch_in_dev": [
"Chrome"
]
};
| Hide container by default when running tests | Hide container by default when running tests
| JavaScript | mit | ember-cli/ember-ajax,ember-cli/ember-ajax,ember-cli/ember-ajax | ---
+++
@@ -2,7 +2,7 @@
module.exports = {
"framework": "qunit",
- "test_page": "tests/index.html?hidepassed",
+ "test_page": "tests/index.html?hidepassed&nocontainer",
"disable_watching": true,
"launch_in_ci": [
"Chrome" |
f394e601e69aef805f95a3d55faa2d7755dcfb39 | src/js/constants/TaskTableHeaderLabels.js | src/js/constants/TaskTableHeaderLabels.js | var TaskTableHeaderLabels = {
cpus: 'CPU',
disk: 'DISK',
host: 'HOST',
mem: 'MEM',
id: 'TASK NAME',
name: 'TASK NAME',
status: 'STATUS',
updated: 'UPDATED',
version: 'VERSION'
};
module.exports = TaskTableHeaderLabels;
| var TaskTableHeaderLabels = {
cpus: 'CPU',
disk: 'DISK',
host: 'HOST',
mem: 'MEM',
id: 'TASK ID',
name: 'TASK NAME',
status: 'STATUS',
updated: 'UPDATED',
version: 'VERSION'
};
module.exports = TaskTableHeaderLabels;
| Correct heading for task table ID column | Correct heading for task table ID column
| JavaScript | apache-2.0 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | ---
+++
@@ -3,7 +3,7 @@
disk: 'DISK',
host: 'HOST',
mem: 'MEM',
- id: 'TASK NAME',
+ id: 'TASK ID',
name: 'TASK NAME',
status: 'STATUS',
updated: 'UPDATED', |
afeb6bed38bc1c31b1f95914056b972efb3ec56f | src/index.js | src/index.js | // We load the Safari fix before document-register-element because DRE
// overrides attachShadow() and calls back the one it finds on HTMLElement.
import './fix/safari';
import 'document-register-element';
import '@webcomponents/shadydom';
import '@webcomponents/shadycss';
| // We load the Safari fix before document-register-element because DRE
// overrides attachShadow() and calls back the one it finds on HTMLElement.
import './fix/safari';
import 'document-register-element';
import '@webcomponents/shadycss';
import '@webcomponents/shadydom';
| Revert "fix: You have to include shadydom before shadycss else shadycss will not work." | Revert "fix: You have to include shadydom before shadycss else shadycss will not work."
This reverts commit 831a3a7ffbc6b53c5766ac1564dc3f95c5b74ef0.
| JavaScript | mit | skatejs/web-components | ---
+++
@@ -2,5 +2,5 @@
// overrides attachShadow() and calls back the one it finds on HTMLElement.
import './fix/safari';
import 'document-register-element';
+import '@webcomponents/shadycss';
import '@webcomponents/shadydom';
-import '@webcomponents/shadycss'; |
2977c20bac8717b39a325436d7381ca9d5a37b00 | src/index.js | src/index.js | import {inspect} from "util";
import {getProperties, isImmutable, isNumeric} from "./helpers";
// LENS ============================================================================================
function createGetter(key) {
return function getter(data) {
if (key) {
if (isImmutable(data)) {
throw n... | import {inspect} from "util";
import {getProperties, isImmutable, isNumeric} from "./helpers";
// LENS ============================================================================================
function createGetter(key) {
return function getter(data) {
if (key) {
if (isImmutable(data)) {
throw n... | Support native objects in getter | Support native objects in getter
| JavaScript | mit | Paqmind/tcomb-lens,Paqmind/tcomb-lens | ---
+++
@@ -8,14 +8,13 @@
if (isImmutable(data)) {
throw new Error(`can't get key ${inspect(key)} from immutable data ${inspect(data)}`);
} else {
- if (data.meta.kind == "dict") {
+ if (data.meta && data.meta.kind == "dict") {
return data.meta.codomain;
- } else... |
2b486327b43390946af416759a05213f19a4a912 | src/index.js | src/index.js | import chain from './chain';
import {clone} from './utils';
function vq(el, props, opts = null) {
if (!el || !props) throw new Error('Must have two or three args');
if (!opts) {
if (!('p' in props && 'o' in props)) {
throw new Error('2nd arg must have `p` and `o` property when only two args is given');
... | import chain from './chain';
import {clone} from './utils';
function vq(el, props, opts = null) {
if (!el || !props) throw new Error('Must have two or three args');
if (!opts) {
if (!('p' in props && 'o' in props)) {
throw new Error('2nd arg must have `p` and `o` property when only two args is given');
... | Split the function for call and wait processes | [Refactoring] Split the function for call and wait processes
| JavaScript | mit | ktsn/vq | ---
+++
@@ -30,26 +30,32 @@
}
vq.sequence = function sequence(seq) {
- const head = seq[0];
+ if (seq.length === 0) return;
+
+ const head = unify(seq[0]);
const tail = seq.slice(1);
- if (typeof head !== 'function') return;
-
- if (head.length > 0) {
- // Ensure there is a callback function as 1st a... |
31e72bfcc30fa13863bc67640ee3b88a3abbb4a1 | src/index.js | src/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import Main from './components/Main';
import reducer from './reducers';
import { SHOW_DEVTOOLS } from './constants';
cons... | import React from 'react';
import ReactDOM from 'react-dom';
import thunk from 'redux-thunk';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import reducer from './reducers';
import { SHOW_DEVTOOLS } from './constants';
const middlewares = [
applyMiddleware(th... | Fix HMR with some help from my good friend Dan | Fix HMR with some help from my good friend Dan
| JavaScript | mit | bjacobel/rak,bjacobel/rak,bjacobel/react-redux-boilerplate,bjacobel/react-redux-boilerplate,bjacobel/rak | ---
+++
@@ -4,7 +4,6 @@
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
-import Main from './components/Main';
import reducer from './reducers';
import { SHOW_DEVTOOLS } from './constants';
@@ -18,10 +17,24 @@
const composedCreateStore = compose.apply(... |
9921ad5b87592655d4bca449924ff7cd2a2ecacb | src/popup.js | src/popup.js | import React, { PropTypes } from 'react';
import ProjectedLayer from './projected-layer';
import {
anchors,
OverlayPropTypes,
} from './util/overlays';
const defaultClassName = ['mapboxgl-popup'];
export default class Popup extends React.Component {
static propTypes = {
coordinates: PropTypes.arrayOf(PropTy... | import React, { PropTypes } from 'react';
import ProjectedLayer from './projected-layer';
import {
anchors,
OverlayPropTypes,
} from './util/overlays';
export default class Popup extends React.Component {
static propTypes = {
coordinates: PropTypes.arrayOf(PropTypes.number).isRequired,
anchor: OverlayPro... | Fix mutable className array in Popup | Fix mutable className array in Popup
| JavaScript | mit | lamuertepeluda/react-mapbox-gl,alex3165/react-mapbox-gl,lamuertepeluda/react-mapbox-gl,alex3165/react-mapbox-gl,alex3165/react-mapbox-gl,alex3165/react-mapbox-gl,lamuertepeluda/react-mapbox-gl,lamuertepeluda/react-mapbox-gl | ---
+++
@@ -4,8 +4,6 @@
anchors,
OverlayPropTypes,
} from './util/overlays';
-
-const defaultClassName = ['mapboxgl-popup'];
export default class Popup extends React.Component {
static propTypes = {
@@ -24,10 +22,6 @@
render() {
const { coordinates, anchor, offset, onClick, children, style } = th... |
f7c78f2e63d3247479e91087ec31c5eb9033af34 | src/store.js | src/store.js | import thunk from 'redux-thunk'
import createLogger from 'redux-logger'
import { browserHistory } from 'react-router'
import { syncHistory } from 'react-router-redux'
import { combineReducers, compose, createStore, applyMiddleware } from 'redux'
import { autoRehydrate } from 'redux-persist'
import { analytics, authenti... | import thunk from 'redux-thunk'
import createLogger from 'redux-logger'
import { browserHistory } from 'react-router'
import { syncHistory } from 'react-router-redux'
import { combineReducers, compose, createStore, applyMiddleware } from 'redux'
import { autoRehydrate } from 'redux-persist'
import { analytics, authenti... | Move authentication higher up the food chain | Move authentication higher up the food chain
| JavaScript | mit | ello/webapp,ello/webapp,ello/webapp | ---
+++
@@ -17,10 +17,10 @@
autoRehydrate(),
applyMiddleware(
thunk,
+ authentication,
reduxRouterMiddleware,
uploader,
requester,
- authentication,
analytics,
logger
), |
d381deebcb82dcbc13000d0bc4819a003385b77f | test/main.js | test/main.js | var gulp = require('gulp');
var gulpB = require('../');
var expect = require('chai').expect;
var es = require('event-stream');
var path = require('path');
var browserify = require('browserify');
describe('gulp-browserify', function() {
var testFile = path.join(__dirname, './test.js');
var fileContents;
beforeEach(... | var gulp = require('gulp');
var gulpB = require('../');
var expect = require('chai').expect;
var es = require('event-stream');
var path = require('path');
var browserify = require('browserify');
describe('gulp-browserify', function() {
var testFile = path.join(__dirname, './test.js');
var fileContents;
beforeEach(... | Add test to verify usage of gulp version of file | Add test to verify usage of gulp version of file
| JavaScript | mit | deepak1556/gulp-browserify | ---
+++
@@ -34,4 +34,17 @@
done();
})
})
+ it('should use the gulp version of the file', function(done) {
+ gulp.src(testFile)
+ .pipe(es.map(function(file, cb) {
+ file.contents = new Buffer('var abc=123;');
+ cb(null, file);
+ }))
+ .pipe(gulpB())
+ .pipe(es.map(function(file) {
+ expect(... |
a7c21fc87578062b393e897f3b3ca5ff4c8be542 | test/main.js | test/main.js | /* eslint-disable no-console, no-duplicate-imports, import/no-duplicates */
import proxyquire from 'proxyquire';
import describe from '../src';
import { specStream } from '../src';
describe('RxT', (it) => {
it('should run a simple passing and failing given/when/then test', test => test
.given('givenWhenThe... | /* eslint-disable no-console, no-duplicate-imports, import/no-duplicates */
import _ from 'lodash';
import proxyquire from 'proxyquire';
import describe from '../src';
import { specStream } from '../src';
describe('RxT', (it) => {
it('should run a simple passing and failing given/when/then test', test => test
... | Test the actual test result. | Test the actual test result.
| JavaScript | mit | RayBenefield/RxT | ---
+++
@@ -1,4 +1,5 @@
/* eslint-disable no-console, no-duplicate-imports, import/no-duplicates */
+import _ from 'lodash';
import proxyquire from 'proxyquire';
import describe from '../src';
import { specStream } from '../src';
@@ -17,13 +18,18 @@
.then(
(result) => {
cons... |
2f2435b59601f79388e664e918f54dc25cfe4177 | app/js/arethusa_util.js | app/js/arethusa_util.js | "use strict";
// Provides the global arethusaUtil object which comes with several
// utility functions
window.arethusaUtil = {
// Pads a number with zeros
formatNumber: function(number, length) {
// coerce a fixnum to a string
var n = "" + number;
while (n.length < length) { n = "0" + n; }
return ... | "use strict";
// Provides the global arethusaUtil object which comes with several
// utility functions
var arethusaUtil = {
// Pads a number with zeros
formatNumber: function(number, length) {
// coerce a fixnum to a string
var n = "" + number;
while (n.length < length) { n = "0" + n; }
return n;
... | Add some xml functions to arethusaUtil | Add some xml functions to arethusaUtil
| JavaScript | mit | latin-language-toolkit/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa | ---
+++
@@ -3,12 +3,19 @@
// Provides the global arethusaUtil object which comes with several
// utility functions
-window.arethusaUtil = {
+var arethusaUtil = {
// Pads a number with zeros
formatNumber: function(number, length) {
// coerce a fixnum to a string
var n = "" + number;
while (n.l... |
a8321824ba18e1655167b216d3c03748673cb1e9 | app/routes/dashboard.js | app/routes/dashboard.js | import Ember from 'ember';
export default Ember.Route.extend({
renderTemplate() {
this.render( 'admin', {
controller: 'dashboard'
});
}
});
| import Ember from 'ember';
export default Ember.Route.extend({
activate() {
$( 'body' ).removeClass( 'login' )
},
renderTemplate() {
this.render( 'admin', {
controller: 'dashboard'
});
}
});
| Remove "login" class after transition | Remove "login" class after transition
| JavaScript | mit | kunni80/server,muffin/server | ---
+++
@@ -1,6 +1,10 @@
import Ember from 'ember';
export default Ember.Route.extend({
+
+ activate() {
+ $( 'body' ).removeClass( 'login' )
+ },
renderTemplate() {
this.render( 'admin', { |
7c533789deeadc740dd961caa60834231b26f26d | web.js | web.js | // web.js
var express = require("express");
var logfmt = require("logfmt");
var app = express();
app.use(logfmt.requestLogger());
app.get('/', function(req, res) {
res.send('Hello World!');
});
var port = Number(process.env.PORT || 8000);
app.listen(port, function() {
console.log("Listening on " + port);
}); | // web.js
var express = require("express");
var logfmt = require("logfmt");
var app = express();
app.use(logfmt.requestLogger());
app.get('*', function(req, res) {
res.sendfile('./app/index.html'); // load our app/index.html file
});
var port = Number(process.env.PORT || 8000);
app.listen(port, function() {
cons... | Make index page appear on heroku | Make index page appear on heroku
| JavaScript | mit | sharlwong/phuxuan | ---
+++
@@ -5,8 +5,8 @@
app.use(logfmt.requestLogger());
-app.get('/', function(req, res) {
- res.send('Hello World!');
+app.get('*', function(req, res) {
+ res.sendfile('./app/index.html'); // load our app/index.html file
});
var port = Number(process.env.PORT || 8000); |
1d86fb05c2a3b347cd93bd4b97e2eafeb8177c31 | app/actions/verticalTreeActions.js | app/actions/verticalTreeActions.js | const updateStructure = newState => {
return { type: 'UPDATE_VERT_STRUCTURE', newState };
};
const highlightNode = (delay, unHighlight, nodeId) => {
setTimeout(() => unHighlight(nodeId), delay / 1.1);
return { type: 'HIGHLIGHT_NODE', nodeId };
};
const unHighlightNode = nodeId => {
return { type: 'UNHIGHLIGHT... | const updateStructure = newState => ({ type: 'UPDATE_VERT_STRUCTURE', newState });
const highlightNode = nodeId => (dispatch, getState) => {
setTimeout(() => dispatch(unHighlightNode(nodeId)), getState().async.delay / 1.1);
dispatch({ type: 'HIGHLIGHT_NODE', nodeId });
};
const unHighlightNode = nodeId => ({ type... | Use thunk to access delay state | Use thunk to access delay state
| JavaScript | mit | ivtpz/brancher,ivtpz/brancher | ---
+++
@@ -1,15 +1,11 @@
-const updateStructure = newState => {
- return { type: 'UPDATE_VERT_STRUCTURE', newState };
+const updateStructure = newState => ({ type: 'UPDATE_VERT_STRUCTURE', newState });
+
+const highlightNode = nodeId => (dispatch, getState) => {
+ setTimeout(() => dispatch(unHighlightNode(nodeId))... |
d2cc1cf05bda3e9e90520dfa9a53818d509852b5 | addon/components/karbon-sortable-item.js | addon/components/karbon-sortable-item.js | import Ember from 'ember';
import layout from '../templates/components/karbon-sortable-item';
export default Ember.Component.extend({
tagName: 'li',
classNames: ['spacer'],
classNameBindings: ['handleClass', 'isSection:section', 'isNested:nested'],
attributeBindings: ['draggable', 'pkid:data-pkid'],
handleCl... | import Ember from 'ember';
import layout from '../templates/components/karbon-sortable-item';
export default Ember.Component.extend({
tagName: 'li',
classNames: ['spacer'],
classNameBindings: ['handleClass', 'isSection:section', 'isNested:nested'],
attributeBindings: ['draggable', 'pkid:data-pkid'],
handleCl... | Disable dragging sections for now. | Disable dragging sections for now.
| JavaScript | mit | PracticeIQ/karbon-sortable,PracticeIQ/karbon-sortable | ---
+++
@@ -7,7 +7,8 @@
classNameBindings: ['handleClass', 'isSection:section', 'isNested:nested'],
attributeBindings: ['draggable', 'pkid:data-pkid'],
handleClass: 'droppable',
- draggable: 'true',
+ // temporary
+ draggable: Ember.computed.not('data.isSection'),
isSection: Ember.computed.alias('data.... |
11a04087e5f95d5fc88fb3a1a4a9724ab777e01d | routing.js | routing.js | var fs = require('fs');
var flatiron = require('flatiron'),
app = flatiron.app;
app.use(flatiron.plugins.http, {
// HTTP options
});
var text_index = fs.readFileSync('index.html');
var buff_index = new Buffer(text_index);
app.router.get('/', function () {
this.res.end(buff_index.toString());
});
app.router.g... | var fs = require('fs');
var flatiron = require('flatiron'),
app = flatiron.app;
app.use(flatiron.plugins.http, {
// HTTP options
});
var text_index = fs.readFileSync('index.html');
var buff_index = new Buffer(text_index);
app.router.get('/', function () {
this.res.end(buff_index.toString());
});
app.router.g... | Change port number t o 5000, per heroku instructions | Change port number t o 5000, per heroku instructions
| JavaScript | mit | jmartenstein/bitcoinshirt | ---
+++
@@ -19,4 +19,4 @@
this.res.end( 'flatiron' + flatiron.version );
});
-app.start(8080);
+app.start(5000); |
a6dec3496e752f76b76f1e572587a401d5f245a2 | assets/js/hxp-import-functions.js | assets/js/hxp-import-functions.js | /**
* * Created by PhpStorm.
* User: Philipp Dippel Inf | DMS - M
* For Project: headerXporter
* Date: 29.08.17
* Copyright: Philipp Dippel
*/
jQuery(document).ready(() => {
function crazyshit()
{
console.log("Hallo");
}
}); | /**
* * Created by PhpStorm.
* User: Philipp Dippel Inf | DMS - M
* For Project: headerXporter
* Date: 29.08.17
* Copyright: Philipp Dippel
*/
jQuery(document).ready(() => {
let hxp_file_input = jQuery('#zip_file');
let hxp_submit_button = jQuery('#submitButton');
hxp_file_input.change(() => {
... | Add Javascript check for selected file in importer | Add Javascript check for selected file in importer
| JavaScript | mit | Pjirlip/X-Porter,Pjirlip/X-Porter | ---
+++
@@ -8,9 +8,20 @@
jQuery(document).ready(() => {
- function crazyshit()
- {
- console.log("Hallo");
- }
+ let hxp_file_input = jQuery('#zip_file');
+ let hxp_submit_button = jQuery('#submitButton');
+
+ hxp_file_input.change(() => {
+ if (hxp_file_input.val() !== '')
+ ... |
1b609f9fdf96ce497557cdda7a979587f360b8e0 | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jasmine: {
geojson_to_gmaps: {
src: 'geojson-to-gmaps.js',
options: {
specs: 'spec/*Spec.js',
... | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jasmine: {
geojson_to_gmaps: {
src: 'geojson-to-gmaps.js',
options: {
specs: 'spec/*Spec.js',
... | Update jshint to work with the correct files. | Update jshint to work with the correct files.
| JavaScript | mit | MarkBennett/geojson_to_gmaps | ---
+++
@@ -14,7 +14,7 @@
}
},
jshint: {
- all: ['Gruntfile.js', 'src/**/*.js', 'spec/**/*.js']
+ all: ['Gruntfile.js', 'geojson-to-gmaps.js', 'spec/**/*.js']
},
uglify: {
options: { |
f08964092048b6d8f8b9643d1e6179e9cc2dcc6f | addon/input.js | addon/input.js | import Em from 'ember';
import FormGroupComponent from './group';
import ControlMixin from 'ember-idx-forms/mixins/control';
/*
Form Input
Syntax:
{{em-input property="property name"}}
*/
export default FormGroupComponent.extend({
controlView: Em.TextField.extend(ControlMixin, {
attributeBindings: ['placeholde... | import Em from 'ember';
import FormGroupComponent from './group';
import ControlMixin from 'ember-idx-forms/mixins/control';
/*
Form Input
Syntax:
{{em-input property="property name"}}
*/
export default FormGroupComponent.extend({
controlView: Em.TextField.extend(ControlMixin, {
attributeBindings: ['placeholde... | Revert "add support for addon icon (requires FontAwesome)" | Revert "add support for addon icon (requires FontAwesome)"
This reverts commit 5db7b0a5550757c653de869516c308ff10452b74.
| JavaScript | apache-2.0 | Szeliga/ember-forms,Szeliga/ember-forms | ---
+++
@@ -19,7 +19,6 @@
model: Em.computed.alias('parentView.model'),
propertyName: Em.computed.alias('parentView.propertyName')
}),
- addonIcon: false,
property: void 0,
label: void 0,
placeholder: void 0, |
ebd26bd534f59588839f5e7a783cd9dde7eaf091 | app/api/app.js | app/api/app.js | /**
* Module dependencies.
*/
var express = require('express'),
Check = require('../../models/check')
CheckEvent = require('../../models/checkEvent');
var app = module.exports = express.createServer();
// middleware
app.configure(function(){
app.use(app.router);
app.use(express.errorHandler({ d... | /**
* Module dependencies.
*/
var express = require('express'),
Check = require('../../models/check')
CheckEvent = require('../../models/checkEvent');
var app = module.exports = express.createServer();
// middleware
app.configure(function(){
app.use(app.router);
app.use(express.errorHandler({ d... | Fix race condition in api causing bad counts in dashboard. | Fix race condition in api causing bad counts in dashboard.
A CheckEvent triggers both a refresh of the count in the api and in the
dashboard - the dashboard asking the api for a fresher value. When using
websockets, the response from MongoDB could happen after the request
from the dashboard.
The fix forces the dashbo... | JavaScript | mit | fzaninotto/uptime,rkmallik/uptime-openshift,SaravananPerumal23/uptime2,ptisp/uptime,RafeHatfield/nodeuptime,sinkingshriek/uptime,cloudfoundry-community/uptime-cfready,b-pedzik/uptime,GuptaVineet-IBM/upTime_ford,ptisp/uptime,phanan/uptime,nacyot/uptime,nerevu/uptime,SufianHassan/uptime,SpringerPE/uptime,blendlabs/uptime... | ---
+++
@@ -16,19 +16,25 @@
// up count
var upCount;
-var refreshUpCount = function() {
+var refreshUpCount = function(callback) {
Check.count({}, function(err, total) {
Check.count({ isUp: true}, function(err, nbUp) {
upCount = { up: nbUp, down: total - nbUp, total: total };
+ callback();
... |
bdfa853c6e4657c8afdab906bf50461a8e26a43b | webpack.build.config.js | webpack.build.config.js | const commonConfig = require("./webpack.common.config");
const nodeExternals = require("webpack-node-externals");
const merge = (...objs) => require("deepmerge").all(objs, {arrayMerge: (arr1, arr2) => arr1.concat(arr2) });
const combinedConfig = merge({}, commonConfig, {
output: {
path: "./dist",
libraryTarget: "... | const path = require("path");
const commonConfig = require("./webpack.common.config");
const nodeExternals = require("webpack-node-externals");
const merge = (...objs) => require("deepmerge").all(objs, {arrayMerge: (arr1, arr2) => arr1.concat(arr2) });
const combinedConfig = merge({}, commonConfig, {
output: {
path... | Fix absolute path requirement for output.path since webpack 2.3.0 | Fix absolute path requirement for output.path since webpack 2.3.0
| JavaScript | mit | aeinbu/webpack-npm-package-template,aeinbu/webpack-npm-package-template | ---
+++
@@ -1,10 +1,11 @@
+const path = require("path");
const commonConfig = require("./webpack.common.config");
const nodeExternals = require("webpack-node-externals");
const merge = (...objs) => require("deepmerge").all(objs, {arrayMerge: (arr1, arr2) => arr1.concat(arr2) });
const combinedConfig = merge({},... |
717e09e2cdbcf1e9bb79925ed0964ac5bc5d5e7f | webapp/web/js/imageUpload/cropImage.js | webapp/web/js/imageUpload/cropImage.js | /* $This file is distributed under the terms of the license in /doc/license.txt$ */
(function($) {
$(window).load(function(){
var jcrop_api = $.Jcrop('#cropbox',{
onChange: showPreview,
onSelect: showPreview,
aspectRatio: 1
});
var bounds = jcrop_api.getBounds();
var boundx = bounds[0];
var boun... | /* $This file is distributed under the terms of the license in /doc/license.txt$ */
(function($) {
$(window).load(function(){
var jcrop_api = $.Jcrop('#cropbox',{
onChange: showPreview,
onSelect: showPreview,
setSelect: [ 0, 0, 115, 115 ],
minSize: [115,115],
maxSize: [300,300],
aspectRatio: 1... | Set an initial selection area of 115 by 115 pixels. Added minimum (115 by 115 pixels) and maximum (300 by 300 pixels) sizes for cropping images | Set an initial selection area of 115 by 115 pixels. Added minimum (115 by 115 pixels) and maximum (300 by 300 pixels) sizes for cropping images
| JavaScript | bsd-3-clause | vivo-project/Vitro,vivo-project/Vitro,vivo-project/Vitro,vivo-project/Vitro | ---
+++
@@ -7,6 +7,9 @@
var jcrop_api = $.Jcrop('#cropbox',{
onChange: showPreview,
onSelect: showPreview,
+ setSelect: [ 0, 0, 115, 115 ],
+ minSize: [115,115],
+ maxSize: [300,300],
aspectRatio: 1
});
|
ad6ca0bde17ece30283aad0438a697f07e817054 | app/view/lib/jquery-watchchanges/jquery-watchchanges.js | app/view/lib/jquery-watchchanges/jquery-watchchanges.js | /*!
* Small jQuery plugin to detect whether or not a form's values have been changed.
* @see: https://gist.github.com/DrPheltRight/4131266
* Written by Luke Morton, licensed under MIT. Adapted for Bolt by Bob.
*/
(function ($) {
$.fn.watchChanges = function () {
// First, make sure the underlying text... | /*!
* Small jQuery plugin to detect whether or not a form's values have been changed.
* @see: https://gist.github.com/DrPheltRight/4131266
* Written by Luke Morton, licensed under MIT. Adapted for Bolt by Bob.
*/
(function ($) {
$.fn.watchChanges = function () {
// First, make sure the underlying text... | Check for existance of CKEditor | Check for existance of CKEditor | JavaScript | mit | Intendit/bolt,nantunes/bolt,Raistlfiren/bolt,electrolinux/bolt,HonzaMikula/masivnipostele,GDmac/bolt,marcin-piela/bolt,Raistlfiren/bolt,cdowdy/bolt,joshuan/bolt,romulo1984/bolt,xeddmc/bolt,joshuan/bolt,Intendit/bolt,joshuan/bolt,electrolinux/bolt,HonzaMikula/masivnipostele,bywatersolutions/reports-site,CarsonF/bolt,rom... | ---
+++
@@ -8,8 +8,10 @@
$.fn.watchChanges = function () {
// First, make sure the underlying textareas are updated with the content in the CKEditor fields.
- for (var instanceName in CKEDITOR.instances) {
- CKEDITOR.instances[instanceName].updateElement();
+ if (typeof CKEDIT... |
2daa402d06f45c7f75f4909b59b022542363be5c | workers/social/index.js | workers/social/index.js | var argv = require('minimist')(process.argv);
require('coffee-script').register();
module.exports = require('./lib/social/main.coffee');
| require('coffee-script').register();
module.exports = require('./lib/social/main.coffee');
| Remove unused command line options parsing code | Remove unused command line options parsing code
Signed-off-by: Sonmez Kartal <d2d15c3d37396a5f2a09f8b42cf5f27d43a3fbde@koding.com>
| JavaScript | agpl-3.0 | kwagdy/koding-1,drewsetski/koding,drewsetski/koding,andrewjcasal/koding,acbodine/koding,szkl/koding,cihangir/koding,usirin/koding,koding/koding,sinan/koding,alex-ionochkin/koding,sinan/koding,sinan/koding,rjeczalik/koding,alex-ionochkin/koding,cihangir/koding,sinan/koding,usirin/koding,acbodine/koding,szkl/koding,jack8... | ---
+++
@@ -1,4 +1,2 @@
-var argv = require('minimist')(process.argv);
-
require('coffee-script').register();
module.exports = require('./lib/social/main.coffee'); |
a13cba3494c5fa4ccb86df8ed8df3d80f646ce1b | app.js | app.js | 'use strict';
var nouns = [
'cat',
'dog',
'mouse',
'house'
];
var firstNoun = '';
var secondNoun = '';
var metaphor = '';
var numberOfNouns = nouns.length;
var lastNounIndex = nouns.length - 1;
var nounIndex1 = 0;
var nounIndex2 = 0;
console.log('The list of nouns is ' + nouns);
console.log('The first noun i... | 'use strict';
var nouns = [
'cat',
'dog',
'mouse',
'house'
];
var firstNoun = '';
var secondNoun = '';
var metaphor = '';
var numberOfNouns = nouns.length;
var nounIndex1 = 0;
var nounIndex2 = 0;
// Returns a random integer between min (included) and max (excluded)
// Using Math.round() will give you a non-u... | Remove logging to console from debugging | Remove logging to console from debugging
| JavaScript | mit | epan/thisisathat | ---
+++
@@ -11,16 +11,8 @@
var metaphor = '';
var numberOfNouns = nouns.length;
-var lastNounIndex = nouns.length - 1;
var nounIndex1 = 0;
var nounIndex2 = 0;
-
-console.log('The list of nouns is ' + nouns);
-console.log('The first noun is ' + nouns[0]);
-console.log('The last noun is ' + nouns[lastNounIndex]);... |
79b151c4fe8bb5f04fd529eb8e36e330902aa960 | i2mx.js | i2mx.js | /*
#
# i2mx.js - v0.1-Alpha
# Apache v2 License
#
*/
// Create img2musicXML (abbreviated as i2mx) namespace
var i2mx = i2mx || { };
// Create JsCheckup class (@TODO: Move to inside namespace)
var JsCheckup = function() {
this.divId = "i2mx-checkup";
this.activate = function() {
var div = document.getElementById... | /*
#
# i2mx.js - v0.1-Alpha
# Apache v2 License
#
*/
// Create img2musicXML (abbreviated as i2mx) namespace
var i2mx = i2mx || { };
// Create JsCheckup class (@TODO: Move to inside namespace)
var JsCheckup = function() {
this.divId = "i2mx-checkup";
this.activate = function() {
// @TODO: Use HTML generator
... | Add File and Blob APIs testing. | Add File and Blob APIs testing.
| JavaScript | apache-2.0 | feikname/img2musicXML,feikname/img2musicXML | ---
+++
@@ -13,9 +13,22 @@
this.divId = "i2mx-checkup";
this.activate = function() {
+ // @TODO: Use HTML generator
+
+ // Initial values
var div = document.getElementById(this.divId);
+ var EOL = "<br>"
+ var checkupText = "";
- div.innerHTML = "No checklist for now, but img2musicXML loaded succ... |
b55033b51cdfccdd72d32cd5922032f44b822998 | notable/static/js/views/password.js | notable/static/js/views/password.js | /**
* @fileoverview Describes a password modal
*/
define([
'text!templates/password.html',
'backbone',
'underscore'
],
function(passwordModalTemplate) {
return Backbone.View.extend({
events: {
'click .modal-footer .btn:first': 'hide',
'click .modal-footer .btn-primary': 'submit',
'submit... | /**
* @fileoverview Describes a password modal
*/
define([
'text!templates/password.html',
'backbone',
'underscore'
],
function(passwordModalTemplate) {
return Backbone.View.extend({
events: {
'click .modal-footer .btn:first': 'hide',
'click .modal-footer .btn-primary': 'submit',
'submit... | Reset bootstrap alert before showing modal | [modal] Reset bootstrap alert before showing modal
| JavaScript | mit | jmcfarlane/Notable,jmcfarlane/Notable,jmcfarlane/Notable,jmcfarlane/Notable | ---
+++
@@ -37,11 +37,16 @@
return this.$('.error').html(msg).show();
},
+ reset: function() {
+ this.$('.error').html('').hide()
+ },
+
setFocus: function() {
this.$('input').focus();
},
show: function(callback) {
+ this.reset();
this.callback = callback;
... |
31d246013ae1647130f7edb927b429ef1af472c0 | lib/web-debug-toolbar/assets/web-debug-toolbar.js | lib/web-debug-toolbar/assets/web-debug-toolbar.js | $(document).ready(function() {
$("#web-debug-toolbar .hidden-panel").hide();
$("#web-debug-toolbar .panel-toggle-button").hover(function() {
if ($("#web-debug-toolbar #" + this.rel).is(":hidden"))
$("#web-debug-toolbar .hidden-panel").hide()
$("#web-debug-toolbar #" + this.rel).toggle();
});
$("#web-debug... | $(document).ready(function() {
$("#web-debug-toolbar .hidden-panel").hide();
$("#web-debug-toolbar .panel-toggle-button").click(function() {
if ($("#web-debug-toolbar #" + this.rel).is(":hidden"))
$("#web-debug-toolbar .hidden-panel").hide()
$("#web-debug-toolbar #" + this.rel).toggle();
});
$("#web-debug... | Change event from hover to click to show the hidden-panels | Change event from hover to click to show the hidden-panels
| JavaScript | mit | ludovic-henry/web-debug-toolbar,ludovic-henry/web-debug-toolbar | ---
+++
@@ -1,7 +1,7 @@
$(document).ready(function() {
$("#web-debug-toolbar .hidden-panel").hide();
- $("#web-debug-toolbar .panel-toggle-button").hover(function() {
+ $("#web-debug-toolbar .panel-toggle-button").click(function() {
if ($("#web-debug-toolbar #" + this.rel).is(":hidden"))
$("#web-debug-too... |
b8e447746418ab5b38b76efb25cc25d2f1218db2 | dev/app/services/TbTable/TableBuilder/table-builder.service.js | dev/app/services/TbTable/TableBuilder/table-builder.service.js | tableBuilder.$inject = [ 'tableContent' ];
function tableBuilder (tableContent) {
const service = {
newTable: newTable,
append: append,
indexOf: indexOf,
remove: remove
};
function newTable (model) {
const table = {
headers: model.headers,
rows: []
... | tableBuilder.$inject = [ 'tableContent' ];
function tableBuilder (tableContent) {
const service = {
newTable: newTable,
emptyTable: emptyTable
};
function newTable (schema, model) {
const table = {
headers: schema.headers,
rows: []
};
for (const obj of mod... | Remove unnecessary functions and add emptyTable | Remove unnecessary functions and add emptyTable
| JavaScript | mit | Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC | ---
+++
@@ -3,35 +3,28 @@
function tableBuilder (tableContent) {
const service = {
newTable: newTable,
- append: append,
- indexOf: indexOf,
- remove: remove
+ emptyTable: emptyTable
};
- function newTable (model) {
+ function newTable (schema, model) {
const table = {
-... |
4d324dd4ca907d6943d3e523db11bf5d0b12abeb | both/lib/constants.js | both/lib/constants.js | JOB_TYPES = ["Full Time", "Hourly Contract", "Term Contract", "Mentoring", "Bounty", "Open Source", "Volunteer", "Other"];
SUMMERNOTE_OPTIONS = {
type: 'summernote',
height: 300,
minHeight: 300,
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'clear']],
['para', ['ul', 'ol... | JOB_TYPES = ["Full Time", "Part Time", "Hourly Contract", "Term Contract", "Mentoring", "Internship", "Bounty", "Open Source", "Volunteer", "Other"];
SUMMERNOTE_OPTIONS = {
type: 'summernote',
height: 300,
minHeight: 300,
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'clear... | Add part time and internship job types | Add part time and internship job types | JavaScript | mit | nate-strauser/wework,nate-strauser/wework | ---
+++
@@ -1,4 +1,4 @@
-JOB_TYPES = ["Full Time", "Hourly Contract", "Term Contract", "Mentoring", "Bounty", "Open Source", "Volunteer", "Other"];
+JOB_TYPES = ["Full Time", "Part Time", "Hourly Contract", "Term Contract", "Mentoring", "Internship", "Bounty", "Open Source", "Volunteer", "Other"];
SUMMERNOTE_OPTI... |
8c8449405d1926240c6023e21c247598a0dafbe6 | src/parser/druid/guardian/modules/features/MitigationCheck.js | src/parser/druid/guardian/modules/features/MitigationCheck.js | import CoreMitigationCheck from 'parser/shared/modules/MitigationCheck';
import SPELLS from 'common/SPELLS';
class MitigationCheck extends CoreMitigationCheck {
constructor(...args){
super(...args);
this.buffCheck = [SPELLS.IRONFUR.id,
SPELLS.FRENZIED_REGENERATION.id,
... | import CoreMitigationCheck from 'parser/shared/modules/MitigationCheck';
import SPELLS from 'common/SPELLS';
class MitigationCheck extends CoreMitigationCheck {
constructor(...args){
super(...args);
this.buffCheckPhysical = [
SPELLS.IRONFUR.id,
];
this.buffCheckPhysAndMag = [
SPELLS.FRE... | Update guardian druid for soft mitigation check damage schools. | Update guardian druid for soft mitigation check damage schools.
| JavaScript | agpl-3.0 | sMteX/WoWAnalyzer,fyruna/WoWAnalyzer,fyruna/WoWAnalyzer,anom0ly/WoWAnalyzer,sMteX/WoWAnalyzer,yajinni/WoWAnalyzer,Juko8/WoWAnalyzer,sMteX/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,yajinni/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,Juko8/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,... | ---
+++
@@ -5,10 +5,15 @@
class MitigationCheck extends CoreMitigationCheck {
constructor(...args){
super(...args);
- this.buffCheck = [SPELLS.IRONFUR.id,
- SPELLS.FRENZIED_REGENERATION.id,
- SPELLS.BARKSKIN.id,
- SPELLS.SURVIVAL_INSTINCTS.id]... |
bba9d73913ecc2aac9b86368606617893f95132b | migro/filestack/dev_console.js | migro/filestack/dev_console.js | (function () {
function b64EncodeUnicode(str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,
function toSolidBytes(match, p1) {
return String.fromCharCode('0x' + p1);
}));
}
var $btnLoadMore = jQuery('#console-loadmore');
var handles = [];
var loadMoreCallbac... | (function () {
function b64EncodeUnicode(str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,
function toSolidBytes(match, p1) {
return String.fromCharCode('0x' + p1);
}));
}
var $btnLoadMore = jQuery('#console-loadmore');
var handles = [];
var loadMoreCallbac... | Refactor filestack dev console script: | Refactor filestack dev console script:
- Add progress notifications
- Add proper next page handling
- Add filename and extension to the result file
| JavaScript | mit | uploadcare/migro,uploadcare/migro | ---
+++
@@ -12,19 +12,28 @@
var loadMoreCallback = function (event, jqXHR, options, data) {
if (options.url.startsWith(window.location.pathname + '/')) {
- if (data) {
+ if ($btnLoadMore.attr('disabled') !== 'disabled'){
+ console.log('Downloading more data for files list...');
$bt... |
b2719123d67f75bc637bf282c53c1b71c56bbf92 | lib/components/map/mapbox-gl.js | lib/components/map/mapbox-gl.js | import L from 'leaflet'
import {} from 'mapbox-gl-leaflet'
import {GridLayer, withLeaflet} from 'react-leaflet'
const accessToken = process.env.MAPBOX_ACCESS_TOKEN
const attribution = `© <a href='https://www.mapbox.com/about/maps/'>Mapbox</a> © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> <strong... | import L from 'leaflet'
import {} from 'mapbox-gl-leaflet'
import {GridLayer, withLeaflet} from 'react-leaflet'
const accessToken = process.env.MAPBOX_ACCESS_TOKEN
const attribution = `© <a href='https://www.mapbox.com/about/maps/'>Mapbox</a> © <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> <strong... | Disable interactivity on the mapbox gl layer since it is handled by leaflet | perf(mapboxgl): Disable interactivity on the mapbox gl layer since it is handled by leaflet
| JavaScript | mit | conveyal/analysis-ui,conveyal/analysis-ui,conveyal/analysis-ui | ---
+++
@@ -18,6 +18,7 @@
return L.mapboxGL({
accessToken,
attribution,
+ interactive: false,
pane: props.leaflet.map._panes.tilePane,
style: getStyle(props.style)
}) |
dde56b09bc441f5628b541a76c7bc2486b980c4c | src/extensions/subjects/tag_subject_tool.js | src/extensions/subjects/tag_subject_tool.js | var Application = require("substance-application");
var Component = Application.Component;
var $$ = React.createElement;
var _ = require("underscore");
// TagSubjectTool
// ----------------
var TagSubjectTool = React.createClass({
displayName: "TagSubjectTool",
handleClick: function(e) {
// this.props.switch... | var $$ = React.createElement;
var _ = require("underscore");
var util = require("substance-util");
// TagSubjectTool
// ----------------
var TagSubjectTool = React.createClass({
displayName: "TagSubjectTool",
handleClick: function(e) {
var doc = this.props.doc;
var writer = this.props.writer;
// TOD... | Create subject annotation when toggling subject tool. | Create subject annotation when toggling subject tool.
| JavaScript | mit | substance/archivist-composer,substance/archivist-composer | ---
+++
@@ -1,7 +1,6 @@
-var Application = require("substance-application");
-var Component = Application.Component;
var $$ = React.createElement;
var _ = require("underscore");
+var util = require("substance-util");
// TagSubjectTool
// ----------------
@@ -10,11 +9,34 @@
displayName: "TagSubjectTool",
... |
f41f91915dd312173e2c84567cf5977397aa0b19 | src/containers/Restricted.js | src/containers/Restricted.js | import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { showModalWindow } from 'actions/ModalActions';
import CheckAuth from 'components/CheckAuth';
const RestrictedWrapper = (WrappedComponent) => {
const Restricted = withRouter(React.createClass({
co... | import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { showModalWindow } from 'actions/ModalActions';
import CheckAuth from 'components/CheckAuth';
const RestrictedWrapper = (WrappedComponent) => {
const Restricted = withRouter(React.createClass({
co... | Fix rtestricted route showing modal | Fix rtestricted route showing modal
| JavaScript | apache-2.0 | iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend | ---
+++
@@ -16,7 +16,7 @@
);
} else {
router.goBack();
- this.props.showModalWindow('auth', location);
+ this.props.showModalWindow({ type: 'auth' }, location);
}
}
}, |
67ba39eb790d8c7baaf51025dd101bcc9cf2190c | server/Queue/getQueue.js | server/Queue/getQueue.js | const db = require('sqlite')
const squel = require('squel')
async function getQueue (roomId) {
const result = []
const entities = {}
try {
const q = squel.select()
.field('queueId, mediaId, userId')
.field('media.title, media.duration, media.provider, users.name AS username, artists.name AS arti... | const db = require('sqlite')
const squel = require('squel')
async function getQueue (roomId) {
const result = []
const entities = {}
try {
const q = squel.select()
.field('queueId, mediaId, userId')
.field('media.title, media.duration, media.provider, media.providerData')
.field('users.nam... | Include providerData for queue items | Include providerData for queue items
| JavaScript | isc | bhj/karaoke-forever,bhj/karaoke-forever | ---
+++
@@ -8,7 +8,8 @@
try {
const q = squel.select()
.field('queueId, mediaId, userId')
- .field('media.title, media.duration, media.provider, users.name AS username, artists.name AS artist')
+ .field('media.title, media.duration, media.provider, media.providerData')
+ .field('users.na... |
a65add662ca18941d6e38ca80f0d268cd8098f13 | public/js/jsondates.js | public/js/jsondates.js | /**
* convert json dates to date objects
* for all requests using the $http service
*
* @return callback for app.config()
*/
define([], function () {
'use strict';
var regexIso8601 = /^(\d{4}|\+\d{6})(?:-(\d{2})(?:-(\d{2})(?:T(\d{2}):(\d{2}):(\d{2})\.(\d{1,})(Z|([\-+])(\d{2}):(\d{2}))?)?)?)?$/;
functio... | /**
* convert json dates to date objects
* for all requests using the $http service
*
* @return callback for app.config()
*/
define([], function () {
'use strict';
var regexIso8601 = /^(\d{4}|\+\d{6})(?:-(\d{2})(?:-(\d{2})(?:T(\d{2}):(\d{2}):(\d{2})\.(\d{1,})(Z|([\-+])(\d{2}):(\d{2}))?)?)?)?$/;
functio... | Fix bug with automatic date transformations | Fix bug with automatic date transformations
| JavaScript | mit | gadael/gadael,gadael/gadael | ---
+++
@@ -25,6 +25,10 @@
var match;
// Check for string properties which look like dates.
if (typeof value === "string" && (match = value.match(regexIso8601))) {
+ if (!match[1] || !match[2] || !match[3] || !match[4] || !match[5] || !match[6]) {
+ ... |
5c07f22de61a6e96699819b45d4682297c66f0b2 | index.js | index.js | /*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS205: Consider reworking code to avoid use of IIFEs
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blo... | /*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* DS205: Consider reworking code to avoid use of IIFEs
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blo... | Fix undefined error in scripts | Fix undefined error in scripts
| JavaScript | mit | patsissons/hubot-giphy | ---
+++
@@ -18,7 +18,7 @@
const result = [];
for (const script of Array.from(fs.readdirSync(scriptsPath))) { // eslint-disable-line no-sync
- if ((scripts !== null) && !Array.from(scripts).includes('*')) {
+ if (scripts && !Array.from(scripts).includes('*')) {
if (Ar... |
5309b9ab76d9b6d244c44582de5ed6d8ba170fa8 | index.js | index.js | "use strict";
hex.Transform = require('./hex_transform');
hex.ChunkedTransform = require('./chunked_hex_transform');
module.exports = hex;
function hex(buffer, options) {
if (!options.offsetWidth) {
options.offsetWidth = 2 * Math.ceil(buffer.length.toString(16).length / 2);
}
var stream = hex.Tra... | "use strict";
hex.Transform = require('./hex_transform');
hex.ChunkedTransform = require('./chunked_hex_transform');
module.exports = hex;
function hex(buffer, options) {
options = options || {};
if (!options.offsetWidth) {
options.offsetWidth = 2 * Math.ceil(buffer.length.toString(16).length / 2);
... | Fix derp in primary interface | Fix derp in primary interface
| JavaScript | mit | kriskowal/hexer,jcorbin/hexer | ---
+++
@@ -6,6 +6,7 @@
module.exports = hex;
function hex(buffer, options) {
+ options = options || {};
if (!options.offsetWidth) {
options.offsetWidth = 2 * Math.ceil(buffer.length.toString(16).length / 2);
} |
8a1db8513c44695f52ac3ed2cd105c389f8f8518 | index.js | index.js | /* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-nouislider',
included: function(app) {
this._super.included(app);
if(!process.env.EMBER_CLI_FASTBOOT) {
// Fix for loading it in addons/engines
if (typeof app.import !== 'function' && app.app) {
app = app.app;
... | /* jshint node: true */
'use strict';
module.exports = {
name: 'ember-cli-nouislider',
included: function(app) {
this._super.included(app);
if(!process.env.EMBER_CLI_FASTBOOT) {
// Fix for loading it in addons/engines
app = recursivelyFindApp(app);
app.import({
development: app... | Improve handling of nested usage | Improve handling of nested usage
| JavaScript | mit | kennethkalmer/ember-cli-nouislider,kennethkalmer/ember-cli-nouislider,kennethkalmer/ember-cli-nouislider | ---
+++
@@ -9,9 +9,7 @@
if(!process.env.EMBER_CLI_FASTBOOT) {
// Fix for loading it in addons/engines
- if (typeof app.import !== 'function' && app.app) {
- app = app.app;
- }
+ app = recursivelyFindApp(app);
app.import({
development: app.bowerDirectory + '/nouisl... |
4278b190dc8088ab38672b5674fa5066fe427ba8 | index.js | index.js | var fs = require("fs");
var path = require("path");
var acme = require("acme/acme.json");
if (typeof(acme) !== 'undefined' && (!acme.hasOwnProperty("DomainsCertificate") ||
!acme.DomainsCertificate.hasOwnProperty("Certs"))) {
console.log("Nothing to do");
}
else {
if(typeof(acme) !== 'undefined'){
for (v... | var fs = require("fs");
var path = require("path");
var acme = require(__dirname + "/acme/acme.json");
if (typeof(acme) !== 'undefined' && (!acme.hasOwnProperty("DomainsCertificate") ||
!acme.DomainsCertificate.hasOwnProperty("Certs"))) {
console.log("Nothing to do");
}
else {
if(typeof(acme) !== 'undefined'... | Fix : Correcting path for acme.json | Fix : Correcting path for acme.json
| JavaScript | mit | dalim-it/docker-images,dalim-it/docker-images,dalim-it/docker-images | ---
+++
@@ -1,6 +1,6 @@
var fs = require("fs");
var path = require("path");
-var acme = require("acme/acme.json");
+var acme = require(__dirname + "/acme/acme.json");
if (typeof(acme) !== 'undefined' && (!acme.hasOwnProperty("DomainsCertificate") ||
!acme.DomainsCertificate.hasOwnProperty("Certs"))) { |
258906b161ddc783c21b918a34d264363c461daf | index.js | index.js | var _ = require('lodash');
exports.register = function (plugin, options, next) {
var environment = process.env.NODE_ENV || 'development';
// Hook onto the 'onPostHandler'
plugin.ext('onPostHandler', function (request, next) {
// Get the response object
var response = request.response;
... | var _ = require('lodash');
exports.register = function (plugin, options, next) {
var environment = process.env.NODE_ENV || 'development';
// Hook onto the 'onPostHandler'
plugin.ext('onPostHandler', function (request, next) {
// Get the response object
var response = request.response;
... | Fix issue with error when the context object is not set | Fix issue with error when the context object is not set
| JavaScript | mit | poeticninja/hapi-assets | ---
+++
@@ -11,10 +11,15 @@
// Check to see if the response is a view
if (response.variety === 'view') {
- if(_.isEmpty(response.source.context.assets)){
- response.source.context.assets = {};
- }
- response.source.context.assets = op... |
2b924c9b780e3266b1eba47b8e657ac82ad59996 | index.js | index.js | var sweet = require('sweet.js');
var gutil = require('gulp-util');
var applySourceMap = require('vinyl-sourcemaps-apply');
var es = require('event-stream');
var merge = require('merge');
module.exports = function(opts) {
var moduleCache = {};
return es.through(function(file) {
if(file.isNull()) {
return... | var sweet = require('sweet.js');
var gutil = require('gulp-util');
var applySourceMap = require('vinyl-sourcemaps-apply');
var es = require('event-stream');
var merge = require('merge');
module.exports = function(opts) {
if(opts.modules){
opts.modules = opts.modules.map(function(mod) {
return sweet.loadNo... | Load modules and set readtables only once | Load modules and set readtables only once
Don't re-setup modules and readtables for each file to prevent the module cache from breaking the plugin when processing multiple files. | JavaScript | bsd-2-clause | jlongster/gulp-sweetjs | ---
+++
@@ -5,7 +5,18 @@
var merge = require('merge');
module.exports = function(opts) {
- var moduleCache = {};
+
+ if(opts.modules){
+ opts.modules = opts.modules.map(function(mod) {
+ return sweet.loadNodeModule(process.cwd(), mod);
+ });
+ }
+
+ if(opts.readtables){
+ opts.readtables.forEach... |
aef23e6966ba96a53d3d46a92f2c5ec0c0876347 | index.js | index.js | 'use strict';
var jest = require('jest-cli'),
gutil = require('gulp-util'),
through = require('through2');
module.exports = function (options) {
options = options || {};
return through.obj(function (file, enc, cb) {
options.rootDir = options.rootDir || file.path;
jest.runCLI({
... | 'use strict';
var jest = require('jest-cli'),
gutil = require('gulp-util'),
through = require('through2');
module.exports = function (options) {
options = options || {};
return through.obj(function (file, enc, cb) {
options.rootDir = options.rootDir || file.path;
var cliOptions = {con... | Support --name options to filter spec files | Support --name options to filter spec files
| JavaScript | mit | M6Web/gulp-jest | ---
+++
@@ -8,9 +8,16 @@
options = options || {};
return through.obj(function (file, enc, cb) {
options.rootDir = options.rootDir || file.path;
- jest.runCLI({
- config: options
- }, options.rootDir, function (success) {
+
+ var cliOptions = {config: options};
+ ... |
2fae8caff4eb5f7dac7aafe16596337f9e99eb3d | index.js | index.js | 'use strict';
var net = require('net');
module.exports = {
get: get
};
function get(opts, text, callback) {
var socket = new net.Socket();
socket.connect(opts.port, opts.host, function () {
socket.setNoDelay(true);
socket.write(text + '\n');
});
socket.on('data', function (data) {
var re = /<([A-Z]+?)>(.... | 'use strict';
var net = require('net');
module.exports = {
get: get
};
function get(opts, text, callback) {
var socket = new net.Socket();
socket.connect(opts.port, opts.host, function () {
socket.setNoDelay(true);
socket.write(text.replace(/\r?\n|\r|\t/g, ' ') + '\n');
});
socket.on('data', function (data... | Fix no response due to newlines | Fix no response due
to newlines
| JavaScript | mit | niksrc/ner,niksrc/ner | ---
+++
@@ -10,7 +10,7 @@
socket.connect(opts.port, opts.host, function () {
socket.setNoDelay(true);
- socket.write(text + '\n');
+ socket.write(text.replace(/\r?\n|\r|\t/g, ' ') + '\n');
});
socket.on('data', function (data) { |
d27bcc3e5cfa824dabbb4f16bf9dcee17764ff77 | index.js | index.js | var config = require('./config'),
_ = require('underscore');
module.exports = require('./lib/api').Api.buildFromFile(config);
module.exports.configure = function(options) {
options = options || {};
_.defaults(options, config);
return require('./lib/api').Api.buildFromFile(options);
};
module.exports.oauth = re... | var config = require('./config'),
underscore = require('underscore');
module.exports = require('./lib/api').Api.buildFromFile(config);
module.exports.configure = function (options) {
options = options || {};
underscore.defaults(options, config);
return require('./lib/api').Api.buildFromFile(options);
};
module... | Rename underscore variable to fix jslint warning | Rename underscore variable to fix jslint warning
| JavaScript | isc | raoulmillais/7digital-api,raoulmillais/node-7digital-api,7digital/7digital-api | ---
+++
@@ -1,12 +1,12 @@
var config = require('./config'),
- _ = require('underscore');
+ underscore = require('underscore');
module.exports = require('./lib/api').Api.buildFromFile(config);
-module.exports.configure = function(options) {
+module.exports.configure = function (options) {
options = options || ... |
f1fce55cf4a1ba1205b040a51d5f7fb5dfc5615c | index.js | index.js | 'use strict';
var assign = require('object-assign');
var hasOwn = require('hasown');
module.exports = function(object, keys){
var result = {}
if (keys){
keys = keys.filter(hasOwn(object))
}
keys.forEach(function(key){
var value = object[key]
try { value = JSON.parse(value) } catch (ex){ }
result[key]... | 'use strict';
var assign = require('object-assign');
var hasOwn = require('hasown');
module.exports = function(object, keys){
var result = {}
if (Array.isArray(keys)){
keys = keys.filter(hasOwn(object))
}
keys.forEach(function(key){
var value = object[key]
try { value = JSON.parse(value) } catch (ex){ }... | Add Array.isArray check for keys | Add Array.isArray check for keys
| JavaScript | mit | radubrehar/parse-keys | ---
+++
@@ -7,7 +7,7 @@
var result = {}
- if (keys){
+ if (Array.isArray(keys)){
keys = keys.filter(hasOwn(object))
}
|
bb90814b60040ef1ebb5ceba46ab9d3086384c07 | packages/rotonde-core/src/server.js | packages/rotonde-core/src/server.js | import path from 'path';
import express from 'express';
import morgan from 'morgan';
require('dotenv').config();
export default callback => {
const server = express();
server.set('env', process.env.NODE_ENV || 'development');
server.set('host', process.env.HOST || '0.0.0.0');
server.set('port', process.env.PO... | import path from 'path';
import express from 'express';
import morgan from 'morgan';
require('dotenv').config();
export default callback => {
const server = express();
server.set('env', process.env.NODE_ENV || 'development');
server.set('host', process.env.HOST || '0.0.0.0');
server.set('port', process.env.PO... | Add some websocket debugging code | Add some websocket debugging code
| JavaScript | mit | merveilles/Rotonde,merveilles/Rotonde | ---
+++
@@ -10,6 +10,20 @@
server.set('host', process.env.HOST || '0.0.0.0');
server.set('port', process.env.PORT || 3000);
server.use(morgan(process.env.NODE_ENV === 'production' ? 'combined' : 'dev'));
+ server.use('/', (req, res, next) => {
+ return res.send(`
+ <script src="/socket.io/socket.i... |
810a957b56dee0d032535c3cfa403079ac32aa71 | gevents.js | gevents.js | 'use strict';
var request = require('request');
var opts = {
uri: 'https://api.github.com' + '/users/' + parseParams(process.argv[2]) + '/events',
json: true,
method: 'GET',
headers: {
'User-Agent': 'nodejs script'
}
}
request(opts, function (err, res, body) {
if (err) throw new Error... | 'use strict';
var request = require('request');
var opts = parseOptions(process.argv[2]);
request(opts, function (err, res, body) {
if (err) throw new Error(err);
var format = '[%s]: %s %s %s %s';
for (var i = 0; i < body.length; i++) {
/*
* TODO return something like this as JSON
... | Move options building to dedicated function | Move options building to dedicated function
* No validation (yet), just returns request-friendly object.
* Add newline before return in parseParams fn.
* Add newline to EOF
* TODO
** Validate parameters
** Accept and parse multiple parameters
| JavaScript | mit | jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts | ---
+++
@@ -2,14 +2,7 @@
var request = require('request');
-var opts = {
- uri: 'https://api.github.com' + '/users/' + parseParams(process.argv[2]) + '/events',
- json: true,
- method: 'GET',
- headers: {
- 'User-Agent': 'nodejs script'
- }
-}
+var opts = parseOptions(process.argv[2]);
r... |
7ac7843a019996837ad56e781178612f1de706d3 | pinpoint-items-from-dom-extractor.js | pinpoint-items-from-dom-extractor.js | PinPoint.ItemsfromDomExtractor = function(targetName) {
this.targetName = targetName;
}
PinPoint.ItemsfromDomExtractor.prototype = {
getElements : function(element) {
var timeDivArray = document.getElementsbyClassName("ytp-time-current")
var time = timeDivArray[0].innerHTML
}
}
| PinPoint.ItemsfromDomExtractor = function(targetName) {
this.targetName = targetName;
}
// We'll need logic stating what className to use depending on sit:
// YouTube: "ytp-time-current"
// Vimeo: "box"
PinPoint.ItemsfromDomExtractor.prototype = {
getTime : function(className) {
var timeDivArray = document.get... | Change function name from getElements to getTime. | Change function name from getElements to getTime.
| JavaScript | mit | jbouzi12/PinPoint,ospreys-2014/PinPoint,jbouzi12/PinPoint | ---
+++
@@ -2,8 +2,11 @@
this.targetName = targetName;
}
+// We'll need logic stating what className to use depending on sit:
+// YouTube: "ytp-time-current"
+// Vimeo: "box"
PinPoint.ItemsfromDomExtractor.prototype = {
- getElements : function(element) {
+ getTime : function(className) {
var timeDivArr... |
f8717ac3301639f0cbb7103f686af2a27eb96c87 | examples/dump-burp-xml.js | examples/dump-burp-xml.js |
var BurpImporter = require(__dirname + '/../index'),
util = require('util');
var importer = new BurpImporter(__dirname + '/example1.xml');
importer.on('start', function (info) {
console.log('Dump: start');
console.log(' burpVersion: ' + info.burpVersion);
console.log(' exportTime: ' + info.exportTim... |
var BurpImporter = require(__dirname + '/../index'),
util = require('util');
// source below may be stream or filename.
var importer = new BurpImporter(__dirname + '/example1.xml');
importer.on('start', function (info) {
console.log('Dump: start');
console.log(' burpVersion: ' + info.burpVersion);
co... | Add comment to example regarding source. | Add comment to example regarding source.
| JavaScript | mit | bls/node-burp-importer | ---
+++
@@ -2,6 +2,7 @@
var BurpImporter = require(__dirname + '/../index'),
util = require('util');
+// source below may be stream or filename.
var importer = new BurpImporter(__dirname + '/example1.xml');
importer.on('start', function (info) {
console.log('Dump: start'); |
020c793fed4c1b11197c6ee311a10940709d2c22 | lib/assets/javascripts/jasmine-console-shims.js | lib/assets/javascripts/jasmine-console-shims.js | (function() {
/**
* Function.bind for ECMAScript 5 Support
*
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
*/
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== "function") {
// closest th... | // using react's Function.prototype.bind polyfill for phantomjs
// https://github.com/facebook/react/blob/master/src/test/phantomjs-shims.js
(function() {
var Ap = Array.prototype;
var slice = Ap.slice;
var Fp = Function.prototype;
if (!Fp.bind) {
// PhantomJS doesn't support Function.prototype.bind natively, so
... | Replace Function.prototype.bind polyfill with one that works for the latest version of Phantomjs | Replace Function.prototype.bind polyfill with one that works for the latest version of Phantomjs
| JavaScript | mit | mallikarjunayaddala/jasmine-rails,ennova/jasmine-rails,carwow/jasmine-rails,henrik/jasmine-rails,alphagov/jasmine-rails,carwow/jasmine-rails,carwow/jasmine-rails,sharethrough/jasmine-rails,searls/jasmine-rails,spadin/jasmine-rails,PericlesTheo/jasmine-rails,PericlesTheo/jasmine-rails,mallikarjunayaddala/jasmine-rails,s... | ---
+++
@@ -1,31 +1,38 @@
+// using react's Function.prototype.bind polyfill for phantomjs
+// https://github.com/facebook/react/blob/master/src/test/phantomjs-shims.js
+
(function() {
- /**
- * Function.bind for ECMAScript 5 Support
- *
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Gl... |
c7216b228e14aa30ec83d7415d11aa3c6c7ff198 | app/server.js | app/server.js | var express = require('express'),
Memcached = require('memcached');
// Constants
var port = 3000;
var env = process.env.NODE_ENV || 'production';
var mc = new Memcached(process.env.MC_PORT.replace('tcp://', ''));
// App
var app = express();
app.use(express.urlencoded());
app.get('/', function (req, res) {
res.... | var express = require('express'),
Memcached = require('memcached'),
fs = require('fs');
// Constants
var port = 3000;
var env = process.env.NODE_ENV || 'production';
var mc = new Memcached(process.env.MC_PORT.replace('tcp://', ''));
// App
var app = express();
app.use(express.urlencoded());
app.get('/', func... | Write set values to log file | Write set values to log file
| JavaScript | mit | ndemoor/dockerbel,ndemoor/dockerbel,ndemoor/dockerbel | ---
+++
@@ -1,5 +1,6 @@
var express = require('express'),
- Memcached = require('memcached');
+ Memcached = require('memcached'),
+ fs = require('fs');
// Constants
var port = 3000;
@@ -15,6 +16,8 @@
});
app.post('/test', function (req, res) {
+ fs.appendFile('/var/log/app/values.log', req.body.val... |
da2ed8f22a4aeb6b71b0ee028891cff0d2904753 | js/Landing.js | js/Landing.js | import React from 'react'
import { Link } from 'react-router'
import { setSearchTerm } from './actionCreators'
import { connect } from 'react-redux'
const { string, func, object } = React.PropTypes
const Landing = React.createClass({
contextTypes: {
router: object
},
propTypes: {
searchTerm: string,
... | import React from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { setSearchTerm } from './actionCreators'
const { string, func, object } = React.PropTypes
const Landing = React.createClass({
contextTypes: {
router: object
},
propTypes: {
searchTerm: string,
... | Refactor landing page to use mapDispatchToProps which is another method of doing what we were already doing | Refactor landing page to use mapDispatchToProps which is another method of doing what we were already doing
| JavaScript | mit | galaxode/ubiquitous-eureka,galaxode/ubiquitous-eureka | ---
+++
@@ -1,7 +1,7 @@
import React from 'react'
+import { connect } from 'react-redux'
import { Link } from 'react-router'
import { setSearchTerm } from './actionCreators'
-import { connect } from 'react-redux'
const { string, func, object } = React.PropTypes
const Landing = React.createClass({
@@ -10,10 +10... |
e7485014cf2f3e591360b3215871c2b8d2f9382e | src/components/DiagonalDivider/DiagonalDivider.js | src/components/DiagonalDivider/DiagonalDivider.js | // DiagonalDivider
import React, { PropTypes } from 'react/addons'; // eslint-disable-line no-unused-vars
import styles from './DiagonalDivider.less';
import withStyles from '../../decorators/withStyles';
@withStyles(styles)
export default class DiagonalDivider extends React.Component {
static propTypes = {
id:... | // DiagonalDivider
import React, { PropTypes } from 'react/addons'; // eslint-disable-line no-unused-vars
import styles from './DiagonalDivider.less';
import withStyles from '../../decorators/withStyles';
@withStyles(styles)
export default class DiagonalDivider extends React.Component {
static propTypes = {
id:... | Make <canvas> drawings look sharp on high-density ("Retina") screens | Make <canvas> drawings look sharp on high-density ("Retina") screens
| JavaScript | mit | tonikarttunen/tonikarttunen-com,tonikarttunen/tonikarttunen-com | ---
+++
@@ -14,8 +14,22 @@
componentDidMount() {
let canvas = document.getElementById(this.props.id);
+ // Check if the <canvas> element exists and the browser supports <canvas>
if (canvas && canvas.getContext) {
let context = canvas.getContext('2d');
+
+ // Make canvas drawings look sha... |
57fefba0eb45a21e7fb57bc2400a1cff22c7b72b | addon/utils/has-block.js | addon/utils/has-block.js | import Ember from 'ember';
import emberVersionInfo from './ember-version-info';
const { major, minor, isGlimmer } = emberVersionInfo();
let hasBlockSymbol;
if (major > 3 || (major == 3 && minor >= 1)) {
// Ember-glimmer moved to TypeScript since v3.1
// Do nothing since the symbol is not exported
} else if (isGl... | import Ember from 'ember';
import emberVersionInfo from './ember-version-info';
const { major, minor, isGlimmer } = emberVersionInfo();
let hasBlockSymbol;
try {
if (major > 3 || (major == 3 && minor >= 1)) {
// Ember-glimmer moved to TypeScript since v3.1
// Do nothing since the symbol is not exported
}... | Add try block to allow fallback to runtime check for HAS_BLOCK symbol | Add try block to allow fallback to runtime check for HAS_BLOCK symbol
| JavaScript | mit | pswai/ember-cli-react,pswai/ember-cli-react | ---
+++
@@ -5,17 +5,21 @@
let hasBlockSymbol;
-if (major > 3 || (major == 3 && minor >= 1)) {
- // Ember-glimmer moved to TypeScript since v3.1
- // Do nothing since the symbol is not exported
-} else if (isGlimmer) {
- hasBlockSymbol = Ember.__loader.require('ember-glimmer/component')[
- 'HAS_BLOCK'
- ];... |
ef5db3df7c7e4dd76f920fc44a20a75b1511cf95 | karma.conf.js | karma.conf.js | module.exports = function(config) {
config.set({
frameworks: [
'jasmine',
'karma-typescript',
],
plugins: [
'karma-typescript',
'karma-jasmine',
'karma-firefox-launcher',
'karma-chrome-launcher',
'karma-edge-launcher'
],
files: [
"./src/**/*.ts",
... | module.exports = function(config) {
config.set({
frameworks: [
'jasmine',
'karma-typescript',
],
plugins: [
'karma-typescript',
'karma-jasmine',
'karma-firefox-launcher',
'karma-chrome-launcher',
],
files: [
"./src/**/*.ts",
"./test/**/*.ts"
],
... | Remove Edge launcher from Karma Conf | Remove Edge launcher from Karma Conf
| JavaScript | mit | arogozine/LinqToTypeScript,arogozine/LinqToTypeScript | ---
+++
@@ -9,7 +9,6 @@
'karma-jasmine',
'karma-firefox-launcher',
'karma-chrome-launcher',
- 'karma-edge-launcher'
],
files: [
"./src/**/*.ts",
@@ -27,8 +26,7 @@
tsconfig: "./test/tsconfig.json"
},
reporters: [ 'progress', 'karma-typescript' ],
- browser... |
33c025904ffccf45e3ef43747a60730241ef53b6 | karma.conf.js | karma.conf.js | // @AngularClass
// Look in config for karma.conf.js
module.exports = require('./config/karma.conf.js');
| // @AngularClass
// Look in config for karma.conf.js
module.exports = require('./config/karma.conf.js');
| Debug Error: No such file | Debug Error: No such file
| JavaScript | mit | ZombieHippie/fantastic-repository,ZombieHippie/fantastic-repository,ZombieHippie/fantastic-repository,ZombieHippie/fantastic-repository | ---
+++
@@ -1,3 +1,3 @@
// @AngularClass
-// Look in config for karma.conf.js
+// Look in config for karma.conf.js
module.exports = require('./config/karma.conf.js'); |
e371cdfc4f43935caae843310bb3a7fb1468de17 | test/support/assert-paranoid-equal.js | test/support/assert-paranoid-equal.js | 'use strict';
var assert = require('assert');
var inspectors = require('./assert-paranoid-equal/inspectors');
var Context = require('./assert-paranoid-equal/context');
function paranoidEqual(value1, value2) {
inspectors.ensureEqual(new Context(value1, value2), value1, value2);
}
function notParanoidEqual(value1... | 'use strict';
var assert = require('assert');
var inspectors = require('./assert-paranoid-equal/inspectors');
var Context = require('./assert-paranoid-equal/context');
/*
* This function provides a "paranoid" variant of Node's assert.deepEqual
* See assert-paranoid-equal's README for details.
*
* https://npmjs.... | Add description for `paranoidEqual` function | Add description for `paranoidEqual` function
| JavaScript | mit | nodeca/js-yaml,SmartBear/js-yaml,SmartBear/js-yaml,deltreey/js-yaml,crissdev/js-yaml,djchie/js-yaml,crissdev/js-yaml,rjmunro/js-yaml,crissdev/js-yaml,doowb/js-yaml,nodeca/js-yaml,cesarmarinhorj/js-yaml,SmartBear/js-yaml,joshball/js-yaml,pombredanne/js-yaml,joshball/js-yaml,minj/js-yaml,rjmunro/js-yaml,vogelsgesang/js-y... | ---
+++
@@ -6,6 +6,13 @@
var Context = require('./assert-paranoid-equal/context');
+/*
+ * This function provides a "paranoid" variant of Node's assert.deepEqual
+ * See assert-paranoid-equal's README for details.
+ *
+ * https://npmjs.org/package/assert-paranoid-equal
+ *
+ */
function paranoidEqual(value1, va... |
881cda193c44a1bea0bd02f0cf5ca263a5e3730f | packages/react-scripts/template/src/App.test.js | packages/react-scripts/template/src/App.test.js | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
});
| import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
it('renders without crashing', () => {
window.matchMedia = jest.genMockFunction().mockImplementation(function () {
return {
matches: true
};
});
const div = document.createElement('div');
ReactDOM.render(<App />... | Add a mock for window.matchMedia. | Add a mock for window.matchMedia.
The window.matchMedia function is used in the Spectacle Slide component (and other parts of Radium).
| JavaScript | bsd-3-clause | igetgames/spectacle-create-react-app,igetgames/spectacle-create-react-app,igetgames/spectacle-create-react-app | ---
+++
@@ -3,6 +3,11 @@
import App from './App';
it('renders without crashing', () => {
+ window.matchMedia = jest.genMockFunction().mockImplementation(function () {
+ return {
+ matches: true
+ };
+ });
const div = document.createElement('div');
ReactDOM.render(<App />, div);
}); |
fbe99b3addf8e6da1f9e004b01f37ddddce035db | app/services/fastboot.js | app/services/fastboot.js | import Ember from "ember";
let alias = Ember.computed.alias;
let computed = Ember.computed;
export default Ember.Service.extend({
cookies: alias('_fastbootInfo.cookies'),
headers: alias('_fastbootInfo.headers'),
host: computed(function() {
return this._fastbootInfo.host();
}),
isFastboot: computed(funct... | /* global FastBoot */
import Ember from "ember";
let alias = Ember.computed.alias;
let computed = Ember.computed;
export default Ember.Service.extend({
cookies: alias('_fastbootInfo.cookies'),
headers: alias('_fastbootInfo.headers'),
host: computed(function() {
return this._fastbootInfo.host();
}),
isFa... | Add isFastBoot property to service | Add isFastBoot property to service
| JavaScript | mit | tildeio/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot,josemarluedke/ember-cli-fastboot,josemarluedke/ember-cli-fastboot,rwjblue/ember-cli-fastboot,habdelra/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot,habdelra/ember-cli-fastboot,kratiahuja/ember-cli-fastboot,tildeio/ember-cli-fastboot,kratiahuja/ember-cl... | ---
+++
@@ -1,3 +1,4 @@
+/* global FastBoot */
import Ember from "ember";
let alias = Ember.computed.alias;
@@ -9,7 +10,7 @@
host: computed(function() {
return this._fastbootInfo.host();
}),
- isFastboot: computed(function() {
- return typeof window.document === 'undefined';
+ isFastBoot: computed... |
94c6656d834febbe16b2c732912dbbab109a6d39 | test-projects/electron-log-test-nwjs/main.spec.js | test-projects/electron-log-test-nwjs/main.spec.js | 'use strict';
const expect = require('chai').expect;
const helper = require('../spec-helper');
const APP_NAME = 'electron-log-test-nwjs';
describe('nwjs test project', function() {
this.timeout(5000);
it('should write one line to a log file', () => {
return helper.run(APP_NAME).then((logs) => {
expect... | 'use strict';
const expect = require('chai').expect;
const helper = require('../spec-helper');
const APP_NAME = 'electron-log-test-nwjs';
describe('nwjs test project', function() {
this.timeout(5000);
it('should write one line to a log file', () => {
return helper.run(APP_NAME).then((logs) => {
expect... | Remove line number check for nwjs. | Remove line number check for nwjs.
| JavaScript | mit | megahertz/electron-log,megahertz/electron-log,megahertz/electron-log | ---
+++
@@ -10,7 +10,6 @@
it('should write one line to a log file', () => {
return helper.run(APP_NAME).then((logs) => {
- expect(logs.length).to.equal(2);
expect(logs[0]).to.match(/\[[\d-]{10} [\d:]{13}] \[warn] Log from nw.js/);
});
}) |
de10bbbd46e148fe38e82256eb5d92a13550e1c3 | protocol-spec/.vuepress/plugin-matomo/inject.js | protocol-spec/.vuepress/plugin-matomo/inject.js | /* global MATOMO_SITE_ID, MATOMO_TRACKER_URL, MATOMO_ENABLE_LINK_TRACKING */
export default ({ router }) => {
// Google analytics integration
if (MATOMO_SITE_ID && MATOMO_TRACKER_URL) {
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.p... | /* global MATOMO_SITE_ID, MATOMO_TRACKER_URL, MATOMO_ENABLE_LINK_TRACKING */
export default ({ router }) => {
// Google analytics integration
if (process.env.NODE_ENV === 'production' && typeof window !== 'undefined' && MATOMO_SITE_ID && MATOMO_TRACKER_URL) {
var _paq = _paq || [];
/* tracker methods like ... | Fix matomo generation to only happen in production | Fix matomo generation to only happen in production
| JavaScript | bsd-3-clause | metafetish/buttplug | ---
+++
@@ -2,7 +2,7 @@
export default ({ router }) => {
// Google analytics integration
- if (MATOMO_SITE_ID && MATOMO_TRACKER_URL) {
+ if (process.env.NODE_ENV === 'production' && typeof window !== 'undefined' && MATOMO_SITE_ID && MATOMO_TRACKER_URL) {
var _paq = _paq || [];
/* tracker methods lik... |
674452e37dc30389046b1d3f99a0c20062bf7100 | assets/scripts/script.js | assets/scripts/script.js | (function(document, saveAs, smoothScroll, downloadName) {
'use strict';
if(window.location.protocol.indexOf('http') !== -1) {
// Created before download in order to be JS-modifications-free.
var blob = new Blob(['<!doctype html>' + document.documentElement.outerHTML], {type: 'text/html;charset=utf-8'});
... | (function(document, saveAs, smoothScroll, downloadName) {
'use strict';
if (window.location.protocol.indexOf('http') !== -1) {
// Created before download in order to be JS-modifications-free.
var blob = new Blob(['<!doctype html>' + document.documentElement.outerHTML], {type: 'text/html;charset=utf-8'});
... | Move click handler inside the right block | Move click handler inside the right block
| JavaScript | isc | ThibWeb/jsonresume-theme-eloquent,ThibWeb/jsonresume-theme-eloquent,ThibWeb/jsonresume-theme-eloquent | ---
+++
@@ -1,15 +1,15 @@
(function(document, saveAs, smoothScroll, downloadName) {
'use strict';
- if(window.location.protocol.indexOf('http') !== -1) {
+ if (window.location.protocol.indexOf('http') !== -1) {
// Created before download in order to be JS-modifications-free.
var blob = new Blob(['<!... |
6b4498d48865bd7fde55cc03ee3a682543c4d96d | .mocharc.js | .mocharc.js | module.exports = {
recursive: true,
reporter: 'spec',
slow: 0,
timeout: 40000,
ui: 'bdd',
extension: 'js',
};
| module.exports = {
recursive: true,
reporter: 'spec',
slow: 0,
timeout: 50000,
ui: 'bdd',
extension: 'js',
};
| Increase mocha timeout to 50000ms | Increase mocha timeout to 50000ms
Fix #13090
| JavaScript | apache-2.0 | ctamisier/generator-jhipster,pascalgrimaud/generator-jhipster,dynamicguy/generator-jhipster,atomfrede/generator-jhipster,liseri/generator-jhipster,dynamicguy/generator-jhipster,ruddell/generator-jhipster,gmarziou/generator-jhipster,atomfrede/generator-jhipster,vivekmore/generator-jhipster,mraible/generator-jhipster,cta... | ---
+++
@@ -2,7 +2,7 @@
recursive: true,
reporter: 'spec',
slow: 0,
- timeout: 40000,
+ timeout: 50000,
ui: 'bdd',
extension: 'js',
}; |
74081cd1ba00c1efcba11eae021b474adc26c126 | config/webpack.config.devserver.js | config/webpack.config.devserver.js | const path = require('path');
const webpack = require('webpack');
// Listen port
const PORT = process.env.PORT || 8080;
// Load base config
const baseConfig = require('./webpack.config.base');
// Create the config
const config = Object.create(baseConfig);
config.devtool = 'cheap-source-map';
config.devServer = {
... | const path = require('path');
const webpack = require('webpack');
// Listen port
const PORT = process.env.PORT || 8080;
// Load base config
const baseConfig = require('./webpack.config.base');
// Create the config
const config = Object.create(baseConfig);
config.devtool = 'cheap-source-map';
config.devServer = {
... | Fix this crashing spewage: Uncaught Error: [HMR] Hot Module Replacement is disabled. | Fix this crashing spewage:
Uncaught Error: [HMR] Hot Module
Replacement is disabled.
| JavaScript | mit | gaudeon/interstice,gaudeon/interstice,gaudeon/interstice | ---
+++
@@ -14,7 +14,6 @@
config.devtool = 'cheap-source-map';
config.devServer = {
- hot: true,
host: "0.0.0.0",
disableHostCheck: true,
port: PORT, |
a8875ecedd19d33baf1832b5ed1b710cf8de0019 | public/js/app/mixins/Pagination.js | public/js/app/mixins/Pagination.js | define(["app/app",
"ember"], function(App, Ember) {
"use strict";
App.Pagination = Ember.Mixin.create({
queryParams: ['offset'],
limit: 30,
offset: 0,
actions: {
nextPage: function() {
this.incrementProperty('offset', this.get('limit'))
},
prevPage: function() {... | define(["app/app",
"ember"], function(App, Ember) {
"use strict";
App.Pagination = Ember.Mixin.create({
queryParams: ['offset'],
limit: 30,
offset: 0,
actions: {
nextPage: function() {
this.incrementProperty('offset', this.get('limit'))
},
prevPage: function() {... | Disable pagination check for prev page. | Disable pagination check for prev page.
Due to bans timelines can return less than limit posts now.
To work, it requires proper pagination metadata from timelines.
| JavaScript | mit | FreeFeed/freefeed-html,epicmonkey/pepyatka-html,SiTLar/pepyatka-html,dsumin/freefeed-html,SiTLar/pepyatka-html,dsumin/freefeed-html,pepyatka/pepyatka-html,FreeFeed/freefeed-html,epicmonkey/pepyatka-html,pepyatka/pepyatka-html | ---
+++
@@ -33,8 +33,9 @@
nextPageDisabled: function() {
var len = this.get('content.posts.length') ||
this.get('content.content.length')
- return len === 0 || len === undefined ||
- len < this.get('limit') ? 'disabled' : ''
+ return len === 0 || len === undefined /*||
+ -... |
2baa9b0490355c15a317205fa6cfd94e0ce89f6b | static/js/append-contents.js | static/js/append-contents.js | /**
* Load all h2, h3, h4, h5 and h6 tags as contents.
*/
$('.append-contents').each(function() {
let html = '<ul class="list-unstyled contents">',
level = 2;
for(let h of $('h2, h3, h4, h5, h6').not('.append-contents')) {
let newLevel = parseInt(h.tagName.charAt(1));
if ... | /**
* Load all h2, h3, h4, h5 and h6 tags as contents.
*/
$('.append-contents').each(function() {
let html = '<ul class="list-unstyled contents">',
level = 2;
for(let h of $('h2, h3, h4, h5, h6').not('.append-contents')) {
let newLevel = parseInt(h.tagName.charAt(1));
if ... | Fix append contents js again | Fix append contents js again
| JavaScript | bsd-3-clause | LibCrowds/libcrowds-bs4-pybossa-theme,LibCrowds/libcrowds-bs4-pybossa-theme | ---
+++
@@ -15,8 +15,8 @@
html += `</li>`;
}
level = newLevel;
- html = `${html}<li><a href="${h.getAttribute('id')}" id="${h.innerHTML.trim()}">${h.innerHTML}</a>`;
- h.setAttribute('id', this.innerHTML.trim());
+ html = `${html}<li><a href="#${h.innerHTML.replace(... |
849af48a8ca902ecc8414d200c691f51f99a399c | mmir-plugin-tts-speakjs/www/speakWorkerExt.js | mmir-plugin-tts-speakjs/www/speakWorkerExt.js | /*
* based on speakWorker.js from:
*
* speak.js
* https://github.com/logue/speak.js
* License: GPL-3.0
*/
importScripts('speakGenerator.js');
onmessage = function(event) {
var msg = event.data;
var id = msg.id;
var audioData = generateSpeech(msg.text, msg.options)
postMessage({id: id, data: audioData... | /*
* based on speakWorker.js from:
*
* speak.js
* https://github.com/logue/speak.js
* License: GPL-3.0
*/
importScripts('speakGenerator.js');
onmessage = function(event) {
var msg = event.data;
var id = msg.id;
try {
var audioData = generateSpeech(msg.text, msg.options)
postMessage({id: id, data: a... | FIX catch and notify about errors | FIX catch and notify about errors | JavaScript | mit | mmig/mmir-plugins-media | ---
+++
@@ -13,9 +13,12 @@
var msg = event.data;
var id = msg.id;
- var audioData = generateSpeech(msg.text, msg.options)
-
- postMessage({id: id, data: audioData});
+ try {
+ var audioData = generateSpeech(msg.text, msg.options)
+ postMessage({id: id, data: audioData});
+ } catch(ex){
+ postMessage({id: ... |
68fe5843ccf28c9fed9870ce7de54f103648425e | src/util/brush/getCircle.js | src/util/brush/getCircle.js | /**
* Gets the pixels within the circle.
* @export @public @method
* @name getCircle
*
* @param {number} radius The radius of the circle.
* @param {number} rows The number of rows.
* @param {number} columns The number of columns.
* @param {number} [xCoord = 0] The x-location of the center of th... | /**
* Gets the pixels within the circle.
* @export @public @method
* @name getCircle
*
* @param {number} radius The radius of the circle.
* @param {number} rows The number of rows.
* @param {number} columns The number of columns.
* @param {number} [xCoord = 0] The x-location of the center of th... | Use floor instead of round for determining brush's selected pixels | fix(Brush): Use floor instead of round for determining brush's selected pixels
| JavaScript | mit | cornerstonejs/cornerstoneTools,cornerstonejs/cornerstoneTools,chafey/cornerstoneTools,cornerstonejs/cornerstoneTools | ---
+++
@@ -17,8 +17,8 @@
xCoord = 0,
yCoord = 0
) {
- const x0 = Math.round(xCoord);
- const y0 = Math.round(yCoord);
+ const x0 = Math.floor(xCoord);
+ const y0 = Math.floor(yCoord);
if (radius === 1) {
return [[x0, y0]]; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.