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 |
|---|---|---|---|---|---|---|---|---|---|---|
9484f3cb37841c988a1e1893645ba99693d9d896 | karma.conf.js | karma.conf.js | // Karma configuration
//
// For all available config options and default values, see:
// http://karma-runner.github.io/0.10/config/configuration-file.html
module.exports = function (config) {
'use strict';
config.set({
autoWatch: true,
basePath: '',
browsers: [process.env.TRAVIS ? 'Firefox' : 'Chrome... | // Karma configuration
//
// For all available config options and default values, see:
// http://karma-runner.github.io/0.10/config/configuration-file.html
module.exports = function (config) {
'use strict';
config.set({
autoWatch: true,
basePath: '',
browsers: [process.env.TRAVIS ? 'Firefox' : 'Chrome... | Add underscore.js to test require | Add underscore.js to test require
| JavaScript | apache-2.0 | giovaneliberato/tablero,giovaneliberato/tablero,TWtablero/tablero,giovaneliberato/tablero,TWtablero/tablero,TWtablero/tablero,giovaneliberato/tablero,TWtablero/tablero | ---
+++
@@ -17,6 +17,7 @@
files: [
// loaded without require
'app/bower_components/jquery/dist/jquery.js',
+ 'app/bower_components/underscore/underscore.js',
'app/bower_components/jasmine-jquery/lib/jasmine-jquery.js',
'app/bower_components/jasmine-flight/lib/jasmine-flight.js',
... |
73a85ead520c66583a748667b109225cb894c5e0 | karma.conf.js | karma.conf.js | const path = require('path');
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
preprocessors: { 'src/testception-spec.js': ['webpack'] },
files: ['src/testception-spec.js'],
webpack: {
mode: 'none',
module: {
rules: [
{
... | const path = require('path');
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
preprocessors: { 'src/testception-spec.js': ['webpack'] },
files: ['src/testception-spec.js'],
webpack: {
mode: 'none',
module: {
rules: [
{
... | Create lcov report so that it can be uploaded to Codeclimate | Create lcov report so that it can be uploaded to Codeclimate
| JavaScript | mit | fvanwijk/testception | ---
+++
@@ -30,7 +30,7 @@
coverageIstanbulReporter: {
dir: 'coverage',
subdir: '.',
- reports: ['html', 'text-summary'],
+ reports: ['html', 'text-summary', 'lcov'],
thresholds: {
each: {
statements: 100, |
a2e8380767936e874924736793a8c2de5ead590a | karma.conf.js | karma.conf.js | var webpackConfig = require("./webpack.config");
Object.assign(webpackConfig, {
debug: true,
devtool: "inline-source-map"
});
webpackConfig.externals.push("react/lib/ExecutionEnvironment");
webpackConfig.externals.push("react/lib/ReactContext");
webpackConfig.externals.push("react/addons");
webpackConfig.exter... | var webpackConfig = require("./webpack.config");
Object.assign(webpackConfig, {
debug: true,
devtool: "inline-source-map"
});
webpackConfig.externals.push("react/lib/ExecutionEnvironment");
webpackConfig.externals.push("react/lib/ReactContext");
webpackConfig.externals.push("react/addons");
webpackConfig.exter... | Set singleRun setting to false | Set singleRun setting to false
| JavaScript | apache-2.0 | FlockOfBirds/carousel,mendixlabs/carousel,FlockOfBirds/carousel,mendixlabs/carousel | ---
+++
@@ -30,7 +30,7 @@
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: [ "Chrome" ],
- singleRun: true,
+ singleRun: false,
concurrency: Infinity,
coverageReporter: {
dir: "./dist/testresults", |
32dc1fe382cda7b53c2bfacc02811849dc0a616b | test/node.js | test/node.js | var browserRequire = require('../require')
console.log(browserRequire.toString())
| var compiler = require('../compiler')
compiler.compileJS('require("socket.io/support/socket.io-client/socket.io")')
| Add test case for new npm/module-aware compiler | Add test case for new npm/module-aware compiler
| JavaScript | mit | marcuswestin/require,marcuswestin/require | ---
+++
@@ -1,4 +1,4 @@
-var browserRequire = require('../require')
+var compiler = require('../compiler')
-console.log(browserRequire.toString())
+compiler.compileJS('require("socket.io/support/socket.io-client/socket.io")')
|
9491446d1b1d91e5c148fd6f943148c08de8de76 | spec/api_browser/filters/attribute_name_spec.js | spec/api_browser/filters/attribute_name_spec.js | describe('attributeName filter', function() {
var filter;
beforeEach(angular.mock.module('PraxisDocBrowser'));
beforeEach(inject(function(attributeNameFilter, $sce) {
filter = function(input) {
return $sce.getTrusted('html', attributeNameFilter(input));
};
}));
it('only modifies input with one... | describe('attributeName filter', function() {
var filter;
beforeEach(angular.mock.module('PraxisDocBrowser'));
beforeEach(inject(function(attributeNameFilter, $sce) {
filter = function(input) {
return $sce.getTrusted('html', attributeNameFilter(input));
};
}));
it('only modifies input with one... | Fix the broken js spec that started failing when sub-attributes were properly grayed out. | Fix the broken js spec that started failing when sub-attributes were properly grayed out.
Signed-off-by: Josep M. Blanquer <843d9a062ab1c6792ebebca5589f22ce86ac85ce@gmail.com> | JavaScript | mit | rightscale/praxis,praxis/praxis,rightscale/praxis,gampleman/praxis,gampleman/praxis,rightscale/praxis,gampleman/praxis | ---
+++
@@ -8,10 +8,10 @@
};
}));
- it('only modifies input with one dot', function() {
+ it('only modifies input with one or more dots', function() {
expect(function(str) {
var dotsCount = str.split('.').length - 1;
- if (dotsCount !== 1) {
+ if (dotsCount === 0) {
return s... |
cfea5e5c4a7a8f78382930a2445299f8ca9da50a | src/helper.js | src/helper.js | export function extend(obj) {
var arg, i, k;
for (i = 1; i < arguments.length; i++) {
arg = arguments[i];
for (k in arg) {
if (arg.hasOwnProperty(k)) {
obj[k] = arg[k];
}
}
}
return obj;
};
| export function extend(obj) {
var arg, i, k;
for (i = 1; i < arguments.length; i++) {
arg = arguments[i];
for (k in arg) {
if (arg.hasOwnProperty(k) && arg[k] !== undefined) {
obj[k] = arg[k];
}
}
}
return obj;
}
| Update extend to not carry over undefined values. | feat(extend): Update extend to not carry over undefined values.
| JavaScript | mit | chemoish/videojs-chapter-thumbnails,chemoish/videojs-chapter-thumbnails | ---
+++
@@ -5,11 +5,11 @@
arg = arguments[i];
for (k in arg) {
- if (arg.hasOwnProperty(k)) {
+ if (arg.hasOwnProperty(k) && arg[k] !== undefined) {
obj[k] = arg[k];
}
}
}
return obj;
-};
+} |
c3c8ec9ed9f153cc77fd5ae82b889c1b5bd1cf36 | js/foundation/foundation.offcanvas.js | js/foundation/foundation.offcanvas.js | ;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.offcanvas = {
name : 'offcanvas',
version : '5.0.3',
settings : {},
init : function (scope, method, options) {
this.events();
},
events : function () {
$(this.scope).off('.offcanvas')
.on('cl... | ;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.offcanvas = {
name : 'offcanvas',
version : '5.1.0',
settings : {},
init : function (scope, method, options) {
this.events();
},
events : function () {
var S = this.S;
S(this.scope).off('.offc... | Update Offcanvas to use S selector | Update Offcanvas to use S selector
| JavaScript | mit | mbarlock/foundation,aoimedia/foundation,dragthor/foundation-sites,dragthor/foundation-sites,jaylensoeur/foundation-sites-6,gnepal7/foundation,dimamedia/foundation-6-sites-simple-scss-and-js,karland/foundation-sites,joe-watkins/foundation,atmmarketing/foundation-sites,walbo/foundation,ysalmin/foundation,oller/foundation... | ---
+++
@@ -4,7 +4,7 @@
Foundation.libs.offcanvas = {
name : 'offcanvas',
- version : '5.0.3',
+ version : '5.1.0',
settings : {},
@@ -13,22 +13,24 @@
},
events : function () {
- $(this.scope).off('.offcanvas')
+ var S = this.S;
+
+ S(this.scope).off('.offcanvas')
... |
cbe9f82b34c63c8ffdcb7f117fdb5ab3a268b575 | js/locales/bootstrap-datepicker.bg.js | js/locales/bootstrap-datepicker.bg.js | /**
* Bulgarian translation for bootstrap-datepicker
* Apostol Apostolov <apostol.s.apostolov@gmail.com>
*/
;(function($){
$.fn.datepicker.dates['bg'] = {
days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота", "Неделя"],
daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "С... | /**
* Bulgarian translation for bootstrap-datepicker
* Apostol Apostolov <apostol.s.apostolov@gmail.com>
*/
;(function($){
$.fn.datepicker.dates['bg'] = {
days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота", "Неделя"],
daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "С... | Add 'today' to bulgarian locale | Add 'today' to bulgarian locale
| JavaScript | apache-2.0 | kiwiupover/bootstrap-datepicker,dswitzer/bootstrap-datepicker,vsn4ik/bootstrap-datepicker,i-am-kenny/bootstrap-datepicker,champierre/bootstrap-datepicker,nilbus/bootstrap-datepicker,dswitzer/bootstrap-datepicker,Youraiseme/bootstrap-datepicker,yangyichen/bootstrap-datepicker,Habitissimo/bootstrap-datepicker,hebbet/boot... | ---
+++
@@ -8,6 +8,7 @@
daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "Съб", "Нед"],
daysMin: ["Н", "П", "В", "С", "Ч", "П", "С", "Н"],
months: ["Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"],
- monthsShort: ["Ян", "Фев", "Мар", ... |
dfea4618f46b69c37df36a27de3e4d1327c7203f | app/components/ConceptList/index.js | app/components/ConceptList/index.js | import './index.css';
import React, { PropTypes } from 'react';
import HashLink from './../HashLink';
import ConceptTile from './../ConceptTile';
import ConceptDragSource from '../ConceptDragSource';
import Padding from '../Padding';
const ConceptList = ({ concepts, concept, dispatch }) =>
<ul className="List">
... | import './index.css';
import React, { PropTypes } from 'react';
import HashLink from './../HashLink';
import ConceptTile from './../ConceptTile';
import ConceptDragSource from '../ConceptDragSource';
import Padding from '../Padding';
const ConceptList = ({ concepts, concept, dispatch }) =>
<ul className="List">
... | Remove link wrapper around drag source - Fixes drag-drop bug in FF | Remove link wrapper around drag source - Fixes drag-drop bug in FF
https://github.com/gaearon/react-dnd/issues/120#issuecomment-81602875
| JavaScript | mit | transparantnederland/relationizer,waagsociety/tnl-relationizer,transparantnederland/browser,waagsociety/tnl-relationizer,transparantnederland/browser,transparantnederland/relationizer | ---
+++
@@ -13,13 +13,13 @@
className={['List-item', item.id === (concept && concept.id) ? 'List-item--active' : ''].join(' ')}
key={item.id}
>
- <HashLink hash={item.id}>
- <ConceptDragSource concept={item} dispatch={dispatch}>
+ <ConceptDragSource concept={item} dispa... |
8199d30354e83690343e4c779073de7dee523842 | app/scripts/directives/login-box.js | app/scripts/directives/login-box.js | 'use strict';
(function() {
angular.module('ncsaas')
.directive('loginbox', function($window) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
var winHeight = $window.innerHeight;
element.css('height', winHeight - 100 + 'px');
}
};
})
... | 'use strict';
(function() {
angular.module('ncsaas')
.directive('loginboxcontext', function($window) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
var elHeight = element[0].offsetHeight;
element.css('margin-top', -elHeight / 2 + 'px');
}
... | Change directive loginboxcontext for vertical aligne login blovk. Remove directive loginbox. | Change directive loginboxcontext for vertical aligne login blovk. Remove directive loginbox.
– saas-239
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -3,22 +3,12 @@
(function() {
angular.module('ncsaas')
- .directive('loginbox', function($window) {
- return {
- restrict: 'A',
- link: function(scope, element, attrs) {
- var winHeight = $window.innerHeight;
- element.css('height', winHeight - 100 + 'px');
- ... |
275b8f8017bd196c40aef8b1b2c753f56a31fa14 | app/scripts/services/environment.js | app/scripts/services/environment.js | 'use strict';
/**
* @ngdoc service
* @name ausEnvApp.environment
* @description
* # environment
* Service in the ausEnvApp.
*/
angular.module('ausEnvApp')
.service('environment', function () {
var service = this;
service.STATIC_CSV_SOURCE='/aucsv/accounts2/';
service.REGION_AREAS='/aucsv/region_ar... | 'use strict';
/**
* @ngdoc service
* @name ausEnvApp.environment
* @description
* # environment
* Service in the ausEnvApp.
*/
angular.module('ausEnvApp')
.service('environment', function () {
var service = this;
service.STATIC_CSV_SOURCE='/aucsv/accounts2/';
service.REGION_AREAS='/aucsv/region_ar... | Update paths of land-use summaries | Update paths of land-use summaries
| JavaScript | bsd-2-clause | ANU-WALD/aus-env,ANU-WALD/aus-env,ANU-WALD/aus-env,ANU-WALD/aus-env | ---
+++
@@ -15,7 +15,7 @@
service.REGION_AREAS='/aucsv/region_areas/';
service.LANDCOVER_CODES='static/config/DLCD_codes.csv';
service.LANDUSE_CODES='static/config/landuse_codes.csv';
- service.BY_LAND_TYPE_SUMMARY='clum0917';
+ service.BY_LAND_TYPE_SUMMARY='clum1219';
service.THEMES='static... |
4c38d0fcc5f7eb620ca052f02e0db98ed81b0724 | lib/filter/mappingAssignee.js | lib/filter/mappingAssignee.js | // MRのassignee_nameが既知の場合には、チャットワークの通知先IDを設定します。
export default function(req, res, next) {
if (req.objectKind === 'merge_request') {
if (req.body.object_attributes.assignee_name === 'shigeru.nakajima') {
req.body.object_attributes.assignee_chatwark_id = '903097'
}
}
next()
}
| const map = new Map([
['ai.yuichi', '903099'],
['kurubushionline', '933045'],
['masaomi.tsuge', '903098'],
['shigeru.nakajima', '903097'],
['yusuke.matsuda', '903099']
])
// MRのassignee_nameが既知の場合には、チャットワークの通知先IDを設定します。
export default function(req, res, next) {
if (req.objectKind === 'merge_request') {
... | Add target members to ask review | Add target members to ask review
| JavaScript | mit | luxiar/syamo,ledsun/syamo,luxiar/syamo,ledsun/syamo | ---
+++
@@ -1,8 +1,16 @@
+const map = new Map([
+ ['ai.yuichi', '903099'],
+ ['kurubushionline', '933045'],
+ ['masaomi.tsuge', '903098'],
+ ['shigeru.nakajima', '903097'],
+ ['yusuke.matsuda', '903099']
+])
+
// MRのassignee_nameが既知の場合には、チャットワークの通知先IDを設定します。
export default function(req, res, next) {
if (req... |
db403e516d5583f9cd5dbe9e3921f1c369f25d2b | test/event.js | test/event.js | var Chrome = require('../');
var assert = require('assert');
describe('registering event', function () {
describe('"event"', function () {
it('should give the raw message', function (done) {
Chrome(function (chrome) {
chrome.once('event', function (message) {
... | var Chrome = require('../');
var assert = require('assert');
describe('registering event', function () {
describe('"event"', function () {
it('should give the raw message', function (done) {
Chrome(function (chrome) {
chrome.once('event', function (message) {
... | Fix race condition in test | Fix race condition in test
Registering an event with the shorthand syntax behaves like `.on` and not like
`.once` so in this case, if more than one request *will be sent* by the "New
Tab" of Chrome then the Mocha's `done()` function gets called twice causing an
error.
This has been hidden until 85409d3a4633ddb928c64f... | JavaScript | mit | cyrus-and/chrome-remote-interface,cyrus-and/chrome-remote-interface | ---
+++
@@ -29,6 +29,8 @@
chrome.Network.requestWillBeSent(function (message) {
assert(!message.method);
chrome.close(done);
+ // avoid to call `done()` more than once
+ chrome.removeAllListeners();
});
chrome.send(... |
7ac46ed8e33285064d1a96989e55ceb365928542 | lib/controllers/actions/login.js | lib/controllers/actions/login.js | 'use strict';
var method = require('../../waterlock-ldap-auth');
var ldap = method.ldap;
var connection = method.connection;
/**
* Login action
*/
module.exports = function(req, res) {
var params = req.params.all();
if (typeof params.username === 'undefined' || typeof params.password === 'undefined') {
... | 'use strict';
var method = require('../../waterlock-ldap-auth');
var ldap = method.ldap;
var connection = method.connection;
/**
* Login action
*/
module.exports = function(req, res) {
var params = req.params.all();
if (typeof params.username === 'undefined' || typeof params.password === 'undefined') {
... | Fix creation of Auth instance and pass entryUUID to it. | Fix creation of Auth instance and pass entryUUID to it.
| JavaScript | mit | OpenServicesEU/waterlock-ldap-auth,waterlock/waterlock-ldap-auth,OpenServicesEU/waterlock-ldap-auth,waterlock/waterlock-ldap-auth,fladi/waterlock-ldap-auth,fladi/waterlock-ldap-auth,corycollier/waterlock-multiple-ldap-auth,corycollier/waterlock-multiple-ldap-auth | ---
+++
@@ -25,9 +25,9 @@
};
var attr = {
username: params.username,
- entryUUID: user
+ entryUUID: user.entryUUID
};
- waterlock.engine.findOrCreateAuth(criteria, attr).exec(function(err, user) {
+ waterlock.engine.findOrCreateAuth(criteria, attr,... |
b0888069daf80486d38944063e4661a362d29d7c | tests/test.js | tests/test.js | //I hear you like to run node in your node, so I'm testing node using node
var spawn = require('spawn-cmd').spawn,
testProcess = spawn('node ./src/index.js < ./tests/eval.js'),
assert = require('assert');
testProcess.stdout.on('data', function (data) {
assert.equal(data, 'This is only a test');
});
... | //I hear you like to run node in your node, so I'm testing node using node
var spawn = require('spawn-cmd').spawn,
testProcess = spawn('node ./src/index.js < ./tests/eval.js'),
assert = require('assert');
console.log("Modules required and process spawned");
testProcess.stdout.on('data', function (data)... | Test still failing on TravisCI | Test still failing on TravisCI
| JavaScript | mit | chad-autry/stdin-eval-stdout | ---
+++
@@ -2,9 +2,11 @@
var spawn = require('spawn-cmd').spawn,
testProcess = spawn('node ./src/index.js < ./tests/eval.js'),
assert = require('assert');
-
+console.log("Modules required and process spawned");
+
testProcess.stdout.on('data', function (data) {
assert.equal(data, 'This is only a test'... |
9ef7d006c9c882043d2c6f6e27a62d6d26198dac | tests/png.js | tests/png.js | QUnit.module("png");
QUnit.test("png-image-element format returns an image", function(assert) {
var done = assert.async();
var image = Viz("digraph { a -> b; }", { format: "png-image-element" });
assert.ok(image instanceof Image, "image should be an Image");
image.onload = function() {
done();
}
... | QUnit.module("png");
QUnit.test("png-image-element format returns an image", function(assert) {
var done = assert.async();
var image = Viz("digraph { a -> b; }", { format: "png-image-element" });
assert.ok(image instanceof Image, "image should be an Image");
image.onload = function() {
done();
}
... | Add test for scale option. | Add test for scale option.
| JavaScript | mit | mdaines/viz.js,mdaines/viz.js,mdaines/viz.js,mdaines/viz.js | ---
+++
@@ -8,6 +8,22 @@
assert.ok(image instanceof Image, "image should be an Image");
image.onload = function() {
+ done();
+ }
+
+ image.onerror = function(e) {
+ throw e;
+ }
+});
+
+QUnit.test("specifying the scale option should change resulting image's natural size", function(assert) {
+ v... |
1282f064f119e2d1b27dc5ec84dd952cb2201ae5 | js/agency.js | js/agency.js | /*!
* Start Bootstrap - Agency Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
// jQuery for page scrolling feature - requires jQuery Easing plugin
$(function() {
$('a.page-scroll').bind('click', functi... | /*!
* Start Bootstrap - Agency Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
function hideOnRefresh() {
console.log($(".navbar").offset().top);
if ($(".navbar").offset().top > 50) {
$(".na... | Fix to collapse navbar on page reloads | Fix to collapse navbar on page reloads
| JavaScript | apache-2.0 | jamlamberti/startbootstrap-agency,jamlamberti/startbootstrap-agency,jamlamberti/startbootstrap-agency | ---
+++
@@ -4,6 +4,14 @@
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
+function hideOnRefresh() {
+ console.log($(".navbar").offset().top);
+ if ($(".navbar").offset().top > 50) {
+ $(".navbar-fixed-top").addClass("navbar-collapse navbar-shrink");
+ } else {
+ $(".nav... |
f0ab55e742304db3f1e23a30d73108cd2ac88aee | src/app/lib/ipc_handler.js | src/app/lib/ipc_handler.js | const { ipcMain } = require('electron');
function isPromise(object) {
return object.then && typeof(object.then) === 'function';
}
function isGenerator(object) {
return object.next && typeof(object.next) === 'function';
}
class IPCHandler {
handle(event, funct, binding = this) {
const localFunc = ... | const { ipcMain } = require('electron');
function isPromise(object) {
return object.then && typeof(object.then) === 'function';
}
function isGenerator(object) {
return object[Symbol.iterator] && typeof(object[Symbol.iterator]) === 'function';
}
class IPCHandler {
handle(event, funct, binding = this) {
... | Fix check for generator ipc response | Fix check for generator ipc response
Since we're actually using an for..of loop it doesn't matter that there's a 'next()' function on the object. What really matters is a function for the iterator symbol. | JavaScript | mit | kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop | ---
+++
@@ -5,7 +5,7 @@
}
function isGenerator(object) {
- return object.next && typeof(object.next) === 'function';
+ return object[Symbol.iterator] && typeof(object[Symbol.iterator]) === 'function';
}
class IPCHandler { |
6834d216400f61c3682ee3974977e73f2d0da0b7 | src/withStyles.js | src/withStyles.js | /**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React, { Component, PropTypes } from 'react';
function withStyles(Co... | /**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React, { Component, PropTypes } from 'react';
function withStyles(Co... | Fix warning in console, to display ComposedComponent name, rather `Styles` name. | Fix warning in console, to display ComposedComponent name, rather `Styles` name. | JavaScript | mit | 5punk/isomorphic-style-loader,kriasoft/isomorphic-style-loader | ---
+++
@@ -14,6 +14,8 @@
static contextTypes = {
insertCss: PropTypes.func.isRequired,
};
+
+ static displayName = ComposedComponent.displayName || ComposedComponent.name;
componentWillMount() {
this.removeCss = this.context.insertCss.apply(undefined, styles); |
dceb11ea80ca2464ea4907737fa91123857d5eb6 | js/script.js | js/script.js | $(function() {
/* Vars */
var TIME = 500;
var pics = $('.ref-pic');
var refs = $('.ref-block');
/* Handlers */
var refHandler = function(event) {
var $this = $(this);
var ACT = 'active';
var i = $this.index();
if (! $this.hasClass( ACT )) {
pics.removeClass( ACT );
$this.addClass( ACT );
... | $(function() {
/* Vars */
var TIME = 500;
var pics = $('.ref-pic');
var refs = $('.ref-block');
var navItem = $('.nav-item');
/* Handlers */
var menuItemHandler = function(event) {
event.preventDefault();
hash = $(this).children('a')[0].hash;
$('html').animate(function() {
offsetY = $(hash).posit... | Add temporary scroll animation function | Add temporary scroll animation function
| JavaScript | mit | albertoblaz/albertoblaz.github.io,albertoblaz/albertoblaz.github.io | ---
+++
@@ -7,8 +7,20 @@
var pics = $('.ref-pic');
var refs = $('.ref-block');
+ var navItem = $('.nav-item');
+
/* Handlers */
+ var menuItemHandler = function(event) {
+ event.preventDefault();
+ hash = $(this).children('a')[0].hash;
+
+ $('html').animate(function() {
+ offsetY = $(hash).position.top... |
f3ee98e068265aecbde8e52fafbe955ea1480bd6 | app/libs/utils/methods/notify.js | app/libs/utils/methods/notify.js | 'use strict'
// Create a pushover instance
const pushover = new (require('pushover-notifications'))({
user: process.env.PUSHOVER_USER,
token: process.env.PUSHOVER_TOKEN
})
// Load utilities
const i18n = require('../../locale')
const logger = require('../../log')
// Get package data
const pkg = require('../../../... | 'use strict'
// Load requirements
const emoji = require('node-emoji')
// Create a pushover instance
const pushover = new (require('pushover-notifications'))({
user: process.env.PUSHOVER_USER,
token: process.env.PUSHOVER_TOKEN
})
// Load utilities
const i18n = require('../../locale')
const logger = require('../..... | Add emoji handling to push notifications | Add emoji handling to push notifications
| JavaScript | mit | jHoldroyd/trollmoji | ---
+++
@@ -1,4 +1,7 @@
'use strict'
+
+// Load requirements
+const emoji = require('node-emoji')
// Create a pushover instance
const pushover = new (require('pushover-notifications'))({
@@ -20,7 +23,7 @@
// Send the message
return pushover.send({
- message: msg,
+ message: emoji.emojify(msg),
... |
b2c454861de9dbada3ee60ea041637165538488a | src/components/NotFound.js | src/components/NotFound.js | //@flow
/*******************************************************************************
* Imports
*******************************************************************************/
import React from 'react'
import { Markdown, Cr } from 'tldr/components/Markdown'
import Link from 'tldr/components/Link'
import Tldr f... | //@flow
/*******************************************************************************
* Imports
*******************************************************************************/
import React from 'react'
import { Markdown, Cr } from 'tldr/components/Markdown'
import Link from 'tldr/components/Link'
import Tldr f... | Update not found page to fix command request link. | Update not found page to fix command request link.
The new command label seems to have changed recently. This commit fixes the broken link. | JavaScript | mit | ostera/tldr.jsx,ostera/tldr.jsx,ostera/tldr.jsx,ostera/tldr.jsx | ---
+++
@@ -25,7 +25,7 @@
{Cr}
### How can I help?
{Cr}
- Take a look at the open <Link href="https://github.com/tldr-pages/tldr/issues?q=is%3Aopen+is%3Aissue+label%3Acommand" text="Command Requests" /> to throw a jab at things people need, or maybe join in on any of the open <Link href="https://github.com/... |
07b7bdfcff71eee89363e0e8b67ef080148a204f | public/audio.js | public/audio.js | var audio = new AudioContext || new webkitAudioContext;
| var audio = new AudioContext || new webkitAudioContext;
function playRadarPing() {
var osc = audio.createOscillator();
var gain = audio.createGain();
var time = audio.currentTime;
gain.connect(audio.destination);
osc.connect(gain);
osc.type = 'triangle';
gain.gain.setValueAtTime(0.2, time);
gain.gain... | Add function to play radar ping sound | Add function to play radar ping sound
| JavaScript | mit | peternatewood/socket-battle,peternatewood/socket-battle | ---
+++
@@ -1 +1,16 @@
var audio = new AudioContext || new webkitAudioContext;
+
+function playRadarPing() {
+ var osc = audio.createOscillator();
+ var gain = audio.createGain();
+ var time = audio.currentTime;
+
+ gain.connect(audio.destination);
+ osc.connect(gain);
+
+ osc.type = 'triangle';
+ gain.gain.s... |
1fe6e0891a6b50cea9df5399812cdbf3daa88604 | modules/recognizer/recognizer.js | modules/recognizer/recognizer.js | Module.register("recognizer",{
start() {
this.display = false;
this.image = "";
console.log("Recognizer started");
this.sendSocketNotification("RECOGNIZER_STARTUP");
return;
},
socketNotificationReceived: function(notification) {
console.log("Recognizer recieved a notification: " + notif... | Module.register("recognizer",{
start() {
this.display = false;
this.image = "";
console.log("Recognizer started");
this.sendSocketNotification("RECOGNIZER_STARTUP");
return;
},
socketNotificationReceived: function(notification) {
console.log("Recognizer recieved a notification: " + notif... | Add picture display after taken on mirror, need to set a timer for that | Add picture display after taken on mirror, need to set a timer for that
| JavaScript | mit | OniDotun123/MirrorMirror,OniDotun123/MirrorMirror,OniDotun123/MirrorMirror | ---
+++
@@ -37,10 +37,10 @@
if (this.display) {
var imgElem = document.createElement("img");
imgElem.src = "./public/webcam_pic.jpg";
- wrapper.innerHTML = '<img id="selfie" src="./public/webcam_pic.jpg" />';
- document.getElementById("selfie-display").appendChild(imgElem);
+ wrapper... |
3bc3c822a7aff47e57423a9ce36e8b5d6b6eeacd | static/js/main.js | static/js/main.js | $(document).ready(() => {
const restaurants = ['taste', 'variantti', 'kanttiini', 'blancco', 'factory']
const days = [
{name: "Maanantai"},
{name: "Tiistai"},
{name: "Keskiviikko"},
{name: "Torstai"},
{name: "Perjantai"},
]
restaurants.forEach((r) => {
$.ajax({
url: `/crawled/${r}.ht... | $(document).ready(() => {
const restaurants = ['taste', 'variantti', 'kanttiini', 'blancco', 'factory']
const days = [
{name: "Maanantai"},
{name: "Tiistai"},
{name: "Keskiviikko"},
{name: "Torstai"},
{name: "Perjantai"},
]
restaurants.forEach((r) => {
$.ajax({
url: `/crawled/${r}.ht... | Put inspirational images on the bottom on xs devices | [Dev] Put inspirational images on the bottom on xs devices
| JavaScript | mit | sampohaavisto/pitskulounas,sampohaavisto/pitskulounas,sampohaavisto/pitskulounas | ---
+++
@@ -15,10 +15,10 @@
url: `/crawled/${r}.html`,
type: 'get',
}).done((res) => {
- $(`#${r}`).html(res);
+ $(`#${r}`).html(`<div class="float-sm-left">${res}</div`);
var number = Math.floor(Math.random()*(10-1+1)+1);
- $(`#${r}`).prepend(`<img style="float:right;" src=... |
65160150bb563a5db8757c7bc2966dd38eff4dfb | src/e2e-tests/basic.e2e.js | src/e2e-tests/basic.e2e.js | var assert = require('assert');
describe("Basic Test", function(){
it("Loads the basic demo page and sends values to server", function(){
browser.url('http://localhost:7888/src/e2e-tests/basic-demo-page?auto-activate-glasswing')
browser.waitUntil(function () {
var a = browser.execute(fu... | var assert = require('assert');
describe("Basic Test", function(){
it("Loads the basic demo page and sends values to server", function(){
browser.url('http://localhost:7888/src/e2e-tests/basic-demo-page?auto-activate-glasswing')
browser.waitUntil(function () {
var a = browser.execute(fu... | Check file listing loads in E2E test. | Check file listing loads in E2E test.
| JavaScript | mit | mattzeunert/glasswing,mattzeunert/glasswing,mattzeunert/glasswing | ---
+++
@@ -8,13 +8,21 @@
return window.a
}).value
return a == 25;
- }, 30000, 'expected a to be set to 25 by the page')
+ }, 20000, 'expected a to be set to 25 by the page')
browser.waitUntil(function () {
var a = browser.execute(function... |
bdef84e429a948ac336438a20d539a10de19b030 | config/policies.js | config/policies.js | /**
* Policies are simply Express middleware functions which run before your controllers.
* You can apply one or more policies for a given controller or action.
*
* Any policy file (e.g. `authenticated.js`) can be dropped into the `/policies` folder,
* at which point it can be accessed below by its filename, minus... | /**
* Policies are simply Express middleware functions which run before your controllers.
* You can apply one or more policies for a given controller or action.
*
* Any policy file (e.g. `authenticated.js`) can be dropped into the `/policies` folder,
* at which point it can be accessed below by its filename, minus... | Add 'authenticated' policy to dashboard action. | Add 'authenticated' policy to dashboard action.
Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com> | JavaScript | mit | maxfierke/WaterCooler | ---
+++
@@ -16,11 +16,15 @@
// (`true` allows public access)
'*': true,
- UserController: {
- '*': 'authenticated'
+ MainController: {
+ 'dashboard': 'authenticated'
},
RoomController: {
'*': 'authenticated'
+ },
+
+ UserController: {
+ '*': 'authentic... |
f6ad51415098d625893243fbb9bc4dea65127124 | cli/src/utils/fs.js | cli/src/utils/fs.js | import Promise from 'bluebird'
import childProcess from 'child_process'
import logger from '../logger'
Promise.promisifyAll(childProcess)
const log = logger({
component: 'FS'
})
// Hides a directory on Windows.
// Errors are logged, not thrown.
export async function hideOnWindows (path: string): Promise<void> {
... | import Promise from 'bluebird'
import childProcess from 'child_process'
import logger from '../logger'
Promise.promisifyAll(childProcess)
const log = logger({
component: 'FS'
})
// Hides a directory on Windows.
// Errors are logged, not thrown.
export async function hideOnWindows (path: string): Promise<void> {
... | Hide dirs on Windows only | Hide dirs on Windows only
| JavaScript | agpl-3.0 | cozy-labs/cozy-desktop,nono/cozy-desktop,cozy-labs/cozy-desktop,cozy-labs/cozy-desktop,cozy-labs/cozy-desktop,nono/cozy-desktop,nono/cozy-desktop,nono/cozy-desktop | ---
+++
@@ -12,6 +12,7 @@
// Hides a directory on Windows.
// Errors are logged, not thrown.
export async function hideOnWindows (path: string): Promise<void> {
+ if (process.platform !== 'win32') return
try {
await childProcess.execAsync(`attrib +h "${path}"`)
} catch (err) { |
470fbbe32934834e8b5cc983e021fc3e7f7c9594 | test/core_spec.js | test/core_spec.js | import {List} from 'immutable';
import {expect} from 'chai';
import {createPlayer} from '../src/core';
describe('createPlayer', () => {
it('sets name properly', () => {
const name = 'someName';
const player = createPlayer(name);
expect(player.name).to.equal(name);
... | import {List} from 'immutable';
import {expect} from 'chai';
import {createPlayer} from '../src/core';
describe('createPlayer', () => {
it('sets name properly', () => {
const name = 'someName';
const player = createPlayer(name);
expect(player.name).to.equal(name);
... | Simplify assertion from to.not.be.empty to to.exist | Simplify assertion from to.not.be.empty to to.exist
| JavaScript | apache-2.0 | evanepio/NodejsWarOServer | ---
+++
@@ -14,7 +14,7 @@
it('sets a non-empty ID', () => {
const player = createPlayer('someName');
- expect(player.id).to.not.be.empty;
+ expect(player.id).to.exist;
});
it('initializes an empty hand', () => { |
9ecbd6caa7a51141fa790ef7ab8a94b94f6e6492 | app/utils/compare-last-opened.js | app/utils/compare-last-opened.js | export default function(a, b) {
const alast = a.lastOpened;
const blast = b.lastOpened;
if (alast < blast) {
return 1;
} else if (alast > blast) {
return -1;
}
return 0;
}
| export default function(a, b) {
const alast = a.lastOpened || a.id;
const blast = b.lastOpened || b.id;
if (alast < blast) {
return 1;
} else if (alast > blast) {
return -1;
}
return 0;
}
| Fix bug with sort albums | Fix bug with sort albums
| JavaScript | mit | DenQ/electron-react-lex,DenQ/electron-react-lex | ---
+++
@@ -1,6 +1,6 @@
export default function(a, b) {
- const alast = a.lastOpened;
- const blast = b.lastOpened;
+ const alast = a.lastOpened || a.id;
+ const blast = b.lastOpened || b.id;
if (alast < blast) {
return 1;
} else if (alast > blast) { |
53ade6629935c05653eb9dc35237597602ef061d | gulp/tasks/browserSync.js | gulp/tasks/browserSync.js | 'use strict';
import config from '../config';
import url from 'url';
import browserSync from 'browser-sync';
import gulp from 'gulp';
gulp.task('browserSync', function() {
const DEFAULT_FILE = 'index.html';
const ASSET_EXTENSIONS = ['js', 'css', 'png', 'jpg', 'jpeg', 'gif'];
browserSync.in... | 'use strict';
import config from '../config';
import url from 'url';
import browserSync from 'browser-sync';
import gulp from 'gulp';
gulp.task('browserSync', function() {
const DEFAULT_FILE = 'index.html';
const ASSET_EXTENSION_REGEX = /\b(?!\?)\.(js|css|png|jpe?g|gif|svg|eot|otf|ttc|ttf|wof... | Fix not being able to serve fonts and other assets using query string cache busters. | Fix not being able to serve fonts and other assets using query string cache busters.
| JavaScript | mit | StrikeForceZero/angularjs-ionic-gulp-browserify-boilerplate,tungptvn/tungpts-ng-blog,adamcolejenkins/dotcom,henrymyers/quotes,cshaver/angularjs-gulp-browserify-boilerplate,dnaloco/digitala,cshaver/angularjs-gulp-browserify-boilerplate,dnaloco/digitala,Deftunk/TestCircleCi,StrikeForceZero/angularjs-ionic-gulp-browserify... | ---
+++
@@ -8,16 +8,15 @@
gulp.task('browserSync', function() {
const DEFAULT_FILE = 'index.html';
- const ASSET_EXTENSIONS = ['js', 'css', 'png', 'jpg', 'jpeg', 'gif'];
+ const ASSET_EXTENSION_REGEX = /\b(?!\?)\.(js|css|png|jpe?g|gif|svg|eot|otf|ttc|ttf|woff2?)(?!\.)/i;
browserSync.init({
server: {... |
954b34245682de410257ebf5aab3ea6281850b12 | src/app/index.route.js | src/app/index.route.js | function routerConfig ($stateProvider, $urlRouterProvider) {
'ngInject';
$stateProvider
.state('home', {
url: '/',
templateUrl: 'app/main/main.html',
controller: 'MainController',
controllerAs: 'main'
});
$urlRouterProvider.otherwise('/');
}
export default routerConfig;
| function routerConfig ($stateProvider, $urlRouterProvider) {
'ngInject';
$stateProvider
.state('home', {
url: '/',
templateUrl: 'app/main/main.html',
controller: 'MainController',
controllerAs: 'main'
})
.state('ambr', {
url: '/ambr',
templateUrl: 'app/projects/ambr.h... | Add routing for each project | Add routing for each project
| JavaScript | mit | RobEasthope/lazarus,RobEasthope/lazarus | ---
+++
@@ -6,6 +6,48 @@
templateUrl: 'app/main/main.html',
controller: 'MainController',
controllerAs: 'main'
+ })
+ .state('ambr', {
+ url: '/ambr',
+ templateUrl: 'app/projects/ambr.html',
+ controller: 'AmbrController',
+ controllerAs: 'ambr'
+ })
+ .state('bri... |
64b3b6f6b40b1e604d9f161c1b34a7cf619e02b0 | packages/neft-core/src/initializer.js | packages/neft-core/src/initializer.js | const Renderer = require('./renderer')
const Document = require('./document')
const Element = require('./document/element')
const windowElement = new Element.Tag()
windowElement.props.set('n-style', ['__default__', 'item'])
const windowDocument = new Document('__window__', {
style: {
__default__: {
item: ... | const Renderer = require('./renderer')
const Document = require('./document')
const Element = require('./document/element')
const eventLoop = require('./event-loop')
const windowElement = new Element.Tag()
windowElement.props.set('n-style', ['__default__', 'item'])
const windowDocument = new Document('__window__', {
... | Fix for handling errors when calling Neft.render | Fix for handling errors when calling Neft.render
| JavaScript | apache-2.0 | Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft | ---
+++
@@ -1,6 +1,7 @@
const Renderer = require('./renderer')
const Document = require('./document')
const Element = require('./document/element')
+const eventLoop = require('./event-loop')
const windowElement = new Element.Tag()
windowElement.props.set('n-style', ['__default__', 'item'])
@@ -23,11 +24,13 @@
... |
fe268dacebda3161c2efeb9d1091a412702d1228 | src/components/modals/CreatorTypesModal.js | src/components/modals/CreatorTypesModal.js | import React from 'react'
import CreatorTypeContainer from '../../containers/CreatorTypeContainer'
import * as s from '../../styles/jso'
import { css, media } from '../../styles/jss'
const creatorTypeModalStyle = css(
s.bgcWhite,
s.fullWidth,
s.mxAuto,
s.p10,
{ borderRadius: 5, maxWidth: 510 },
media(s.min... | import React from 'react'
import CreatorTypeContainer from '../../containers/CreatorTypeContainer'
import * as s from '../../styles/jso'
import { css, media } from '../../styles/jss'
const creatorTypeModalStyle = css(
s.bgcWhite,
s.fullWidth,
s.mxAuto,
s.p10,
{ borderRadius: 5, maxWidth: 510 },
media(s.min... | Update creator type modal copy | Update creator type modal copy
| JavaScript | mit | ello/webapp,ello/webapp,ello/webapp | ---
+++
@@ -21,7 +21,7 @@
export default () => (
<div className={creatorTypeModalStyle}>
<h3 className={titleStyle}>We're doing a quick survey to find out a little more about the
- artistic composition of the Ello Community. You can always update your answers on your
+ artistic composition of ... |
905f2424a016aeb004f5bd2a14b26fe008d485ac | test/hashtable.js | test/hashtable.js | var HashMap = require('..'),
test = require('test-more')();
var hashmap = new HashMap();
test.
ok(hashmap, 'new HashMap()').
is(function() {
hashmap.max_load_factor(0.75);
return hashmap.max_load_factor();
}, 0.75, 'get/set max_load_factor').
test("object identity", function(tes... | var HashMap = require('..'),
test = require('test-more')();
var hashmap = new HashMap();
test.ok(hashmap, 'new HashMap()')
.is(function() {
hashmap.max_load_factor(0.75);
return hashmap.max_load_factor();
}, 0.75, 'get/set max_load_factor')
.test("object identity", function(test) {
... | Revert "Changed tests to 'dot-after' formatting" | Revert "Changed tests to 'dot-after' formatting"
This reverts commit 9cd0e3cb0ea17ded5fa93c4471a9cad73b0b2f30.
| JavaScript | mit | chad3814/node-hashtable,vigbk/node-hashtable,vigbk/node-hashtable,vigbk/node-hashtable,chad3814/node-hashtable,chad3814/node-hashtable | ---
+++
@@ -3,27 +3,19 @@
var hashmap = new HashMap();
-test.
-
- ok(hashmap, 'new HashMap()').
-
- is(function() {
+test.ok(hashmap, 'new HashMap()')
+ .is(function() {
hashmap.max_load_factor(0.75);
return hashmap.max_load_factor();
- }, 0.75, 'get/set max_load_factor').
-
- te... |
638def304c2efc0755aedf0070760bc15c404bee | lib/index.js | lib/index.js | "use strict";
var Model = require('./model');
module.exports = new Restifier();
module.exports.Restifier = Restifier;
function Restifier() {
this.prefix = '';
}
Restifier.prototype.initialize = function() {
return require('res-error')({
log: false
});
};
Restifier.prototype.model = function(mongooseModel... | "use strict";
var Model = require('./model');
module.exports = new Restifier();
module.exports.Restifier = Restifier;
function Restifier() {
this.models = [];
}
Restifier.prototype.initialize = function() {
return require('res-error')({
log: false
});
};
Restifier.prototype.model = function(mongooseModel... | Store models in restifier instance | Store models in restifier instance
Signed-off-by: Ian Macalinao <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@ian.pw>
| JavaScript | mit | simplyianm/preston,simplyianm/preston | ---
+++
@@ -6,7 +6,7 @@
module.exports.Restifier = Restifier;
function Restifier() {
- this.prefix = '';
+ this.models = [];
}
Restifier.prototype.initialize = function() {
@@ -16,5 +16,7 @@
};
Restifier.prototype.model = function(mongooseModel) {
- return new Model(this, mongooseModel);
+ var m = new... |
0898198cb32667ff94b83dd0d2f1ce26a810d89f | src/js/services/homeIntegrationsService.js | src/js/services/homeIntegrationsService.js | 'use strict';
angular.module('copayApp.services').factory('homeIntegrationsService', function(configService, $log) {
var root = {};
var services = [];
root.register = function(serviceInfo) {
$log.info('Adding home Integrations entry:' + serviceInfo.name);
services.push(serviceInfo);
};
root... | 'use strict';
angular.module('copayApp.services').factory('homeIntegrationsService', function(lodash, configService, $log) {
var root = {};
var services = [];
root.register = function(serviceInfo) {
// Check if already exists
if (lodash.find(services, { 'name': serviceInfo.name })) return;
$l... | Fix duplicated home integration items | Fix duplicated home integration items
| JavaScript | mit | cmgustavo/copay,matiu/copay,fr34k8/copay,dabura667/copay,gabrielbazan7/copay,bitchk-wallet/copay,gabrielbazan7/copay,Bitcoin-com/Wallet,Bitcoin-com/Wallet,gabrielbazan7/copay,bitjson/copay,msalcala11/copay,Bitcoin-com/Wallet,msalcala11/copay,gabrielbazan7/copay,cmgustavo/copay,janko33bd/copay,bitchk-wallet/copay,fr34k8... | ---
+++
@@ -1,9 +1,11 @@
'use strict';
- angular.module('copayApp.services').factory('homeIntegrationsService', function(configService, $log) {
+ angular.module('copayApp.services').factory('homeIntegrationsService', function(lodash, configService, $log) {
var root = {};
var services = [];
root.regist... |
7a27af0f05a6b18f0423bf61a1d834e75d9eeea0 | api/src/constants.js | api/src/constants.js |
import EPSG21781 from '@geoblocks/sources/EPSG21781.js';
/**
* @type {string}
*/
export const themesUrl = 'https://geomapfish-demo-dc.camptocamp.com/2.4/themes?version=2&background=background';
/**
* @type {string}
*/
export const projection = EPSG21781;
/**
* @type {Array.<number>}
*/
export const resoluti... |
import EPSG21781 from '@geoblocks/proj/src/EPSG_21781.js';
/**
* @type {string}
*/
export const themesUrl = 'https://geomapfish-demo-dc.camptocamp.com/2.4/themes?version=2&background=background';
/**
* @type {string}
*/
export const projection = EPSG21781;
/**
* @type {Array.<number>}
*/
export const resolu... | Fix bad import in api | Fix bad import in api
| JavaScript | mit | camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo | ---
+++
@@ -1,5 +1,5 @@
-import EPSG21781 from '@geoblocks/sources/EPSG21781.js';
+import EPSG21781 from '@geoblocks/proj/src/EPSG_21781.js';
/**
* @type {string} |
869084d477d7df84d80b2674e2a5be7242fe562b | app/lib/router.js | app/lib/router.js | require('dashboard/core');
require('dashboard/github_data_source');
Dashboard.Router = Ember.Router.extend({
root: Ember.Route.extend({
index: Ember.Route.extend({
route: '/',
connectOutlets: function(router) {
router.transitionTo('user', {
username: 'pangratz'
});
}
... | require('dashboard/core');
require('dashboard/github_data_source');
Dashboard.Router = Ember.Router.extend({
root: Ember.Route.extend({
index: Ember.Route.extend({
route: '/',
connectOutlets: function(router) {
router.transitionTo('user', {
username: 'pangratz'
});
}
... | Use outlet to show repositories | Use outlet to show repositories
| JavaScript | isc | greyhwndz/dashboard,pangratz/dashboard,greyhwndz/dashboard,pangratz/dashboard,greyhwndz/dashboard | ---
+++
@@ -23,11 +23,8 @@
repositoriesController.set('content', []);
repositoriesController.loadWatchedRepositories(context.username);
- // finally add a view which renders repositories template for given controller
- Ember.View.create({
- templateName: 'repositories',
- ... |
977307c14c41df2eeb53df04f58222ef7a009fc6 | app/assets/javascripts/paginator.js | app/assets/javascripts/paginator.js | $(document).ready(function() {
$(".per-page").chosen({
width: '70px',
disable_search_threshold: 20,
});
$(".per-page").change(function () {
location.href = add_parameter(location.href, 'per_page', $(this).val());
});
}); | $(document).ready(function() {
$(".per-page").select2({
width: '70px',
minimumResultsForSearch: 20,
});
$(".per-page").change(function () {
location.href = add_parameter(location.href, 'per_page', $(this).val());
});
}); | Make pagination dropdown into select2 | Make pagination dropdown into select2
| JavaScript | mit | Marri/glowfic,Marri/glowfic,Marri/glowfic,Marri/glowfic | ---
+++
@@ -1,7 +1,7 @@
$(document).ready(function() {
- $(".per-page").chosen({
+ $(".per-page").select2({
width: '70px',
- disable_search_threshold: 20,
+ minimumResultsForSearch: 20,
});
$(".per-page").change(function () { |
38991d9f5b34b84f6cb1c26de6d622cadb33b7f7 | app/assets/javascripts/questions.js | app/assets/javascripts/questions.js | $(document).ready( function () {
$('#signup').click(function(event){
event.preventDefault();
$('#screen_block').show();
$('#signup_modal').show();
});
$('#screen_block').click(function(event){
event.preventDefault();
clear_modals();
});
$('#login').click(function(event){
event.preven... | $(document).ready( function () {
$('#signup').click(function(event){
event.preventDefault();
$('#screen_block').show();
$('#signup_modal').show();
});
$('#screen_block').click(function(event){
event.preventDefault();
clear_modals();
});
$('#login').click(function(event){
event.preven... | Fix JavaScript Interaction with Forms | Fix JavaScript Interaction with Forms
| JavaScript | mit | great-horned-owls-2014/dbc-what-is-this,great-horned-owls-2014/dbc-what-is-this | ---
+++
@@ -31,10 +31,10 @@
dataType: 'JSON',
}).done(function(data){
$('ol.thumb-grid').load('/ .thumb-grid');
- // clear_modals();
- reset_question_form()
+ clear_modals();
+ reset_question_form();
}).fail(function(data){
- reset_question_form()
+ ... |
1b0427393e5713700039862b2d5cbd7c3e079cba | src/components/search_bar.js | src/components/search_bar.js | import React, { Component } from 'react';
class SearchBar extends Component {
render() {
return <input onChange={event => console.log(event.target.value)} />;
}
// onInputChange(event) {
// console.log(event.target.value);
// }
}
export default SearchBar; | import React, { Component } from 'react';
class SearchBar extends Component {
constructor(props) {
super(props);
this.state = { term: '' };
}
render() {
return (
<div>
<input onChange={event => this.setState({ term: event.target.value })} />
</div>
);
}
}
export default SearchBar; | Add a constructor method and add a property of term for the state, add a function as an event handler onchange that sets the state for term as the inputs value. | Add a constructor method and add a property of term for the state, add a function as an event handler onchange that sets the state for term as the inputs value.
| JavaScript | mit | JosephLeon/redux-simple-starter-tutorial,JosephLeon/redux-simple-starter-tutorial | ---
+++
@@ -1,13 +1,19 @@
import React, { Component } from 'react';
class SearchBar extends Component {
- render() {
- return <input onChange={event => console.log(event.target.value)} />;
+ constructor(props) {
+ super(props);
+
+ this.state = { term: '' };
}
- // onInputChange(event) {
- // console.log(... |
04649c101a33074c7745c867aab8eacc322a057a | www/js/app.js | www/js/app.js | (function () {
RecipeListView.prototype.template = Handlebars.compile($("#recipe-list-tpl").html());
RecipeView.prototype.template = Handlebars.compile($("#recipe-tpl").html());
var service = new RecipeService();
service.initialize().done(function () {
router.addRoute('', function() {
... | (function () {
RecipeListView.prototype.template = Handlebars.compile($("#recipe-list-tpl").html());
RecipeView.prototype.template = Handlebars.compile($("#recipe-tpl").html());
Handlebars.registerHelper('recipe_image', function(image_id) {
return _.find(recipe_images, function(recipe){ return reci... | Add handlebars helper in order to show recipe image | Add handlebars helper in order to show recipe image | JavaScript | mit | enoliglesias/wpreader,enoliglesias/wpreader | ---
+++
@@ -2,6 +2,10 @@
RecipeListView.prototype.template = Handlebars.compile($("#recipe-list-tpl").html());
RecipeView.prototype.template = Handlebars.compile($("#recipe-tpl").html());
+
+ Handlebars.registerHelper('recipe_image', function(image_id) {
+ return _.find(recipe_images, function(re... |
b7ffeb3e868611232fc03fd6f317d66511ff5f1e | app/moxie.conf.js | app/moxie.conf.js | define([], function() {
var MoxieConf = {
endpoint: 'http://api.m.ox.ac.uk',
paths: {
places_search: '/places/search',
places_id: '/places/',
dates: '/oxford_dates/',
courses_search: '/courses/search',
courses_subjects: '/courses/subjects',... | define([], function() {
var MoxieConf = {
endpoint: 'http://api.m.ox.ac.uk',
paths: {
places_search: '/places/search',
places_categories: '/places/types',
places_id: '/places/',
dates: '/oxford_dates/',
courses_search: '/courses/search',
... | Add API endpoint for categories | Add API endpoint for categories
| JavaScript | apache-2.0 | ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client | ---
+++
@@ -3,6 +3,7 @@
endpoint: 'http://api.m.ox.ac.uk',
paths: {
places_search: '/places/search',
+ places_categories: '/places/types',
places_id: '/places/',
dates: '/oxford_dates/',
courses_search: '/courses/search', |
4555f764571997162c5659f0f8c5de60fef2323f | lib/query.js | lib/query.js | 'use strict'
var semver = require('semver')
var sub = require('subleveldown')
var DepDb = require('dependency-db')
module.exports = function (db, name, range, opts) {
range = String(range || '*')
var depDb = new DepDb(sub(db, 'depdb'))
if (!name) throw new Error('missing required name')
if (!opts.csv) cons... | 'use strict'
var semver = require('semver')
var sub = require('subleveldown')
var DepDb = require('dependency-db')
module.exports = function (db, name, range, opts) {
range = String(range || '*')
var depDb = new DepDb(sub(db, 'depdb'))
if (!name) throw new Error('missing required name')
if (!opts.csv) cons... | Rename dependant to dependent (American English) | Rename dependant to dependent (American English)
| JavaScript | mit | watson/npm-dependency-db | ---
+++
@@ -11,7 +11,7 @@
if (!name) throw new Error('missing required name')
- if (!opts.csv) console.log('Looking up %s %s dependants...', name, range)
+ if (!opts.csv) console.log('Looking up %s %s dependents...', name, range)
var pkgCount = 0
var lastName |
deacf13c2a918d910b5a994fa7aec90ce2891650 | app/models/widgets/ticker_widget.js | app/models/widgets/ticker_widget.js | Dashboard.TickerWidget = Dashboard.Widget.extend({
sourceData: "",
templateName: 'ticker_widget',
classNames: ['widget', 'widget-ticker'],
widgetView: function() {
var widget = this;
return this._super().reopen({
didInsertElement: function() {
var scaleFactor = 0.7;
var widgetHeig... | Dashboard.TickerWidget = Dashboard.Widget.extend({
sourceData: "",
templateName: 'ticker_widget',
classNames: ['widget', 'widget-ticker'],
widgetView: function() {
var widget = this;
return this._super().reopen({
didInsertElement: function() {
var scaleFactor = 0.7;
var widgetHe... | Fix minor code style issues | Fix minor code style issues
| JavaScript | mit | kloudsio/mucuchies,ShiftForward/mucuchies,kloudsio/mucuchies,ShiftForward/mucuchies | ---
+++
@@ -7,8 +7,8 @@
widgetView: function() {
var widget = this;
- return this._super().reopen({
- didInsertElement: function() {
+ return this._super().reopen({
+ didInsertElement: function() {
var scaleFactor = 0.7;
var widgetHeight = this.$().height();
@@ -23,6 +23,6 ... |
9686e400d6823e23e5740676b5f8e67f32a56051 | tests/CoreSpec.js | tests/CoreSpec.js | describe("Core Bliss", function () {
"use strict";
beforeEach(function () {
fixture.setBase('tests/fixtures');
this.fixture = fixture.load('core.html');
document.body.innerHTML += this.fixture[0];
});
// testing setup
it("has the fixture on the dom", function () {
expect($('#fixture-container')).to.not.b... | describe("Core Bliss", function () {
"use strict";
before(function() {
fixture.setBase('tests/fixtures');
});
beforeEach(function () {
this.fixture = fixture.load('core.html');
document.body.innerHTML += this.fixture[0];
});
// testing setup
it("has the fixture on the dom", function () {
expect($('#fi... | Set fixture base before instead of before each | Set fixture base before instead of before each
| JavaScript | mit | LeaVerou/bliss,LeaVerou/bliss,dperrymorrow/bliss,zdfs/bliss,dperrymorrow/bliss,zdfs/bliss | ---
+++
@@ -1,8 +1,11 @@
describe("Core Bliss", function () {
"use strict";
+ before(function() {
+ fixture.setBase('tests/fixtures');
+ });
+
beforeEach(function () {
- fixture.setBase('tests/fixtures');
this.fixture = fixture.load('core.html');
document.body.innerHTML += this.fixture[0];
}); |
16666da6421dd2bf6f580ef534c9a7b24d9cd927 | app/middleware/preview-api.js | app/middleware/preview-api.js | const parseUrl = require('parseurl');
const get = require('lodash/get');
const crypto = require('crypto');
const timingSafeCompare = require('tsscmp');
const contentStore = require('../../lib/content-store');
/* eslint-disable no-param-reassign */
module.exports = (req, res, next) => {
const pathName = get(parseUr... | const parseUrl = require('parseurl');
const get = require('lodash/get');
const crypto = require('crypto');
const timingSafeCompare = require('tsscmp');
const contentStore = require('../../lib/content-store');
/* eslint-disable no-param-reassign */
module.exports = (req, res, next) => {
const pathName = get(parseUr... | Update preview logic after content refactoring | Update preview logic after content refactoring
As we removed the two column layout in favour of the 1 column
stream, the related preview logic has to be updated.
| JavaScript | mit | nhsuk/betahealth,nhsuk/betahealth,nhsalpha/betahealth,nhsalpha/betahealth,nhsalpha/betahealth,nhsuk/betahealth | ---
+++
@@ -24,8 +24,11 @@
return contentStore.getPreview(`${pageId}/?revision-id=${revisionId}`)
.then((response) => {
- req.layout = `_layouts/${response.layout}`;
- req.pageData = response;
+ const record = response;
+ const layout = record.layout || 'content-simple';
+
+ req.lay... |
d8c404e8b641e9ff42f0fd10843f55977667594f | application/index.js | application/index.js | var dispatcher = require('../dispatcher');
module.exports = {
render: require('./render'),
builtInStore: require('./built-in-store'),
actionBuilder: require('./action-builder'),
clear: require('./clear'),
mountedComponents: require('./mounted-components'),
changeMode(newMode, previousMode){
var mode = {... | var dispatcher = require('../dispatcher');
var Empty = React.createClass({
render: function() {
return <div></div>;
}
});
module.exports = {
render: require('./render'),
builtInStore: require('./built-in-store'),
actionBuilder: require('./action-builder'),
clear: require('./clear'),
mountedComponents... | Change div with empty compoennt. | [clear-cartridge] Change div with empty compoennt.
| JavaScript | mit | Jerom138/focus,Jerom138/focus,Jerom138/focus,KleeGroup/focus-core | ---
+++
@@ -1,4 +1,10 @@
var dispatcher = require('../dispatcher');
+var Empty = React.createClass({
+ render: function() {
+ return <div></div>;
+ }
+});
+
module.exports = {
render: require('./render'),
builtInStore: require('./built-in-store'),
@@ -14,9 +20,12 @@
},
clearCartridge(){
dispat... |
aded6fe440526e31c1f2da2f4336bf53c10f4f9d | lib/index.js | lib/index.js | 'use strict'
/* eslint-disable no-param-reassign */
// Replace absolute file paths with <PROJECT_ROOT>
const cwd = process.cwd()
/*::
type Val = string | Object
*/
module.exports = {
print (val/* : Val */, serialize/* : Function */) {
if (isPath(val)) {
val = val.split(cwd).join('<PROJECT_ROOT>')
... | 'use strict'
/* eslint-disable no-param-reassign */
// Replace absolute file paths with <PROJECT_ROOT>
const cwd = process.cwd()
module.exports = {
print (val, serialize) {
if (isPath(val)) {
val = val.split(cwd).join('<PROJECT_ROOT>')
}
else if (val instanceof Error) {
val.message = v... | Remove all flowtypes for now | Remove all flowtypes for now
| JavaScript | apache-2.0 | tribou/jest-serializer-path | ---
+++
@@ -6,12 +6,8 @@
const cwd = process.cwd()
-/*::
-type Val = string | Object
- */
-
module.exports = {
- print (val/* : Val */, serialize/* : Function */) {
+ print (val, serialize) {
if (isPath(val)) {
@@ -40,7 +36,7 @@
return serialize(val)
},
- test (val/* : Val */) {
+ test (v... |
34ba61a4dca1c8968ca03c669dba1689a99c26ba | lib/index.js | lib/index.js | 'use strict'
function makeError (res, originalError) {
var errorMessage = res.body.message || res.body.error_message || res.body.ErrorMessage
if (errorMessage) {
var error = new Error(originalError.message)
if (res.body.code) {
error.code = res.body.code
}
if (res.body.name) {
error.nam... | 'use strict'
function makeError (res, originalError) {
var errorMessage = res.body.message || res.body.error_message || res.body.ErrorMessage
if (errorMessage) {
var error = new Error(originalError.message)
if (res.body.code) {
error.code = res.body.code
}
if (res.body.name) {
error.nam... | Remove lambda expression for ES5 support | Remove lambda expression for ES5 support
| JavaScript | mit | LOKE/supertest-thenable | ---
+++
@@ -13,7 +13,9 @@
if (res.body.stack) {
error.stack = (
res.body.stack.split('\n')
- .filter(line => !/node_modules\//.test(line))
+ .filter(function (line) {
+ return !/node_modules\//.test(line)
+ })
.join('\n')
)
} else { |
99383952dc38f0e673955aa76feb210c93c665bc | src/patchers/FunctionApplicationPatcher.js | src/patchers/FunctionApplicationPatcher.js | import NodePatcher from './NodePatcher';
export default class FunctionApplicationPatcher extends NodePatcher {
constructor(node, context, editor, fn, args) {
super(node, context, editor);
this.fn = fn;
this.args = args;
fn.setRequiresExpression();
args.forEach(arg => arg.setRequiresExpression());... | import NodePatcher from './NodePatcher';
export default class FunctionApplicationPatcher extends NodePatcher {
constructor(node, context, editor, fn, args) {
super(node, context, editor);
this.fn = fn;
this.args = args;
fn.setRequiresExpression();
args.forEach(arg => arg.setRequiresExpression());... | Add basic support for inserting function call parentheses. | Add basic support for inserting function call parentheses.
| JavaScript | mit | alangpierce/decaffeinate,alangpierce/decaffeinate,eventualbuddha/decaffeinate,decaffeinate/decaffeinate,eventualbuddha/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate | ---
+++
@@ -11,7 +11,18 @@
patch() {
let { fn, args } = this;
+ let implicitCall = this.isImplicitCall();
fn.patch();
+ if (implicitCall) {
+ this.overwrite(fn.after, args[0].before, '(');
+ }
args.forEach(arg => arg.patch());
+ if (implicitCall) {
+ this.insertAfter(')');
+ ... |
3a449b052e3080c7af175012b8bfdf2e221568c3 | share/spice/rfc/rfc.js | share/spice/rfc/rfc.js | (function (env) {
"use strict";
env.ddg_spice_rfc = function(api_result) {
if (!api_result || api_result.error || api_result.message == "no results.") {
return Spice.failed('rfc');
}
Spice.add({
id: "rfc",
name: "Reference",
data: api_res... | (function (env) {
"use strict";
env.ddg_spice_rfc = function(api_result) {
if (!api_result || api_result.error || api_result.message == "no results.") {
return Spice.failed('request_for_comments');
}
Spice.add({
id: "rfc",
name: "Answer",
... | Update name property, rename id in failed function call. | Update name property, rename id in failed function call.
| JavaScript | apache-2.0 | soleo/zeroclickinfo-spice,levaly/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,deserted/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,soleo/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,whalenrp/zeroclickinf... | ---
+++
@@ -3,12 +3,12 @@
env.ddg_spice_rfc = function(api_result) {
if (!api_result || api_result.error || api_result.message == "no results.") {
- return Spice.failed('rfc');
+ return Spice.failed('request_for_comments');
}
Spice.add({
id: "rfc"... |
d15c68fbffbc7ac26e07bf034ab828c72669447f | lib/tests.js | lib/tests.js | #!/usr/bin/env node
var suite = require('suite.js');
var o = require('./object-sugar');
// test schemas
var license = o.schema('License', {
name: {type: String, unique: true}
});
var library = o.schema('Library', {
name: {type: String, required: true},
licenses: o.refs('License')
});
suite(o.get, [
], {... | #!/usr/bin/env node
var suite = require('suite.js');
var o = require('./object-sugar');
suite(o.get, [
], {async: true});
(function() {
var li = license();
suite(o.create, [
[li, {name: 'foobar'}], {name: 'foobar'},
[li, {name: 'foobar'}], {error: 'name was not unique!'}, // XXX: trig err!
... | Make test dbs not persistent | Make test dbs not persistent
| JavaScript | mit | sugarjs/object-sugar | ---
+++
@@ -1,26 +1,20 @@
#!/usr/bin/env node
var suite = require('suite.js');
var o = require('./object-sugar');
-
-// test schemas
-var license = o.schema('License', {
- name: {type: String, unique: true}
-});
-
-var library = o.schema('Library', {
- name: {type: String, required: true},
- licenses: o.r... |
e30d9f0b4ea028f0a93177500a490d99cc15cd26 | lib/types.js | lib/types.js | 'use babel'
/* @flow */
import type {Point, TextEditorMarker, TextEditor, Range} from 'atom'
export type Provider = {
grammarScopes: Array<string>,
getDeclarations: ((params: {textEditor: TextEditor, visibleRange: Range}) => Array<Declaration>)
}
export type Declaration = {
range: Range,
source: {
fileP... | 'use babel'
/* @flow */
import type {Point, TextEditorMarker, TextEditor, Range} from 'atom'
export type Provider = {
grammarScopes: Array<string>,
getDeclarations: ((params: {textEditor: TextEditor, visibleRange: Range}) => Array<Declaration>)
}
export type Declaration = {
range: Range,
source: Declaration... | Add new type to flow | :new: Add new type to flow
| JavaScript | mit | steelbrain/declarations | ---
+++
@@ -11,10 +11,12 @@
export type Declaration = {
range: Range,
- source: {
- filePath: string,
- position: Point
- }
+ source: Declaration$Source | (() => Promise<Declaration$Source>)
+}
+
+export type Declaration$Source = {
+ filePath: string,
+ position: Point
}
export type Intention$Hig... |
5b08e397562e9a56d3142e145057a930860b4f6a | generators/app/index.js | generators/app/index.js | 'use strict';
var yeoman = require( 'yeoman-generator' ),
yosay = require( 'yosay' );
var DashGenerator = yeoman.generators.Base.extend( {
initializing: function() {
this.pkg = require( '../../package.json' );
},
prompting: function() {
var done = this.async();
// Have Yeo... | 'use strict';
var yeoman = require( 'yeoman-generator' ),
yosay = require( 'yosay' );
var DashGenerator = yeoman.generators.Base.extend( {
initializing: function() {
this.pkg = require( '../../package.json' );
},
prompting: function() {
var done = this.async();
// Have Yeo... | Fix copying files that don't exist | Fix copying files that don't exist
| JavaScript | mit | Circular-Studios/generator-dash | ---
+++
@@ -40,8 +40,6 @@
},
projectfiles: function() {
- this.src.copy( 'editorconfig', '.editorconfig');
- this.src.copy( 'jshintrc', '.jshintrc');
}
},
|
ac9a1dd651b5d590e2633a140ca6aa53e1a7d9e8 | src/search/search-index/tag-suggestions.js | src/search/search-index/tag-suggestions.js | import index from './'
import { keyGen, removeKeyType } from './util'
/**
* @param {string} [query=''] Plaintext query string to match against start of tag names.
* eg. 'wo' would match 'work', 'women' (assuming both these tags exist).
* @param {number} [limit=10] Max number of suggestions to return.
* @returns {... | import index from './'
import { keyGen, removeKeyType } from './util'
/**
* @param {string} [query=''] Plaintext query string to match against start of tag names.
* eg. 'wo' would match 'work', 'women' (assuming both these tags exist).
* @param {number} [limit=10] Max number of suggestions to return.
* @returns {... | Update suggest + fetch tags methods to return arrays | Update suggest + fetch tags methods to return arrays
- prev was using `Set` but it cannot be simply serialized to a primitive to send over the web ext interscript messaging API
| JavaScript | mit | WorldBrain/WebMemex,WorldBrain/WebMemex | ---
+++
@@ -5,11 +5,11 @@
* @param {string} [query=''] Plaintext query string to match against start of tag names.
* eg. 'wo' would match 'work', 'women' (assuming both these tags exist).
* @param {number} [limit=10] Max number of suggestions to return.
- * @returns {Promise<Set<string>>} Resolves to a Set of ... |
d142757dfdccd5480f28b1938009e80133c6cc68 | src/strategies/direction/nativeStrategy.js | src/strategies/direction/nativeStrategy.js | function nativeStrategy(data) {
const { origin, destination, mode } = data;
let originLocation;
let destinationLocation;
if (typeof origin === 'object' && origin.lat && origin.lng) {
originLocation = new google.maps.LatLng(origin);
} else {
originLocation = origin;
}
if (typeof destination === ... | function nativeStrategy(data) {
const { origin, destination, mode } = data;
let originLocation;
let destinationLocation;
if (typeof origin === 'object' && origin.lat && origin.lng) {
originLocation = new google.maps.LatLng(origin);
} else {
originLocation = origin;
}
if (typeof destination === ... | Fix native strategy resolution path | Fix native strategy resolution path
| JavaScript | mit | bondz/react-static-google-map | ---
+++
@@ -22,11 +22,11 @@
{
origin: originLocation,
destination: destinationLocation,
- travelMode: mode,
+ travelMode: mode.toUpperCase(),
},
(result, status) => {
if (status === google.maps.DirectionsStatus.OK) {
- resolve(result.routes[0].ove... |
7c01fd5c5e3c174d7d5f3eee599603d3295c27e8 | src/js/modules/courselist.js | src/js/modules/courselist.js | this.mmooc=this.mmooc||{};
this.mmooc.courseList = function() {
return {
listCourses: function(parentId) {
mmooc.api.getEnrolledCourses(function(courses) {
var html = mmooc.util.renderTemplateWithData("courselist", {courses: courses});
document.getElementById(pa... | this.mmooc=this.mmooc||{};
this.mmooc.courseList = function() {
return {
listCourses: function(parentId) {
mmooc.api.getEnrolledCourses(function(courses) {
var html = mmooc.util.renderTemplateWithData("courselist", {courses: courses});
document.getElementById(pa... | Use $.ajaxSuccess to show "add new course" button | Use $.ajaxSuccess to show "add new course" button
| JavaScript | mit | matematikk-mooc/frontend,matematikk-mooc/frontend | ---
+++
@@ -10,10 +10,12 @@
});
},
showAddCourseButton : function() {
- var button = $('#start_new_course');
- if (button.size() > 0) {
- $('#content').append(button);
- }
+ $(document).ajaxSuccess(function () {
+ ... |
fb3fbe1df40744ac42dfb79ad6117dce48322fc7 | tools/run-test.js | tools/run-test.js | const path = require("path");
const rootDir = path.normalize(path.join(__dirname, ".."));
const tester = path.join(rootDir, "node_modules", "vscode", "bin", "test");
const cp = require("child_process");
let tests = process.argv.slice(2);
let failed = 0;
tests.forEach((test) => {
let [ testName, wsName ] = test.spl... | const path = require("path");
const rootDir = path.normalize(path.join(__dirname, ".."));
const tester = path.join(rootDir, "node_modules", "vscode", "bin", "test");
const cp = require("child_process");
let tests = process.argv.slice(2);
let failed = 0;
tests.forEach((test) => {
let [ testName, wsName ] = test.spl... | Fix env for test runner | Fix env for test runner
| JavaScript | mit | kimushu/rubic-vscode,kimushu/rubic-vscode,kimushu/rubic-vscode,kimushu/rubic-vscode | ---
+++
@@ -15,16 +15,11 @@
console.log("#".repeat(100));
console.log(`# [${test}] Started at ${new Date().toString()}`);
console.log("");
- let cmd = (process.platform === "win32") ? "node" : "env";
- let args = [tester];
- if (process.platform !== "win32") {
- args.unshift("node");
- ... |
9e7bcadbb2c522d394f73b762dd986f9c4a5b3c1 | simpleshelfmobile/_attachments/code/couchutils.js | simpleshelfmobile/_attachments/code/couchutils.js | /**
* Utilities for accessing CouchDB.
*/
define([
"jquery"
], function($) {
var couchUtils = {
/**
* Login to CouchDB
* @return Promise
*/
login: function(userName, password, urlPrefix) {
// $.Deferred callbacks: done, fail, always
return $.a... | /**
* Utilities for accessing CouchDB.
*/
define([
"jquery",
"settings"
], function($, appSettings) {
var couchUtils = {
/**
* Determine if current session is active.
* @return Promise
**/
isLoggedIn: function() {
var dfrd = $.Deferred();
... | Add login check, use appSetting model | Add login check, use appSetting model
| JavaScript | agpl-3.0 | tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf | ---
+++
@@ -2,18 +2,44 @@
* Utilities for accessing CouchDB.
*/
define([
- "jquery"
-], function($) {
+ "jquery",
+ "settings"
+], function($, appSettings) {
var couchUtils = {
+
+ /**
+ * Determine if current session is active.
+ * @return Promise
+ **/
+ isLo... |
74463bb0f1dc606ce8856db350ea88a6cf7840c4 | scripts/externals/mpv/libs.js | scripts/externals/mpv/libs.js | const { copyFileSync, existsSync } = require('fs')
const { join } = require('path')
const IS_LINUX = !['win32', 'darwin'].includes(process.platform)
const baseDir = ({
'darwin': '/usr/local/lib',
'win32': 'C:\\Windows\\system32'
}[process.platform])
const libFilename = ({
'darwin': 'libmpv.1.dylib',
'win32':... | const { copyFileSync, existsSync } = require('fs')
const { join } = require('path')
const IS_LINUX = !['win32', 'darwin'].includes(process.platform)
if (!IS_LINUX) {
const baseDir = ({
'darwin': '/usr/local/lib',
'win32': 'C:\\Windows\\system32'
}[process.platform])
const libFilename = ({
'darwin':... | Fix lib import for linux platforms | Fix lib import for linux platforms
| JavaScript | mit | Kylart/KawAnime,Kylart/KawAnime,Kylart/KawAnime | ---
+++
@@ -3,27 +3,27 @@
const IS_LINUX = !['win32', 'darwin'].includes(process.platform)
-const baseDir = ({
- 'darwin': '/usr/local/lib',
- 'win32': 'C:\\Windows\\system32'
-}[process.platform])
+if (!IS_LINUX) {
+ const baseDir = ({
+ 'darwin': '/usr/local/lib',
+ 'win32': 'C:\\Windows\\system32'
+ ... |
2209db752bea8f0989134b1bb5a107f52d2282b4 | src/plugins/cache/index.js | src/plugins/cache/index.js | import {curry, values} from 'ladda-fp';
import {createCache} from './cache';
import {decorateCreate} from './operations/create';
import {decorateRead} from './operations/read';
import {decorateUpdate} from './operations/update';
import {decorateDelete} from './operations/delete';
import {decorateNoOperation} from './op... | import {curry, values} from 'ladda-fp';
import {createCache} from './cache';
import {decorateCreate} from './operations/create';
import {decorateRead} from './operations/read';
import {decorateUpdate} from './operations/update';
import {decorateDelete} from './operations/delete';
import {decorateNoOperation} from './op... | Normalize fn name for change objects | Normalize fn name for change objects
| JavaScript | mit | petercrona/ladda,petercrona/ladda,ladda-js/ladda | ---
+++
@@ -14,11 +14,13 @@
NO_OPERATION: decorateNoOperation
};
+const normalizeFnName = (fnName) => fnName.replace(/^bound /, '');
+
const notify = curry((onChange, entity, fn, changeType, args, payload) => {
onChange({
type: changeType,
entity: entity.name,
- apiFn: fn.name,
+ apiFn: norm... |
92b970377d8089486a929a06ba0085fe60aaca5f | src/libs/mapbox-rtl.js | src/libs/mapbox-rtl.js | import MapboxGl from 'mapbox-gl'
// Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX.
const data = require("raw-loader?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js");
const blob = new window.Blob([data]);
const objectUrl = window.URL.createObjectURL(blob... | import MapboxGl from 'mapbox-gl'
// Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX.
const data = require("raw-loader?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js");
const blob = new window.Blob([data], {
type: "text/javascript"
});
const objectUrl = ... | Set MIME type for RTL blob | Set MIME type for RTL blob | JavaScript | mit | maputnik/editor,maputnik/editor | ---
+++
@@ -3,9 +3,9 @@
// Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX.
const data = require("raw-loader?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js");
-const blob = new window.Blob([data]);
-const objectUrl = window.URL.createObjectURL(blob, {... |
3bb6bc2c1bf444770bf1b01ee93e27b85589d4de | chrome/common/extensions/docs/examples/extensions/benchmark/script.js | chrome/common/extensions/docs/examples/extensions/benchmark/script.js | // The port for communicating back to the extension.
var benchmarkExtensionPort = chrome.extension.connect();
// The url is what this page is known to the benchmark as.
// The benchmark uses this id to differentiate the benchmark's
// results from random pages being browsed.
// TODO(mbelshe): If the page redirects, t... | // The port for communicating back to the extension.
var benchmarkExtensionPort = chrome.extension.connect();
// The url is what this page is known to the benchmark as.
// The benchmark uses this id to differentiate the benchmark's
// results from random pages being browsed.
// TODO(mbelshe): If the page redirects, t... | Update the benchmark to use the document.readyState to measure page-completedness rather than the onload event. Extensions were moved from the pre-onload state to running at document idle some time ago. | Update the benchmark to use the document.readyState to measure page-completedness
rather than the onload event. Extensions were moved from the pre-onload state
to running at document idle some time ago.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/397013
git-svn-id: de016e52bd170d2d4f2344f9bf92d504... | JavaScript | bsd-3-clause | yitian134/chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,yitian134/chromium,Crystalnix/house-... | ---
+++
@@ -10,8 +10,14 @@
var benchmarkExtensionUrl = window.location.toString();
function sendTimesToExtension() {
+ if (window.parent != window) {
+ return;
+ }
+
var times = window.chrome.loadTimes();
+ // If the load is not finished yet, schedule a timer to check again in a
+ // little bit.
if... |
70ce9cfe4a0192ad766eac75f6fd51d32cd43024 | server.js | server.js | 'use strict';
const WebApp = require('./services/WebApp');
const app = new WebApp();
app
.configure({
files: [
__dirname + '/config/application.js'
]
})
.bootstrap()
.launch();
module.exports = app;
| 'use strict';
const WebApp = require('./services/WebApp');
const app = new WebApp();
app
.configure({
files: [
`${__dirname}/config/application.js`,
`${__dirname}/config/application.local.js`,
],
})
.bootstrap()
.launch();
module.exports = app;
| Add support for local config overrides | Add support for local config overrides
| JavaScript | mit | release-notes/release-notes-hub,release-notes/release-notes-hub | ---
+++
@@ -1,13 +1,15 @@
'use strict';
const WebApp = require('./services/WebApp');
+
const app = new WebApp();
app
.configure({
files: [
- __dirname + '/config/application.js'
- ]
+ `${__dirname}/config/application.js`,
+ `${__dirname}/config/application.local.js`,
+ ],
})
... |
5e27c30b83bf462f152b3839646f3ffc17b2f62e | _promisify.js | _promisify.js |
var falsey = {
0: true,
false: true,
no: true,
nope: true
}
var bloob = process.env.MZ_BLUEBIRD
if (typeof Promise === 'undefined' || (bloob && !falsey[bloob])) {
// use bluebird
var promisify
try {
promisify = require('bluebird').promisify
} catch (err) {
throw new Error('please install blueb... |
var falsey = {
0: true,
false: true,
no: true,
nope: true
}
var bloob = process.env.MZ_BLUEBIRD
if (typeof Promise === 'undefined' || (bloob && !falsey[bloob])) {
// use bluebird
var promisify
try {
promisify = require('bluebird').promisify
} catch (err) {
throw new Error('please install blueb... | Optimize native promisification and support multiple arguments | Optimize native promisification and support multiple arguments
| JavaScript | mit | normalize/mz,aminuga/mz,petkaantonov/mz | ---
+++
@@ -20,22 +20,38 @@
}
} else if (typeof Promise === 'function') {
// var set = require('function-name')
- var slice = require('sliced')
+ var makeCallback = function(resolve, reject) {
+ return function(err, value) {
+ if (err) {
+ reject(err)
+ } else {
+ var len = argumen... |
e8c149607f9266b348fa519addf05f8f311f19f5 | src/sorted_unique_count.js | src/sorted_unique_count.js | 'use strict';
/**
* For a sorted input, counting the number of unique values
* is possible in constant time and constant memory. This is
* a simple implementation of the algorithm.
*
* Values are compared with `===`, so objects and non-primitive objects
* are not handled in any special way.
*
* @param {Array} ... | 'use strict';
/**
* For a sorted input, counting the number of unique values
* is possible in constant time and constant memory. This is
* a simple implementation of the algorithm.
*
* Values are compared with `===`, so objects and non-primitive objects
* are not handled in any special way.
*
* @param {Array} ... | Fix code style of sorted unique count. | Fix code style of sorted unique count.
| JavaScript | isc | simple-statistics/simple-statistics,GerHobbelt/simple-statistics,simple-statistics/simple-statistics,llimllib/simple-statistics,simple-statistics/simple-statistics,tmcw/simple-statistics | ---
+++
@@ -15,15 +15,15 @@
* sortedUniqueCount([1, 1, 1]); // 1
*/
function sortedUniqueCount(input) {
- var uniqueValueCount = 0,
- lastSeenValue;
- for (var i = 0; i < input.length; i++) {
- if (i === 0 || input[i] !== lastSeenValue) {
- lastSeenValue = input[i];
- uniqueValueCount++;
+ v... |
497be86d19253138425577534f68acd76143b275 | authWindow.js | authWindow.js | const electron = require('electron');
const BrowserWindow = electron.BrowserWindow;
const ipcMain = electron.ipcMain;
module.exports = { createAuthWindow: function(mainWindow, loginCallback) {
var loginWindow = new BrowserWindow({
frame: false,
height: 250,
modal: true,
parent: mainWindow,
movabl... | const electron = require('electron');
const BrowserWindow = electron.BrowserWindow;
const ipcMain = electron.ipcMain;
module.exports = { createAuthWindow: function(mainWindow, loginCallback) {
var loginWindow = new BrowserWindow({
frame: false,
height: 250,
modal: true,
parent: mainWindow,
movabl... | Fix electron behaviour when cancelling http basic auth | Fix electron behaviour when cancelling http basic auth
| JavaScript | mit | bobar/tdfb,bobar/tdfb,bobar/tdfb,bobar/tdfb | ---
+++
@@ -20,10 +20,8 @@
loginWindow.webContents.executeJavaScript('\
var ipcRenderer = require("electron").ipcRenderer;\
const form = document.getElementById("login-form");\
- console.log(form);\
document.getElementById("trigramme").focus();\
form.addEventListener("s... |
a30e8e8d64c242fd699dadd1de970d0024edcbd4 | config/initializers/sequelize.js | config/initializers/sequelize.js | Sequelize = require('sequelize')
dbConfig = require('../database.json')['staging']
pg = require('pg').native;
var db;
if (process.env.POSTGRES_URL) {
var match = process.env.POSTGRES_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/);
var db = new Sequelize(match[5], match[1], match[2], {
dialect: ... | Sequelize = require('sequelize')
dbConfig = require('../database.json')['staging']
pg = require('pg').native;
var db;
if (process.env.DATABASE_URL) {
var match = process.env.DATABASE_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/);
var db = new Sequelize(match[5], match[1], match[2], {
dialect: ... | Use DATABASE_URL instead of POSTGRES_URL | [CHORE] Use DATABASE_URL instead of POSTGRES_URL
| JavaScript | isc | crazyquark/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd,whotooktwarden/gatewayd | ---
+++
@@ -4,8 +4,8 @@
var db;
-if (process.env.POSTGRES_URL) {
- var match = process.env.POSTGRES_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/);
+if (process.env.DATABASE_URL) {
+ var match = process.env.DATABASE_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/);
var db = new S... |
47d9342ea808373ba8cd410e39a1e1d5f7e088b5 | cli/lib/validate.js | cli/lib/validate.js | 'use strict';
var validate = exports;
var validator = require('validator');
validate.name = function(input) {
/**
* TODO: Change js validation for json schema
*/
var error = 'Please provide your full name';
return input.length < 3 || input.length > 64? error : true;
};
validate.email = function(input) {... | 'use strict';
var validate = exports;
var validator = require('validator');
validate.name = function(input) {
/**
* TODO: Change js validation for json schema
* https://github.com/arigatomachine/cli/issues/134
*/
var error = 'Please provide your full name';
return input.length < 3 || input.length > 64... | Document TODO for JSON schema | Document TODO for JSON schema
| JavaScript | bsd-3-clause | luizbranco/torus-cli,manifoldco/torus-cli,luizbranco/torus-cli,manifoldco/torus-cli,luizbranco/torus-cli,manifoldco/torus-cli | ---
+++
@@ -7,6 +7,7 @@
validate.name = function(input) {
/**
* TODO: Change js validation for json schema
+ * https://github.com/arigatomachine/cli/issues/134
*/
var error = 'Please provide your full name';
return input.length < 3 || input.length > 64? error : true; |
65f772caa5aa0350ae0456e8bc2f447db1f21921 | packages/internal-test-helpers/tests/index-test.js | packages/internal-test-helpers/tests/index-test.js | QUnit.module('internal-test-helpers');
QUnit.test('module present', function(assert) {
assert.ok(true, 'each package needs at least one test to be able to run through `npm test`');
});
| import { moduleFor, AbstractTestCase } from 'internal-test-helpers';
moduleFor('internal-test-helpers', class extends AbstractTestCase {
['@test module present'](assert) {
assert.ok(true, 'each package needs at least one test to be able to run through `npm test`');
}
});
| Convert internal-test-helpers to new test style | [CLEANUP] Convert internal-test-helpers to new test style
| JavaScript | mit | fpauser/ember.js,tildeio/ember.js,jaswilli/ember.js,asakusuma/ember.js,emberjs/ember.js,karthiick/ember.js,qaiken/ember.js,jaswilli/ember.js,xiujunma/ember.js,givanse/ember.js,Turbo87/ember.js,Gaurav0/ember.js,kellyselden/ember.js,givanse/ember.js,intercom/ember.js,jaswilli/ember.js,asakusuma/ember.js,miguelcobain/embe... | ---
+++
@@ -1,5 +1,8 @@
-QUnit.module('internal-test-helpers');
+import { moduleFor, AbstractTestCase } from 'internal-test-helpers';
-QUnit.test('module present', function(assert) {
- assert.ok(true, 'each package needs at least one test to be able to run through `npm test`');
+moduleFor('internal-test-helpers', ... |
2ad65976d5fbbea38e74004b4836c97d13394993 | web/js/profile.js | web/js/profile.js | /**
* Created by nkmathew on 05/07/2016.
*/
$(document).ready(function () {
$("#profile-form").submit(function (e) {
$("#btn-submit-profile").spin(BIG_SPINNER);
var url = '/site/profile';
$.ajax({
type: 'POST',
url: url,
data: $("#profile-for... | /**
* Created by nkmathew on 05/07/2016.
*/
$(document).ready(function () {
$("#profile-form").submit(function (e) {
$("#btn-submit-profile").spin(BIG_SPINNER);
var url = '/site/profile';
$.ajax({
type: 'POST',
url: url,
data: $("#profile-for... | Add button for jumping to todays date | Add button for jumping to todays date
| JavaScript | bsd-3-clause | nkmathew/intern-portal,nkmathew/intern-portal | ---
+++
@@ -37,6 +37,7 @@
todayHighlight: true,
endDate: '0',
toggleActive: true,
- orientation: 'auto'
+ orientation: 'auto',
+ todayBtn: true,
});
}); |
69aed72d668bbe18883ce511a4b359c268c9c582 | src/commands/commands.js | src/commands/commands.js | 'use strict';
// This is a very simple interface
// Used to fire up gulp task in your local project
var runner = require('../utils/runner'),
cb = require('../utils/callback'),
argv = require('minimist')(process.argv.slice(2));
var commands = function(options) {
var command = argv._[0] || options.parent.rawA... | 'use strict';
// This is a very simple interface
// Used to fire up gulp task in your local project
var runner = require('../utils/runner'),
cb = require('../utils/callback'),
argv = require('minimist')(process.argv.slice(2));
var commands = function(options) {
var command = argv._[0] || options.parent.rawA... | Adjust switch for accept alias to serve and build. | Adjust switch for accept alias to serve and build.
| JavaScript | mit | mattma/ember-rocks,mattma/ember-rocks,mattma/ember-rocks | ---
+++
@@ -8,11 +8,11 @@
var commands = function(options) {
var command = argv._[0] || options.parent.rawArgs[2];
- switch( command ) {
- case 'serve':
+ switch( true ) {
+ case /s|serve/.test(command):
runner(cb, 'serve');
break;
- case 'build':
+ case /b|build/.test(command):
... |
954fd1c7892d72ce9148a49554f49c8a554d5abe | app/config.js | app/config.js | // Use this file to change prototype configuration.
// Note: prototype config can be overridden using environment variables (eg on heroku)
module.exports = {
// Service name used in header. Eg: 'Renew your passport'
serviceName: " ",
// Default port that prototype runs on
port: '3000',
// Enable or disab... | // Use this file to change prototype configuration.
// Note: prototype config can be overridden using environment variables (eg on heroku)
module.exports = {
// Service name used in header. Eg: 'Renew your passport'
serviceName: " ",
// Default port that prototype runs on
port: '80',
// Enable or disable... | Change port that its running on | Change port that its running on
| JavaScript | mit | tyfairclough/das-aml-beta-ui,SkillsFundingAgency/das-alpha-ui,SkillsFundingAgency/das-alpha-ui,tyfairclough/das-aml-beta-ui,tyfairclough/das-aml-beta-ui,tyfairclough/das-aml-beta-ui,SkillsFundingAgency/das-alpha-ui,tyfairclough/das-aml-beta-ui,SkillsFundingAgency/das-alpha-ui | ---
+++
@@ -8,7 +8,7 @@
serviceName: " ",
// Default port that prototype runs on
- port: '3000',
+ port: '80',
// Enable or disable password protection on production
useAuth: 'true' |
51d3aa5289b62f4d6a602e7807ef934f4862525c | app/config.js | app/config.js | module.exports = (function () {
'use strict';
var config = {
development: {
server: {
port: 3000
},
wsapp: {
port: 3334
}
},
testing: {
server: {
port: 3001
},
wsapp: {
port: 3334
}
},
production: {
server: {
... | module.exports = (function () {
'use strict';
var config = {
development: {
server: {
port: 3000
},
wsapp: {
port: 3334
}
},
testing: {
server: {
port: 3001
},
wsapp: {
port: 3334
}
},
production: {
server: {
... | Use env port for app to listen on | Use env port for app to listen on
| JavaScript | mit | cr0cK/mockify,Gandi/mockify | ---
+++
@@ -20,7 +20,7 @@
},
production: {
server: {
- port: 8080
+ port: process.env.PORT || 8080
},
wsapp: {
port: 3334 |
46014be39155d26a1b04d14485990a0a562b4695 | src/som/vmobjects/SAbstractObject.js | src/som/vmobjects/SAbstractObject.js | 'use strict';
function SAbstractObject() {
this.toString = function () {
var clazz = getClass();
if (clazz === null) {
return "an Object(clazz==null)";
}
return "a " + clazz.getName().getString();
};
this.send = function (selectorString, args) {
var sele... | 'use strict';
function SAbstractObject() {
var _this = this;
this.toString = function () {
var clazz = _this.getClass();
if (clazz === null) {
return "an Object(clazz==null)";
}
return "a " + clazz.getName().getString();
};
this.send = function (selectorStr... | Use _this when it seems necessary | Use _this when it seems necessary
Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>
| JavaScript | mit | smarr/JsSOM,smarr/JsSOM,SOM-st/JsSOM,smarr/JsSOM,smarr/JsSOM,SOM-st/JsSOM,SOM-st/JsSOM,SOM-st/JsSOM | ---
+++
@@ -1,8 +1,10 @@
'use strict';
function SAbstractObject() {
+ var _this = this;
+
this.toString = function () {
- var clazz = getClass();
+ var clazz = _this.getClass();
if (clazz === null) {
return "an Object(clazz==null)";
}
@@ -20,16 +22,16 @@
... |
99c8d2b74710d88b465b2cdaddc97216ce6404f4 | tests/support/end2end-server.js | tests/support/end2end-server.js | let task = require('./lib/task');
if (process.platform === 'win32') {
console.log('Windows is currently not supported. Please use');
console.log(' npm run test:end2end:ldap');
console.log(' npm run test:end2end:meteor');
console.log('instead.');
process.exit(0);
}
function logTask(taskname)... | let task = require('./lib/task');
if (process.platform === 'win32') {
console.log('Windows is currently not supported. Please use');
console.log(' npm run test:end2end:ldap');
console.log(' npm run test:end2end:meteor');
console.log('instead.');
process.exit(0);
}
function logTask(taskname)... | Use correct name for array method 'forEach' | Use correct name for array method 'forEach'
| JavaScript | mit | RobNeXX/4minitz,4minitz/4minitz,Huggle77/4minitz,4minitz/4minitz,Huggle77/4minitz,4minitz/4minitz,RobNeXX/4minitz,RobNeXX/4minitz,Huggle77/4minitz | ---
+++
@@ -33,7 +33,7 @@
}
process.on('SIGINT', function () {
- tasks.each((task) => {
+ tasks.forEach((task) => {
task.kill();
});
|
8ffc94a2239933f0134cfc603d019da3a9b9a499 | tests/unit/routes/index_test.js | tests/unit/routes/index_test.js | import Index from 'appkit/routes/index';
import App from 'appkit/app';
var route;
module("Unit - IndexRoute", {
setup: function(){
route = App.__container__.lookup('route:index');
}
});
test("it exists", function(){
ok(route);
ok(route instanceof Ember.Route);
});
test("#model", function(){
deepEqual(... | import Index from 'appkit/routes/index';
import App from 'appkit/app';
var route;
module("Unit - IndexRoute", {
setup: function(){
route = routeFor('index');
}
});
test("it exists", function(){
ok(route);
ok(route instanceof Ember.Route);
});
test("#model", function(){
deepEqual(route.model(), ['red',... | Refactor to use new test helper | Refactor to use new test helper
| JavaScript | mit | dierbro/ember-invoice | ---
+++
@@ -5,7 +5,7 @@
module("Unit - IndexRoute", {
setup: function(){
- route = App.__container__.lookup('route:index');
+ route = routeFor('index');
}
});
|
5cd19bdea12501dc8a2a8cf8255f132f2794046d | src/gulpfile.js | src/gulpfile.js | var elixir = require('laravel-elixir');
elixir(function(mix) {
mix.copy(
'node_modules/bootstrap/dist/fonts',
'public/build/fonts'
);
mix.copy(
'node_modules/font-awesome/fonts',
'public/build/fonts'
);
mix.copy(
'node_modules/ionicons/dist/fonts',
... | var elixir = require('laravel-elixir');
elixir(function(mix) {
mix.copy(
'node_modules/bootstrap/dist/fonts',
'public/build/fonts'
);
mix.copy(
'node_modules/font-awesome/fonts',
'public/build/fonts'
);
mix.copy(
'node_modules/ionicons/dist/fonts',
... | Fix invalid path for Bootstrap js file | Fix invalid path for Bootstrap js file
| JavaScript | mit | syahzul/admin-theme | ---
+++
@@ -19,7 +19,7 @@
mix.scripts([
'../../../node_modules/jquery/dist/jquery.min.js',
- '../../../node_modules/bootstrap/dist/js/bootstrap.min.js'
+ '../../../vendor/twbs/bootstrap/dist/js/bootstrap.min.js'
], 'public/js/vendor.js');
mix.scripts([ |
57dd338eb6a7013eaace069ad8a5886ae16db57b | app/assets/javascripts/analytics/_register.js | app/assets/javascripts/analytics/_register.js | (function (root) {
"use strict";
root.GOVUK.GDM = root.GOVUK.GDM || {};
root.GOVUK.GDM.analytics = {
'register': function () {
GOVUK.Analytics.load();
var cookieDomain = (root.document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : root.document.domai... | (function (root) {
"use strict";
root.GOVUK.GDM = root.GOVUK.GDM || {};
root.GOVUK.GDM.analytics = {
'register': function () {
GOVUK.Analytics.load();
var cookieDomain = (root.document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : root.document.domai... | Fix analytics wrapper for window.location.href | Fix analytics wrapper for window.location.href
| JavaScript | mit | alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend | ---
+++
@@ -14,7 +14,7 @@
},
'location': {
'href': function () {
- return root.location.search;
+ return root.location.href;
},
'pathname': function () {
return root.location.pathname; |
8c36e50421438506ef24e5566761ebb30ec849fa | packages/ember-template-compiler/tests/system/compile_options_test.js | packages/ember-template-compiler/tests/system/compile_options_test.js | import { defaultCompileOptions } from 'ember-template-compiler';
import TransformOldBindingSyntax from 'ember-template-compiler/plugins/transform-old-binding-syntax';
import TransformItemClass from 'ember-template-compiler/plugins/transform-item-class';
import TransformAngleBracketComponents from 'ember-template-compil... | import { defaultCompileOptions } from 'ember-template-compiler';
import defaultPlugins from 'ember-template-compiler/plugins';
QUnit.module('ember-template-compiler: default compile options');
QUnit.test('default options are a new copy', function() {
notEqual(defaultCompileOptions(), defaultCompileOptions());
});
... | Fix tests confirming default plugins are included in compileOptions. | Fix tests confirming default plugins are included in compileOptions.
| JavaScript | mit | jherdman/ember.js,intercom/ember.js,mfeckie/ember.js,HeroicEric/ember.js,miguelcobain/ember.js,cibernox/ember.js,amk221/ember.js,emberjs/ember.js,code0100fun/ember.js,cbou/ember.js,nickiaconis/ember.js,xiujunma/ember.js,stefanpenner/ember.js,tsing80/ember.js,chadhietala/ember.js,kaeufl/ember.js,sandstrom/ember.js,inter... | ---
+++
@@ -1,11 +1,5 @@
import { defaultCompileOptions } from 'ember-template-compiler';
-import TransformOldBindingSyntax from 'ember-template-compiler/plugins/transform-old-binding-syntax';
-import TransformItemClass from 'ember-template-compiler/plugins/transform-item-class';
-import TransformAngleBracketCompone... |
4640bab0430674787ed3d6ad613c9525925dbfbf | bindings/pyroot/ROOTaaS/html/static/js/custom.js | bindings/pyroot/ROOTaaS/html/static/js/custom.js | /* ROOTaaS JS */
// Make sure Clike JS lexer is loaded, then configure syntax highlighting for %%cpp and %%dcl magics
require(['codemirror/mode/clike/clike', 'base/js/namespace', 'notebook/js/codecell'], function(Clike, IPython, CodeCell) {
IPython.CodeCell.config_defaults.highlight_modes['magic_text/x-c++src'] = ... | /* ROOTaaS JS */
highlight_cells = function(IPython, mime) {
IPython.CodeCell.options_default.cm_config.mode = mime;
var cells = IPython.notebook.get_cells();
for (i = 0; i < cells.length; i++) {
var cell = cells[i];
if (cell.cell_type == "code") {
cell.code_mirror.setOption('mo... | Configure C++ syntax highlighting for ROOT prompt notebooks | Configure C++ syntax highlighting for ROOT prompt notebooks
| JavaScript | lgpl-2.1 | mkret2/root,veprbl/root,BerserkerTroll/root,gganis/root,CristinaCristescu/root,sbinet/cxx-root,bbockelm/root,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,beniz/root,beniz/root,thomaskeck/root,BerserkerTroll/root,esakellari/root,arch1tect0r/root,Y--/root,lgiommi/root,simonpf/root,veprbl/root,sirinath/root,agarciamo... | ---
+++
@@ -1,7 +1,36 @@
/* ROOTaaS JS */
-// Make sure Clike JS lexer is loaded, then configure syntax highlighting for %%cpp and %%dcl magics
-require(['codemirror/mode/clike/clike', 'base/js/namespace', 'notebook/js/codecell'], function(Clike, IPython, CodeCell) {
- IPython.CodeCell.config_defaults.highlight... |
738918c2cf2eb9d3d4f88798a6e57a200985abaf | webpack.config.js | webpack.config.js | var webpack = require('webpack'),
path = require('path'),
yargs = require('yargs');
var libraryName = 'hdrhistogram',
plugins = [],
outputFile;
if (yargs.argv.p) {
//plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true }));
outputFile = libraryName + '.min.js';
} else {
outputFile =... | var webpack = require('webpack'),
path = require('path'),
yargs = require('yargs');
var libraryName = 'hdrhistogram',
plugins = [],
outputFile;
if (yargs.argv.p) {
plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true }));
outputFile = libraryName + '.min.js';
} else {
outputFile = l... | Add pako as a webpack external dependency | Add pako as a webpack external dependency
| JavaScript | bsd-2-clause | alexvictoor/HdrHistogramJS,HdrHistogram/HdrHistogramJS,HdrHistogram/HdrHistogramJS,HdrHistogram/HdrHistogramJS,alexvictoor/HdrHistogramJS | ---
+++
@@ -7,7 +7,7 @@
outputFile;
if (yargs.argv.p) {
- //plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true }));
+ plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true }));
outputFile = libraryName + '.min.js';
} else {
outputFile = libraryName + '.js';
@@ -34,6 +34,13 ... |
1f727966e6416ca11789722552f52ee27297c2ab | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp'),
run = require('gulp-run'),
del = require('del'),
scrollrack = require('scroll-rack');
// Config
var path = {
files: 'docs/',
dest: 'build'
}
/**
* Clean up project.
*/
gulp.task('clean', function ( done ) {
del([
path.dest
], done);
}... | 'use strict';
var gulp = require('gulp'),
run = require('gulp-run'),
del = require('del'),
scrollrack = require('scroll-rack');
// Config
var path = {
files: 'docs/',
dest: 'build'
}
/**
* Clean up project.
*/
gulp.task('clean', function ( done ) {
del([
path.dest
], done);
}... | Remove build as dependency from release task. | chore(gulp): Remove build as dependency from release task.
| JavaScript | mit | sebald/guidelines,sebald/guidelines | ---
+++
@@ -43,7 +43,7 @@
/**
* Generate Github Pages
*/
-gulp.task('release', ['build'], function ( done ) {
+gulp.task('release', function ( done ) {
run('git subtree push --prefix ' + path.dest + ' origin gh-pages')
.exec(done);
}); |
48017f9a9135b16b47a0404dab9d4e30c19ef4e1 | gulpfile.js | gulpfile.js | 'use strict';
const gulp = require('gulp');
const tools = require('./src');
const unmockedModulePathPatterns = [
'node_modules/.*',
'utils/helper-tests.js'
];
tools.setGlobalConfiguration(defaults => {
defaults.sourceFiles = defaults.sourceFiles.concat(// eslint-disable-line no-param-reassign
'!**/dist/**'... | 'use strict';
const gulp = require('gulp');
const tools = require('./src');
const unmockedModulePathPatterns = [
'node_modules/.*',
'utils/helper-tests.js'
];
tools.setGlobalConfiguration(defaults => {
defaults.sourceFiles = defaults.sourceFiles.concat(// eslint-disable-line no-param-reassign
'!**/dist/**'... | Increase timeout for mocha tests | Increase timeout for mocha tests
| JavaScript | mit | urbanjs/urbanjs-tools,urbanjs/urbanjs-tools,urbanjs/tools,urbanjs/tools,urbanjs/tools,urbanjs/urbanjs-tools | ---
+++
@@ -47,7 +47,9 @@
jsdoc: true,
- mocha: true,
+ mocha: {
+ timeout: 5000
+ },
nsp: true,
|
a30c0038343c6ccdfbe78c7e31e787b701b02e0c | gulpfile.js | gulpfile.js |
const gulp = require('gulp');
const jasmineNode = require('gulp-jasmine-node');
const livereload = require('gulp-livereload');
// Loads Jasmine Browser
gulp.task('test', () => gulp.src('jasmine/spec/*_spec.js').pipe(jasmineNode()));
// Loads Jasmine Browser
gulp.task('browser', () => gulp.src('index.html').pipe(live... | /* jshint esversion: 6 */
const gulp = require('gulp');
const jasmineNode = require('gulp-jasmine-node');
const livereload = require('gulp-livereload');
// Loads Jasmine Browser
gulp.task('test', () => gulp.src('jasmine/spec/*_spec.js').pipe(jasmineNode()));
// Loads Jasmine Browser
gulp.task('browser', () => gul... | Add jshint esverion: 6 comment | Add jshint esverion: 6 comment
| JavaScript | mit | andela-wmaina/inverted-index,andela-wmaina/inverted-index | ---
+++
@@ -1,4 +1,5 @@
-
+ /* jshint esversion: 6 */
+
const gulp = require('gulp');
const jasmineNode = require('gulp-jasmine-node');
const livereload = require('gulp-livereload'); |
30f768e24be58b83fed22847bc255dd3aaf68add | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var path = require('path');
var metal = require('gulp-metal');
var runSequence = require('run-sequence');
var codeFileGlobs = [
'src/**/*.js',
'test/**/*.js',
'gulpfile.js',
'!test/**/assets/**/*.js'
];
metal.registerTasks({
corePathFromSoy: function(file) {
return pa... | 'use strict';
var gulp = require('gulp');
var path = require('path');
var metal = require('gulp-metal');
var runSequence = require('run-sequence');
var codeFileGlobs = [
'src/**/*.js',
'test/**/*.js',
'gulpfile.js',
'!test/**/assets/**/*.js'
];
metal.registerTasks({
corePathFromSoy: function(file) {
return pa... | Redefine build:all:js task to skip jquery builds | Redefine build:all:js task to skip jquery builds
| JavaScript | bsd-3-clause | travisc5/metal.js,zsagia/metal.js,travisc5/metal.js,mairatma/metal.js,zsagia/metal.js | ---
+++
@@ -28,3 +28,7 @@
soyGeneratedDest: false,
soySrc: ['src/**/*.soy', 'test/**/*.soy']
});
+
+gulp.task('build:all:js', function(done) {
+ runSequence(['build:globals', 'build:amd'], done);
+}); |
f8d297353f33accefde38b9100cb877ca680af49 | app/scripts/helpers/repository-data-mapper.js | app/scripts/helpers/repository-data-mapper.js | 'use babel';
import $ from 'jquery';
import CONFIG from '../constants/AppConstants';
let RepositoryDataMapper = {
parse: (data) => {
let xml = $($.parseXML(data));
return xml.find('Projects').map(function(){
let el = $(this).find('Project');
let lastBuildStatus = el.attr('lastBuildStatus');
... | 'use babel';
import $ from 'jquery';
import CONFIG from '../constants/AppConstants';
const getClassByBuildStatus = (lastBuildStatus) => {
let statusClassname = '';
switch(lastBuildStatus) {
case CONFIG.BUILD_STATUS_SUCCESS:
statusClassname = CONFIG.CARD_SUCCESS_CLASS;
break;
case CONFIG.BUILD_... | Add new classes and icons based in cctray response status | Add new classes and icons based in cctray response status
| JavaScript | mit | willmendesneto/build-checker-app,willmendesneto/build-checker-app | ---
+++
@@ -2,6 +2,41 @@
import $ from 'jquery';
import CONFIG from '../constants/AppConstants';
+
+const getClassByBuildStatus = (lastBuildStatus) => {
+ let statusClassname = '';
+ switch(lastBuildStatus) {
+ case CONFIG.BUILD_STATUS_SUCCESS:
+ statusClassname = CONFIG.CARD_SUCCESS_CLASS;
+ break... |
abc76d852c0ac8bc8e156cedea3b4a44c90e322f | htdocs/components/EG_10_Piechart.js | htdocs/components/EG_10_Piechart.js | Ensembl.Panel.Piechart.prototype.getContent = function() {
var panel = this;
var visible = [];
this.graphData = [];
this.graphConfig = {};
this.graphEls = {};
this.dimensions = eval($('input.graph_dimensions', this.el).val());
// ParaSite: sometimes the order of items in the DOM doesn't match th... | Ensembl.Panel.Piechart.prototype.init = function () {
var panel = this;
this.base();
if (typeof Raphael === 'undefined') {
$.getScript('/raphael/raphael-min.js', function () {
$.getScript('/raphael/g.raphael-min.js', function () {
$.getScript('/raphael/g.pie-modified.js', function () { panel.g... | Use modified version of raphael piechart code | Use modified version of raphael piechart code
| JavaScript | apache-2.0 | EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite | ---
+++
@@ -1,3 +1,18 @@
+Ensembl.Panel.Piechart.prototype.init = function () {
+ var panel = this;
+
+ this.base();
+
+ if (typeof Raphael === 'undefined') {
+ $.getScript('/raphael/raphael-min.js', function () {
+ $.getScript('/raphael/g.raphael-min.js', function () {
+ $.getScript('/raphael/g.pie... |
3c450f8338cc14f2ecbc1f411f45084b7bbf0b65 | webpack.config.js | webpack.config.js | module.exports = {
entry: './src/index.js',
output: {
path: './dist',
filename: 'hyperline.js'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
}
]
}
};
| module.exports = {
entry: './src/index.js',
output: {
path: './dist',
filename: 'hyperline.js',
libraryTarget: "commonjs"
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
... | Set webpack libraryTarget to commonjs | Set webpack libraryTarget to commonjs
| JavaScript | mit | Hyperline/hyperline,edoren/hyperline | ---
+++
@@ -2,7 +2,8 @@
entry: './src/index.js',
output: {
path: './dist',
- filename: 'hyperline.js'
+ filename: 'hyperline.js',
+ libraryTarget: "commonjs"
},
module: {
loaders: [ |
7d42f49e80f1abdb8917363835dd9b372f281b0b | webpack.config.js | webpack.config.js | /* eslint-env node */
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
entry: {
daypicker: './DayPicker.dist.js',
},
output: {
path: `${__dirname}/lib`,
filename: `[name]${isProduction ? '.min' : ''}.js`,
library: 'DayPicker',
libraryTarget: 'umd',
},
extern... | /* eslint-env node */
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
devtool: 'source-map',
entry: {
daypicker: './DayPicker.dist.js',
},
output: {
path: `${__dirname}/lib`,
filename: `[name]${isProduction ? '.min' : ''}.js`,
library: 'DayPicker',
libraryTar... | Add source-map to minified build | Add source-map to minified build
| JavaScript | mit | saenglert/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker | ---
+++
@@ -3,6 +3,7 @@
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
+ devtool: 'source-map',
entry: {
daypicker: './DayPicker.dist.js',
}, |
eb2caed8e729b35d4311c2e80b85b6981bb42f37 | webpack.config.js | webpack.config.js | const path = require('path');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: {
eventPage: './src/eventPage.js',
contentScript: './src/contentScript.jsx',
},
output: {
path: path.join(__dirname, '/dist'),
filename: '[name].bundle.js',
},
module: {
loaders: [
{
... | const path = require('path');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: {
eventPage: './src/eventPage.js',
contentScript: './src/contentScript.jsx',
},
output: {
path: path.join(__dirname, '/dist'),
filename: '[name].bundle.js',
},
module: {
loaders: [
{
... | Enable import of React components without .jsx suffix | Enable import of React components without .jsx suffix
| JavaScript | mit | JohnAmadeo/fb-messenger-slackmoji,JohnAmadeo/fb-messenger-slackmoji | ---
+++
@@ -22,4 +22,7 @@
},
],
},
+ resolve: {
+ extensions: ['', '.js', '.jsx'],
+ },
}; |
0ec06924f2c02763a6e21ca6b0e8e8a45644c0b7 | webpack.config.js | webpack.config.js | const path = require('path');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const CompressionPlugin = require('compression-webpack-plugin');
const config = {
entry: path.resolve(__dirname, './src/index.js'),
output: {
path: path.resolve(__dirname, './dist'),
filename: 'ap... | const path = require('path');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const config = {
entry: path.resolve(__dirname, './src/index.js'),
output: {
path: path.resolve(__dirname, './dist'),
filename: 'app.bundle.js',
},
module: {
rules: [
{... | Remove devtool in production build | Remove devtool in production build
- Reduces bundle size by 90%
| JavaScript | mit | arnav-aggarwal/react-boilerplate-setup | ---
+++
@@ -1,6 +1,5 @@
const path = require('path');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
-const CompressionPlugin = require('compression-webpack-plugin');
const config = {
entry: path.resolve(__dirname, './src/index.js'),
@@ -30,7 +29,6 @@
},
],
}... |
17305541fff8cdf2ad709f16ecb6db1dfed325ca | src/hyper-content-for.js | src/hyper-content-for.js | angular.module("hyperContentFor", [])
.value("HYPER_CONTENT_FOR_IDS", { })
.directive("hyperContent", function() {
return {
scope: { "for": "@" },
restrict: "E",
transclude: true,
controller: function($scope, $transclude, HYPER_CONTENT_FOR_IDS) {
HYPER_CONTENT_FOR_IDS[$scope[... | angular.module('hyperContentFor', [])
.value('HYPER_CONTENT_FOR_IDS', { })
.directive('hyperContent', function() {
return {
scope: { 'for': '@' },
restrict: 'E',
transclude: true,
controller: function($scope, $transclude, HYPER_CONTENT_FOR_IDS) {
HYPER_CONTENT_FOR_IDS[$scope[... | Swap out double quotes with single quotes | Swap out double quotes with single quotes
| JavaScript | mit | hyperoslo/hyper-content-for-angular,hyperoslo/hyper-content-for-angular | ---
+++
@@ -1,25 +1,25 @@
-angular.module("hyperContentFor", [])
- .value("HYPER_CONTENT_FOR_IDS", { })
+angular.module('hyperContentFor', [])
+ .value('HYPER_CONTENT_FOR_IDS', { })
- .directive("hyperContent", function() {
+ .directive('hyperContent', function() {
return {
- scope: { "for": "@" },
+ ... |
eced298af987ec1bc6e42392f80b9c6afc27e752 | slickdeals-dont-track-me.user.js | slickdeals-dont-track-me.user.js | // ==UserScript==
// @name Slickdeals Don't Track Me!
// @version 1.0
// @description Replaces outgoing Slickdeals tracking links with direct links.
// @match http://slickdeals.net/f/*
// @namespace https://github.com/gg/slickdeals-dont-track-me
// @author Gregg Gajic <https://github.com/gg>
// @licen... | // ==UserScript==
// @name Slickdeals Don't Track Me!
// @version 1.1
// @description Replaces outgoing Slickdeals tracking links with direct links.
// @match http://slickdeals.net/f/*
// @namespace https://github.com/gg/slickdeals-dont-track-me
// @author Gregg Gajic <https://github.com/gg>
// @licen... | Add support for forum thread view | Add support for forum thread view | JavaScript | mit | gg/slickdeals-dont-track-me | ---
+++
@@ -1,6 +1,6 @@
// ==UserScript==
// @name Slickdeals Don't Track Me!
-// @version 1.0
+// @version 1.1
// @description Replaces outgoing Slickdeals tracking links with direct links.
// @match http://slickdeals.net/f/*
// @namespace https://github.com/gg/slickdeals-dont-track-me
@@ -26,... |
17ab6c096163fffce68104d107a3e5abc868e414 | static/script/debug.js | static/script/debug.js | var Debug = {
init: function() {
$( '.enable-profiling' ).click( function() {
return toggleProfiling.bind( this )( true );
} );
$( '.disable-profiling' ).click( function() {
return toggleProfiling.bind( this )( false );
} );
function toggleProfiling( ... | var Debug = {
ready: function() {
$( '.enable-profiling' ).click( function() {
return toggleProfiling.bind( this )( true );
} );
$( '.disable-profiling' ).click( function() {
return toggleProfiling.bind( this )( false );
} );
function toggleProfiling(... | Rename Debug.init JS function to Debug.ready for consistency with other modules | Rename Debug.init JS function to Debug.ready for consistency with other modules
| JavaScript | mit | dionyziz/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes | ---
+++
@@ -1,5 +1,5 @@
var Debug = {
- init: function() {
+ ready: function() {
$( '.enable-profiling' ).click( function() {
return toggleProfiling.bind( this )( true );
} );
@@ -40,4 +40,4 @@
}
};
-$( document ).ready( Debug.init );
+$( document ).ready( Debug.ready ); |
d855c11a138e15dde2582319c3f8ccc443910f7a | test/PageClick-test.js | test/PageClick-test.js | describe('PageClick', () => {
const PageClickInjector = require('inject!../src/PageClick');
let mock, PageClick;
beforeEach(() => {
mock = jasmine.createSpyObj('mock', ['']);
});
beforeEach(() => PageClick = PageClickInjector({
mock
}));
it('should be ok', () => {
expect(PageClick).toBeT... | import React from 'react/addons';
const TestUtils = React.addons.TestUtils;
describe('PageClick', () => {
const PageClickInjector = require('inject!../src/PageClick');
let mock, PageClick;
beforeEach(() => {
mock = jasmine.createSpyObj('mock', ['']);
});
beforeEach(() => PageClick = PageClickInjecto... | Add tests for document click sub/unsub | Add tests for document click sub/unsub
| JavaScript | mit | nkbt/react-page-click | ---
+++
@@ -1,3 +1,7 @@
+import React from 'react/addons';
+const TestUtils = React.addons.TestUtils;
+
+
describe('PageClick', () => {
const PageClickInjector = require('inject!../src/PageClick');
let mock, PageClick;
@@ -16,4 +20,39 @@
it('should be ok', () => {
expect(PageClick).toBeTruthy();
});... |
71d93fec3444fc2813df4e93050eb1c5206ec6d9 | bin/message.js | bin/message.js | module.exports = (function() {
var def = require('./def');
var util = require('./util');
var guard_undef = util.guard_undef;
var Message = def.type(function(raw_msg) {
guard_undef(raw_msg);
this.def_prop('raw', raw_msg);
this.def_prop('channel', slack.getChannelGroupOrDMByID(raw_msg.channel));
... | module.exports = (function() {
var def = require('./def');
var util = require('./util');
var guard_undef = util.guard_undef;
var Message = def.type(function(client, raw_msg) {
guard_undef(raw_msg);
this.def_prop('raw', raw_msg);
this.def_prop('channel', client.getChannelGroupOrDMByID(raw_msg.chan... | Fix reference to non-existent field. Inject session state into ctor. | Fix reference to non-existent field. Inject session state into ctor.
| JavaScript | mit | bassettmb/slack-bot-dev | ---
+++
@@ -5,11 +5,11 @@
var guard_undef = util.guard_undef;
- var Message = def.type(function(raw_msg) {
+ var Message = def.type(function(client, raw_msg) {
guard_undef(raw_msg);
this.def_prop('raw', raw_msg);
- this.def_prop('channel', slack.getChannelGroupOrDMByID(raw_msg.channel));
- th... |
b5b2d02b60c9db94b4fce6d7839832eb7b6a0356 | config/webpack.js | config/webpack.js | const path = require('path');
const options = require('../utils/commandOptions');
module.exports = {
commonn: {
convertPxToRem: {
enable: false,
options: {
rootValue: 108, // 设计稿为3倍图
propList: ['*', '!border'],
unitPrecision: 4,
... | const path = require('path');
const options = require('../utils/commandOptions');
module.exports = {
commonn: {
convertPxToRem: {
enable: false,
options: {
rootValue: 108, // 设计稿为3倍图
propList: ['*', '!border'],
unitPrecision: 4,
... | Solve the default random avatar path problem | fix: Solve the default random avatar path problem
| JavaScript | mit | yinxin630/fiora,yinxin630/fiora,yinxin630/fiora | ---
+++
@@ -25,8 +25,8 @@
},
index: path.resolve(__dirname, '../dist/index.html'),
assetsRoot: path.resolve(__dirname, '../dist/fiora'),
- assetsSubDirectory: options.subDirectory || '.',
- assetsPublicPath: options.publicPath || '/',
+ assetsSubDirectory: options.subDi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.