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 |
|---|---|---|---|---|---|---|---|---|---|---|
e8decae34ae5d07fdeecfd55f60f3d010c97cc10 | index.js | index.js | 'use strict'
module.exports = trimTrailingLines
var line = '\n'
// Remove final newline characters from `value`.
function trimTrailingLines(value) {
var string = String(value)
var index = string.length
while (string.charAt(--index) === line) {
// Empty
}
return string.slice(0, index + 1)
}
| 'use strict'
module.exports = trimTrailingLines
// Remove final newline characters from `value`.
function trimTrailingLines(value) {
return String(value).replace(/\n+$/, '')
}
| Refactor code to improve bundle size | Refactor code to improve bundle size
| JavaScript | mit | wooorm/trim-trailing-lines | ---
+++
@@ -2,16 +2,7 @@
module.exports = trimTrailingLines
-var line = '\n'
-
// Remove final newline characters from `value`.
function trimTrailingLines(value) {
- var string = String(value)
- var index = string.length
-
- while (string.charAt(--index) === line) {
- // Empty
- }
-
- return string.sli... |
a6edc68779d82e7193360d321ebdc97307e5c59f | index.js | index.js | 'use strict'
const _ = require('lodash')
const Promise = require('bluebird')
const arr = []
module.exports = function loadAllPages (callFx, opts) {
opts['page'] = opts.page || 1
return Promise
.resolve(callFx(opts))
.then((result) => {
arr.push(result)
if (_.isFunction(result.nextPage)) {
... | 'use strict'
const _ = require('lodash')
const Promise = require('bluebird')
var arr = []
module.exports = function loadAllPages (callFx, opts) {
opts['page'] = opts.page || 1
return Promise
.resolve(callFx(opts))
.then((result) => {
arr.push(result)
if (_.isFunction(result.nextPage)) {
... | Reset array after each use | Reset array after each use
| JavaScript | mit | RichardLitt/depaginate | ---
+++
@@ -1,7 +1,7 @@
'use strict'
const _ = require('lodash')
const Promise = require('bluebird')
-const arr = []
+var arr = []
module.exports = function loadAllPages (callFx, opts) {
opts['page'] = opts.page || 1
@@ -14,11 +14,13 @@
opts.page = opts.page + 1
return loadAllPages(callFx, ... |
a76d316430fd9f95d9eaee90915a25a7b2ec582a | index.js | index.js | 'use strict';
var yargs = require('yargs');
var uploader = require('./lib/uploader');
var version = require('./package.json').version;
var argv = yargs
.usage('$0 [options] <directory>')
.demand(1, 1)
.option('api-key', {
demand: true,
describe: 'Cloudinary API key',
type: 'string',
nargs: 1
... | 'use strict';
var yargs = require('yargs');
var uploader = require('./lib/uploader');
var version = require('./package.json').version;
var argv = yargs
.usage('$0 [options] <directory>')
.demand(1, 1)
.option('api-key', {
demand: true,
describe: 'Cloudinary API key',
type: 'string',
nargs: 1
... | Add option to print version | Add option to print version
| JavaScript | mit | kemskems/cloudinary-cli-upload | ---
+++
@@ -31,6 +31,7 @@
.alias('h', 'help')
.example('$0 --api-key 12345 --api-secret somesecret --cloud-name name ~/pics',
'Upload all images under ~/pics directory to Cloudinary')
+ .version(version)
.argv;
uploader.config({ |
43364f8b042a3bc6b1b03f55a65fc670ae7efd2e | index.js | index.js | var postcss = require('postcss');
module.exports = postcss.plugin('postcss-property-lookup', propertyLookup);
function propertyLookup() {
return function(css, result) {
css.eachRule(function(rule) {
rule.replaceValues(/@([a-z-]+)(\s?)/g, { fast: '@' }, function(orig, prop, space) {
var replacement... | var postcss = require('postcss');
module.exports = postcss.plugin('postcss-property-lookup', propertyLookup);
function propertyLookup() {
return function(css, result) {
css.eachRule(function(rule) {
rule.replaceValues(/@([a-z-]+)(\s?)/g, { fast: '@' }, function(orig, prop, space) {
var replacement... | Add rule selector to console warning | Add rule selector to console warning
| JavaScript | mit | jedmao/postcss-property-lookup,simonsmith/postcss-property-lookup | ---
+++
@@ -14,7 +14,7 @@
if (replacementVal) {
return replacementVal + space;
} else {
- result.warn('Unable to find property ' + orig, { node: rule });
+ result.warn('Unable to find property ' + orig + ' in ' + rule.selector, { node: rule });
return '';
... |
40e92a2240c7d764dd430ccd64cb6eaff3b5879b | lib/define.js | lib/define.js |
/*jslint browser:true, node:true*/
'use strict';
/**
* Module Dependencies
*/
var View = require('./view');
var store = require('./store');
/**
* Creates and registers a
* FruitMachine view constructor.
*
* @param {Object|View}
* @return {View}
*/
module.exports = function(props) {
var module = props.m... |
/*jslint browser:true, node:true*/
'use strict';
/**
* Module Dependencies
*/
var View = require('./view');
var store = require('./store');
/**
* Creates and registers a
* FruitMachine view constructor.
*
* @param {Object|View}
* @return {View}
*/
module.exports = function(props) {
var module = props.mo... | Remove API to clear stored modules | Remove API to clear stored modules
| JavaScript | mit | quarterto/fruitmachine,quarterto/fruitmachine,ftlabs/fruitmachine | ---
+++
@@ -6,7 +6,6 @@
/**
* Module Dependencies
*/
-
var View = require('./view');
var store = require('./store');
@@ -22,7 +21,7 @@
var module = props.module || 'undefined';
var view;
- // Remove the module key
+ // Move the module key
delete props.module;
props._module = module;
@@ -41,... |
9a7ce192e5e13c34c6bdf97b5ac4123071978fdb | desktop/src/Settings/SettingsContainer.js | desktop/src/Settings/SettingsContainer.js | import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as actionCreators from './actionCreators';
import Settings from './Settings';
const mapStateToProps = state => ({
fullscreen: state.appProperties.fullscreen,
showNotYetTasks: state.appProperties.showNotYetTasks,
calendar... | import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as actionCreators from './actionCreators';
import Settings from './Settings';
const mapStateToProps = state => ({
fullscreen: state.appProperties.fullscreen,
showNotYetTasks: state.appProperties.showNotYetTasks,
calendar... | Add firstDayOfWeek to Settings mapped props | Add firstDayOfWeek to Settings mapped props
| JavaScript | mit | mkermani144/wanna,mkermani144/wanna | ---
+++
@@ -8,6 +8,7 @@
fullscreen: state.appProperties.fullscreen,
showNotYetTasks: state.appProperties.showNotYetTasks,
calendarSystem: state.appProperties.calendarSystem,
+ firstDayOfWeek: state.appProperties.firstDayOfWeek,
});
const mapDispatchToProps = dispatch => bindActionCreators(actionCreators... |
164bcc02f7ebf73fe99e7ecb1d6d0b158cd5965c | test/logger.js | test/logger.js | 'use strict';
// logger.js tests
const chai = require('chai');
const expect = chai.expect;
const chalk = require('chalk');
const Logger = require('../lib/logger');
// Init logger
const logger = new Logger();
// Tests
describe('logger.js tests', () => {
it('should check if logger._getdate() works', (done) => {
/... | 'use strict';
// logger.js tests
const chai = require('chai');
const expect = chai.expect;
const chalk = require('chalk');
const Logger = require('../lib/logger');
// Init logger
const logger = new Logger();
// Tests
describe('logger.js tests', () => {
it('should check if logger._getdate() works', (done) => {
/... | Fix issue in tests where old was not defined | :bug: Fix issue in tests where old was not defined
| JavaScript | mit | Gum-Joe/bedel,Gum-Joe/bedel,Gum-Joe/bedel,Gum-Joe/bedel | ---
+++
@@ -21,8 +21,8 @@
it('should check if logger.info() works', (done) => {
// Date to help with checking
const date = new Date();
- // Pipe console.log
- old = console.log;
+ // Patch console.log
+ const old = console.log;
console.log = (txt) => {
const str = chalk.green.bold... |
f3dc47b0a0e7f606aceeceb263c3c15872cb7ab5 | lib/gitlab.js | lib/gitlab.js | import _ from 'underscore'
import sendMessage from './sendMessage'
import sendResultBy from './sendResultBy'
import sendIgnore from './sendIgnore'
import debug from 'debug'
export default function(req, res, next) {
let result = sendResultBy(res)
debug('request')(req.body)
if (_.isString(req.objectKind)) ... | import _ from 'underscore'
import sendMessage from './sendMessage'
import sendResultBy from './sendResultBy'
import sendIgnore from './sendIgnore'
import debug from 'debug'
export default function(req, res, next) {
let result = sendResultBy(res)
debug('request')(JSON.stringify(req.body, null, 2))
if (_.i... | Format son in the debug print. | Format son in the debug print.
| JavaScript | mit | luxiar/syamo,luxiar/syamo,ledsun/syamo,ledsun/syamo | ---
+++
@@ -7,7 +7,7 @@
export default function(req, res, next) {
let result = sendResultBy(res)
- debug('request')(req.body)
+ debug('request')(JSON.stringify(req.body, null, 2))
if (_.isString(req.objectKind)) {
sendMessage(req.objectKind, result, req.params, req.body) |
59a6fcf57baedffd5d88042f4f3b0caa7b54ee82 | static/scripts/views/event/creation.js | static/scripts/views/event/creation.js | define(['backbone', 'marionette'], function(Backbone, Marionette) {
return Backbone.View.extend({
template: '#event-creation',
events: {
'click button.create-event': 'create_event'
},
initialize: function() {},
render: function() {
var rendered_temp... | define(['backbone', 'marionette'], function(Backbone, Marionette) {
return Backbone.View.extend({
template: '#event-creation',
events: {
'click button.create-event': 'create_event'
},
initialize: function() {},
render: function() {
var rendered_temp... | Set date when creating event, not when it's require'd | Set date when creating event, not when it's require'd
| JavaScript | mit | amackera/stratus | ---
+++
@@ -22,14 +22,17 @@
this.$el.html($('#loading').html());
this.collection.create({
title: title,
- description: description
+ description: description,
+ date: Date.now()
}, {
wait: true,
... |
7a5a493bb83d3f6c75ec870e29f79e94a09dd479 | src/js/SimpleTourItem.js | src/js/SimpleTourItem.js | import React from 'react';
class SimpleTourItem extends React.Component {
render() {
const containerStyle = {
background: 'white',
padding: '20px',
color: 'black',
maxWidth: '300px'
};
const buttonStyle = {
cursor: 'pointer',
textDecoration: 'none',
color: '#34... | import React from 'react';
class SimpleTourItem extends React.Component {
render() {
const containerStyle = {
background: 'white',
padding: '20px',
color: 'black',
maxWidth: '300px'
};
const buttonStyle = {
cursor: 'pointer',
textDecoration: 'none',
color: '#34... | Change word from Done to Next | Change word from Done to Next
| JavaScript | mit | khankuan/react-tourist,khankuan/react-tourist | ---
+++
@@ -33,7 +33,7 @@
className='simple-tour-item-button'
style={buttonStyle}
onClick={this.props.onDone}>
- Close
+ Next
</span>
</div> |
d1ca08ada6e949b9fb0c052b8f9a3056da8065a0 | source/loosely-matches.js | source/loosely-matches.js | "use strict";
const flow = require("lodash.flow");
const deburr = require("lodash.deburr");
const toLower = require("lodash.tolower");
const looseMatchTransform = flow(deburr, toLower);
/**
* Function that returns true when `needle` is found in `haystack`.
* The main advantages of this function are that it rem... | "use strict";
const flow = require("lodash.flow");
const deburr = require("lodash.deburr");
const toLower = require("lodash.tolower");
const looseMatchTransform = flow(deburr, toLower);
/**
* Function that returns true when `needle` is found in `haystack`.
* The main advantages of this function are that it rem... | Add terminal . at end of sentence in looselyMatches documentation string | Add terminal . at end of sentence in looselyMatches documentation string
| JavaScript | mit | tentwentyfour/helpbox | ---
+++
@@ -11,7 +11,7 @@
* The main advantages of this function are that it removes accented characters and that
* it is case-insensitive.
*
- * Powered by lodash's {@link https://lodash.com/docs/#deburr deburr}
+ * Powered by lodash's {@link https://lodash.com/docs/#deburr deburr}.
*
* @function looselyMa... |
52b58f48625f7a54f4e342e263b865747137dcfa | src/Middleware/MiddlewareStack.js | src/Middleware/MiddlewareStack.js | export default class MiddlewareStack {
constructor(handler, stack = []) {
this._handler = handler;
this._stack = stack.map(element => (typeof element === 'function' ? new element() : element));
this._regenerateMiddlewareProcess();
}
push(middleware) {
this._stack.push(middleware);
this._regen... | export default class MiddlewareStack {
constructor(handler, stack = []) {
this._handler = handler;
this._stack = stack.map(element => (typeof element === 'function' ? new element() : element));
this._regenerateMiddlewareProcess();
}
push(middleware) {
this._stack.push(middleware);
this._regen... | Make the middleware regen after pops. | Make the middleware regen after pops.
| JavaScript | mit | hkwu/ghastly | ---
+++
@@ -11,7 +11,10 @@
}
pop() {
- return this._stack.pop();
+ const popped = this._stack.pop();
+ this._regenerateMiddlewareProcess();
+
+ return popped;
}
process(...data) { |
20542df46f1a5274c2292c9c05cf8024ab4679ad | test/react/router.spec.js | test/react/router.spec.js | var makeSignatureFromRoutes = require('../../src/react/router').makeSignatureFromRoutes
describe("react: makeSignatureFromRoutes", function() {
it("should correctly join paths", function() {
var routes = [
{path: "/"}, {path: "/something"},
]
expect(makeSignatureFromRoutes(routes)).toBe("/someth... | var makeSignatureFromRoutes = require('../../src/react/router').makeSignatureFromRoutes
var pushLocation = {action: 'PUSH'}, replaceLocation = {action: 'REPLACE'}
describe("react: makeSignatureFromRoutes", function() {
it("should correctly join paths", function() {
var routes = [
{path: "/"}, {path: "/som... | Add test for REPLACE route | Add test for REPLACE route
| JavaScript | mit | opbeat/opbeat-react,opbeat/opbeat-react,opbeat/opbeat-react | ---
+++
@@ -1,4 +1,5 @@
var makeSignatureFromRoutes = require('../../src/react/router').makeSignatureFromRoutes
+var pushLocation = {action: 'PUSH'}, replaceLocation = {action: 'REPLACE'}
describe("react: makeSignatureFromRoutes", function() {
it("should correctly join paths", function() {
@@ -7,16 +8,28 @@
... |
76d385139e36b3b685d73ba209e2f52ad89ebd01 | client/apps/user_tool/actions/application.js | client/apps/user_tool/actions/application.js | import wrapper from 'atomic-fuel/libs/constants/wrapper';
import Network from 'atomic-fuel/libs/constants/network';
// Local actions
const actions = [];
// Actions that make an api request
const requests = ['SEARCH_FOR_ACCOUNT_USERS', 'GET_ACCOUNT_USER', 'UPDATE_ACCOUNT_USER'];
export const Constants = wrapper(actio... | import wrapper from 'atomic-fuel/libs/constants/wrapper';
import Network from 'atomic-fuel/libs/constants/network';
// Increasing timeout to accomodate slow environments. Default is 20_000.
Network.TIMEOUT = 60_000;
// Local actions
const actions = [];
// Actions that make an api request
const requests = ['SEARCH_FO... | Increase client-side network timeout from 20 seconds to 60 | fix: Increase client-side network timeout from 20 seconds to 60
We're having problems in the staging environment where requests
are taking longer than 20 seconds and are timing out so the user can't
perform certain actions. Increasing the timeout to 60 seconds won't
improve the slow performance obviously, but it will ... | JavaScript | mit | atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/adhesion | ---
+++
@@ -1,5 +1,8 @@
import wrapper from 'atomic-fuel/libs/constants/wrapper';
import Network from 'atomic-fuel/libs/constants/network';
+
+// Increasing timeout to accomodate slow environments. Default is 20_000.
+Network.TIMEOUT = 60_000;
// Local actions
const actions = []; |
fcda3bb2aa828f7f34a0fa667b43089b10786bd5 | public/app/service-api.js | public/app/service-api.js | var svcMod = angular.module( "linksWeb.service-api", [] );
svcMod.factory( 'API', [ "$http", "$window", function ( $http, $window ) {
var apiRequest = function ( method, path, requestData, callback ) {
var headers = {
"Content-Type": "application/json",
"Authorization": "Token " ... | var svcMod = angular.module( "linksWeb.service-api", [] );
svcMod.factory( 'API', [ "$http", "$window", function ( $http, $window ) {
var apiRequest = function ( method, path, requestData, callback ) {
var headers = {
"Content-Type": "application/json"
};
if ( $window.sessio... | Set the Authorization header if a token exists | Set the Authorization header if a token exists
| JavaScript | mit | projectweekend/Links-Web,projectweekend/Links-Web | ---
+++
@@ -6,9 +6,12 @@
var apiRequest = function ( method, path, requestData, callback ) {
var headers = {
- "Content-Type": "application/json",
- "Authorization": "Token " + $window.sessionStorage.token
+ "Content-Type": "application/json"
};
+
+ if ... |
4a31e8979533dfccd99157832def834f134f340a | test/fixtures/index.js | test/fixtures/index.js | var sample_xform = require('./sample_xform');
module.exports = function() {
return [
{
request: {
method: "GET",
url: "http://www.example.org/xform00",
params: {},
},
response: {
code: "200",
... | module.exports = function() {
return [];
};
| Revert "Add fixture for getting an xform from an external server" | Revert "Add fixture for getting an xform from an external server"
This reverts commit 8ef11ed11f09b9f4ce7d53234fdb6100c7fe8451.
| JavaScript | bsd-3-clause | praekelt/go-jsbox-xform,praekelt/go-jsbox-xform | ---
+++
@@ -1,17 +1,3 @@
-var sample_xform = require('./sample_xform');
-
module.exports = function() {
- return [
- {
- request: {
- method: "GET",
- url: "http://www.example.org/xform00",
- params: {},
- },
- response: {
- ... |
28929cc0260ea14c2de5ec19874c6dbba00f9100 | matchMedia.js | matchMedia.js | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
window.matchMedia = window.matchMedia || (function( doc, undefined ) {
"use strict";
var bool,
docElem = doc.documentElement,
refNode = docElem.... | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
window.matchMedia || (window.matchMedia = function() {
"use strict";
var styleMedia = (window.styleMedia || window.media);
// For those that doen't... | Complete rewrite in an effort to gain performance | Complete rewrite in an effort to gain performance | JavaScript | mit | therealedsheenan/matchMedia.js,amitabhaghosh197/matchMedia.js,AndBicScadMedia/matchMedia.js,ababic/matchMedia.js,therealedsheenan/matchMedia.js,paulirish/matchMedia.js,zxfjessica/match-media-polyfill,CondeNast/matchMedia.js,CondeNast/matchMedia.js,ababic/matchMedia.js,dirajkumar/matchMedia.js,zxfjessica/match-media-pol... | ---
+++
@@ -1,36 +1,51 @@
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
-window.matchMedia = window.matchMedia || (function( doc, undefined ) {
+window.matchMedia || (window.matchMedia = function() {
+ ... |
6e648cc1f0abfd8df74f11a48682c8c177ad309d | pa11y.js | pa11y.js | // This is our options configuration for Pa11y
// https://github.com/pa11y/pa11y#configuration
const options = {
timeout: 60000,
hideElements: '.skip-to, .is-visuallyhidden'
};
module.exports = options;
| // This is our options configuration for Pa11y
// https://github.com/pa11y/pa11y#configuration
const options = {
timeout: 60000,
hideElements: '.skip-to, .is-visuallyhidden, .visuallyhidden'
};
module.exports = options;
| Add .visuallyhidden class to Pa11y test excludes | Add .visuallyhidden class to Pa11y test excludes
| JavaScript | mit | AusDTO/gov-au-ui-kit,AusDTO/gov-au-ui-kit,AusDTO/gov-au-ui-kit | ---
+++
@@ -3,7 +3,7 @@
const options = {
timeout: 60000,
- hideElements: '.skip-to, .is-visuallyhidden'
+ hideElements: '.skip-to, .is-visuallyhidden, .visuallyhidden'
};
module.exports = options; |
ad11af7002bfb7e6c0737bae5f48270010e1a42e | modules/wikipedia/index.js | modules/wikipedia/index.js | const wiki = require('wikijs').default;
module.exports.commands = ['wiki', 'wikipedia'];
function prettyPage(page) {
return page.summary()
// Get the first "sentence" (hopefully)
.then(str => str.substr(0, str.indexOf('.') + 1))
// Truncate with an ellipsis if length exceeds 250 chars
.then(str => (... | const wiki = require('wikijs').default;
module.exports.commands = ['wiki', 'wikipedia'];
const urlRegex = /^(?:https?:\/\/)?(?:en\.)?wikipedia\.org\/wiki\/(.+)/;
const errorMessage = term => `No Wikipedia page found for "${term}"`;
function shortSummary(page, withUrl) {
return page.summary()
// Get the first ... | Add URL matching to Wikipedia module | Add URL matching to Wikipedia module
| JavaScript | mit | LinuxMercedes/EuIrcBot,gmackie/EuIrcBot,euank/EuIrcBot,euank/EuIrcBot,gmackie/EuIrcBot,LinuxMercedes/EuIrcBot | ---
+++
@@ -2,21 +2,37 @@
module.exports.commands = ['wiki', 'wikipedia'];
-function prettyPage(page) {
+const urlRegex = /^(?:https?:\/\/)?(?:en\.)?wikipedia\.org\/wiki\/(.+)/;
+
+const errorMessage = term => `No Wikipedia page found for "${term}"`;
+
+function shortSummary(page, withUrl) {
return page.summa... |
334c168af32f349fa8dbd1ee319611647fa44004 | components/org.wso2.carbon.siddhi.editor.core/src/main/resources/web/commons/js/menu-bar/deploy-menu.js | components/org.wso2.carbon.siddhi.editor.core/src/main/resources/web/commons/js/menu-bar/deploy-menu.js | /**
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | /**
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | Change shortcut key for deploy to server | Change shortcut key for deploy to server
| JavaScript | apache-2.0 | tishan89/carbon-analytics,minudika/carbon-analytics,Niveathika92/carbon-analytics,erangatl/carbon-analytics,Niveathika92/carbon-analytics,minudika/carbon-analytics,minudika/carbon-analytics,tishan89/carbon-analytics,tishan89/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics,tishan89/carbon-analytics,wso2/car... | ---
+++
@@ -28,12 +28,12 @@
id: "deploy-to-server",
shortcuts: {
mac: {
- key: "shift+d",
- label: "\u21E7D"
+ key: "command+shift+d",
+ label:... |
da490e3f5353be00b9deb384813b48952a8db3cc | erpnext/stock/doctype/serial_no/serial_no.js | erpnext/stock/doctype/serial_no/serial_no.js | // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
cur_frm.add_fetch("customer", "customer_name", "customer_name")
cur_frm.add_fetch("supplier", "supplier_name", "supplier_name")
cur_frm.add_fetch("item_code", "item_name", "item_name")
c... | // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
cur_frm.add_fetch("customer", "customer_name", "customer_name")
cur_frm.add_fetch("supplier", "supplier_name", "supplier_name")
cur_frm.add_fetch("item_code", "item_name", "item_name")
c... | Set status button in serial no | Set status button in serial no
| JavaScript | agpl-3.0 | Tejal011089/fbd_erpnext,indictranstech/erpnext,suyashphadtare/sajil-final-erp,rohitwaghchaure/erpnext-receipher,mbauskar/Das_Erpnext,rohitwaghchaure/New_Theme_Erp,gangadharkadam/office_erp,Tejal011089/huntercamp_erpnext,suyashphadtare/gd-erp,mbauskar/helpdesk-erpnext,gangadharkadam/v5_erp,rohitwaghchaure/New_Theme_Erp,... | ---
+++
@@ -19,10 +19,8 @@
frm.toggle_enable("item_code", frm.doc.__islocal);
if(frm.doc.status == "Sales Returned" && frm.doc.warehouse)
- cur_frm.add_custom_button(__('Set Status as Available'), cur_frm.cscript.set_status_as_available);
+ cur_frm.add_custom_button(__('Set Status as Available'), function() {... |
44f3adfdbf85467272d71cf10c9ecd4fe75b57b7 | src/KeyboardObserver.js | src/KeyboardObserver.js | import {DeviceEventEmitter} from 'react-native';
class KeyboardObserver {
constructor() {
this.keyboardHeight = 0;
this.animationWillEndAt = 0;
this.listeners = {};
this.listenerId = 0;
DeviceEventEmitter.addListener('keyboardWillShow', this.handleKeyboardWillShow.bind(this));
DeviceEventEmi... | import {Keyboard} from 'react-native';
class KeyboardObserver {
constructor() {
this.keyboardHeight = 0;
this.animationWillEndAt = 0;
this.listeners = {};
this.listenerId = 0;
Keyboard.addListener('keyboardWillShow', this.handleKeyboardWillShow.bind(this));
Keyboard.addListener('keyboardWill... | Fix React Native Keyboard warnings | Fix React Native Keyboard warnings
| JavaScript | mit | azendoo/react-native-keyboard-responsive-view | ---
+++
@@ -1,4 +1,4 @@
-import {DeviceEventEmitter} from 'react-native';
+import {Keyboard} from 'react-native';
class KeyboardObserver {
@@ -7,8 +7,8 @@
this.animationWillEndAt = 0;
this.listeners = {};
this.listenerId = 0;
- DeviceEventEmitter.addListener('keyboardWillShow', this.handleKeybo... |
166231a4e9c666d017f6823b46f238fd50537e5a | lib/node_modules/@stdlib/math/base/special/gammaincinv/lib/index.js | lib/node_modules/@stdlib/math/base/special/gammaincinv/lib/index.js | 'use strict';
/**
* Computes the inverse of the lower incomplete gamma function.
*
* @module @stdlib/math/base/special/gammaincinv
*
* @example
* var gammaincinv = require( '@stdlib/math/base/special/gammaincinv' );
*
* var val = gammaincinv( 0.5, 2.0 );
* // returns ~1.678
*
* val = gammaincinv( 0.1, 10.0 );
* // ret... | 'use strict';
/**
* Compute the inverse of the lower incomplete gamma function.
*
* @module @stdlib/math/base/special/gammaincinv
*
* @example
* var gammaincinv = require( '@stdlib/math/base/special/gammaincinv' );
*
* var val = gammaincinv( 0.5, 2.0 );
* // returns ~1.678
*
* val = gammaincinv( 0.1, 10.0 );
* // retu... | Update description to imperative mood | Update description to imperative mood
| JavaScript | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | ---
+++
@@ -1,7 +1,7 @@
'use strict';
/**
-* Computes the inverse of the lower incomplete gamma function.
+* Compute the inverse of the lower incomplete gamma function.
*
* @module @stdlib/math/base/special/gammaincinv
* |
c8639e7b8e380cbe1f68c7597de438ccdebdda77 | server/instaFeed.es6.js | server/instaFeed.es6.js | Meteor.methods({
fetchInstaApi: function(){
var instaDebounce = _.debounce(Meteor.bindEnvironment(function(){
var ig = Meteor.npmRequire('instagram-node').instagram();
ig.use({ access_token: Meteor.settings.instagram.access_token });
ig.user_self_media_recent(Meteor.bindEnvironment(function(err... | Meteor.methods({
fetchInstaApi: function(){
/*var instaDebounce = _.debounce(Meteor.bindEnvironment(function(){
var ig = Meteor.npmRequire('instagram-node').instagram();
ig.use({ access_token: Meteor.settings.instagram.access_token });
ig.user_self_media_recent(Meteor.bindEnvironment(function(e... | Revert "Scaling crash testing twitFeed" | Revert "Scaling crash testing twitFeed"
This reverts commit 3216af3058e496f249781cf97e94359e01d7fa82.
| JavaScript | mit | Rhjulskov/webonaut,Rhjulskov/webonaut,Rhjulskov/webonaut | ---
+++
@@ -1,6 +1,6 @@
Meteor.methods({
fetchInstaApi: function(){
- var instaDebounce = _.debounce(Meteor.bindEnvironment(function(){
+ /*var instaDebounce = _.debounce(Meteor.bindEnvironment(function(){
var ig = Meteor.npmRequire('instagram-node').instagram();
ig.use({ access_token: Meteo... |
8c4b151b36ac5ff4d83206e19675c45932248809 | src/BBM.fn.toBBM.js | src/BBM.fn.toBBM.js | (function (){
"use strict";
var BBM = require("./BBM.js");
var ENUM = BBM.ENUM;
var REGSTR =
[
"\"{3,}"
, "--"
, "\\*{2}"
, "\\^{2}"
, ",,"
, "__"
, "''"
, "\\?<"
, "!<"
, "#<"
, "#\\["
, "-\\["
, "\\]"
];
var REGEX = new RegExp(REGSTR.join("|"), "g");
//Serializes this subtree into BBM.
function toBBM()
{
}
... | (function (){
"use strict";
var BBM = require("./BBM.js");
var ENUM = BBM.ENUM;
var REGSTR =
[
"\\\\[\\s\\S]"
, "\"{3,}"
, "--"
, "\\*{2}"
, "\\^{2}"
, ",,"
, "__"
, "''"
, "\\?<"
, "!<"
, "#<"
, "#\\["
, "-\\["
, "\\]"
];
var REGEX = new RegExp(REGSTR.join("|"), "g");
//Serializes this subtree into BBM.
functio... | Add backslash tokens to the escape list. | Add backslash tokens to the escape list.
| JavaScript | mit | Preole/bbm,Preole/bbm | ---
+++
@@ -5,7 +5,8 @@
var ENUM = BBM.ENUM;
var REGSTR =
[
- "\"{3,}"
+ "\\\\[\\s\\S]"
+, "\"{3,}"
, "--"
, "\\*{2}"
, "\\^{2}" |
a8bde2cb21c53fbdcf6a4aae9124a310f9e0111f | lib/client/error_reporters/window_error.js | lib/client/error_reporters/window_error.js | var prevWindowOnError = window.onerror;
window.onerror = function(message, url, line, stack) {
var now = Date.now();
stack = stack || 'window@'+url+':'+line+':0';
Kadira.sendErrors([{
appId : Kadira.options.appId,
name : message,
source : 'client',
startTime : now,
type : 'window.onerror',
... | var prevWindowOnError = window.onerror;
window.onerror = function(message, url, line, stack) {
var now = Date.now();
stack = stack || 'window@'+url+':'+line+':0';
Kadira.sendErrors([{
appId : Kadira.options.appId,
name : 'Error: ' + message,
source : 'client',
startTime : now,
type : 'window.o... | Use 'ErrorName: message' format for name | Use 'ErrorName: message' format for name
| JavaScript | mit | chatr/kadira,meteorhacks/kadira | ---
+++
@@ -4,7 +4,7 @@
stack = stack || 'window@'+url+':'+line+':0';
Kadira.sendErrors([{
appId : Kadira.options.appId,
- name : message,
+ name : 'Error: ' + message,
source : 'client',
startTime : now,
type : 'window.onerror', |
7035a1f61994961884bc8c584b793b2f657ad242 | web/frontend/pages/rich_text_editor.js | web/frontend/pages/rich_text_editor.js | import tinymce from 'tinymce/tinymce';
window.tinymce = tinymce;
import 'tinymce/themes/silver';
import 'tinymce/plugins/link';
import 'tinymce/plugins/lists';
import 'tinymce/plugins/image';
import 'tinymce/plugins/table';
import 'tinymce/plugins/code';
import 'tinymce/plugins/paste';
import 'tinymce/plugins/media';
i... | import tinymce from 'tinymce/tinymce';
window.tinymce = tinymce;
import 'tinymce/themes/silver';
import 'tinymce/icons/default';
import 'tinymce/plugins/link';
import 'tinymce/plugins/lists';
import 'tinymce/plugins/image';
import 'tinymce/plugins/table';
import 'tinymce/plugins/code';
import 'tinymce/plugins/paste';
i... | Include TinyMCE icons after update | Include TinyMCE icons after update
| JavaScript | agpl-3.0 | harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o | ---
+++
@@ -1,6 +1,7 @@
import tinymce from 'tinymce/tinymce';
window.tinymce = tinymce;
import 'tinymce/themes/silver';
+import 'tinymce/icons/default';
import 'tinymce/plugins/link';
import 'tinymce/plugins/lists';
import 'tinymce/plugins/image'; |
a06d8d4a10b0cfb5905a0dc183bf25b26dd51e69 | assets/js/googlesitekit/modules/datastore/__fixtures__/index.js | assets/js/googlesitekit/modules/datastore/__fixtures__/index.js | /**
* Modules datastore fixtures.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | /**
* Modules datastore fixtures.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | Fix new docs ESLint rule violation. | Fix new docs ESLint rule violation.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | ---
+++
@@ -27,6 +27,8 @@
/**
* Makes a copy of the modules with the given module activation set.
*
+ * @since n.e.x.t
+ *
* @param {...string} slugs Active module slugs.
* @return {Object[]} Array of module objects.
*/ |
3825954db3a1f20411329f6efde9fc7b09c62f22 | ifrau-client.js | ifrau-client.js | module.exports = import('ifrau').then(function(ifrau) {
return ifrau.Client;
});
| module.exports = import('ifrau').then(function(ifrau) {
return ifrau.SlimClient;
});
| Return slim client instead of full client | Return slim client instead of full client
Co-authored-by: Owen Smith <9069d0e8b554bca3df1592c83c498c5cd0661c2e@omsmith.ca> | JavaScript | apache-2.0 | Brightspace/frau-jwt | ---
+++
@@ -1,3 +1,3 @@
module.exports = import('ifrau').then(function(ifrau) {
- return ifrau.Client;
+ return ifrau.SlimClient;
}); |
61ef41e923fe2d05f36f47ed26139fcf6e4685ae | app/components/language-picker/component.js | app/components/language-picker/component.js | import Ember from 'ember';
import countries from './countries';
export default Ember.Component.extend({
i18n: Ember.inject.service(),
countries: countries,
languages: Ember.computed('countries', function() {
var langs = [];
this.get('countries').forEach((country) => {
country.language... | import Ember from 'ember';
import countries from './countries';
export default Ember.Component.extend({
i18n: Ember.inject.service(),
countries: countries,
languages: Ember.computed('countries', function() {
var langs = [];
this.get('countries').forEach((country) => {
country.language... | Sort flags by country code | Sort flags by country code
| JavaScript | apache-2.0 | CenterForOpenScience/isp,CenterForOpenScience/isp,samanehsan/isp,samanehsan/isp,CenterForOpenScience/isp,samanehsan/isp | ---
+++
@@ -18,10 +18,10 @@
});
});
langs.sort(function(a, b) {
- if (a.name > b.name) {
+ if (a.countryCode > b.countryCode) {
return 1;
}
- if (a.name < b.name) {
+ if (a.countryCode < b.countryCode) {
return -1;
}
r... |
4f0b898c968cca08ac87638d4250c6140f354a7f | src/components/HomepagePetitions/index.js | src/components/HomepagePetitions/index.js | import React from 'react';
import TeaserGrid from 'components/TeaserGrid';
import Container from 'components/Container';
import BlockContainer from 'components/BlockContainer';
import Section from 'components/Section';
import Heading2 from 'components/Heading2';
import styles from './homepage-petitions.scss';
import Li... | import React from 'react';
import TeaserGrid from 'components/TeaserGrid';
import Container from 'components/Container';
import BlockContainer from 'components/BlockContainer';
import Section from 'components/Section';
import Heading2 from 'components/Heading2';
import styles from './homepage-petitions.scss';
import Li... | Use latest petitions on HP instead... | Use latest petitions on HP instead...
| JavaScript | apache-2.0 | iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend | ---
+++
@@ -21,8 +21,8 @@
</div>
</BlockContainer>
<TeaserGrid
- petitions={groupedPetitions.trending.data}
- isLoading={groupedPetitions.trending.isLoading}
+ petitions={groupedPetitions.latest.data}
+ isLoading={groupedPetitions.latest.isLoading}
... |
8ea1ff2f989480a77181a384d64cfdcd68a88c18 | blueprints/ember-flexberry-designer/index.js | blueprints/ember-flexberry-designer/index.js | /* globals module */
module.exports = {
afterInstall: function() {
var _this = this;
return _this.addAddonsToProject({
packages: [
{ name: 'ember-flexberry', target: '0.12.3' }
]
}).then(function () {
return _this.addPackagesToProject([
{ name: 'npm:jointjs', target: '^2.1.... | /* globals module */
module.exports = {
afterInstall: function() {
var _this = this;
return _this.addAddonsToProject({
packages: [
{ name: 'ember-cli-jstree', target: '1.0.9' },
{ name: 'ember-flexberry', target: '0.12.3' },
{ name: 'ember-promise-helpers', target: '1.0.3' }
... | Fix default blueprint add missing dependencies | Fix default blueprint add missing dependencies
| JavaScript | mit | Flexberry/ember-flexberry-designer,Flexberry/ember-flexberry-designer,Flexberry/ember-flexberry-designer | ---
+++
@@ -4,11 +4,13 @@
var _this = this;
return _this.addAddonsToProject({
packages: [
- { name: 'ember-flexberry', target: '0.12.3' }
+ { name: 'ember-cli-jstree', target: '1.0.9' },
+ { name: 'ember-flexberry', target: '0.12.3' },
+ { name: 'ember-promise-helpers', ta... |
3322f2a9c5627719c552d737543a3f7f88888122 | webpack.config.dist.js | webpack.config.dist.js | var config = require('./webpack.config.js');
var webpack = require('webpack');
config.devtool = 'source-map';
config.output.publicPath = './';
config.plugins.push(
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
})
);
config.plugins.push(
new webpack.optimi... | var config = require('./webpack.config.js');
var webpack = require('webpack');
var pkg = require('./package.json');
var banner = '@license minigrid ';
banner = banner + pkg.version;
banner = banner + ' – minimal cascading grid layout http://alves.im/minigrid';
config.devtool = 'source-map';
config.output.publicPath ... | Add banner comment to dis version | Add banner comment to dis version
| JavaScript | mit | messinmotion/minigrid,henriquea/minigrid,henriquea/minigrid | ---
+++
@@ -1,5 +1,10 @@
var config = require('./webpack.config.js');
var webpack = require('webpack');
+var pkg = require('./package.json');
+
+var banner = '@license minigrid ';
+banner = banner + pkg.version;
+banner = banner + ' – minimal cascading grid layout http://alves.im/minigrid';
config.devtool = 'sou... |
9dd210893d6e961f89836281df4a16c056917d8f | src/TileMap.js | src/TileMap.js | function TileMap(w, h) {
this.width = w;
this.height = h;
this.reset();
}
TileMap.prototype.reset = function() {
this.map = [];
for(var y = 0; y < this.height; y++) {
this.map[y] = [];
for(var x = 0; x < this.width; x++) {
this.map[y][x] = new Tile();
}
}
}
function Tile() {
}
TileMap... | function TileMap(w, h) {
this.width = w;
this.height = h;
this.reset();
}
TileMap.prototype.reset = function() {
this.map = [];
for(var y = 0; y < this.height; y++) {
this.map[y] = [];
for(var x = 0; x < this.width; x++) {
this.map[y][x] = new Tile(x, y);
}
}
}
function Tile(x, y) {
t... | Change Tile to store its own coordinates | Change Tile to store its own coordinates
| JavaScript | mit | yoo2001818/TableFlip | ---
+++
@@ -9,13 +9,14 @@
for(var y = 0; y < this.height; y++) {
this.map[y] = [];
for(var x = 0; x < this.width; x++) {
- this.map[y][x] = new Tile();
+ this.map[y][x] = new Tile(x, y);
}
}
}
-function Tile() {
-
+function Tile(x, y) {
+ this.x = x;
+ this.y = y;
}
TileMap.Ti... |
cd072a2e2de2213eb9450445c5a48ca5c6452335 | lib/generators/half_pipe/templates/tasks/options/sass.js | lib/generators/half_pipe/templates/tasks/options/sass.js | module.exports = {
options: {
require: ['sass-css-importer'],
loadPath: ['<%%= bowerOpts.directory || "bower_components" %>'],
bundleExec: true,
},
debug: {
src: '<%%= dirs.tmp %>/prepare/assets/styles/main.scss',
dest: '<%%= dirs.tmp %>/public/assets/styles/main.css',
options: {
sty... | module.exports = {
options: {
require: ['sass-css-importer'],
loadPath: ['<%%= bowerOpts.directory || "bower_components" %>'],
bundleExec: true
},
debug: {
src: '<%%= dirs.tmp %>/prepare/assets/styles/main.scss',
dest: '<%%= dirs.tmp %>/public/assets/styles/main.css',
options: {
styl... | Add sourcemaps option to Sass task | Add sourcemaps option to Sass task | JavaScript | mit | half-pipe/half-pipe,half-pipe/half-pipe | ---
+++
@@ -2,13 +2,14 @@
options: {
require: ['sass-css-importer'],
loadPath: ['<%%= bowerOpts.directory || "bower_components" %>'],
- bundleExec: true,
+ bundleExec: true
},
debug: {
src: '<%%= dirs.tmp %>/prepare/assets/styles/main.scss',
dest: '<%%= dirs.tmp %>/public/assets/sty... |
5068d340bf68c03d79d3c6b9325f5557d4daa3c9 | lib/libra2/app/assets/javascripts/file_upload_options.js | lib/libra2/app/assets/javascripts/file_upload_options.js | (function() {
"use strict";
function initPage() {
var fileTypes = [
"csv",
"gif",
"jpeg",
"jpg",
"mp3",
"mp4",
"pdf",
"png",
"tif",
"tiff",
"txt",
"xml"
];
var list = fileTypes.join(", ").toUpperCase();
var filter = fileTypes.join("|");
// Match any file that doesn't c... | (function() {
"use strict";
function initPage() {
var fileTypes = [
"csv",
"gif",
"htm",
"html",
"jpeg",
"jpg",
"mp3",
"mp4",
"pdf",
"png",
"tif",
"tiff",
"txt",
"xml"
];
var list = fileTypes.join(", ").toUpperCase();
var filter = fileTypes.join("|");
// Match an... | Add html and htm to list of acceptable files | LIBRA-235: Add html and htm to list of acceptable files
| JavaScript | apache-2.0 | uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2 | ---
+++
@@ -5,6 +5,8 @@
var fileTypes = [
"csv",
"gif",
+ "htm",
+ "html",
"jpeg",
"jpg",
"mp3", |
253529d42c1ef9b7aed7b2754c77bc8a246d892e | repeat.js | repeat.js | /*! http://mths.be/repeat v0.1.0 by @mathias */
if (!String.prototype.repeat) {
(function() {
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
var repeat = function(count) {
if (this == null) {
throw TypeError();
}
var string = String(this);
// `ToInteger`
var n = count ... | /*! http://mths.be/repeat v0.1.0 by @mathias */
if (!String.prototype.repeat) {
(function() {
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
var repeat = function(count) {
if (this == null) {
throw TypeError();
}
var string = String(this);
// `ToInteger`
var n = count ... | Remove unnecessary check for `n == 0` | Remove unnecessary check for `n == 0`
The `while` loop below handles this case anyway. The only ‘overhead’ the check avoided was a single `n--` and a `ToBoolean(0)` — so this was definitely a micro-optimization.
Closes #3.
| JavaScript | mit | mathiasbynens/String.prototype.repeat | ---
+++
@@ -16,9 +16,6 @@
if (n < 0 || n == Infinity) {
throw RangeError();
}
- if (n == 0) {
- return '';
- }
var result = '';
while (n--) {
result += string; |
c7dd9a0b4aacce1e04e9cbe4400b085cd0eb9119 | src/build.js | src/build.js | var requirejs = require('requirejs');
var applicationConfig = {
baseUrl: './public/js',
name: 'app',
out: './public/app.js',
mainConfigFile: './public/js/app.js',
paths: {
'socket.io': 'empty:',
'requireLib': 'require'
},
include: [
'requireLib'
]
};
var mainConfig... | var requirejs = require('requirejs');
var applicationConfig = {
baseUrl: './public/js',
name: 'app',
out: './public/app.js',
mainConfigFile: './public/js/app.js',
paths: {
'socket.io': 'empty:',
'requireLib': 'require'
},
include: [
'requireLib'
]
};
var mainConfig... | Compress CSS into a single file | Compress CSS into a single file
| JavaScript | apache-2.0 | pinittome/pinitto.me,pinittome/pinitto.me,pinittome/pinitto.me | ---
+++
@@ -37,7 +37,19 @@
requirejs.optimize(mainConfig, function (log) {
console.log("Main javascript optimisation complete".green);
+ console.log((log).cyan);
+}, function(error) {
+ console.log(("Error optimizing javascript: " + error).red);
+});
+
+var cssConfig = {
+ cssIn: './public/css/main.css',
+... |
a9ed364ba26e9952a05934ac5369dce8db23c4da | public/nav_control/nav_control.js | public/nav_control/nav_control.js | import { constant, includes } from 'lodash';
import { element } from 'angular';
import uiModules from 'ui/modules';
import registry from 'ui/registry/chrome_nav_controls';
import '../components/notification_center';
import template from './nav_control.html';
import 'ui/angular-bootstrap';
registry.register(constant({
... | import { constant, includes } from 'lodash';
import { element } from 'angular';
import uiModules from 'ui/modules';
import registry from 'ui/registry/chrome_nav_controls';
import '../components/notification_center';
import template from './nav_control.html';
import 'ui/angular-bootstrap';
registry.register(constant({
... | Fix notification-center not to close when button clicked. | Fix notification-center not to close when button clicked.
| JavaScript | mit | sw-jung/kibana_notification_center,sw-jung/kibana_notification_center | ---
+++
@@ -15,12 +15,9 @@
const module = uiModules.get('notification_center', []);
module.controller('notificationCenterNavController', ($scope, $compile, $document, NotificationCenter) => {
function initNotificationCenter() {
- const $elem = $scope.$notificationCenter = $compile('<notification-center></noti... |
225df4bb8f5e6561161dab095c49a8b78286dbb2 | src/components/Heading.js | src/components/Heading.js | /*
* A reusable component to display a styled heading.
*/
import PropTypes from 'prop-types';
import React, {Component} from 'react';
import {StyleSheet, css} from 'aphrodite/no-important';
export default class Heading extends Component {
static propTypes = {
level: PropTypes.oneOf([1, 2]).isRequired,
... | /*
* A reusable component to display a styled heading.
*/
import PropTypes from 'prop-types';
import React, {Component} from 'react';
import {StyleSheet, css} from 'aphrodite/no-important';
export default class Heading extends Component {
static propTypes = {
level: PropTypes.oneOf([1, 2, 3]).isRequire... | Add support for level-3 headings | Add support for level-3 headings
| JavaScript | mit | wchargin/wchargin.github.io,wchargin/wchargin.github.io | ---
+++
@@ -9,7 +9,7 @@
export default class Heading extends Component {
static propTypes = {
- level: PropTypes.oneOf([1, 2]).isRequired,
+ level: PropTypes.oneOf([1, 2, 3]).isRequired,
}
render() {
@@ -32,4 +32,9 @@
fontSize: 24,
fontWeight: 'normal',
},
+ ... |
641b6937f8b8b54bd654c4ca6ca5345be5ff3f0e | router.js | router.js | var httpProxy = require('http-proxy');
var http = require('http');
var proxy = httpProxy.createProxy();
var routes = {
// Router
'hook.labeli.org' : 'http://localhost:9000',
// Api
'api.labeli.org' : 'http://localhost:9010',
'hook.api.labeli.org' : 'http://localhost:9011',
... | var httpProxy = require('http-proxy');
var http = require('http');
var proxy = httpProxy.createProxyServer({});
var routes = {
// Router
'hook.labeli.org' : 'http://localhost:9000',
// Api
'api.labeli.org' : 'http://localhost:9010',
'hook.api.labeli.org' : 'http://localhost:9011',
// Website
... | Add method getRouteFor() to create default route | Add method getRouteFor() to create default route
| JavaScript | mit | asso-labeli/labeli-router,asso-labeli/labeli-router | ---
+++
@@ -1,22 +1,29 @@
var httpProxy = require('http-proxy');
var http = require('http');
-var proxy = httpProxy.createProxy();
+var proxy = httpProxy.createProxyServer({});
var routes = {
- // Router
- 'hook.labeli.org' : 'http://localhost:9000',
- // Api
- 'api.labeli.org' : 'h... |
3c54b4d5f8351898be26699ad9cece43318a32e3 | frontend/config/dev.env.js | frontend/config/dev.env.js | var merge = require('webpack-merge')
var prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
API_HOST: '"http://localhost:3000"'
})
| var merge = require('webpack-merge')
var prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
API_HOST: '"http://localhost:5100"'
})
| Fix local api server path because of Foreman | Fix local api server path because of Foreman
| JavaScript | mit | riseshia/Bonghwa,riseshia/Bonghwa,riseshia/Bonghwa,riseshia/Bonghwa | ---
+++
@@ -3,5 +3,5 @@
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
- API_HOST: '"http://localhost:3000"'
+ API_HOST: '"http://localhost:5100"'
}) |
c956e63c62f17c3c671ea991f978e42218a94691 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Add explicit include (early in order) for the leaflet.markercluster js file | Add explicit include (early in order) for the leaflet.markercluster js file
| JavaScript | mit | codeforgso/cityvoice,ajb/cityvoice,daguar/cityvoice,ajb/cityvoice,codeforgso/cityvoice,daguar/cityvoice,codeforgso/cityvoice,codeforamerica/cityvoice,codeforamerica/cityvoice,ajb/cityvoice,codeforamerica/cityvoice,daguar/cityvoice,daguar/cityvoice,codeforamerica/cityvoice,ajb/cityvoice,codeforgso/cityvoice | ---
+++
@@ -14,6 +14,7 @@
//= require jquery_ujs
//= require turbolinks
//= require leaflet
+//= require ./leaflet.markercluster
//= require mapbox
//= require bootstrap
//= require ./typeahead.min |
d703dad4967b92c85a470b5d445a7a1fd5765352 | app/assets/javascripts/osem-switch.js | app/assets/javascripts/osem-switch.js | $(function () {
$("[class='switch-checkbox']").bootstrapSwitch();
$('input[class="switch-checkbox"]').on('switchChange.bootstrapSwitch', function(event, state) {
var url = $(this).attr('url') + state;
var method = $(this).attr('method');
$.ajax({
url: url,
type: method,
dataType: 'sc... | function checkboxSwitch(selector){
$(selector).bootstrapSwitch(
);
$(selector).on('switchChange.bootstrapSwitch', function(event, state) {
var url = $(this).attr('url') + state;
var method = $(this).attr('method');
$.ajax({
url: url,
type: method,
dataType: 'script'
});
});
... | Add a function for initing boostrapSwitch outside of $() | Add a function for initing boostrapSwitch outside of $()
| JavaScript | mit | bear454/osem,hennevogel/osem,AndrewKvalheim/osem,differentreality/osem,differentreality/osem,rishabhptr/osem,openSUSE/osem,rishabhptr/osem,bear454/osem,SeaGL/osem,openSUSE/osem,rishabhptr/osem,differentreality/osem,hennevogel/osem,hennevogel/osem,SeaGL/osem,hennevogel/osem,openSUSE/osem,bear454/osem,rishabhptr/osem,And... | ---
+++
@@ -1,7 +1,9 @@
-$(function () {
- $("[class='switch-checkbox']").bootstrapSwitch();
+function checkboxSwitch(selector){
+ $(selector).bootstrapSwitch(
- $('input[class="switch-checkbox"]').on('switchChange.bootstrapSwitch', function(event, state) {
+ );
+
+ $(selector).on('switchChange.bootstrapSwitch... |
23a7aefe2d78f46523bd71a25c3ceb90db254f5e | src/index.js | src/index.js | const fs = require('fs');
const path = require('path');
const { infer } = require('bayesjs');
const { json, send } = require('micro');
const htmlContent = fs
.readFileSync(path.join(__dirname, 'index.html'))
.toString();
module.exports = async (req, res) => {
if (req.url !== '/') {
return send(res, 404);
... | const fs = require('fs');
const path = require('path');
const { infer } = require('bayesjs');
const { json, send } = require('micro');
const htmlContent = fs
.readFileSync(path.join(__dirname, 'index.html'))
.toString();
module.exports = async (req, res) => {
if (req.url !== '/') {
return send(res, 404);
... | Change 'not found' to 'method not allowed' | Change 'not found' to 'method not allowed'
| JavaScript | mit | fhelwanger/bayesjs-ws,fhelwanger/bayesjs-ws | ---
+++
@@ -20,7 +20,8 @@
const payload = await json(req);
return infer(payload.network, payload.nodes, payload.given);
}
+ default: {
+ return send(res, 405);
+ }
}
-
- return send(res, 404);
}; |
73f420d634399f26a329fd66f1afc6221e1aeb8b | src/index.js | src/index.js | const Discord = require('discord.js');
const config = require('./config.json');
const manager = new Discord.ShardingManager('./bot.js');
//Spawn with a relevant number of shards automatically
manager.spawn();
| const Discord = require('discord.js');
const config = require('./config.json');
const API = require("./api.json");
const manager = new Discord.ShardingManager('./bot.js', {
token: API.discord
});
//Spawn with a relevant number of shards automatically
manager.spawn();
| Add token in sharding manager | Add token in sharding manager
| JavaScript | mit | moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord | ---
+++
@@ -1,6 +1,9 @@
const Discord = require('discord.js');
const config = require('./config.json');
-const manager = new Discord.ShardingManager('./bot.js');
+const API = require("./api.json");
+const manager = new Discord.ShardingManager('./bot.js', {
+ token: API.discord
+});
//Spawn with a relevant number... |
5955b691f3e44cbf8224e070c1c67fdd070f5454 | src/content.js | src/content.js | /* Listen for messages and get modResource meta tag*/
chrome.runtime.onMessage.addListener(function(msg, sender, sendResponse) {
if (msg.command && (msg.command == "getResource")) {
function getMetaContentByName(name,content){
var content = (content==null)?'content':content;
var meta = document.q... | /* Listen for messages and get modResource meta tag*/
chrome.runtime.onMessage.addListener(function(msg, sender, sendResponse) {
if (msg.command && (msg.command == "getResource")) {
function getMetaContentByName(name,content){
var content = (content==null)?'content':content;
var meta = document.q... | Change meta name for valid html output | Change meta name for valid html output
| JavaScript | mit | bartholomej/modx-manager-switch,bartholomej/modx-manager-switch | ---
+++
@@ -9,6 +9,6 @@
return meta.getAttribute(content);
}
}
- sendResponse(getMetaContentByName("modResource"));
+ sendResponse(getMetaContentByName('application-name','data-id'));
}
}); |
490f0af6992eab28938273d91341073138082b35 | test/unit/tadaboard-node-sdk.js | test/unit/tadaboard-node-sdk.js | import TB from '../../src/tadaboard-node-sdk';
describe('TB', () => {
});
| import TB from '../../src/tadaboard-node-sdk';
describe('TB', () => {
describe('response', () => {
it('is a function', () => {
expect(TB.response).to.be.a('function');
});
});
});
| Add simple test for TB.response | Add simple test for TB.response
| JavaScript | mit | tadaboard/node-sdk,tadaboard/node-sdk | ---
+++
@@ -1,4 +1,9 @@
import TB from '../../src/tadaboard-node-sdk';
describe('TB', () => {
+ describe('response', () => {
+ it('is a function', () => {
+ expect(TB.response).to.be.a('function');
+ });
+ });
}); |
c716b8f23392e2d26c7675f193be4c54f72205cd | app/renderer/js/notification/index.js | app/renderer/js/notification/index.js | 'use strict';
const {
remote: { app }
} = require('electron');
const DefaultNotification = require('./default-notification');
const { appId, loadBots } = require('./helpers');
// From https://github.com/felixrieseberg/electron-windows-notifications#appusermodelid
// On windows 8 we have to explicitly set the appUs... | 'use strict';
const {
remote: { app }
} = require('electron');
const DefaultNotification = require('./default-notification');
const { appId, loadBots } = require('./helpers');
// From https://github.com/felixrieseberg/electron-windows-notifications#appusermodelid
// On windows 8 we have to explicitly set the appUs... | Refactor code for bot mention in reply. | notification: Refactor code for bot mention in reply.
| JavaScript | apache-2.0 | zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-electron,zulip/zulip-desktop,zulip/zulip-electron | ---
+++
@@ -12,11 +12,16 @@
app.setAppUserModelId(appId);
window.Notification = DefaultNotification;
+
if (process.platform === 'darwin') {
const DarwinNotification = require('./darwin-notifications');
window.Notification = DarwinNotification;
}
window.addEventListener('load', () => {
- loadBots();
+ // ... |
39525514e4849eb514bb563e51f5cb7e5900f0ea | blueprints/flexberry-edit-form/snippets/getCellComponent-function.js | blueprints/flexberry-edit-form/snippets/getCellComponent-function.js | (attr, bindingPath, model) {
let cellComponent = this._super(...arguments);
if (attr.kind === 'belongsTo') {
switch (<% '`${model.modelName}+${bindingPath}`' %>) {
<%= bodySwitchBindingPath %>
}
}
return cellComponent;
}
| (attr, bindingPath, model) {
let cellComponent = this._super(...arguments);
if (attr.kind === 'belongsTo') {
switch (<%= '`${model.modelName}+${bindingPath}`' %>) {
<%= bodySwitchBindingPath %>
}
}
return cellComponent;
}
| Fix flexberry-edit-form blueprint getCellComponent template | Fix flexberry-edit-form blueprint getCellComponent template
| JavaScript | mit | Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry | ---
+++
@@ -1,7 +1,7 @@
(attr, bindingPath, model) {
let cellComponent = this._super(...arguments);
if (attr.kind === 'belongsTo') {
- switch (<% '`${model.modelName}+${bindingPath}`' %>) {
+ switch (<%= '`${model.modelName}+${bindingPath}`' %>) {
<%= bodySwitchBindingPath %>
}
} |
2237d762db94f82264d5784412720fcfe69226a0 | Assets/js/init-dropzone.js | Assets/js/init-dropzone.js | $( document ).ready(function() {
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone(".dropzone", {
url: '/api/file',
autoProcessQueue: true,
maxFilesize: maxFilesize,
acceptedFiles : acceptedFiles
});
myDropzone.on("success", function(file, http) {
windo... | $( document ).ready(function() {
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone(".dropzone", {
url: '/api/file',
autoProcessQueue: true,
maxFilesize: maxFilesize,
acceptedFiles : acceptedFiles
});
myDropzone.on("queuecomplete", function(file, http) {
... | Fix early redirect when uploading multiple files | Fix early redirect when uploading multiple files
I had the case where I needed to upload 20+ files. Some files were uploaded others not.
The others failed due to the location.reload() function triggered on the first success emit from a first successful upload.
It seems by using the queuecomplete event it works in... | JavaScript | mit | zedee/Media,zedee/Media,AsgardCms/Media,oimken/Media,MentallyFriendly/Media,mikemand/Media,gabva/Media,mikemand/Media,AsgardCms/Media,mikemand/Media,AsgardCms/Media,MentallyFriendly/Media,gabva/Media,ruscon/Media,oimken/Media,zedee/Media,oimken/Media,ruscon/Media | ---
+++
@@ -6,7 +6,7 @@
maxFilesize: maxFilesize,
acceptedFiles : acceptedFiles
});
- myDropzone.on("success", function(file, http) {
+ myDropzone.on("queuecomplete", function(file, http) {
window.setTimeout(function(){
location.reload();
}, 1000); |
16eadc7fd084c4d4471655aa5239b77c933529db | tasks/options/concat_sourcemap.js | tasks/options/concat_sourcemap.js | module.exports = {
app: {
src: ['tmp/transpiled/app/**/*.js'],
dest: 'tmp/public/assets/app.js'
},
test: {
src: 'tmp/transpiled/tests/**/*.js',
dest: 'tmp/public/tests/tests.js'
}
};
| module.exports = {
app: {
src: ['tmp/transpiled/app/**/*.js'],
dest: 'tmp/public/assets/app.js',
options: {
sourcesContent: true
},
},
test: {
src: 'tmp/transpiled/tests/**/*.js',
dest: 'tmp/public/tests/tests.js',
options: {
sourcesContent: true
}
}
};
| Revert "sourceMappingURL instead of sourceContent for now" | Revert "sourceMappingURL instead of sourceContent for now"
This reverts commit cd758092a64445d48c5e4ab61407a5c5b51ea8f1.
| JavaScript | mit | sajt/ember-weather,mixonic/ember-app-kit,duvillierA/try_ember,grese/miner-app-OLD,cevn/tasky-web,ClockworkNet/ember-boilerplate,stefanpenner/ember-app-kit,kiwiupover/seattle-auckland-weather,kiwiupover/ember-weather,shin1ohno/want-js,tomclose/minimal_eak_test_stub_problem,ClockworkNet/ember-boilerplate,Anshdesire/ember... | ---
+++
@@ -1,11 +1,17 @@
module.exports = {
app: {
src: ['tmp/transpiled/app/**/*.js'],
- dest: 'tmp/public/assets/app.js'
+ dest: 'tmp/public/assets/app.js',
+ options: {
+ sourcesContent: true
+ },
},
test: {
src: 'tmp/transpiled/tests/**/*.js',
- dest: 'tmp/public/tests/t... |
c518210b525a55e01f8ec1551ec40a2d08133bac | public/js/routes/Routes.js | public/js/routes/Routes.js | define(['app', 'controllers/Today', 'controllers/History', 'services/History'], function (app) {
"use strict";
return app.config(['$routeProvider', function (routes) {
routes
.when('/', {
controller: 'TodayController',
templateUrl: '/partials/today.html'
})
.when('/history', {... | define(['app', 'controllers/Today', 'controllers/History', 'services/History'], function (app) {
"use strict";
return app.config(['$routeProvider', function (routes) {
routes
.when('/', {
controller: 'TodayController',
templateUrl: '/partials/today.html'
})
.when('/history', {... | Fix resolve for minified route controller | Fix resolve for minified route controller
| JavaScript | mit | BrettBukowski/tomatar | ---
+++
@@ -12,17 +12,13 @@
templateUrl: '/partials/history.html'
})
.when('/signedin', {
- controller: function (location, historyService) {
+ controller: ['$location', 'historyService', function (location, historyService) {
historyService.sync();
location.u... |
11764092ee043286fd017da940c28df51a4eba00 | client/js/directives/fancy-box-directive.js | client/js/directives/fancy-box-directive.js | "use strict";
angular.module("hikeio").
directive("fancybox", ["$rootScope", function($rootScope) {
return {
link: function (scope, element, attrs) {
scope.$on("$routeChangeStart", function () {
$.fancybox.close();
});
scope.$on("fancyboxClose", function () {
$.fancybox.close();
});
... | "use strict";
angular.module("hikeio").
directive("fancybox", ["$rootScope", function($rootScope) {
return {
link: function (scope, element, attrs) {
var context = {
afterLoad: function(current, previous) {
$rootScope.$broadcast("fancyboxLoaded");
},
afterClose: function(current, previou... | Remove fancybox afterLoad / afterClose event on destroy. | Remove fancybox afterLoad / afterClose event on destroy.
| JavaScript | mit | zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io | ---
+++
@@ -4,13 +4,7 @@
directive("fancybox", ["$rootScope", function($rootScope) {
return {
link: function (scope, element, attrs) {
- scope.$on("$routeChangeStart", function () {
- $.fancybox.close();
- });
- scope.$on("fancyboxClose", function () {
- $.fancybox.close();
- });
- $(e... |
3716935789ed49ae905df0d3da6adf8c52e0f966 | platform/wasm/test-server.js | platform/wasm/test-server.js | "use strict";
const http = require("http");
const express = require("express");
let app = express();
// Use Cross-Origin headers so browsers allow SharedArrayBuffer
app.use(function(req, res, next) {
res.header("Cross-Origin-Opener-Policy", "same-origin");
res.header("Cross-Origin-Embedder-Policy", "require-corp")... | "use strict";
const http = require("http");
const express = require("express");
let app = express();
// Add some logging on each request
app.use(function(req, res, next) {
const date = new Date().toISOString();
console.log(
`[${date}] "${cyan(req.method)} ${cyan(req.url)}" "${req.headers["user-agent"]}"`
);
ne... | Add logging to test server | muwasm: Add logging to test server
| JavaScript | agpl-3.0 | ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf,ArtifexSoftware/mupdf | ---
+++
@@ -4,6 +4,15 @@
const express = require("express");
let app = express();
+
+// Add some logging on each request
+app.use(function(req, res, next) {
+ const date = new Date().toISOString();
+ console.log(
+ `[${date}] "${cyan(req.method)} ${cyan(req.url)}" "${req.headers["user-agent"]}"`
+ );
+ next();
+... |
a1bf63b212b97d8b7e1ad90e7397ab79defe902c | generatorTests/test/directoryStructureSpec.js | generatorTests/test/directoryStructureSpec.js | var path = require('path');
var chai = require('chai');
chai.use(require('chai-fs'));
chai.should();
const ROOT_DIR = path.join(process.cwd(), '..');
describe('As a dev', function() {
describe('When testing generator directory structure', function() {
it('then _config folder should exist', function() {... | var path = require('path');
var chai = require('chai');
chai.use(require('chai-fs'));
chai.should();
const ROOT_DIR = path.join(process.cwd(), '..');
describe('As a dev', function() {
describe('When testing generator directory structure', function() {
var pathToTest;
it('then _config folder sh... | Update directoryStructure test to include all base folders. Refactor order to mirror folder order, minor refactor | test: Update directoryStructure test to include all base folders. Refactor order to mirror folder order, minor refactor
| JavaScript | mit | CodeRichardJohnston/slate-demo,cartridge/cartridge-cli,code-computerlove/quarry,code-computerlove/slate-cli,cartridge/cartridge,code-computerlove/slate,CodeRichardJohnston/slate-demo,code-computerlove/slate | ---
+++
@@ -10,20 +10,38 @@
describe('When testing generator directory structure', function() {
+ var pathToTest;
+
it('then _config folder should exist', function() {
- var pathToTest = path.join(ROOT_DIR, '_config');
+ pathToTest = path.join(ROOT_DIR, '_config');
+ ... |
eaac19a6be8c660bec896dea0c0968590e3eeee4 | src/js/app/view/history.js | src/js/app/view/history.js | var Backbone = require('backbone');
var url = require('url');
"use strict";
exports.HistoryUpdate = Backbone.View.extend({
initialize : function () {
console.log('HistoryUpdate:initialize');
this.listenTo(this.model, "change:asset", this.assetChanged);
this.listenTo(this.model, "change:ac... | var Backbone = require('backbone');
var url = require('url');
"use strict";
exports.HistoryUpdate = Backbone.View.extend({
initialize : function () {
console.log('HistoryUpdate:initialize');
this.listenTo(this.model, "change:asset", this.assetChanged);
this.listenTo(this.model, "change:ac... | Allow for more flexible url pattern | Allow for more flexible url pattern
| JavaScript | bsd-3-clause | menpo/landmarker.io,menpo/landmarker.io,menpo/landmarker.io | ---
+++
@@ -18,15 +18,20 @@
assetChanged: function () {
var u = url.parse(window.location.href.replace('#', '?'), true);
u.search = null;
- if (this.model.activeTemplate() == undefined ||
- this.model.activeCollection() == undefined ||
- this.model.assetIndex() == u... |
ffae6c6f7c935684a132b191b71bae1919ecffab | src/js/config/config.js | src/js/config/config.js | var url = require("url");
var packageJSON = require("../../../package.json");
var config = {
// @@ENV gets replaced by build system
environment: "@@ENV",
// If the UI is served through a proxied URL, this can be set here.
rootUrl: "",
// Defines the Marathon API URL,
// leave empty to use the same as the U... | var packageJSON = require("../../../package.json");
var config = {
// @@ENV gets replaced by build system
environment: "@@ENV",
// If the UI is served through a proxied URL, this can be set here.
rootUrl: "",
// Defines the Marathon API URL,
// leave empty to use the same as the UI is served.
apiURL: "..... | Revert "Convert relative apiURL paths to absolute paths" | Revert "Convert relative apiURL paths to absolute paths"
This reverts commit d4649622aecd8d1cae56963fd4f214acf45b0cf3.
| JavaScript | apache-2.0 | cribalik/marathon-ui,mesosphere/marathon-ui,mesosphere/marathon-ui,cribalik/marathon-ui | ---
+++
@@ -1,4 +1,3 @@
-var url = require("url");
var packageJSON = require("../../../package.json");
var config = {
@@ -30,15 +29,4 @@
"to enable a development configuration.");
}
}
-
-// Convert relative URLs to absolute URLs for node-fetch
-if (global.document != null) {
- if (config.apiURL.indexO... |
0703a2c971dc6fc0e0280c680e539a696fc81f2c | app/directives/player/player.js | app/directives/player/player.js | angular.module('soundmist').directive('player', function (Player) {
return {
restrict: 'E',
scope: false,
replace: false,
templateUrl: 'directives/player/player.html',
link: function (scope, element) {
scope.Player = Player
let slider = angular.element(document.querySelector('#progres... | angular.module('soundmist').directive('player', function (Player) {
return {
restrict: 'E',
scope: false,
replace: false,
templateUrl: 'directives/player/player.html',
link: function (scope, element) {
scope.Player = Player
let slider = angular.element(document.querySelector('#progres... | Increase headers background color opacity | Increase headers background color opacity
| JavaScript | cc0-1.0 | Kattjakt/soundmist,Kattjakt/soundmist | ---
+++
@@ -21,7 +21,7 @@
}
scope.wallpaper = {
- 'background': 'linear-gradient(rgba(255, 126, 0, 0.90),rgba(255, 119, 0, 0.75)), url(' + url + ')'
+ 'background': 'linear-gradient(rgba(255, 126, 0, 0.90),rgba(255, 119, 0, 0.95)), url(' + url + ')'
}
})
|
9f2b45cec678d106844359977968c859f1bc9c16 | app/scripts/services/invitation-service.js | app/scripts/services/invitation-service.js | 'use strict';
(function() {
angular.module('ncsaas')
.service('invitationService', ['baseServiceClass', '$http', 'ENV', invitationService]);
function invitationService(baseServiceClass, $http, ENV) {
/*jshint validthis: true */
var vm = this;
var ServiceClass = baseServiceClass.extend({
init... | 'use strict';
(function() {
angular.module('ncsaas')
.service('invitationService', ['baseServiceClass', '$http', 'ENV', invitationService]);
function invitationService(baseServiceClass, $http, ENV) {
/*jshint validthis: true */
var ServiceClass = baseServiceClass.extend({
init: function() {
... | Implement invitation data service (WAL-32) | Implement invitation data service (WAL-32)
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -6,20 +6,19 @@
function invitationService(baseServiceClass, $http, ENV) {
/*jshint validthis: true */
- var vm = this;
var ServiceClass = baseServiceClass.extend({
init: function() {
this._super();
this.endpoint = '/user-invitations/';
},
accept: fun... |
1e2dacf7b8946f8e97d0ae823cfd00a2cf131819 | src/lib/backend/lib/find_dirs_with_entry.js | src/lib/backend/lib/find_dirs_with_entry.js | "use strict";
const fs = require("fs-extra-promise");
const path = require("path");
const log = require("log");
const findDirsWithEntry = async (baseDir, entryFile = "index.js") => {
const res = [];
const dirContent = await fs.readdirAsync(baseDir);
for (const dirName of dirContent) {
const dirPat... | "use strict";
const fs = require("fs-extra-promise");
const path = require("path");
const log = require("log");
const findDirsWithEntry = async (baseDir, entryFile = "index.js") => {
const res = [];
const dirContent = await fs.readdirAsync(baseDir);
for (const dirName of dirContent) {
const dirPat... | Fix problem with regular files in search paths | backend: Fix problem with regular files in search paths
| JavaScript | mit | Combitech/codefarm,Combitech/codefarm,Combitech/codefarm | ---
+++
@@ -10,15 +10,19 @@
for (const dirName of dirContent) {
const dirPath = path.join(baseDir, dirName);
const entryPath = path.join(dirPath, entryFile);
+
try {
- fs.accessAsync(entryPath, fs.constants.R_OK);
- res.push({
- path: entryPath,
- ... |
0dae84d675d76dafcde86eb1911b9c9f3cf31997 | src/view/table/cell/EditableAmountCell.js | src/view/table/cell/EditableAmountCell.js | /**
* Cell used for showing and allowing the editing of an AmountEntry
*
* Copyright 2015 Ethan Smith
*/
var $ = require('jquery'),
AmountEntryCell = require('./AmountEntryCell');
var EditableAmountCell = AmountEntryCell.extend({
render: function() {
var self = this;
this._super();
this... | /**
* Cell used for showing and allowing the editing of an AmountEntry
*
* Copyright 2015 Ethan Smith
*/
var $ = require('jquery'),
AmountEntryCell = require('./AmountEntryCell');
var EditableAmountCell = AmountEntryCell.extend({
render: function() {
var self = this;
this._super();
this... | Update model and trigger edited event on blur | Update model and trigger edited event on blur
| JavaScript | mit | onebytegone/banknote-client,onebytegone/banknote-client | ---
+++
@@ -14,7 +14,9 @@
this._super();
this.$el.on('blur', 'input', function() {
- self.trigger('editing:ended', $(this));
+ var originalHash = self.model.hash();
+ self.model.get('amount').set($(this).val());
+ self.trigger('editing:ended', originalHash, self.model);... |
6aa462a2d69c71f8813925b65c715d329a912ef0 | packages/react/src/TransitionContainer.js | packages/react/src/TransitionContainer.js | // @flow
import type { Children } from 'react';
import React from 'react';
import { addTransitionListener } from 'yubaba-core';
export default class TransitionContainer extends React.Component {
_detatch: Function;
props: {
pair: string,
children?: Children,
style?: any,
};
state = {
visibl... | // @flow
import type { Children } from 'react';
import React from 'react';
import { addTransitionListener } from 'yubaba-core';
export default class TransitionContainer extends React.Component {
_detatch: Function;
props: {
pair: string,
children?: Children,
style?: any,
};
state = {
visibl... | Check for documents existance in transition container | Check for documents existance in transition container
| JavaScript | mit | madou/yubaba,madou/yubaba | ---
+++
@@ -19,10 +19,9 @@
};
componentWillMount () {
- // We need to have this be attached before
- // everything else is mounted, but we don't want to run this on the server.
- // How?
- this._detatch = addTransitionListener(this.props.pair, this.setVisibility);
+ if (document) {
+ this.... |
2754983001e7a5853620db4d1b13b91a944424c9 | server.js | server.js | require('dotenv').config({silent: true});
const process = require('process');
const http = require('http');
const createHandler = require('github-webhook-handler');
const GitHubApi = require('github');
const Configuration = require('./lib/configuration');
const Dispatcher = require('./lib/dispatcher');
const installat... | require('dotenv').config({silent: true});
const process = require('process');
const http = require('http');
const createHandler = require('github-webhook-handler');
const Configuration = require('./lib/configuration');
const Dispatcher = require('./lib/dispatcher');
const installations = require('./lib/installations')... | Remove unused github api instance | Remove unused github api instance
| JavaScript | isc | pholleran-org/probot,probot/probot,bkeepers/PRobot,probot/probot,pholleran-org/probot,probot/probot,pholleran-org/probot,bkeepers/PRobot | ---
+++
@@ -3,7 +3,6 @@
const process = require('process');
const http = require('http');
const createHandler = require('github-webhook-handler');
-const GitHubApi = require('github');
const Configuration = require('./lib/configuration');
const Dispatcher = require('./lib/dispatcher');
const installations = req... |
9f3981cd7e6ba35ee01a5a81e6cd1ba8f6e524f2 | server.js | server.js | var queue = require('queue-async');
var express = require('express');
var request = require('request');
var app = express();
app.use(express.static(__dirname + '/static'));
app.get('/:owner/:repo', function(req, res, next) {
var q = queue();
var repoName = req.params.owner + '/' + req.params.repo;
res.locals.re... | var queue = require('queue-async');
var express = require('express');
var request = require('request');
var app = express();
app.use(express.static(__dirname + '/static'));
function renderStargazes(req, res, next) {
var q = queue();
for (var i=1; i<=10; i++) {
q.defer(request,{
url:'https://api.github.c... | Add environmental config for root repo | Add environmental config for root repo
| JavaScript | mit | stuartpb/starwatchcats,stuartpb/starwatchcats | ---
+++
@@ -5,13 +5,11 @@
var app = express();
app.use(express.static(__dirname + '/static'));
-app.get('/:owner/:repo', function(req, res, next) {
+function renderStargazes(req, res, next) {
var q = queue();
- var repoName = req.params.owner + '/' + req.params.repo;
- res.locals.repoName = repoName;
for ... |
27e591f9b15c2b73b3f1ddef7c7c61208f90b53c | karma.config.js | karma.config.js | var _ = require('lodash'),
path = require('path'),
webpackConfig = require('./webpack.config.js');
_.merge(webpackConfig, {
devtool: 'inline-source-map',
module: {
preLoaders: [
{
test: /\.(js|jsx)?$/,
include: path.resolve('src/'),
loader: 'babel-istanbul-in... | var _ = require('lodash'),
path = require('path'),
webpackConfig = require('./webpack.config.js');
_.merge(webpackConfig, {
devtool: 'inline-source-map',
module: {
postLoaders: [
{
test: /\.(js|jsx)?$/,
include: path.resolve('src/'),
loader: 'babel-istanbul-i... | Change from `preLoaders` to `postLoaders` | Change from `preLoaders` to `postLoaders`
| JavaScript | mit | ufocoder/WebsocketUI,ufocoder/WebsocketUI | ---
+++
@@ -5,7 +5,7 @@
_.merge(webpackConfig, {
devtool: 'inline-source-map',
module: {
- preLoaders: [
+ postLoaders: [
{
test: /\.(js|jsx)?$/,
include: path.resolve('src/'),
@@ -20,14 +20,12 @@
frameworks: ['jasmine'],
browsers: ['PhantomJS'],
... |
ecf867bf88ddd300d4dab1ad978db8d0554258d7 | app/assets/javascripts/browser-check.js | app/assets/javascripts/browser-check.js | /*globals $, GOVUK, suchi */
/*jslint
white: true,
browser: true */
$(function() {
"use strict";
function browserWarning() {
var container = $('<div id="global-browser-prompt"></div>'),
text = $('<p><a href="/help/browsers">Upgrade your web browser</a> (the software you use to access the internet), i... | /*globals $, GOVUK, suchi */
/*jslint
white: true,
browser: true */
$(function() {
"use strict";
function browserWarning() {
var container = $('<div id="global-browser-prompt"></div>'),
text = $('<p><a href="/help/browsers">Upgrade your web browser</a> (the software you use to access the internet), i... | Increase the browser upgrade dismissal duration | Increase the browser upgrade dismissal duration
As some users are not in a position to upgrade, eg, anywhere with restrictive IT policies and slow update rollout.
While we still want to re-remind users, we shouldn't do it too often. A month seems reasonable
| JavaScript | mit | kalleth/static,alphagov/static,tadast/static,alphagov/static,robinwhittleton/static,alphagov/static,robinwhittleton/static,tadast/static,kalleth/static,kalleth/static,tadast/static,tadast/static,kalleth/static,robinwhittleton/static,robinwhittleton/static | ---
+++
@@ -22,8 +22,9 @@
$prompt.show();
$prompt.on("click", ".dismiss", function(e) {
$prompt.hide();
- // the warning is dismissable for 2 weeks
- GOVUK.cookie('govuk_browser_upgrade_dismissed', 'yes', { days: 14 });
+ // the warning is dismissable for 4 week... |
4a4a71225c39f12c981f8c1b5962f05154496fa3 | app/common/modules/single-timeseries.js | app/common/modules/single-timeseries.js | define([
'common/collections/single-timeseries'
],
function (Collection) {
return {
requiresSvg: true,
hasDatePicker: true,
collectionClass: Collection,
collectionOptions: function () {
return {
numeratorMatcher: new RegExp(this.model.get('numerator-matcher')),
denominatorMatc... | define([
'common/collections/single-timeseries'
],
function (Collection) {
return {
requiresSvg: true,
hasDatePicker: true,
collectionClass: Collection,
collectionOptions: function () {
var options = {};
options.numeratorMatcher = new RegExp(this.model.get('numerator-matcher')),
o... | Switch to using options, as with newer module definitions | Switch to using options, as with newer module definitions
- Also allows easier extension of existing objects within the option set
| JavaScript | mit | tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight,alphagov/spotlight | ---
+++
@@ -8,28 +8,29 @@
collectionClass: Collection,
collectionOptions: function () {
- return {
- numeratorMatcher: new RegExp(this.model.get('numerator-matcher')),
- denominatorMatcher: new RegExp(this.model.get('denominator-matcher')),
- matchingAttribute: this.model.get('gr... |
133bf86bf81ca9d00acfc33fa62d85cdf04c7598 | src/server/greenlock.js | src/server/greenlock.js | import env from 'dotenv';
import { log, logErr } from './app/shared/utils';
import * as greenlockExpress from 'greenlock-express';
env.config();
let greenlock;
// API_DOMAINS environment variable is a comma-delimited string of domains
if (process.env.API_DOMAINS && process.env.API_DOMAINS.split(",").length > 0) {
l... | import env from 'dotenv';
import { log, logErr } from './app/shared/utils';
import * as greenlockExpress from 'greenlock-express';
env.config();
let greenlock;
// API_DOMAINS environment variable is a comma-delimited string of domains
if (process.env.API_DOMAINS && process.env.API_DOMAINS.split(",").length > 0) {
l... | Add comments, remove debug, use process.env email | Add comments, remove debug, use process.env email
| JavaScript | agpl-3.0 | Cosecha/redadalertas-api | ---
+++
@@ -10,17 +10,23 @@
log(`API_DOMAINS: ${process.env.API_DOMAINS.split(',')}`);
greenlock = greenlockExpress.create({
version: 'draft-11' // Let's Encrypt v2
+
// You MUST change this to 'https://acme-v02.api.letsencrypt.org/directory' in production
+ // then rm -rf letsencrypt dir and resta... |
ba6e39146412a83443c0110af7d77e642c747115 | src/field-inputs/Url.js | src/field-inputs/Url.js | import React, {PropTypes} from 'react'
import FormBuilderPropTypes from '../FormBuilderPropTypes'
import Str from './String'
export default React.createClass({
propTypes: {
field: FormBuilderPropTypes.field.isRequired,
value: PropTypes.string,
onChange: PropTypes.func
},
getDefaultProps() {
retu... | import React, {PropTypes} from 'react'
import FormBuilderPropTypes from '../FormBuilderPropTypes'
import Str from './String'
export default React.createClass({
propTypes: {
field: FormBuilderPropTypes.field.isRequired,
value: PropTypes.string,
onChange: PropTypes.func
},
getDefaultProps() {
retu... | Set type on url field | Set type on url field
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -23,7 +23,7 @@
render() {
const {value, field} = this.props
return (
- <Str field={field} value={value} onChange={this.handleChange} />
+ <Str type="url" field={field} value={value} onChange={this.handleChange} />
)
}
}) |
1c93e4d142284de9508da497003bcb34f7ed87b8 | src/data/SubtitlePiece.js | src/data/SubtitlePiece.js | const striptags = require('striptags');
const { convertFormatToSeconds, convertSecondsToFormat, normalizeString } = require('../utils');
class SubtitlePiece {
static fromSubtitlesParserItem(item) {
return new SubtitlePiece(item);
}
constructor({ id, startTime, endTime, text, data }) {
if ... | const striptags = require('striptags');
const { convertFormatToSeconds, convertSecondsToFormat, normalizeString } = require('../utils');
class SubtitlePiece {
static fromSubtitlesParserItem(item) {
return new SubtitlePiece(item);
}
constructor({ id, startTime, endTime, text, data }) {
if ... | Fix wrong text splitting to words | Fix wrong text splitting to words
| JavaScript | mit | CLUG-kr/ming,CLUG-kr/ming | ---
+++
@@ -21,7 +21,7 @@
}
get words() {
- return striptags(this.text).split(' ');
+ return striptags(this.text).split(/\s+/);
}
get normalizedWords() { |
25b6134a2ced438ec2ab2dbfde6ff7a3003c1ab7 | src/routes/names.js | src/routes/names.js | const thesaurus = require('powerthesaurus-api')
module.exports = (router) => {
router.use('/v1/names', (req, res, next) => {
Promise.all(req.query.bandname.split(' ').map((name) => thesaurus(name)))
.then((results) => {
const wordlist = results.map((item) => {
return item.map((data) => {
... | const thesaurus = require('powerthesaurus-api')
const ignore = [
'a',
'the',
'of',
'in',
]
module.exports = (router) => {
router.use('/v1/names', (req, res, next) => {
Promise.all(req.query.bandname.split(' ').map((name) => {
if (ignore.indexOf(name) !== -1) return name
return thesaurus(name... | Add ignore list for common words | Add ignore list for common words
| JavaScript | mit | signup-from-bandname/banGen,signup-from-bandname/banGen,signup-from-bandname/banGen | ---
+++
@@ -1,8 +1,18 @@
const thesaurus = require('powerthesaurus-api')
+
+const ignore = [
+ 'a',
+ 'the',
+ 'of',
+ 'in',
+]
module.exports = (router) => {
router.use('/v1/names', (req, res, next) => {
- Promise.all(req.query.bandname.split(' ').map((name) => thesaurus(name)))
+ Promise.all(req.qu... |
a8857834ca63ead1d53c7136ada3f27d77bc7a99 | src/store.js | src/store.js | //@flow
import { createStore, compose, applyMiddleware } from "redux";
import { routerMiddleware } from "react-router-redux";
import createHistory from "history/createBrowserHistory";
import reducers from "./data/reducers";
const defaultState = {};
export const history = createHistory();
const middlewares = [routerM... | //@flow
import { createStore, compose, applyMiddleware } from "redux";
import { routerMiddleware } from "react-router-redux";
import createHistory from "history/createBrowserHistory";
import reducers from "./data/reducers";
import cards from "./data/state/cards";
const defaultState = { cards };
export const history =... | Add cards to default state and hot reload reducers | Add cards to default state and hot reload reducers
| JavaScript | mit | slightly-askew/portfolio-2017,slightly-askew/portfolio-2017 | ---
+++
@@ -4,8 +4,9 @@
import { routerMiddleware } from "react-router-redux";
import createHistory from "history/createBrowserHistory";
import reducers from "./data/reducers";
+import cards from "./data/state/cards";
-const defaultState = {};
+const defaultState = { cards };
export const history = createHistor... |
35e083ed2ae2c8e2d0ba286303ee8f3ab120ff2e | src/store.js | src/store.js | // @flow
import type { ThunkOrActionType } from "./actionCreators";
import type { ActionType } from "./actionTypes";
import type { AppState } from "./reducers";
import type { Store as ReduxStore } from "redux";
import { browserHistory } from "react-router";
import { routerMiddleware } from "react-router-redux";
import... | // @flow
import type { ThunkOrActionType } from "./actionCreators";
import type { ActionType } from "./actionTypes";
import type { AppState } from "./reducers";
import type { Store as ReduxStore } from "redux";
import { browserHistory } from "react-router";
import { routerMiddleware } from "react-router-redux";
import... | Add AppState annotation to slicer | Add AppState annotation to slicer
| JavaScript | mit | captbaritone/markdown.today,captbaritone/markdown.today,captbaritone/markdown.today | ---
+++
@@ -19,7 +19,7 @@
export const getStore = (): Store => {
const slicer = paths => {
- return state => {
+ return (state: AppState) => {
return Object.assign(
{},
{ |
809aaa2d1cd4007e36c1518d8a44944e3b88a9d6 | src/modules/mymodule.js | src/modules/mymodule.js | // ------------------------------------
// Constants
const COUNTER_INCREMENT = 'COUNTER_INCREMENT';
// ------------------------------------
// Action creators
export function increment(value = 1) {
return {
type: COUNTER_INCREMENT,
payload: value
};
}
// ------------------------------------
// Selectors... | // ------------------------------------
// Constants
const COUNTER_INCREMENT = 'COUNTER_INCREMENT';
// ------------------------------------
// Action creators
export function increment(value = 1) {
return {
type: COUNTER_INCREMENT,
payload: value
};
}
// ------------------------------------
// Selectors... | Replace Object.assign with the spread object operator (supported by CRA) | Replace Object.assign with the spread object operator (supported by CRA)
Signed-off-by: Gianni Valdambrini <c5d749f9a9fad12805bcb3c96e57c90355771f56@develer.com>
| JavaScript | mit | nbschool/ecommerce_web,nbschool/ecommerce_web | ---
+++
@@ -28,10 +28,10 @@
export default function reducer(state = initialState, action = {}) {
switch (action.type) {
case COUNTER_INCREMENT:
- return Object.assign(
- {},
- state,
- {counter: state.counter + action.payload});
+ return {
+ ...state,
+ counter: state.counter + a... |
d78e7efdadd90cb3a167fce2d60043693e4c32e9 | server/init/default-users.js | server/init/default-users.js | var mongoose = require('mongoose'),
User = mongoose.model('User'),
constants = require('../common/constants'),
SHA256 = require('crypto-js/sha256');
User.findOne({username: 'admin'})
.exec(function (err, user) {
'use strict';
if (!user && !err) {
User({
user... | var mongoose = require('mongoose'),
User = mongoose.model('User'),
constants = require('../common/constants'),
SHA256 = require('crypto-js/sha256');
User.findOne({username: 'admin'})
.exec(function (err, user) {
'use strict';
if (!user && !err) {
User({
user... | Fix default-user to have adequate length for username and password. | Fix default-user to have adequate length for username and password.
| JavaScript | mit | TA-2016-NodeJs-Team2/Telerik-Racer,TA-2016-NodeJs-Team2/Telerik-Racer | ---
+++
@@ -9,8 +9,8 @@
if (!user && !err) {
User({
- username: 'admin',
- hashPassword: SHA256('admin'),
+ username: 'administrator',
+ hashPassword: SHA256('administrator'),
cars: [],
level: constan... |
2ae406a61f6bbe200c7e5a4c6fcb1d6422d32fc9 | tools/tool-env/install-runtime.js | tools/tool-env/install-runtime.js | // Install ES2015-complaint polyfills for Object, Array, String, Function,
// Symbol, Map, Set, and Promise, patching the native implementations when
// they are available.
require("./install-promise.js");
var Mp = module.constructor.prototype;
var moduleLoad = Mp.load;
Mp.load = function (filename) {
var result = m... | // Install ES2015-complaint polyfills for Object, Array, String, Function,
// Symbol, Map, Set, and Promise, patching the native implementations when
// they are available.
require("./install-promise.js");
// Enable the module.{watch,export,...} runtime API needed by Reify.
require("reify/lib/runtime").enable(module.c... | Enable the Reify runtime API even if meteor-babel/register does not. | Enable the Reify runtime API even if meteor-babel/register does not.
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | ---
+++
@@ -2,6 +2,9 @@
// Symbol, Map, Set, and Promise, patching the native implementations when
// they are available.
require("./install-promise.js");
+
+// Enable the module.{watch,export,...} runtime API needed by Reify.
+require("reify/lib/runtime").enable(module.constructor);
var Mp = module.constructor... |
4de0a8456b92488180954f2994f987bdb5798256 | resources/assets/js/services/info/song.js | resources/assets/js/services/info/song.js | import http from '../http';
import albumInfo from './album';
import artistInfo from './artist';
export default {
/**
* Get extra song information (lyrics, artist info, album info).
*
* @param {Object} song
* @param {?Function} cb
*/
fetch(song, cb = null) {
// Check if ... | import http from '../http';
import albumInfo from './album';
import artistInfo from './artist';
export default {
/**
* Get extra song information (lyrics, artist info, album info).
*
* @param {Object} song
* @param {?Function} cb
*/
fetch(song, cb = null) {
// Check if ... | Fix the artist loading & info bug | Fix the artist loading & info bug
| JavaScript | mit | X-Ryl669/kutr,phanan/koel,alex-phillips/koel,X-Ryl669/kutr,phanan/koel,mikifus/koel,mikifus/koel,phanan/koel,alex-phillips/koel,alex-phillips/koel,mikifus/koel,X-Ryl669/kutr | ---
+++
@@ -23,7 +23,7 @@
song.lyrics = data.lyrics;
- data.artist_info && artistInfo.merge(song.album.artist, data.artist_info);
+ data.artist_info && artistInfo.merge(song.artist, data.artist_info);
data.album_info && albumInfo.merge(song.album, data.album_info);
... |
36c5d3a4f84a02c2ae467fb09e57e9db4f6c36dc | lib/bindings.js | lib/bindings.js | var fs = require('fs'),
path = require('path');
// normalize node 0.6 and 0.8
fs.existsSync || (fs.existsSync = path.existsSync);
var platforms = {
win32: function(folder){
process.env.PATH += ';' + folder;
}
};
// derive a distributable path from the node version, platform, and arch
function distribPa... | var fs = require('fs'),
path = require('path');
// normalize node 0.6 and 0.8
fs.existsSync || (fs.existsSync = path.existsSync);
var platforms = {
win32: function(folder, file){
process.env.PATH += ';' + folder;
}
};
// derive a distributable path from the node version, platform, and arch
function dis... | Check that the .node file actually exists | Check that the .node file actually exists
| JavaScript | mit | modulexcite/appjs,appjs/appjs,eric-seekas/appjs,appjs/appjs,reekoheek/appjs,SaravananRajaraman/appjs,SaravananRajaraman/appjs,milani/appjs,tempbottle/appjs,tempbottle/appjs,SaravananRajaraman/appjs,yuhangwang/appjs,eric-seekas/appjs,reekoheek/appjs,reekoheek/appjs,milani/appjs,imshibaji/appjs,modulexcite/appjs,yuhangwa... | ---
+++
@@ -7,7 +7,7 @@
var platforms = {
- win32: function(folder){
+ win32: function(folder, file){
process.env.PATH += ';' + folder;
}
};
@@ -19,7 +19,7 @@
process.version.slice(1, 4),
process.platform,
process.arch,
- 'bindings/'].join('/');
+ ... |
e356d1dda09d7303b8fead6c158c308a154607ee | client/app/i18n/container_helper.service.js | client/app/i18n/container_helper.service.js | 'use strict';
angular.module('arethusaTranslateGuiApp').service('containerHelper', [
function() {
var self = this;
var DIRTY = 'dirty-bg';
var CLEAN = 'clean-bg';
function stats(scope) {
return scope.getStats(scope.container);
}
this.checkStatus = function(scope) {
var cont = s... | 'use strict';
angular.module('arethusaTranslateGuiApp').service('containerHelper', [
function() {
var self = this;
var DIRTY = 'dirty-bg';
var CLEAN = 'clean-bg';
function stats(scope) {
return scope.getStats(scope.container);
}
function isDirty(scope) {
return stats(scope).dir... | Fix dirty check in containerHelper | Fix dirty check in containerHelper
| JavaScript | mit | LFDM/angular-translate-gui | ---
+++
@@ -11,9 +11,15 @@
return scope.getStats(scope.container);
}
+ function isDirty(scope) {
+ return stats(scope).dirty || _.find(scope.container.containers, function(el) {
+ return el.dirty;
+ });
+ }
+
this.checkStatus = function(scope) {
var cont = scope.contai... |
beffff1c70d6bc7b7dfd56144d98f3f37fd179dd | client/src/components/HopscotchLauncher.js | client/src/components/HopscotchLauncher.js | import React from 'react'
import {Button} from 'react-bootstrap'
import tourIcon from 'resources/tour-icon.svg'
import ReactSVG from 'react-svg'
export default function HopscotchLauncher(props) {
return <Button bsStyle="link" className="persistent-tour-launcher" onClick={props.onClick}>
New to ANET? Take a... | import React from 'react'
import {Button} from 'react-bootstrap'
import tourIcon from 'resources/tour-icon.svg'
import ReactSVG from 'react-svg'
export default function HopscotchLauncher(props) {
return <Button bsStyle="link" className="persistent-tour-launcher" onClick={props.onClick}>
New to ANET? Take a... | Remove period from "Take a guided tour" | Remove period from "Take a guided tour"
| JavaScript | mit | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet | ---
+++
@@ -5,7 +5,7 @@
export default function HopscotchLauncher(props) {
return <Button bsStyle="link" className="persistent-tour-launcher" onClick={props.onClick}>
- New to ANET? Take a guided tour.
+ New to ANET? Take a guided tour
<ReactSVG path={tourIcon} className="tour-icon" />
... |
e189c3bef0dfa572e4d966635475d8c23bfda79e | client/src/components/forms/FormActions.js | client/src/components/forms/FormActions.js | import React from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import Button from 'react-bootstrap/lib/Button';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
const ActionsButtons = ({ t, resetForm, saving }) => (
<p>
<Button bsStyle="danger" onClick={resetForm}... | import React from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import Button from 'react-bootstrap/lib/Button';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
const ActionsButtons = ({ t, saving }) => (
<p>
{/* Bug for the moment */}
{/* <Button bsStyle="dan... | Disable reset for the moment | [Client] Disable reset for the moment
| JavaScript | mit | DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager | ---
+++
@@ -4,11 +4,12 @@
import Button from 'react-bootstrap/lib/Button';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
-const ActionsButtons = ({ t, resetForm, saving }) => (
+const ActionsButtons = ({ t, saving }) => (
<p>
- <Button bsStyle="danger" onClick={resetForm}>
+ {/* Bug for the mome... |
0da020c61817474e15c63bd6dc40d4b65a40fda9 | web/src/js/components/General/Fireworks.js | web/src/js/components/General/Fireworks.js | import React, { useRef } from 'react'
import * as FireworksCanvas from 'fireworks-canvas'
import { withStyles } from '@material-ui/core/styles'
import FadeInDashboardAnimation from 'js/components/General/FadeInDashboardAnimation'
const styles = {
container: {
position: 'absolute',
zIndex: 5000,
top: 0,
... | import React, { useRef, useState } from 'react'
import * as FireworksCanvas from 'fireworks-canvas'
import { withStyles } from '@material-ui/core/styles'
import FadeInDashboardAnimation from 'js/components/General/FadeInDashboardAnimation'
import IconButton from '@material-ui/core/IconButton'
import CloseIcon from '@ma... | Add a close button to the fireworks | Add a close button to the fireworks
| JavaScript | mpl-2.0 | gladly-team/tab,gladly-team/tab,gladly-team/tab | ---
+++
@@ -1,7 +1,9 @@
-import React, { useRef } from 'react'
+import React, { useRef, useState } from 'react'
import * as FireworksCanvas from 'fireworks-canvas'
import { withStyles } from '@material-ui/core/styles'
import FadeInDashboardAnimation from 'js/components/General/FadeInDashboardAnimation'
+import Ico... |
cf269a26ac586a948b7cbb332e1f88113f15221b | src/routes/index.js | src/routes/index.js | const router = require('express').Router()
const nonUser = require('./non-user')
const user = require('./user-only')
router.use('/', nonUser)
router.use('/', user)
module.exports = router
| const router = require('express').Router()
const nonUser = require('./non-user')
const user = require('./user-only')
router.use((req, res, next) => {
console.log('middleware stuff')
next()
})
router.use('/', nonUser)
router.use('/', user)
module.exports = router
| Add middleware function that's console logging to make sure it's working | Add middleware function that's console logging to make sure it's working
| JavaScript | mit | Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge | ---
+++
@@ -1,6 +1,11 @@
const router = require('express').Router()
const nonUser = require('./non-user')
const user = require('./user-only')
+
+router.use((req, res, next) => {
+ console.log('middleware stuff')
+ next()
+})
router.use('/', nonUser)
router.use('/', user) |
a9e219a5e5be3b18335b5031b5c0450b1e54bd5b | src/text-grabber.js | src/text-grabber.js | ;(function(exports) {
var TextGrabber = function() {
this.submittedText = "";
this.currentLine = "";
};
TextGrabber.prototype = {
write: function(e) {
if (e.event === "submit") {
this.submittedText += e.text + "\n";
this.currentLine = "";
} else {
this.currentLine ... | ;(function(exports) {
var TextGrabber = function() {
this.submittedText = [];
this.currentLine = {};
};
TextGrabber.prototype = {
write: function(e) {
if (e.event === "permanent") {
var lines = e.text.split("\n");
for (var i = 0; i < lines.length; i++) {
if (lines[i] !... | Make text grabber categorise text in input and output. | Make text grabber categorise text in input and output. | JavaScript | mit | maryrosecook/codewithisla | ---
+++
@@ -1,22 +1,48 @@
;(function(exports) {
var TextGrabber = function() {
- this.submittedText = "";
- this.currentLine = "";
+ this.submittedText = [];
+ this.currentLine = {};
};
TextGrabber.prototype = {
write: function(e) {
- if (e.event === "submit") {
- this.submitt... |
b62d9b600dda1e65bf23aeaa1eb5578acfbd9f6d | start.js | start.js | #!/usr/bin/env node
var cp = require('child_process')
var BIN = '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'
var ARGS = ['--load-and-launch-app=chrome']
var child = cp.spawn(BIN, ARGS)
// Nodemon is trying to kill us, so kill Chrome
process.once('SIGUSR2', function () {
child.kill(... | #!/usr/bin/env node
var cp = require('child_process')
var BIN = process.platform=='linux' ? '/bin/google-chrome' : '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary';
var ARGS = ['--load-and-launch-app=chrome']
var child = cp.spawn(BIN, ARGS)
// Nodemon is trying to kill us, so kill Chrome... | Improve the accessibility of the project for linux users. | Improve the accessibility of the project for linux users.
| JavaScript | mit | feross/webtorrent-cli,feross/webtorrent-cli | ---
+++
@@ -2,7 +2,7 @@
var cp = require('child_process')
-var BIN = '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'
+var BIN = process.platform=='linux' ? '/bin/google-chrome' : '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary';
var ARGS = ['--load-and-la... |
b163c12143f332b276cd1104ab42598489994c6e | client/lecturer/app/courses.factory.js | client/lecturer/app/courses.factory.js | (function() {
'use strict';
angular
.module('lecturer')
.factory('coursesFactory', coursesFactory);
/* @ngInject */
function coursesFactory(coursesService) {
var selectedCourse = {};
var Course = false;
var service = {
getCourses: getCou... | (function() {
'use strict';
angular
.module('lecturer')
.factory('coursesFactory', coursesFactory);
/* @ngInject */
function coursesFactory(coursesService, lecturerFactory) {
var selectedCourse = {};
var Course = false;
var service = {
g... | Fix all courses being displayed for all lecturers | Fix all courses being displayed for all lecturers
| JavaScript | mit | MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS | ---
+++
@@ -6,7 +6,7 @@
.factory('coursesFactory', coursesFactory);
/* @ngInject */
- function coursesFactory(coursesService) {
+ function coursesFactory(coursesService, lecturerFactory) {
var selectedCourse = {};
var Course = false;
@@ -24,7 +24,7 @@
... |
e6a72cd9754ea4bf2332c8a5262614295f10ebef | bot.js | bot.js | var telegramBot = require('node-telegram-bot-api');
var twitter = require('twitter');
var aws = require('aws-sdk');
var nconf = require('nconf');
var log4js = require('log4js');
nconf.file('config', __dirname + '/config/config.json');
var botToken = nconf.get('telegram').bot_token;
var bot = new TelegramBot(botToken,... | var telegramBot = require('node-telegram-bot-api');
var twitter = require('twitter');
var aws = require('aws-sdk');
var nconf = require('nconf');
var log4js = require('log4js');
nconf.file('config', __dirname + '/config/config.json');
var botToken = nconf.get('telegram').bot_token;
var bot = new TelegramBot(botToken,... | Add dydb object and put updateUserList function again | Add dydb object and put updateUserList function again
| JavaScript | mit | dollars0427/mtrupdate-bot | ---
+++
@@ -16,10 +16,12 @@
aws.config.update{accessKeyId: awsAccessKeyId, secretAccessKey: awsSecretAccessKey, region: 'ap-southeast-1'};
-
+var dyDb = new aws.DynamoDB();
bot.onText('/register', function(msg, match) {
- var msgId = msg.from.id;
+ var userId = msg.from.id;
+
+ updateUserList(dyDb, userId);... |
962b29531ef90a415ee062a45b81c5dd927e3f18 | app/js/components/Alert.js | app/js/components/Alert.js | 'use strict'
import {Component} from 'react'
import {Link} from 'react-router'
import Countdown from 'react-countdown-now';
import CountdownTimer from './CountdownTimer'
const registrationEndDate = "Wednesday, November 15 2017 15:00:00 EST"
class Alert extends Component {
constructor(props) {
super(props)
... | 'use strict'
import {Component} from 'react'
import {Link} from 'react-router'
import Countdown from 'react-countdown-now';
import CountdownTimer from './CountdownTimer'
const registrationEndDate = "Wednesday, November 15 2017 15:00:00 EST"
class Alert extends Component {
constructor(props) {
super(props)
... | Correct token sale banner timezone. | Correct token sale banner timezone.
| JavaScript | mit | blockstack/blockstack-site,blockstack/blockstack-site | ---
+++
@@ -20,7 +20,7 @@
<button type="button" className="close close-primary d-none d-sm-block" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
- <span className="" style={{ marginLeft: "26px" }}>Blockstack Token Main Sale Starts... |
86a611bf64d3fb18bde62e3457c1c09953c4b158 | test/file-collection.js | test/file-collection.js | import test from 'ava';
import '../src/index';
import FileCollection from '../src/FileCollection';
test('that it sets the output file if a src file and output directory are provided', t => {
let src = new File('src/file.txt').parsePath();
let files = new FileCollection(src.path);
files.destination = 'outpu... | import test from 'ava';
import '../src/index';
import FileCollection from '../src/FileCollection';
test('that it sets the output file if a src file and output directory are provided', t => {
let src = new File('src/file.txt').parsePath();
let files = new FileCollection(src.path);
files.destination = 'outpu... | Add test for file collection | Add test for file collection
| JavaScript | mit | JeffreyWay/laravel-mix | ---
+++
@@ -20,3 +20,19 @@
new File('node_modules/path/to/it/nested/file.txt').parsePath()
));
});
+
+
+test('that it sets the output path for an array of src files properly', t => {
+ let collection = new FileCollection([
+ 'resources/assets/img/one.jpg',
+ 'resources/assets/img/two.j... |
c4e98094e2250d556566d76512f502e382d05ae5 | test/functional/conf.js | test/functional/conf.js | exports.config = {
baseUrl: 'http://dev.hmda-pilot.ec2.devis.com/',
specs: ['cucumber/*.feature'],
allScriptsTimeout: 30000,
getPageTimeout: 30000,
capabilities: {
browserName: 'chrome'
},
framework: 'cucumber',
cucumberOpts: {
require: 'cucumber/step_definitions/*.j... | 'use strict';
exports.config = {
baseUrl: 'http://dev.hmda-pilot.ec2.devis.com/',
specs: ['cucumber/*.feature'],
allScriptsTimeout: 30000,
getPageTimeout: 30000,
capabilities: {
browserName: 'chrome'
},
framework: 'cucumber',
cucumberOpts: {
require: 'cucumber/step_... | Set the browser size to 1280x1024 | Set the browser size to 1280x1024
| JavaScript | cc0-1.0 | cfpb/hmda-pilot,LinuxBozo/hmda-pilot,LinuxBozo/hmda-pilot,cfpb/hmda-pilot,cfpb/hmda-pilot,LinuxBozo/hmda-pilot | ---
+++
@@ -1,3 +1,5 @@
+'use strict';
+
exports.config = {
baseUrl: 'http://dev.hmda-pilot.ec2.devis.com/',
@@ -16,5 +18,11 @@
require: 'cucumber/step_definitions/*.js',
tags: ['~@wip', '~@ignore'],
format: 'progress'
+ },
+
+ onPrepare: function() {
+ var width = 1280... |
122abc843a93c20ccaa48deea0675cbd281f3c41 | sencha-workspace/SlateAdmin/app/view/progress/NavPanel.js | sencha-workspace/SlateAdmin/app/view/progress/NavPanel.js | Ext.define('SlateAdmin.view.progress.NavPanel', {
extend: 'SlateAdmin.view.LinksNavPanel',
xtype: 'progress-navpanel',
title: 'Student Progress',
data: true,
applyData: function(data) {
if (data !== true) {
return data;
}
return [
{
... | Ext.define('SlateAdmin.view.progress.NavPanel', {
extend: 'SlateAdmin.view.LinksNavPanel',
xtype: 'progress-navpanel',
title: 'Student Progress',
data: true,
applyData: function(data) {
if (data !== true) {
return data;
}
return [
{
... | Use consistent naming for 'Print / Export' section | Use consistent naming for 'Print / Export' section
| JavaScript | mit | SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin | ---
+++
@@ -31,7 +31,7 @@
href: '#progress/terms/report',
children: [
{
- text: 'Search & Print',
+ text: 'Print / Export',
href: '#progress/terms/print'
},
... |
796a9e6f66b019fbe102c79ed2c0836369cde36f | src/sw-precache-config.js | src/sw-precache-config.js | /* eslint-env node */
'use strict';
module.exports = {
staticFileGlobs: [
'index.html',
'bower_components/webcomponentsjs/webcomponents-*.js',
'images/*',
'favicon.ico'
],
navigateFallback: 'index.html'
};
| /* eslint-env node */
'use strict';
module.exports = {
staticFileGlobs: [
'index.html',
'bower_components/webcomponentsjs/webcomponents-*.js',
'images/*',
'favicon.ico'
],
navigateFallback: 'index.html',
navigateFallbackWhitelist: [/^\/(projects|posts|impress)\//]
};
| Exclude "/demo" from SW navigateFallback. | Exclude "/demo" from SW navigateFallback.
| JavaScript | mit | frigus02/website,frigus02/website | ---
+++
@@ -9,5 +9,6 @@
'images/*',
'favicon.ico'
],
- navigateFallback: 'index.html'
+ navigateFallback: 'index.html',
+ navigateFallbackWhitelist: [/^\/(projects|posts|impress)\//]
}; |
9e7379f863ab7bb8b4ae2fd39530692a427df5a1 | test/loader.js | test/loader.js | /*globals mocha*/
require.config({
baseUrl: '/',
paths: {
'tabler': '../',
'jquery': 'test/lib/jquery-1.7.1',
'underscore': 'test/lib/underscore'
}
});
mocha.setup({
ui: 'bdd',
globals: ['jQuery']
});
require(['jquery',
'test/tabler.tests',
'test/tabler.aggreg... | /*globals mocha*/
require.config({
baseUrl: '/',
paths: {
'tabler': '../',
'jquery': 'test/lib/jquery-1.7.1',
'underscore': 'test/lib/underscore'
}
});
mocha.setup({
ui: 'bdd',
globals: ['jQuery']
});
require(['jquery',
'test/tabler.tests',
'test/tabler.aggreg... | Add removeColumns plugin to the test suite | Add removeColumns plugin to the test suite
| JavaScript | mit | BrandwatchLtd/tabler,BrandwatchLtd/tabler,BrandwatchLtd/tabler | ---
+++
@@ -19,6 +19,7 @@
'test/tabler.pageSize.tests',
'test/tabler.pager.tests',
'test/tabler.toggleColumns.tests',
+ 'test/tabler.removeColumns.tests',
'test/tabler.sortable.tests',
'test/tabler.columnGrouper.tests'
], function(){ |
cd2e472740ea42928b635d79a22d71d1f24024d9 | src/activity-logger/index.js | src/activity-logger/index.js | export const PAUSE_STORAGE_KEY = 'is-logging-paused'
export function isLoggable({ url }) {
// Just remember http(s) pages, ignoring data uris, newtab, ...
const loggableUrlPattern = /^https?:\/\/\w+([-/.#=$^@&%?+(),]\w*\/?([-/.#=$^@&:%?+(),]\w*\/?)*)*$/
const urlEndings = ['.svg', '.jpg', '.png', '.jpeg', ... | export const PAUSE_STORAGE_KEY = 'is-logging-paused'
export function isLoggable({ url }) {
// Just remember http(s) pages, ignoring data uris, newtab, ...
const loggableUrlPattern = /^https?:\/\/\w+(?:[-/.#=$^@&%?+(),]\w*\/?(?:[-/.#=$^@&:%?+(),]\w*\/?)*)*$/
const urlEndings = ['.svg', '.jpg', '.png', '.jpe... | Make loggability regex groups non-capturing | Make loggability regex groups non-capturing
- captured groups have a performance overhead, which we seem to have been impacted by through the addition of this nested group when it comes to its use in imports calculations
- we never actually attempt any matches with the pattern, only test it against strings, so there's... | JavaScript | mit | WorldBrain/WebMemex,WorldBrain/WebMemex | ---
+++
@@ -2,7 +2,7 @@
export function isLoggable({ url }) {
// Just remember http(s) pages, ignoring data uris, newtab, ...
- const loggableUrlPattern = /^https?:\/\/\w+([-/.#=$^@&%?+(),]\w*\/?([-/.#=$^@&:%?+(),]\w*\/?)*)*$/
+ const loggableUrlPattern = /^https?:\/\/\w+(?:[-/.#=$^@&%?+(),]\w*\/?(?:[-/... |
b08269f679a78d1f24774a687706927a8b00bd57 | tests/index.js | tests/index.js | 'use strict';
var path = require('path');
var expect = require('expect.js');
var walkSync = require('walk-sync');
var broccoli = require('broccoli');
var fs = require('fs');
// require('mocha-jshint')();
var Tar = require('..');
describe('broccoli-targz', function(){
var fixturePath = path.join(__dirname, 'fixtur... | 'use strict';
var path = require('path');
var expect = require('expect.js');
var walkSync = require('walk-sync');
var broccoli = require('broccoli');
var fs = require('fs');
// require('mocha-jshint')();
var Tar = require('..');
describe('broccoli-targz', function(){
var fixturePath = path.join(__dirname, 'fixtur... | Add tests for non-constructor pattern. | Add tests for non-constructor pattern. | JavaScript | mit | trek/broccoli-tar,vasman/broccoli-zip | ---
+++
@@ -45,5 +45,11 @@
var outputPath = results.directory;
expect(fs.existsSync(outputPath + '/name.tar.gz'));
});
- })
+ });
+
+ it('supports non-constructor pattern', function () {
+ var inputPath = path.join(fixturePath);
+ var tree = Tar(inputPath);
+ expect(tree).to.be.... |
d938dec90ecc359be562851b91223e3512dd0dea | src/ui/mixin/element.js | src/ui/mixin/element.js | /** section: scripty2 ui
* mixin S2.UI.Mixin.Element
*
* Provides a few convenience methods for widgets that map easily to a
* single element.
**/
(function() {
var METHODS = $w('observe stopObserving show hide ' +
'addClassName removeClassName hasClassName setStyle getStyle' +
'writeAttribute readAt... | /** section: scripty2 ui
* mixin S2.UI.Mixin.Element
*
* Provides a few convenience methods for widgets that map easily to a
* single element.
**/
(function() {
var METHODS = $w('observe stopObserving show hide ' +
'addClassName removeClassName hasClassName setStyle getStyle' +
'writeAttribute readAt... | Redefine `S2.UI.Mixin.Element.on` so that it caches its observers. | Redefine `S2.UI.Mixin.Element.on` so that it caches its observers. | JavaScript | mit | madrobby/scripty2,madrobby/scripty2 | ---
+++
@@ -8,7 +8,7 @@
(function() {
var METHODS = $w('observe stopObserving show hide ' +
'addClassName removeClassName hasClassName setStyle getStyle' +
- 'writeAttribute readAttribute on fire');
+ 'writeAttribute readAttribute fire');
var E = {};
@@ -18,7 +18,14 @@
return element[na... |
8b5a0f5a1d7f435d23e3c220a85e4180531f3aeb | Kwc/Basic/LinkTag/Extern/Component.defer.js | Kwc/Basic/LinkTag/Extern/Component.defer.js | $(document).on('click', 'a', function(event) {
var lnk = event.currentTarget;
//for backwards compatibility
var rels = lnk.rel.split(' ');
$.each(rels, function() {
if (this.match(/^popup/)) {
var relProperties = this.split('_');
//$(lnk).addClass('webLinkPopup');
... | $(document).on('click', 'a', function(event) {
var lnk = event.currentTarget;
//for backwards compatibility
var rels = lnk.rel.split(' ');
$.each(rels, function() {
if (this.match(/^popup/)) {
var relProperties = this.split('_');
//$(lnk).addClass('webLinkPopup');
... | Fix data attribute usage for external links | Fix data attribute usage for external links
| JavaScript | bsd-2-clause | kaufmo/koala-framework,nsams/koala-framework,koala-framework/koala-framework,nsams/koala-framework,kaufmo/koala-framework,nsams/koala-framework,koala-framework/koala-framework,kaufmo/koala-framework | ---
+++
@@ -16,11 +16,11 @@
}
});
- if (lnk.data('kwc-popup')) {
- if (lnk.data('kwc-popup') == 'blank') {
+ if ($(lnk).data('kwc-popup')) {
+ if ($(lnk).data('kwc-popup') == 'blank') {
window.open(lnk.href, '_blank');
} else {
- window.open(lnk.hre... |
cb68b3bb815013c4f933665da4d1c9805e64b899 | examples/webpack.config.js | examples/webpack.config.js | var webpack = require("webpack");
var path = require("path");
module.exports = {
devtool: "source-map",
entry: path.join(__dirname, "src/main.js"),
output: {
path: path.join(__dirname, "build"),
publicPath: "/js/",
filename: "main.js"
},
resolve: { extensions: ["", ".js"] },
module: {
lo... | var webpack = require("webpack");
var path = require("path");
module.exports = {
devtool: "source-map",
entry: path.join(__dirname, "src/main.js"),
output: {
path: "./built/js",
publicPath: "/js/",
filename: "main.js"
},
resolve: { extensions: ["", ".js"] },
module: {
loaders: [{
t... | Return to the right build dir | Return to the right build dir
| JavaScript | mit | gpbl/react-day-picker,saenglert/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker | ---
+++
@@ -6,7 +6,7 @@
entry: path.join(__dirname, "src/main.js"),
output: {
- path: path.join(__dirname, "build"),
+ path: "./built/js",
publicPath: "/js/",
filename: "main.js"
}, |
e25af70c3c3043e7028fa6c85d06ea976c35997e | server/votes/countVotes.js | server/votes/countVotes.js | var countVotes = function () {
"use strict";
// find votes for object
var deltaVotesQuery = {
delta: {
$exists: true
}
};
var deltaVotes = Votes.find(deltaVotesQuery).fetch();
var voteTable = {};
// count how many votes each object has
_.forEach(deltaVotes, function (vote) {
var p... | var countVotes = function () {
"use strict";
// find votes for object
var deltaVotesQuery = {
delta: {
$exists: true
}
};
var deltaVotes = Votes.find(deltaVotesQuery).fetch();
var voteTable = {};
// count how many votes each object has
_.forEach(deltaVotes, function (vote) {
var p... | Apply votes quietly every 5 seconds | Apply votes quietly every 5 seconds
| JavaScript | mit | rrevanth/news,rrevanth/news | ---
+++
@@ -30,15 +30,23 @@
});
});
+ var i = 0;
_.forEach(voteTable, function (value, key) {
Posts.update({_id: key}, { $inc: {votes: value}});
+ i++;
});
- console.log('Counting votes:', voteTable);
+
+ if (i > 0) {
+ var str = 'Applying ' + i + ' vote';
+ if (i > 1) {
+ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.