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 |
|---|---|---|---|---|---|---|---|---|---|---|
929a80bb98e44a2c0f0bd05716d3152d7828e72f | webdiagrams/uml.js | webdiagrams/uml.js | /**
* Created by Leandro Luque on 24/07/17.
*/
/* JSHint configurations */
/* jshint esversion: 6 */
/* jshint -W097 */
'use strict';
// A.
const ATTRIBUTE = "A1";
// C.
const CLASS = "C1";
// D.
const DEFAULT = "~";
// I.
const INITIAL_VALUE = "I1";
const INTERFACE = "I2";
const IS_ABSTRACT = "I3";
const... | /**
* Created by Leandro Luque on 24/07/17.
*/
/* JSHint configurations */
/* jshint esversion: 6 */
/* jshint -W097 */
'use strict';
// A.
const ATTRIBUTE = "A1";
// C.
const CLASS = "C1";
// D.
const DEFAULT = "~";
// I.
const INITIAL_VALUE = "I1";
const INTERFACE = "I2";
const IS_ABSTRACT = "I3";
const... | Add parameter to UML constants | Add parameter to UML constants
| JavaScript | mit | leluque/webdiagrams,leluque/webdiagrams | ---
+++
@@ -35,6 +35,7 @@
const PRIVATE = "-";
const PROTECTED = "#";
const PUBLIC = "+";
+const PARAMETER = "P1"
// R.
const RETURN_TYPE = "R1"; |
3f0e7f20fcb361418c7cf76c89c034540dec7382 | src/nih_wayfinding/app/scripts/views/navbar/navbar-controller.js | src/nih_wayfinding/app/scripts/views/navbar/navbar-controller.js | (function () {
'use strict';
// TODO: This should likely be a directive, something like nih-navbar once
// we have profiles to link to
/* ngInject */
function NavbarController($scope, $timeout, $state, NavbarConfig) {
var ctl = this;
var defaultAlertHeight = 50;
var al... | (function () {
'use strict';
// TODO: This should likely be a directive, something like nih-navbar once
// we have profiles to link to
/* ngInject */
function NavbarController($scope, $timeout, $state, NavbarConfig) {
var ctl = this;
var defaultAlertHeight = 50;
var de... | Comment NavbarController.back() and update default state | Comment NavbarController.back() and update default state
| JavaScript | apache-2.0 | azavea/nih-wayfinding,azavea/nih-wayfinding | ---
+++
@@ -7,6 +7,7 @@
function NavbarController($scope, $timeout, $state, NavbarConfig) {
var ctl = this;
var defaultAlertHeight = 50;
+ var defaultBackState = 'locations';
var alertTimeout = null;
var history = [];
initialize();
@@ -27,7 +28,10 @@
}... |
ed3c2a0de70dd7e96fcb376d2199425f0130809a | node-tests/unit/utils/validate-platforms-test.js | node-tests/unit/utils/validate-platforms-test.js | 'use strict';
const expect = require('../../helpers/expect');
const ValidatePlatforms = require('../../../src/utils/validate-platforms');
describe('ValidatePlatforms', () => {
context('when platforms contain valid platforms', () => {
it('returns true', () => {
const platforms = ['all', 'ios', 'and... | 'use strict';
const expect = require('../../helpers/expect');
const ValidatePlatforms = require('../../../src/utils/validate-platforms');
describe('ValidatePlatforms', () => {
context('when platforms contain valid platforms', () => {
const platforms = ['all', 'ios', 'android', 'blackberry', 'windows'];
... | Update test to move context code to context block | style(validate-platforms): Update test to move context code to context block
| JavaScript | mit | isleofcode/splicon | ---
+++
@@ -6,17 +6,17 @@
describe('ValidatePlatforms', () => {
context('when platforms contain valid platforms', () => {
+ const platforms = ['all', 'ios', 'android', 'blackberry', 'windows'];
+
it('returns true', () => {
- const platforms = ['all', 'ios', 'android', 'blackberry', 'windows'];
-
... |
ff15e37b70578c1eb202773f310879e6451b4e9e | src/storage/storage.js | src/storage/storage.js | const { remote } = require('electron');
const path = require('path');
const Config = require('electron-config');
const DEFAULT_BASE_DESTINATION = path.join(remote.app.getPath('videos'), 'YouTube');
const KEYS = {
BASE_DESTINATION: 'base_destination',
};
let config;
export var init = function () {
config = new Co... | const { remote } = require('electron');
const path = require('path');
const Config = require('electron-config');
const DEFAULT_BASE_DESTINATION = path.join(remote.app.getPath('videos'), 'YouTube');
const KEYS = {
BASE_DESTINATION: 'base_destination',
};
let config;
export var init = function () {
config = new Co... | Add method to set base destination | Add method to set base destination
| JavaScript | mit | yannbertrand/youtube-dl-gui,yannbertrand/youtube-dl-gui,yannbertrand/youtube-dl-gui | ---
+++
@@ -28,3 +28,7 @@
export var getBaseDestination = function () {
return config.get(KEYS.BASE_DESTINATION);
}
+
+export var setBaseDestination = function (baseDestination) {
+ config.set(KEYS.BASE_DESTINATION, baseDestination);
+} |
cab77f9829497b5557ca33ccea9ae1bd52e5e351 | options.js | options.js | function generate_key_pair() {
generateKeyPair().then(function(key) {
exportKey(key.privateKey).then(function(exported_private_key) {
chrome.storage.local.set(
{ exported_private_key: exported_private_key },
function() {
var status = document.getElementById('status');
sta... | function generate_key_pair() {
generateKeyPair().then(function(key) {
// export and store private key
exportKey(key.privateKey).then(function(exported_private_key) {
chrome.storage.local.set(
{ exported_private_key: exported_private_key },
function() {
var status = document.get... | Store generated public key on chrome.storage.local. | Store generated public key on chrome.storage.local.
| JavaScript | bsd-3-clause | microwaves/autonomous-messages,microwaves/autonomous-messages | ---
+++
@@ -1,5 +1,6 @@
function generate_key_pair() {
generateKeyPair().then(function(key) {
+ // export and store private key
exportKey(key.privateKey).then(function(exported_private_key) {
chrome.storage.local.set(
{ exported_private_key: exported_private_key },
@@ -13,6 +14,18 @@
... |
575077bf8be2efc2809fa8aa2a77f122f3239396 | src/js/main.js | src/js/main.js | ;(function(){
angular.module('flockTogether', ['ngRoute'], function($routeProvider, $httpProvider) {
$routeProvider
.when('/', {
templateUrl: 'partials/home.html',
controller: 'loginCtrl'
})//END .when '/'
})//END angular.module 'flock'
.controller('MainController', function(){
... | ;(function(){
angular.module('flockTogether', ['ngRoute'], function($routeProvider, $httpProvider) {
$routeProvider
.when('/', {
templateUrl: 'partials/home.html',
controller: 'homeCtrl'
})//END .when '/home'
.when('/login', {
templateUrl: 'partials/login.html',
... | Add .when for each current partial. | Add .when for each current partial.
| JavaScript | mit | flock-together/flock-fee,flock-together/flock-fee | ---
+++
@@ -3,19 +3,20 @@
$routeProvider
.when('/', {
templateUrl: 'partials/home.html',
+ controller: 'homeCtrl'
+ })//END .when '/home'
+ .when('/login', {
+ templateUrl: 'partials/login.html',
controller: 'loginCtrl'
- })//END .when '/'
+ })//END .w... |
cdf96b8268996f5c4b7eea4fe2077d0b37205d79 | js/navbar.js | js/navbar.js | (function() {
// construct Headroom
var headroom = new Headroom(document.querySelector(".js-nvbr"), {
"offset": Options.navbarOffset,
"tolerance": Options.navbarTolerance
});
// initialize Headroom
headroom.init();
// add click events to sidebar nav links
document.addEventListener("DOMContentLo... | (function() {
// construct Headroom
var headroom = new Headroom(document.querySelector(".js-nvbr"), {
"offset": Options.navbarOffset,
"tolerance": Options.navbarTolerance
});
// initialize Headroom
headroom.init();
// add click events to sidebar nav links
document.addEventListener("DOMContentLo... | Make Headroom pin even if scroll position has not changed | Make Headroom pin even if scroll position has not changed
| JavaScript | mit | acch/XML-to-bootstrap,acch/XML-to-bootstrap | ---
+++
@@ -19,6 +19,9 @@
elements[i].onclick = function() {
// fudge scroll position to make Headroom pin
headroom.lastKnownScrollY = headroom.getScrollerHeight();
+
+ // make Headroom pin even if scroll position has not changed
+ window.requestAnimationFrame(function() { headr... |
f8aa1ab924c19b8bab4be2b9f69b68b70bae6576 | package.js | package.js | Package.describe({
summary: "Fast and reactive jQuery DataTables using standard Cursors / DataTables API. Supports Bootstrap 3.",
version: "1.0.1",
git: "https://github.com/ephemer/meteor-reactive-datatables.git"
});
Package.onUse(function(api) {
api.versionsFrom('METEOR@0.9.0');
api.use(['templating'], 'cli... | Package.describe({
name: 'ephemer:reactive-datatables',
summary: "Fast and reactive jQuery DataTables using standard Cursors / DataTables API. Supports Bootstrap 3.",
version: "1.0.1",
git: "https://github.com/ephemer/meteor-reactive-datatables.git"
});
Package.onUse(function(api) {
api.versionsFrom('0.9.0')... | Add name, prepare test filename to be Windows-friendly | Add name, prepare test filename to be Windows-friendly | JavaScript | mit | rossmartin/meteor-reactive-datatables,ephemer/meteor-reactive-datatables,rossmartin/meteor-reactive-datatables,ephemer/meteor-reactive-datatables | ---
+++
@@ -1,11 +1,12 @@
Package.describe({
+ name: 'ephemer:reactive-datatables',
summary: "Fast and reactive jQuery DataTables using standard Cursors / DataTables API. Supports Bootstrap 3.",
version: "1.0.1",
git: "https://github.com/ephemer/meteor-reactive-datatables.git"
});
Package.onUse(functio... |
e41da8cb181392a7cc5f7ed4afcfe469f9b3d2b6 | scripts/main/app.js | scripts/main/app.js | /*global MusicPlayer, Vue */
(function (global, undefined) {
'use strict';
document.addEventListener('DOMContentLoaded', function () {
var musicPlayer = new MusicPlayer();
var hasSource = false;
var isPlay = false;
new Vue({
el: '#app',
data: {
... | /*global MusicPlayer, Vue */
(function (global, undefined) {
'use strict';
document.addEventListener('DOMContentLoaded', function () {
var musicPlayer = new MusicPlayer();
var hasSource = false;
var isPlay = false;
new Vue({
el: '#app',
data: {
... | Rename method name (stop -> pause) | Rename method name (stop -> pause)
| JavaScript | mit | kubosho/simple-music-player | ---
+++
@@ -46,7 +46,7 @@
return;
}
- musicPlayer.stop(audioE);
+ musicPlayer.pause(audioE);
isPlay = false;
}
} |
5a75c19eb69bb3d00ec892e6334fb7e6202c8eb8 | config/build.js | config/build.js | module.exports = {
scripts: {
loader: 'browserify',
files: [
'public/scripts/main.js'
]
},
styles: {
directory: 'public/styles'
},
server: {
files: [
'views/**/*.ejs',
'routes/**/*.js',
'models/**/*.js',
'lib/**/*.js',
'config/**/*.js',
'errors/**/*.js',
'app.js'
]
},
watching... | module.exports = {
scripts: {
loader: 'browserify',
files: [
'public/scripts/main.js'
]
},
styles: {
directory: 'public/styles'
},
server: {
files: [
'views/**/*.html',
'routes/**/*.js',
'models/**/*.js',
'lib/**/*.js',
'config/**/*.js',
'errors/**/*.js',
'app.js'
]
},
watchin... | Watch for html instead of ejs files | Watch for html instead of ejs files
| JavaScript | mit | hammour/perk,hammour/perk,alarner/perk,alarner/perk | ---
+++
@@ -10,7 +10,7 @@
},
server: {
files: [
- 'views/**/*.ejs',
+ 'views/**/*.html',
'routes/**/*.js',
'models/**/*.js',
'lib/**/*.js', |
53d364b5d98c7e2d83b7d8c3d5bde46c37615d64 | src/js/containers/main-content/header-filter.js | src/js/containers/main-content/header-filter.js | 'use strict'
import React from 'react'
import FormSelect from '../../components/form-select'
import FormSearch from './form-search'
const filterFields = [{
icon: { id: 'date', label: 'Data' },
label: 'Escolha um mês',
options: [
{ text: 'Escolha um mês', value: '' },
{ text: 'Janeiro', value: 'Janeiro' ... | 'use strict'
import React, { PropTypes } from 'react'
import FormSelect from '../../components/form-select'
import FormSearch from './form-search'
const HeaderFilter = ({ monthFilter, stateFilter, searchField }) => (
<nav className='filter'>
<FormSelect key='months' {...monthFilter} />
<FormSelect key='stat... | Update header filter, passing props down | Update header filter, passing props down
| JavaScript | mit | campinas-front-end/institucional,campinas-front-end-meetup/institucional,campinas-front-end-meetup/institucional,campinas-front-end/institucional,frontendbr/eventos | ---
+++
@@ -1,37 +1,22 @@
'use strict'
-import React from 'react'
+import React, { PropTypes } from 'react'
import FormSelect from '../../components/form-select'
import FormSearch from './form-search'
-const filterFields = [{
- icon: { id: 'date', label: 'Data' },
- label: 'Escolha um mês',
- options: [
- ... |
e4694ee5e0491344ed04336e2eaabf3838c7f037 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Remove CKEditor-jquery JS from default app JS | Remove CKEditor-jquery JS from default app JS
| JavaScript | agpl-3.0 | AsunaYuukio/quienmanda.es,civio/quienmanda.es,civio/quienmanda.es,AsunaYuukio/quienmanda.es,AsunaYuukio/quienmanda.es,civio/quienmanda.es,AsunaYuukio/quienmanda.es,civio/quienmanda.es | ---
+++
@@ -12,5 +12,4 @@
//
//= require jquery
//= require jquery_ujs
-//= require ckeditor-jquery
//= require_tree . |
033ee79b6e2fd0ff747efab5b42e8a03ff65d92d | lib/assets/javascript.js | lib/assets/javascript.js | "use strict";
var util = require('util'),
path = require('path'),
jsParser = require('uglify-js').parser,
compressor = require('uglify-js').uglify,
Asset = require('../Asset'),
JSAsset = function(settings) {
settings.compressor = settings.compressor || 'uglify';
this.init(settings... | "use strict";
var util = require('util'),
path = require('path'),
jsParser = require('uglify-js').parser,
compressor = require('uglify-js').uglify,
Asset = require('../Asset'),
JSAsset = function(settings) {
settings.compressor = settings.compressor || 'uglify';
this.init(settings... | Add \n\n even when only concat'ing and not compressing JS assets | Add \n\n even when only concat'ing and not compressing JS assets
| JavaScript | mit | 2sidedfigure/exstatic | ---
+++
@@ -14,11 +14,15 @@
var self = this;
this.on('variantPostRenderFile', function(variant, file, cb) {
- if (!Asset.COMPRESS) return cb();
+ var basename = path.basename(file),
+ contents = variant.getRenderCache(file);
- var basename = path.b... |
3fb764521d2f503bf33e667c2ea1b7a524526359 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Add scripting for Foundation to fix issue with carousel | Add scripting for Foundation to fix issue with carousel
| JavaScript | mit | TerrenceLJones/not-bored-tonight,TerrenceLJones/not-bored-tonight | ---
+++
@@ -11,6 +11,8 @@
// about supported directives.
//
//= require jquery
+//= require jquery_ujs
//= require foundation
//= require turbolinks
//= require_tree .
+$(function(){ $(document).foundation(); }); |
542491ba818da8768340464323e9fa38fff268cf | app/initializers/extend-ember-link.js | app/initializers/extend-ember-link.js | import Ember from 'ember';
export function initialize(/*application */) {
Ember.LinkComponent.reopen({
attributeBindings: ['tooltip', 'data-placement'],
// Set activeParent=true on a {{link-to}} to automatically propagate the active
// class to the parent element (like <li>{{link-to}}</li>)
activePa... | import Ember from 'ember';
export function initialize(/*application */) {
Ember.LinkComponent.reopen({
attributeBindings: ['tooltip', 'data-placement'],
// Set activeParent=true on a {{link-to}} to automatically propagate the active
// class to the parent element (like <li>{{link-to}}</li>)
activePa... | Update to nav-header dropdown active highlighting | Update to nav-header dropdown active highlighting
| JavaScript | apache-2.0 | rancher/ui,rancherio/ui,rancherio/ui,vincent99/ui,westlywright/ui,lvuch/ui,rancher/ui,westlywright/ui,lvuch/ui,rancherio/ui,rancher/ui,vincent99/ui,pengjiang80/ui,pengjiang80/ui,lvuch/ui,vincent99/ui,pengjiang80/ui,westlywright/ui | ---
+++
@@ -21,12 +21,16 @@
}
// need to mark the parent drop down as active as well
- if (this.get('submenuItem')) {
- if (!!this.get('active')) {
+ if (!!this.get('active')) {
+ if (this.get('submenuItem')) {
if (!this.$().closest('li.dropdown.active').length) {
... |
7c5db77f4b63c60f06cd2f872d09bf83acaf5c7b | app/initializers/route-spy.js | app/initializers/route-spy.js | import Router from '@ember/routing/router';
export function initialize() {
const isEmbedded = window !== window.top;
if (isEmbedded) {
Router.reopen({
notifyTopFrame: function() {
window.top.postMessage({
action: 'did-transition',
url: this.currentURL
})
}.on... | import Router from '@ember/routing/router';
export function initialize() {
const isEmbedded = window !== window.top;
if (isEmbedded) {
Router.reopen({
notifyTopFrame: function() {
window.top.postMessage({
action: 'did-transition',
url: this.currentURL
})
}.on... | Allow theme to be changed | Allow theme to be changed
| JavaScript | apache-2.0 | westlywright/ui,vincent99/ui,westlywright/ui,rancherio/ui,rancherio/ui,vincent99/ui,rancher/ui,rancher/ui,vincent99/ui,rancherio/ui,westlywright/ui,rancher/ui | ---
+++
@@ -40,6 +40,12 @@
}
router.transitionTo(msg.name);
+ } else if (msg.action == 'set-theme') {
+ const userTheme = window.ls('userTheme');
+
+ if (userTheme) {
+ userTheme.setTheme( msg.name, false);
+ }
}
});
} |
85c90d0443f280fe722619a735a9866239e94322 | spec/javascripts/bootstrap_toggle_spec.js | spec/javascripts/bootstrap_toggle_spec.js | describe('bootstrap toggle', function() {
var header;
beforeEach(function() {
setFixtures('<li class="dropdown" id="menuOrgs">'+
'<a class="dropdown-toggle" href="#" data-toggle ="dropdown">Organisations</a>' +
'<ul class="dropdown-menu">' +
' <li><a href="/organiz... | describe('bootstrap toggle', function() {
var link;
beforeEach(function() {
setFixtures('<li class="dropdown" id="menuOrgs">'+
'<a class="dropdown-toggle" href="#" data-toggle ="dropdown">Organisations</a>' +
'<ul class="dropdown-menu">' +
' <li><a href="/organizat... | Use first method instead of zero indexing into an array to fix jasmine spec | Use first method instead of zero indexing into an array to fix jasmine spec
| JavaScript | mit | Aleks4ndr/LocalSupport,SergiosLen/LocalSupport,dsbabbar/LocalSupport,Aleks4ndr/LocalSupport,marianmosley/LocalSupport,Aleks4ndr/LocalSupport,Aleks4ndr/LocalSupport,tansaku/LocalSupport,curlygirly/LocalSupport,intfrr/LocalSupport,tansaku/LocalSupport,tansaku/LocalSupport,SergiosLen/LocalSupport,dsbabbar/LocalSupport,dav... | ---
+++
@@ -1,5 +1,5 @@
describe('bootstrap toggle', function() {
- var header;
+ var link;
beforeEach(function() {
setFixtures('<li class="dropdown" id="menuOrgs">'+
'<a class="dropdown-toggle" href="#" data-toggle ="dropdown">Organisations</a>' +
@@ -7,7 +7,7 @@
' <... |
630e1aefd56854b312b16c2ccd1fcde677a3da00 | activities/measuring-resistance/javascript/activity-dom-helper.js | activities/measuring-resistance/javascript/activity-dom-helper.js | (function () {
var mr = sparks.activities.mr;
var str = sparks.string;
mr.ActivityDomHelper = {
ratedResistanceFormId: '#rated_resistance',
ratedResistanceValueId: '#rated_resistance_value_input',
ratedResistanceUnitId: '#rated_resitance_unit_select',
getA... | (function () {
var mr = sparks.activities.mr;
var str = sparks.string;
mr.ActivityDomHelper = {
ratedResistanceFormId: '#rated_resistance',
ratedResistanceValueId: '#rated_resistance_value_input',
ratedResistanceUnitId: '#rated_resitance_unit_select',
getA... | Use isNaN() to check for NaN. Comparison op '!===' doesn't work. | Use isNaN() to check for NaN. Comparison op '!==='
doesn't work.
Also add a method 'selected' to factor out
retrieval of selected value
| JavaScript | apache-2.0 | concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks | ---
+++
@@ -27,11 +27,11 @@
validateNumberString: function (s) {
var s2 = str.strip(s);
- return s2 !== '' && Number(s2) !== NaN;
+ return s2 !== '' && !isNaN(Number(s2));
},
- validateResistanceUnitString: function (s) {
-
+ ... |
296408107789c142f65f4b6434d85a78a31a51bc | setups/plugin/lib/socketRoutes.js | setups/plugin/lib/socketRoutes.js | "use strict";
var settings = require("./settings");
/*
* This file defines socket routes for data-transmission to the client-side.
*/
//function initUserSockets(Socket) {
// Socket[settings.iD] = function (socket, data, cb) {
// cb(null, {dev: settings.dev, version: settings.pkg.version, settings: settings.get... | "use strict";
var settings = require("./settings");
/*
* This file defines socket routes for data-transmission to the client-side.
*/
//function initUserSockets(Socket) {
// Socket[settings.iD] = function (socket, data, cb) {
// cb(null, {dev: settings.dev, version: settings.pkg.version, settings: settings.get... | Update comments to apply better to core | Update comments to apply better to core
| JavaScript | mit | NodeBB-Community/nodebb-grunt,NodeBB-Community/nodebb-grunt | ---
+++
@@ -24,6 +24,6 @@
}
module.exports.init = function () {
- //initUserSockets(require.main.require("./src/socket.io/modules"));
+ //initUserSockets(require.main.require("./src/socket.io/plugins"));
initAdminSockets(require.main.require("./src/socket.io/admin"));
}; |
5f57ba41403a960278da9e08f71a53fabfb86726 | obfuscate-email.js | obfuscate-email.js | (function(){
function random(a,b) {
return Math.floor(Math.random() * b) + a;
};
function obfuscateEmail(email) {
if (!email) return email;
var re = /^(.*)(@)(.*?)(\.)(.*)$/;
return email.replace(re, function(m,username,at,hostname,dot,tld) {
function obs(s) {
var a = [];
... | (function(){
function random(a,b) {
return Math.floor(Math.random() * b) + a;
};
function obfuscateEmail(email) {
if (!email) return email;
var re = /^(.*)(@)(.*?)(\.)(.*)$/;
return email.replace(re, function(m,username,at,hostname,dot,tld) {
function obs(s) {
var a = [];
... | Fix global variable name for browser usage | Fix global variable name for browser usage | JavaScript | mit | miguelmota/obfuscate-email | ---
+++
@@ -30,7 +30,7 @@
} else if (typeof exports !== 'undefined') {
exports.obfuscateEmail = obfuscateEmail;
} else {
- window.hasprop = obfuscateEmail;
+ window.obfuscateEmail = obfuscateEmail;
}
})(); |
2e28dec3d91379b4bc7ed93d854fe5d1e080495e | test/unit/controllers/statusControllerSpec.js | test/unit/controllers/statusControllerSpec.js | 'use strict';
var expect = chai.expect;
describe('StatusCtrl', function(){
});
| 'use strict';
var expect = chai.expect;
function run(scope,done) {
done();
}
describe('StatusCtrl', function(){
var rootScope, scope, controller_injector, dependencies, ctrl;
beforeEach(module("rp"));
beforeEach(inject(function($rootScope, $controller, $q) {
rootScope = rootScope;
scope = $rootScope.... | Initialize StatusCtrl and add basic tests | [CHORE] Initialize StatusCtrl and add basic tests
Test that private functions and functions on $scope are present
| JavaScript | isc | bankonme/ripple-client-desktop,dncohen/ripple-client-desktop,MatthewPhinney/ripple-client,ripple/ripple-client,xdv/ripple-client-desktop,h0vhannes/ripple-client,ripple/ripple-client,wangbibo/ripple-client,MatthewPhinney/ripple-client,thics/ripple-client-desktop,resilience-me/DEPRICATED_ripple-client,xdv/ripple-client,r... | ---
+++
@@ -1,6 +1,61 @@
'use strict';
var expect = chai.expect;
+function run(scope,done) {
+ done();
+}
+
describe('StatusCtrl', function(){
-
+ var rootScope, scope, controller_injector, dependencies, ctrl;
+
+ beforeEach(module("rp"));
+ beforeEach(inject(function($rootScope, $controller, $q) {
+ ro... |
39a23c72bc6c082a69c8aa61abfc6b83cb267c28 | chai-adapter.js | chai-adapter.js | (function(window, karma) {
window.should = window.chai.should();
window.expect = window.chai.expect;
window.assert = window.chai.assert;
var chaiConfig = karma.config.chai;
if (chaiConfig) {
for (var key in chaiConfig) {
if (chaiConfig.hasOwnProperty(key)) {
window.chai.config[key] = chaiCo... | (function(window, karma) {
window.should = null;
window.should = window.chai.should();
window.expect = window.chai.expect;
window.assert = window.chai.assert;
var chaiConfig = karma.config.chai;
if (chaiConfig) {
for (var key in chaiConfig) {
if (chaiConfig.hasOwnProperty(key)) {
window.c... | Fix 'Maximum call stack size exceeded' in PhantomJS... again | Fix 'Maximum call stack size exceeded' in PhantomJS... again
| JavaScript | mit | kmees/karma-sinon-chai | ---
+++
@@ -1,4 +1,5 @@
(function(window, karma) {
+ window.should = null;
window.should = window.chai.should();
window.expect = window.chai.expect;
window.assert = window.chai.assert; |
61edab4f12e26652f6d53f3456b0b1c75de8faa4 | app/routes/quotes/components/QuoteList.js | app/routes/quotes/components/QuoteList.js | // @flow
import React, { Component } from 'react';
import Quote from './Quote';
type Props = {
quotes: Array<Object>,
approve: number => Promise<*>,
deleteQuote: number => Promise<*>,
unapprove: number => Promise<*>,
actionGrant: Array<string>,
currentUser: any,
loggedIn: boolean,
comments: Object
};
... | // @flow
import React, { Component } from 'react';
import Quote from './Quote';
type Props = {
quotes: Array<Object>,
approve: number => Promise<*>,
deleteQuote: number => Promise<*>,
unapprove: number => Promise<*>,
actionGrant: Array<string>,
currentUser: any,
loggedIn: boolean,
comments: Object
};
... | Fix undefined quotes causing error | Fix undefined quotes causing error
| JavaScript | mit | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp | ---
+++
@@ -47,21 +47,23 @@
return (
<ul>
- {quotes.map(quote => (
- <Quote
- actionGrant={actionGrant}
- approve={approve}
- unapprove={unapprove}
- deleteQuote={deleteQuote}
- quote={quote}
- key={quote.id}
- ... |
6fd9db13f5e52651029d18615fd24359898865d5 | lib/assets/core/javascripts/cartodb3/components/icon/icon-view.js | lib/assets/core/javascripts/cartodb3/components/icon/icon-view.js | var $ = require('jquery');
var CoreView = require('backbone/core-view');
var iconTemplates = {};
var importAllIconTemplates = function () {
var templates = require.context('./templates', false, /\.tpl$/);
templates.keys().forEach(function (template) {
iconTemplates[template] = templates(template);
});
};
i... | var $ = require('jquery');
var CoreView = require('backbone/core-view');
var iconTemplates = {};
var importAllIconTemplates = function () {
var templates = require.context('./templates', false, /\.tpl$/);
templates.keys().forEach(function (template) {
iconTemplates[template] = templates(template);
});
};
i... | Refactor IconView to simplify placeholder behaviour | Refactor IconView to simplify placeholder behaviour
| JavaScript | bsd-3-clause | CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb | ---
+++
@@ -13,6 +13,11 @@
importAllIconTemplates();
module.exports = CoreView.extend({
+ constructor: function (opts) {
+ this.placeholder = this._preinitializeWithPlaceholder(opts && opts.placeholder);
+ CoreView.prototype.constructor.call(this, opts);
+ },
+
initialize: function (opts) {
if (!o... |
22a7e91036fb1556edeb638610631f49a38efdcb | packages/strapi-plugin-users-permissions/admin/src/components/InputSearchLi/index.js | packages/strapi-plugin-users-permissions/admin/src/components/InputSearchLi/index.js | /**
*
* InputSearchLi
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import styles from './styles.scss';
function InputSearchLi({ onClick, isAdding, item }) {
const icon = isAdding ? 'fa-plus' : 'fa-minus-circle';
const liStyle = isAdding ? { cursor: 'pointer' } : {};
const handleClick = is... | /**
*
* InputSearchLi
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import styles from './styles.scss';
function InputSearchLi({ onClick, isAdding, item }) {
const icon = isAdding ? 'fa-plus' : 'fa-minus-circle';
const liStyle = isAdding ? { cursor: 'pointer' } : {};
const handleClick = is... | Fix get user info link in search list | Fix get user info link in search list
| JavaScript | mit | wistityhq/strapi,wistityhq/strapi | ---
+++
@@ -12,7 +12,7 @@
const icon = isAdding ? 'fa-plus' : 'fa-minus-circle';
const liStyle = isAdding ? { cursor: 'pointer' } : {};
const handleClick = isAdding ? () => onClick(item) : () => {};
- const path = `/plugins/content-manager/user/${item.id}?redirectUrl=/plugins/content-manager/user/?page=1&li... |
5e9bea97acb8948f41b5f3d007ccc250dab13e51 | packages/base/resources/js/main_page.js | packages/base/resources/js/main_page.js | function generate_board_page(that, board_id){
/* Generate the board page */
// Gets the node of board page
var bp_node = that.nodeById('board_page');
// Make a serverCall to gets lists and cards related
// to the board.
var result = genro.serverCall(
'get_lists_cards',
{board_i... | function generate_board_page(that, board_id){
/* Generate the board page */
// Gets the node of board page
var bp_node = that.nodeById('board_page');
// Make a serverCall to gets lists and cards related
// to the board.
var result = genro.serverCall(
'get_lists_cards',
{board_i... | Add attributes for drag and drop | Add attributes for drag and drop
| JavaScript | mit | mkshid/genrello,mkshid/genrello,mkshid/genrello | ---
+++
@@ -22,11 +22,14 @@
list_div._('h3', {innerHTML: '^.' + k + '?list_name'});
// create a ul for the cards
- var list_cards = list_div._('div', {_class: 'list-cards'});
+ var list_cards = list_div._('div', {
+ _class: 'list-cards',
+ dropTarget: true, dro... |
61a3ac70939314548f8e3d31a2de6124cc72cce1 | plugins/templateLayout/src/templateLayout.wef.js | plugins/templateLayout/src/templateLayout.wef.js | /*!
* TemplateLayout Wef plugin
* Copyright (c) 2011 Pablo Escalada
* MIT Licensed
*/
//requires: cssParser
//exports: templateLayout
(function () {
var templateLayout = {
name:"templateLayout",
version:"0.0.1",
description:"W3C CSS Template Layout Module",
authors:["Pablo Escal... | /*!
* TemplateLayout Wef plugin
* Copyright (c) 2011 Pablo Escalada
* MIT Licensed
*/
//requires: cssParser
//exports: templateLayout
(function () {
var templateLayout = {
name:"templateLayout",
version:"0.0.1",
description:"W3C CSS Template Layout Module",
authors:["Pablo Escal... | Remove selectorFound event listener Rename templateLayout() to init() | Remove selectorFound event listener
Rename templateLayout() to init()
| JavaScript | mit | diesire/wef,diesire/wef,diesire/wef | ---
+++
@@ -13,17 +13,12 @@
description:"W3C CSS Template Layout Module",
authors:["Pablo Escalada <uo1398@uniovi.es>"],
licenses:["MIT"], //TODO: Licenses
- templateLayout:function () {
- document.addEventListener('selectorFound', function (e) {
- // e.targ... |
53c000c7c048f8a8ccbd66415f94f7d079598961 | middleware/cors.js | middleware/cors.js | const leancloudHeaders = require('leancloud-cors-headers');
module.exports = function() {
return function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');
if (req.method.toLowerCase() === 'options') {
res.statusCode = 200;
res.setHeader('Access-Control-M... | const leancloudHeaders = require('leancloud-cors-headers');
module.exports = function() {
return function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');
if (req.method.toLowerCase() === 'options') {
res.statusCode = 200;
res.setHeader('Access-Control-M... | Fix Access-Control-Allow-Headers to single line | :rotating_light: Fix Access-Control-Allow-Headers to single line
| JavaScript | mit | leancloud/leanengine-node-sdk,sdjcw/leanengine-node-sdk | ---
+++
@@ -8,7 +8,7 @@
res.statusCode = 200;
res.setHeader('Access-Control-Max-Age','86400');
res.setHeader('Access-Control-Allow-Methods', 'HEAD, GET, POST, PUT, DELETE, OPTIONS');
- res.setHeader('Access-Control-Allow-Headers', leancloudHeaders);
+ res.setHeader('Access-Control-Allow... |
4c44ced323cd3efba9b6590ceaa99e3915cf9f69 | code-generator-utils.js | code-generator-utils.js | define(function (require, exports, module) {
'use strict';
function CodeWriter(indentString) {
this.lines = [];
this.indentString = (indentString ? indentString : ' ');
this.indentations = [];
}
CodeWriter.prototype.indent = function () {
this.indentations.push(this.indentString);
};
Cod... | define(function (require, exports, module) {
'use strict';
function CodeWriter(indentString) {
this.lines = [];
this.indentString = (indentString ? indentString : ' ');
this.indentations = [];
}
CodeWriter.prototype.indent = function () {
this.indentations.push(this.indentString);
};
Cod... | Add function to generate general Ruby file name | Add function to generate general Ruby file name
| JavaScript | mit | meisyal/staruml-ruby | ---
+++
@@ -27,5 +27,9 @@
return this.lines.join('\n');
};
+ CodeWriter.prototype.fileName = function (className) {
+ return className.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();
+ };
+
exports.CodeWriter = CodeWriter;
}); |
d5f48fe6281e63f60ffd1c9737d6f04bb58c2d70 | packages/react-app-rewire-less/index.js | packages/react-app-rewire-less/index.js | function rewireLess (config, env, lessLoaderOptions = {}) {
const lessExtension = /\.less$/;
const fileLoader = config.module.rules
.find(rule => rule.loader && rule.loader.endsWith('/file-loader/index.js'));
fileLoader.exclude.push(lessExtension);
const cssRules = config.module.rules
.find(rule => St... | const path = require('path')
function rewireLess (config, env, lessLoaderOptions = {}) {
const lessExtension = /\.less$/;
const fileLoader = config.module.rules
.find(rule => rule.loader && rule.loader.endsWith(`${path.sep}file-loader${path.sep}index.js`));
fileLoader.exclude.push(lessExtension);
const c... | Fix react-app-rewire-less not working on Windows | Fix react-app-rewire-less not working on Windows
Closes #53 | JavaScript | mit | timarney/react-app-rewired,timarney/react-app-rewired | ---
+++
@@ -1,8 +1,10 @@
+const path = require('path')
+
function rewireLess (config, env, lessLoaderOptions = {}) {
const lessExtension = /\.less$/;
const fileLoader = config.module.rules
- .find(rule => rule.loader && rule.loader.endsWith('/file-loader/index.js'));
+ .find(rule => rule.loader && rule... |
60e6634acab3e41f3cee688b9379e21040763254 | public/js/index.js | public/js/index.js | $(document).ready(function(){
$('.log-btn').click(function(){
$('.log-status').addClass('wrong-entry');
$('.alert').fadeIn(500);
setTimeout( "$('.alert').fadeOut(1500);",3000 );
});
$('.form-control').keypress(function(){
$('.log-status').removeClass('wrong-entry');
});
});
function get... | $(document).ready(function(){
$('.log-btn').click(function(){
$('.log-status').addClass('wrong-entry');
$('.alert').fadeIn(500);
setTimeout( "$('.alert').fadeOut(1500);",3000 );
});
$('.form-control').keypress(function(){
$('.log-status').removeClass('wrong-entry');
});
});
function get... | Set the coutdown min and sec values to 00 when the deadline time has been reached. | Set the coutdown min and sec values to 00 when the deadline time has been reached.
| JavaScript | apache-2.0 | KalenWessel/lockandkey,KalenWessel/lockandkey,KalenWessel/lockandkey | ---
+++
@@ -32,6 +32,8 @@
secondsSpan.innerHTML = ('0' + t.seconds).slice(-2);
if (t.total <= 0) {
+ minutesSpan.innerHTML = ('00');
+ secondsSpan.innerHTML = ('00');
clearInterval(timeinterval);
}
} |
2dfa337cd2ccaf9bdd98c47c99b5180846285e57 | mods/lowtierrandom/formats-data.js | mods/lowtierrandom/formats-data.js | exports.BattleFormatsData = {
kangaskhanmega: {
randomBattleMoves: ["fakeout","return","suckerpunch","earthquake","poweruppunch","crunch"],
randomDoubleBattleMoves: ["fakeout","return","suckerpunch","earthquake","facade","poweruppunch","crunch"],
tier: "Uber"
}
};
| exports.BattleFormatsData = {
kangaskhanmega: {
randomBattleMoves: ["fakeout","return","suckerpunch","earthquake","poweruppunch","crunch"],
randomDoubleBattleMoves: ["fakeout","return","suckerpunch","earthquake","doubleedge","poweruppunch","crunch","protect"],
tier: "Uber"
},
altariamega: {
randomBattleMoves... | Remove various BL Megas from Low Tier Random | Remove various BL Megas from Low Tier Random | JavaScript | mit | lFernanl/Mudkip-Server,MayukhKundu/Technogear,MayukhKundu/Pokemon-Domain,yashagl/pokemon-showdown,TheManwithskills/DS,yashagl/pokemon,MayukhKundu/Flame-Savior,yashagl/yash-showdown,SkyeTheFemaleSylveon/Mudkip-Server,MayukhKundu/Flame-Savior,MayukhKundu/Technogear-Final,MayukhKundu/Mudkip-Server,MayukhKundu/Pokemon-Doma... | ---
+++
@@ -1,7 +1,27 @@
exports.BattleFormatsData = {
kangaskhanmega: {
randomBattleMoves: ["fakeout","return","suckerpunch","earthquake","poweruppunch","crunch"],
- randomDoubleBattleMoves: ["fakeout","return","suckerpunch","earthquake","facade","poweruppunch","crunch"],
+ randomDoubleBattleMoves: ["fakeout... |
04ad49650b7aca55d03a7a90097a038d6195345a | client/src/components/advancedSelectWidget/AdvancedSingleSelect.js | client/src/components/advancedSelectWidget/AdvancedSingleSelect.js | import AdvancedSelect, {
propTypes as advancedSelectPropTypes
} from "components/advancedSelectWidget/AdvancedSelect"
import { AdvancedSingleSelectOverlayTable } from "components/advancedSelectWidget/AdvancedSelectOverlayTable"
import * as FieldHelper from "components/FieldHelper"
import _isEmpty from "lodash/isEmpty... | import AdvancedSelect, {
propTypes as advancedSelectPropTypes
} from "components/advancedSelectWidget/AdvancedSelect"
import { AdvancedSingleSelectOverlayTable } from "components/advancedSelectWidget/AdvancedSelectOverlayTable"
import * as FieldHelper from "components/FieldHelper"
import _isEmpty from "lodash/isEmpty... | Fix required value prop failing on null values | Fix required value prop failing on null values
| JavaScript | mit | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet | ---
+++
@@ -42,7 +42,7 @@
}
AdvancedSingleSelect.propTypes = {
...advancedSelectPropTypes,
- value: PropTypes.object.isRequired,
+ value: PropTypes.object,
valueKey: PropTypes.string
}
AdvancedSingleSelect.defaultProps = { |
361ae111b35cc261cfad3f1b37477b93dc15cbda | client/src/components/Form.js | client/src/components/Form.js | import React from 'react'
const Form = ({fields, handleChange, handleSubmit, submitValue, message}) => {
const formFields = fields.map(field => {
return (
<div>
<label>{field.label} </label>
<input type={field.type} name={field.name} value={field.value} onChange={handleChange} /><br />
... | import React from 'react'
const Form = ({fields, handleChange, handleSubmit, submitValue, message}) => {
const formFields = fields.map(field => {
return (
<div>
<label>{field.label} </label>
<input type={field.type} name={field.name} value={field.value} onChange={handleChange} /><br />
... | Add message prop and display | Add message prop and display
| JavaScript | mit | kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed | ---
+++
@@ -13,7 +13,7 @@
<form onSubmit={handleSubmit} >
{formFields}
<input type="Submit" className="button" value={submitValue} /><br />
- <span>{message}</span>
+ <span className="message">{message}</span>
</form>
)
} |
7bc420a4da3b05819b57737b37d1fc8bae6f729b | coderstats/data/coderstats.js | coderstats/data/coderstats.js | var link = document.getElementsByClassName('octicon-link')[0],
path = document.location.pathname,
details,
login,
url;
if (m = path.match(/^\/([\w-]+)\??.*?/)) {
login = m[1].trim();
if (-1 === ['timeline', 'languages', 'blog', 'explore'].indexOf(login)) {
url = 'http://coderstats.net/g... | var path = document.location.pathname,
details,
login,
url;
if (m = path.match(/^\/([\w-]+)\??.*?/)) {
login = m[1].trim();
if (-1 === ['timeline', 'languages', 'blog', 'explore'].indexOf(login)) {
url = 'http://coderstats.net/github/' + login + '/';
details = document.getElementsBy... | Append CoderStats link rather than cloning posibly non-existing link item. Don't listen on DOMSubtreeModified event | Append CoderStats link rather than cloning posibly non-existing link item.
Don't listen on DOMSubtreeModified event
| JavaScript | mit | coderstats/fxt_coderstats | ---
+++
@@ -1,5 +1,4 @@
-var link = document.getElementsByClassName('octicon-link')[0],
- path = document.location.pathname,
+var path = document.location.pathname,
details,
login,
url;
@@ -11,7 +10,6 @@
details = document.getElementsByClassName('vcard-details');
if (details.length... |
2087652170835f7542746d81f2e693738dce1210 | packages/vulcan-lib/lib/server/utils.js | packages/vulcan-lib/lib/server/utils.js | import sanitizeHtml from 'sanitize-html';
import { Utils } from '../modules';
import { throwError } from './errors.js';
Utils.sanitizeAllowedTags = [
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul',
'ol', 'nl', 'li', 'b', 'i', 'u', 'strong', 'em', 'strike',
'code', 'hr', 'br', 'div', 'table', 't... | import sanitizeHtml from 'sanitize-html';
import { Utils } from '../modules';
import { throwError } from './errors.js';
Utils.sanitizeAllowedTags = [
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul',
'ol', 'nl', 'li', 'b', 'i', 'u', 'strong', 'em', 'strike',
'code', 'hr', 'br', 'div', 'table', 't... | Allow srcset attribute on images | Allow srcset attribute on images
| JavaScript | mit | Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2 | ---
+++
@@ -14,7 +14,8 @@
allowedTags: Utils.sanitizeAllowedTags,
allowedAttributes: {
...sanitizeHtml.defaults.allowedAttributes,
- 'figure': ['style']
+ img: [ 'src' , 'srcset'],
+ figure: ['style']
},
allowedStyles: {
...sanitizeHtml.defaults.allowedStyles, |
47e8d2692ea40a3a8d31433f53ac530c8bea85cf | tests/dummy/app/routes/nodes/detail/draft-registrations/detail.js | tests/dummy/app/routes/nodes/detail/draft-registrations/detail.js | import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
let node = this.modelFor('nodes.detail');
this.store.adapterFor('draft-registration').set('namespace', 'v2/nodes/' + node.id);
var draft = this.store.findRecord('draft-registration', params.draft_registration_id)... | import Ember from 'ember';
import config from 'ember-get-config';
export default Ember.Route.extend({
model(params) {
let node = this.modelFor('nodes.detail');
this.store.adapterFor('draft-registration').set('namespace', config.OSF.apiNamespace + '/nodes/' + node.id);
var draft = this.store... | Use config.OSF.apiNamespace instead of hardcoding original namespace. | Use config.OSF.apiNamespace instead of hardcoding original namespace.
| JavaScript | apache-2.0 | chrisseto/ember-osf,binoculars/ember-osf,jamescdavis/ember-osf,cwilli34/ember-osf,hmoco/ember-osf,baylee-d/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,hmoco/ember-osf,cwilli34/ember-osf,pattisdr/ember-osf,CenterForOpenScience/ember-osf,binoculars/ember-osf,pattisdr/ember-osf,jamescdavis/ember-osf,crcres... | ---
+++
@@ -1,9 +1,10 @@
import Ember from 'ember';
+import config from 'ember-get-config';
export default Ember.Route.extend({
model(params) {
let node = this.modelFor('nodes.detail');
- this.store.adapterFor('draft-registration').set('namespace', 'v2/nodes/' + node.id);
+ this.store.... |
d19531fe58474652b45f133fcc8cf34724c6e965 | tests/integration/components/maintenance-banner/component-test.js | tests/integration/components/maintenance-banner/component-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('maintenance-banner', 'Integration | Component | maintenance banner', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('maintenance-banner', 'Integration | Component | maintenance banner', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
... | Test no longer checks for blank, checks that it spits out somehting | Test no longer checks for blank, checks that it spits out somehting
| JavaScript | apache-2.0 | jamescdavis/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,binoculars/ember-osf,jamescdavis/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,binoculars/ember-osf | ---
+++
@@ -12,5 +12,5 @@
this.render(hbs`{{maintenance-banner}}`);
- assert.equal(this.$().text().trim(), '');
+ assert.ok(this.$());
}); |
26e7eb17fcdc93d0356d7a8ef60d3ab5a430d394 | app/lib/db.js | app/lib/db.js | const path = require('path');
const fs = require('fs');
const streamsql = require('streamsql');
const config = require('./config');
const configStore = require('../../lib/config.js');
const dbm = require('db-migrate')
var env = config('DATABASE_ENVIRONMENT', 'dev');
dbm.config.load(path.join(__dirname, '../../database... | const path = require('path');
const fs = require('fs');
const streamsql = require('streamsql');
const config = require('./config');
const configStore = require('config-store');
const dbm = require('db-migrate')
var env = config('DATABASE_ENVIRONMENT', 'dev');
dbm.config.load(path.join(__dirname, '../../database.json')... | Use lib from npm instead of ./lib | Use lib from npm instead of ./lib
| JavaScript | mpl-2.0 | phusion/openbadges-badgekit,larssvekis/openbadges-badgekit,mozilla/openbadges-badgekit,larssvekis/openbadges-badgekit,friedger/openbadges-badgekit,friedger/openbadges-badgekit,mozilla/openbadges-badgekit,phusion/openbadges-badgekit,bethadele/openbadges-badgekit,bethadele/openbadges-badgekit | ---
+++
@@ -2,7 +2,7 @@
const fs = require('fs');
const streamsql = require('streamsql');
const config = require('./config');
-const configStore = require('../../lib/config.js');
+const configStore = require('config-store');
const dbm = require('db-migrate')
var env = config('DATABASE_ENVIRONMENT', 'dev'); |
8c0c4f4f3016cca574878c27be9ecbeebc4e844d | app/routes.js | app/routes.js | import React from 'react';
import { Route } from 'react-router';
import App from 'containers/App';
import HomePage from 'containers/HomePage';
import LoginPage from 'containers/LoginPage';
import UserReservationsPage from 'containers/UserReservationsPage';
import NotFoundPage from 'containers/NotFoundPage';
import Res... | import React from 'react';
import { Route } from 'react-router';
import App from 'containers/App';
import HomePage from 'containers/HomePage';
import LoginPage from 'containers/LoginPage';
import UserReservationsPage from 'containers/UserReservationsPage';
import NotFoundPage from 'containers/NotFoundPage';
import Res... | Fix Facebook "_=_" appended hash issue | Fix Facebook "_=_" appended hash issue
Refs #104.
| JavaScript | mit | fastmonkeys/respa-ui | ---
+++
@@ -11,6 +11,13 @@
import SearchPage from 'containers/SearchPage';
export default (params) => {
+ function removeFacebookAppendedHash(nextState, replaceState, cb) {
+ if (window.location.hash && window.location.hash.indexOf('_=_') !== -1) {
+ replaceState(null, window.location.hash.replace('_=_',... |
664d631ff80e2d1adf29138cb0ccfbb3c3412155 | src/config/index.js | src/config/index.js | var defaults = require('./defaults.json'),
_ = require('lodash'),
path = require('path'),
fs = require('fs'),
mkpath = require('mkpath'),
home = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'],
configDir = path.join(home, ".config"),
configPath = path.join(configDir, "ymklogue.json"),
... | var defaults = require('./defaults.json'),
_ = require('lodash'),
path = require('path'),
fs = require('fs'),
mkpath = require('mkpath'),
home = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'],
configDir = path.join(home, ".config"),
configPath = path.join(configDir, "ymklogue.json"),
... | Fix small issue with contsantly copying over the hidden chans | Fix small issue with contsantly copying over the hidden chans
| JavaScript | mit | YaManicKill/ymklogue,YaManicKill/ymklogue | ---
+++
@@ -30,10 +30,10 @@
});
}
-config = _.merge({}, defaults, config);
+config = _.assign({}, defaults, config);
saveConfig();
-module.exports = _.merge({
+module.exports = _.assign({
setKey: (key) => {
return new Promise(function (res, rej) {
config.key = key; |
332a33c2f48a1cca5ad01eb3a18600fc9c0e28f1 | web/static/js/views/insight_chart_view.js | web/static/js/views/insight_chart_view.js | App.InsightChartView = Em.View.extend({
classNames: ["chart"],
thumbNailBinding: "controller.thumbNail",
width:null,
height: null,
viz: null,
specUpdated: function(){
var spec = this.get("controller.spec"),
element = this.get("element"),
documents = this.get("controller.controllers.q... | App.InsightChartView = Em.View.extend({
classNames: ["chart"],
thumbNailBinding: "controller.thumbNail",
width:null,
height: null,
viz: null,
updateProps: ["controller.spec", "controller.controllers.query.records.@each"],
specUpdated: function(){
var spec = this.get("controller.spec"),
el... | Stop observing value changes when the view is unloaded. | Stop observing value changes when the view is unloaded. | JavaScript | mpl-2.0 | mozilla/caravela,mozilla/caravela,mozilla/caravela,mozilla/caravela | ---
+++
@@ -5,6 +5,8 @@
width:null,
height: null,
viz: null,
+ updateProps: ["controller.spec", "controller.controllers.query.records.@each"],
+
specUpdated: function(){
var spec = this.get("controller.spec"),
@@ -18,7 +20,6 @@
var viz = chart({el:element});
self.set('viz', viz);... |
82ab743f3c119e1036151c7a68d506c35bd6396e | components/link/Link.js | components/link/Link.js | import React, { Fragment, PureComponent } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import theme from './theme.css';
class Link extends PureComponent {
render() {
const { children, className, icon, iconPlacement, element, inherit, ...others } = this.props;
const classNam... | import React, { Fragment, PureComponent } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import theme from './theme.css';
class Link extends PureComponent {
render() {
const { children, className, icon, iconPlacement, element, inherit, ...others } = this.props;
const classNam... | Add 'onMouseLeave' & 'onMouseUp' props | Add 'onMouseLeave' & 'onMouseUp' props
| JavaScript | mit | teamleadercrm/teamleader-ui | ---
+++
@@ -37,6 +37,10 @@
iconPlacement: PropTypes.oneOf(['left', 'right']),
inherit: PropTypes.bool,
element: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),
+ /** Callback function that is fired when mouse leaves the component. */
+ onMouseLeave: PropTypes.func,
+ /** Callback function that... |
05056d99ade4e113419db11c4897fd1157774d81 | src/Home.js | src/Home.js | import React, {Component} from "react";
import RaisedButton from "material-ui/RaisedButton";
const styles = {
button: {
margin: 12,
},
}
class Home extends Component {
render() {
return (
<div className="buttons">
<h1>Gregory N. Katchmar</h1>
<h2>JavaScript Developer</h2>
... | import React, {Component} from "react";
import RaisedButton from "material-ui/RaisedButton";
const styles = {
button: {
margin: 12,
},
}
class Home extends Component {
render() {
return (
<div className="buttons">
<h1>Gregory N. Katchmar</h1>
<h2>JavaScript Developer</h2>
... | Update date change for build | Update date change for build
| JavaScript | isc | gnkatchmar/new-gkatchmar,gnkatchmar/new-gkatchmar | ---
+++
@@ -40,7 +40,7 @@
<h4>Contact me at:</h4>
<a href="mailto:gregkatchmar@gmail.com">gregkatchmar@gmail.com</a>
<hr></hr>
- <p>Last updated August 26, 2017</p>
+ <p>Last updated September 6, 2017</p>
<hr></hr>
<p>A React/material-ui site</p>
</div... |
a54ad382cdfa461d705e0d8c469a793680b71d3b | server/ymlHerokuConfig.js | server/ymlHerokuConfig.js |
var path = require('path');
var yaml_config = require('node-yaml-config');
var _ = require('lodash');
function ymlHerokuConfigModule() {
var HEROKU_VARS_SUPPORT = [
'user', 'password', 'url', 'pipeline', 'jobs', 'key', 'secret', 'account', 'debug', 'dangerzone', 'acceptableTimeFailed'
];
var create = func... |
var path = require('path');
var yaml_config = require('node-yaml-config');
var _ = require('lodash');
function ymlHerokuConfigModule() {
var HEROKU_VARS_SUPPORT = [
'user', 'password', 'url', 'pipeline', 'jobs', 'key', 'secret', 'account', 'debug', 'dangerzone', 'acceptableTimeFailed', 'timeDiff'
];
var c... | Add missing config variable name | Add missing config variable name
| JavaScript | mit | birgitta410/monart,artwise/artwise,birgitta410/monart,birgitta410/monart,artwise/artwise,artwise/artwise | ---
+++
@@ -6,7 +6,7 @@
function ymlHerokuConfigModule() {
var HEROKU_VARS_SUPPORT = [
- 'user', 'password', 'url', 'pipeline', 'jobs', 'key', 'secret', 'account', 'debug', 'dangerzone', 'acceptableTimeFailed'
+ 'user', 'password', 'url', 'pipeline', 'jobs', 'key', 'secret', 'account', 'debug', 'dangerzon... |
db7c53d359e9bc56fcddea038e0dc7acb1cdaffb | src/components/Lane/LaneHeader.js | src/components/Lane/LaneHeader.js | import React from 'react'
import PropTypes from 'prop-types'
import EditableLabel from 'components/widgets/EditableLabel'
import {Title, LaneHeader, RightContent } from 'styles/Base'
import LaneMenu from './LaneHeader/LaneMenu'
const LaneHeaderComponent = ({
updateTitle, canAddLanes, onDelete, onDoubleClick, inline... | import React from 'react'
import PropTypes from 'prop-types'
import EditableLabel from 'components/widgets/EditableLabel'
import {Title, LaneHeader, RightContent } from 'styles/Base'
import LaneMenu from './LaneHeader/LaneMenu'
const LaneHeaderComponent = ({
updateTitle, canAddLanes, onDelete, onDoubleClick, inline... | Remove style hardcoding (margin: '-5px') in Title component | Remove style hardcoding (margin: '-5px') in Title component
| JavaScript | mit | rcdexta/react-trello,rcdexta/react-trello | ---
+++
@@ -11,19 +11,19 @@
return (
<LaneHeader onDoubleClick={onDoubleClick}>
- <Title style={{...titleStyle, margin: '-5px'}}>
- {inlineEditTitle ?
- <EditableLabel value={title} border placeholder={t('placeholder.title')} onSave={updateTitle} /> :
- title
- }
- </Title>
- {l... |
68f2a223588cf0be920427ca4f39124a063d0a30 | public/js/admin.js | public/js/admin.js | jQuery(function($) {
$('.setting .js-save-on-change').each(function () {
var $field = $(this);
$field.closest('.setting').data('old', $field.val());
});
$(document).on('change', '.js-save-on-change', function() {
var $field = $(this);
var name = $field.attr('name');
var... | jQuery(function($) {
$('.setting .js-save-on-change').each(function () {
var $field = $(this);
$field.closest('.setting').data('old', $field.val());
});
$(document).on('change', '.js-save-on-change', function() {
var $field = $(this);
var name = $field.attr('name');
var... | Reset setting fields when saving fails. | Reset setting fields when saving fails.
| JavaScript | mit | fluxbb/core,fluxbb/core | ---
+++
@@ -24,9 +24,16 @@
}).success(function(data) {
$setting.data('old', value);
$setting.addClass('saved');
+ }).fail(function () {
+ $setting.trigger('failed', [old]);
}).always(function() {
$setting.removeClas... |
5760b9bc06813d6411b9d575d5f7d918e49217d3 | public/js/index.js | public/js/index.js | "use strict";
var router = new VueRouter({
routes: [
{ path: "/search", component: Vue.component("main-search") },
{ path: "/tags", component: Vue.component("main-tags") },
{ path: "/upload", component: Vue.component("main-upload") },
{ path: "/options", component: Vue.component("ma... | "use strict";
var router = new VueRouter({
routes: [
{ path: "/search", component: Vue.component("main-search") },
{ path: "/tags", component: Vue.component("main-tags") },
{ path: "/upload", component: Vue.component("main-upload") },
{ path: "/options", component: Vue.component("ma... | Store the options in the local storage | Store the options in the local storage
| JavaScript | mit | Dexesttp/jsbooru,Dexesttp/jsbooru | ---
+++
@@ -22,8 +22,31 @@
},
methods: {
setItemsPerPage: function (newValue) {
- console.log(newValue);
this.itemsPerPage = newValue;
+ this.saveToLocalStorage();
+ },
+ saveToLocalStorage: function () {
+ var data = {
+ it... |
dc39de1103dc4f0f5e29f88fbed4d3d704a1b46b | src/foam/nanos/client/Client.js | src/foam/nanos/client/Client.js | /**
* @license
* Copyright 2018 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.GENMODEL({
package: 'foam.nanos.client',
name: 'Client',
implements: [ 'foam.box.Context' ],
requires: [
// TODO This is just for the build part. Without it, there's no way of
... | /**
* @license
* Copyright 2018 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.GENMODEL({
package: 'foam.nanos.client',
name: 'Client',
implements: [ 'foam.box.Context' ],
requires: [
// TODO This is just for the build part. Without it, there's no way of
... | Add action item to TODO. | Add action item to TODO.
| JavaScript | apache-2.0 | foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2 | ---
+++
@@ -11,7 +11,7 @@
requires: [
// TODO This is just for the build part. Without it, there's no way of
// knowing that this class uses ClientBuilder so it won't get built by build
- // tool without explicitly listing it.
+ // tool without explicitly listing it. Think of a better place for thi... |
9869d0cf8a88e3d5c88c5f0cb49c1b3debf16c02 | src/components/floating-button/FloatingButton.js | src/components/floating-button/FloatingButton.js | 'use strict';
import React, { Component } from 'react';
import ReactCSS from 'reactcss';
class FloatingButton extends Component {
classes() {
return {
'default': {
},
};
}
render() {
return <div>
<button>Item</button>
</div>;
}
}
export default ReactCSS(FloatingButton);
| 'use strict';
import React, { Component } from 'react';
import ReactCSS from 'reactcss';
class FloatingButton extends Component {
classes() {
return {
'default': {
},
};
}
handleClick = () => this.props.onClick && this.props.onClick();
render() {
return <div onClick={ this.handleCli... | Update floating button to use handleClick callback | Update floating button to use handleClick callback
| JavaScript | mit | henryboldi/felony,tobycyanide/felony,tobycyanide/felony,henryboldi/felony | ---
+++
@@ -12,9 +12,11 @@
};
}
+ handleClick = () => this.props.onClick && this.props.onClick();
+
render() {
- return <div>
- <button>Item</button>
+ return <div onClick={ this.handleClick }>
+ <a is="floatingButton">Item</a>
</div>;
}
} |
e1d37539f73bc201bc4b65baa6f77727ac4adc99 | Text.js | Text.js | enyo.kind({
name: "enyo.canvas.Text",
kind: enyo.canvas.Shape,
published: {
text: "",
font: "12pt Arial",
align: "left",
},
renderSelf: function(ctx) {
ctx.textAlign = this.align;
ctx.font = this.font;
this.draw(ctx);
},
fill: function(ctx) {
ctx.fillText(this.text, this.bounds.l, this.bounds.t);
... | enyo.kind({
name: "enyo.canvas.Text",
kind: enyo.canvas.Shape,
published: {
text: "",
font: "12pt Arial",
align: "left"
},
renderSelf: function(ctx) {
ctx.textAlign = this.align;
ctx.font = this.font;
this.draw(ctx);
},
fill: function(ctx) {
ctx.fillText(this.text, this.bounds.l, this.bounds.t);
}... | Fix trailing comma that causes load problems in IE | Fix trailing comma that causes load problems in IE
| JavaScript | apache-2.0 | wleopar-d/html5-Canvas2-,enyojs/canvas | ---
+++
@@ -4,7 +4,7 @@
published: {
text: "",
font: "12pt Arial",
- align: "left",
+ align: "left"
},
renderSelf: function(ctx) {
ctx.textAlign = this.align; |
8c2dff812e52fcc0cad59778675a5a9f4e78ca0a | src/domain/createApiActionCreator/index.js | src/domain/createApiActionCreator/index.js | import { fetch } from 'domain/Api';
import ApiCall from 'containers/ApiCalls';
/*
* Supports currying so that args can be recycled more conveniently.
* A contrived example:
* ```
* const createCreatorForX =
* createApiActionCreator('X_REQUEST', 'X_SUCCESS', 'X_FAILURE', 'http://...');
* const getXActionCreato... | import { fetch } from 'domain/Api';
import ApiCall from 'containers/ApiCalls';
/*
* Supports currying so that args can be recycled more conveniently.
* A contrived example:
* ```
* const createCreatorForX =
* createApiActionCreator('X_REQUEST', 'X_SUCCESS', 'X_FAILURE', 'http://...');
* const getXActionCreato... | Put an arg default back | createNotificationsMiddleware: Put an arg default back
| JavaScript | mit | e1-bsd/omni-common-ui,e1-bsd/omni-common-ui | ---
+++
@@ -13,7 +13,7 @@
*/
const createApiActionCreator = (
- requestActionType, successActionType, failureActionType, url, method) =>
+ requestActionType, successActionType, failureActionType, url, method = 'GET') =>
(dispatch) => {
return dispatch(createFetchRequestAction()).payload
.the... |
12d0f923a9d8f45d131aa54d8a92784a743449db | server.js | server.js | 'use strict';
var express = require('express')
, logger = require('morgan')
, mongoose = require('mongoose')
, path = require('path')
, messages = require('./routes/messages')
, users = require('./routes/users')
, config = require('./lib/config')
, app
;
app = express();
mongoose.connect(config.mongo... | 'use strict';
var express = require('express')
, logger = require('morgan')
, mongoose = require('mongoose')
, path = require('path')
, messages = require('./routes/messages')
, users = require('./routes/users')
, config = require('./lib/config')
, app
;
app = express();
mongoose.connect(config.mongo... | Print stack trace on all errors that have it | Print stack trace on all errors that have it
| JavaScript | mit | Hilzu/SecureChat | ---
+++
@@ -35,7 +35,7 @@
app.use(function (err, req, res, next) {
res.status(err.status || 500);
res.json({ error: err.message });
- if (err.status !== 404) {
+ if (err.stack) {
console.error(err.stack);
}
}); |
44465f21591a5497a687e2cceecaef5cb278833e | server.js | server.js | var express = require('express'),
routes = require(__dirname + '/app/routes.js'),
app = express(),
port = (process.env.PORT || 3000);
// Application settings
app.engine('html', require(__dirname + '/lib/template-engine.js').__express);
app.set('view engine', 'html');
app.set('vendorViews', __dirname + '/go... | var express = require('express'),
routes = require(__dirname + '/app/routes.js'),
app = express(),
port = (process.env.PORT || 3000);
// Application settings
app.engine('html', require(__dirname + '/lib/template-engine.js').__express);
app.set('view engine', 'html');
app.set('vendorViews', __dirname + '/go... | Add Middleware to serve static assets | Add Middleware to serve static assets
| JavaScript | mit | joelanman/govuk_elements,joelanman/govuk_elements | ---
+++
@@ -11,7 +11,8 @@
// Middleware to serve static assets
app.use('/public', express.static(__dirname + '/public'));
-app.use('/public', express.static(__dirname + '/govuk_modules/public'));
+app.use('/public', express.static(__dirname + '/govuk_modules/govuk_template/assets'));
+app.use('/public', express.s... |
35debf8c05fb5233841374331ae40853ec851437 | server.js | server.js | var express = require('express');
var redis = require('ioredis');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/endpoints');
var users = require('./routes/users');
var api = express();
// var redis = new Redis('/tmp... | var express = require('express');
var redis = require('ioredis');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/endpoints');
var users = require('./routes/users');
var api = express();
// var redis = new Redis('/tmp... | Add api to module exports | Add api to module exports
| JavaScript | mit | nathansmyth/node-stack,nathansmyth/node-stack | ---
+++
@@ -23,3 +23,5 @@
var server = api.listen(api.get('port'), function() {
console.log('Listening on port %d', server.address().port);
});
+
+module.exports = api; |
3a5c59ddecc7e5948d93afb00e2487c9001d64f3 | app/assets/javascripts/peoplefinder/help-area.js | app/assets/javascripts/peoplefinder/help-area.js | $('.help-content').hide()
$('.help-toggle').click(function(){
$(this).toggleClass('open').next('.help-content').slideToggle('slow');
}); | /* global $ */
$('.help-content').hide();
$('.help-toggle').click(function(){
$(this).toggleClass('open').next('.help-content').slideToggle('slow');
});
| Tweak JavaScript to pass lint | Tweak JavaScript to pass lint
| JavaScript | mit | MjAbuz/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,MjAbuz/peoplefinder,MjAbuz/peoplefinder,MjAbuz/peoplefinder,ministryofjustice/peoplefinder | ---
+++
@@ -1,4 +1,6 @@
-$('.help-content').hide()
+/* global $ */
+
+$('.help-content').hide();
$('.help-toggle').click(function(){
$(this).toggleClass('open').next('.help-content').slideToggle('slow');
}); |
f7443077399ae76499cb339afcbef5db45c5ace8 | app/components/shared/Panel/intro-with-button.js | app/components/shared/Panel/intro-with-button.js | import React from "react";
class IntroWithButton extends React.Component {
static displayName = "Panel.IntroWithButton";
static propTypes = {
children: React.PropTypes.node.isRequired
};
render() {
return (
<div className="py3 px3 flex">
{this.props.children[0]}
<div className="... | import React from "react";
class IntroWithButton extends React.Component {
static displayName = "Panel.IntroWithButton";
static propTypes = {
children: React.PropTypes.node.isRequired
};
render() {
let children = React.Children.toArray(this.props.children);
let intro;
let button;
if(chil... | Handle case where IntroWithButton has no button | Handle case where IntroWithButton has no button
| JavaScript | mit | buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend | ---
+++
@@ -8,12 +8,29 @@
};
render() {
+ let children = React.Children.toArray(this.props.children);
+
+ let intro;
+ let button;
+ if(children.length == 1) {
+ intro = children;
+ } else {
+ button = children.pop();
+ intro = children;
+ }
+
+ if(button) {
+ button =... |
ee33df0c5c35339239ce82662d295dc2204035a5 | assets/scripts/bookmark/controller/BookMark.js | assets/scripts/bookmark/controller/BookMark.js | angular.module('caco.bookmark.crtl', ['caco.bookmark.REST'])
.controller('BookMarkCrtl', function ($rootScope, $scope, $stateParams, $location, BookMarkREST) {
$rootScope.module = 'bookmark';
if ($stateParams.id) {
BookMarkREST.one({id: $stateParams.id}, function (data) {
... | angular.module('caco.bookmark.crtl', ['caco.bookmark.REST'])
.controller('BookMarkCrtl', function ($rootScope, $scope, $stateParams, $location, BookMarkREST) {
$rootScope.module = 'bookmark';
if ($stateParams.id) {
BookMarkREST.one({id: $stateParams.id}, function (data) {
... | Save one request on bookmark delete. | Save one request on bookmark delete.
| JavaScript | mit | Cacodaimon/CacoCloud,Cacodaimon/CacoCloud,Cacodaimon/CacoCloud,Cacodaimon/CacoCloud | ---
+++
@@ -25,9 +25,17 @@
}
BookMarkREST.remove({id: id}, {}, function(data) {
- BookMarkREST.all({}, function (data) {
- $scope.bookmarks = data.response;
- });
+ if (data.status != 200) {
+ return;
+ ... |
57ec8ec0afca5b79742deecddb4fe4a509b05918 | commons/js/index.js | commons/js/index.js | (function main() {
var active = $('ul.nav li.active');
$('#ART').add('#credits').show(900);
$('ul.nav').on('click', 'li', function() {
$(active.removeClass('active')
.find('a')
.attr('href')).hide(300);
$((active = $(this)).addClass('active')
.find('a')
... | (function main() {
var active = $('ul.nav li.active');
$('#ART').add('#credits').fadeIn(900);
$('ul.nav').on('click', 'li', function() {
$(active.removeClass('active')
.find('a')
.attr('href')).fadeOut(300);
$((active = $(this)).addClass('active')
.find('a')
... | Use fadeIn/Out instead of show/hide since the latter are laggy in weaker machines | Use fadeIn/Out instead of show/hide since the latter are laggy in weaker machines
| JavaScript | mit | artbytrie/artbytrie.github.io,artbytrie/artbytrie.github.io | ---
+++
@@ -1,14 +1,14 @@
(function main() {
var active = $('ul.nav li.active');
- $('#ART').add('#credits').show(900);
+ $('#ART').add('#credits').fadeIn(900);
$('ul.nav').on('click', 'li', function() {
$(active.removeClass('active')
.find('a')
- .attr('href')).hide(300);
+ .... |
068b8cb55fb5f0ab6e51f9a19e202c88f1cc1210 | src/js/weapon/bow.js | src/js/weapon/bow.js | 'use strict';
Darwinator.Bow = function(game, coolDown, bulletSpeed, bullets, damage, owner) {
Darwinator.Weapon.call(this, game, coolDown, bulletSpeed, damage, owner);
this.bullets.createMultiple(30, 'arrow');
this.bullets.setAll('anchor.x', 0.5);
this.bullets.setAll('anchor.y', 0.5);
this.bullets.setAll('o... | 'use strict';
Darwinator.Bow = function(game, coolDown, bulletSpeed, bullets, damage, owner) {
Darwinator.Weapon.call(this, game, coolDown, bulletSpeed, damage, owner);
this.bullets.createMultiple(30, 'arrow');
this.bullets.setAll('anchor.x', 0.5);
this.bullets.setAll('anchor.y', 0.5);
this.bullets.setAll('o... | Make bullets keep track of their weapons owners | Make bullets keep track of their weapons owners
| JavaScript | mit | werme/DATX02 | ---
+++
@@ -6,6 +6,7 @@
this.bullets.setAll('anchor.x', 0.5);
this.bullets.setAll('anchor.y', 0.5);
this.bullets.setAll('outOfBoundsKill', true);
+ this.bullets.setAll('owner', this.owner);
this.game.physics.enable(this.bullets, Phaser.Physics.ARCADE);
bullets.add(this.bullets);
}; |
f2354cb75e3413130d53ae7fe81572d1d43a46c1 | lib/exposure/exposure.config.schema.js | lib/exposure/exposure.config.schema.js | import createGraph from '../query/lib/createGraph.js';
import {Match} from 'meteor/check';
export const ExposureDefaults = {
blocking: false,
method: true,
publication: true,
};
export const ExposureSchema = {
firewall: Match.Maybe(
Match.OneOf(Function, [Function])
),
maxLimit: Match.... | import createGraph from '../query/lib/createGraph.js';
import {Match} from 'meteor/check';
export const ExposureDefaults = {
blocking: false,
method: true,
publication: true,
};
export const ExposureSchema = {
firewall: Match.Maybe(
Match.OneOf(Function, [Function])
),
maxLimit: Match.... | Allow functions in global exposure bodies | Allow functions in global exposure bodies | JavaScript | mit | cult-of-coders/grapher | ---
+++
@@ -16,7 +16,7 @@
publication: Match.Maybe(Boolean),
method: Match.Maybe(Boolean),
blocking: Match.Maybe(Boolean),
- body: Match.Maybe(Object),
+ body: Match.Maybe(Match.OneOf(Object, Function)),
restrictedFields: Match.Maybe([String]),
restrictLinks: Match.Maybe(
Match... |
470493391503d7884774348909dc78b2c0f3cb06 | data.js | data.js | var async = require('async');
var pingdom = require('./pingdom');
function checks(config, limit, done) {
var api = pingdom(config);
api.checks(function(err, checks) {
if(err) return console.error(err);
async.map(checks, function(check, cb) {
api.results(function(err, results) {
... | var async = require('async');
var pingdom = require('./pingdom');
function checks(config, limit, done) {
var api = pingdom(config);
api.checks(function(err, checks) {
if(err) return console.error(err);
async.map(checks, function(check, cb) {
api.results(function(err, results) {
... | Convert time to JS format | Convert time to JS format
JS uses ms instead of s provided by the API.
| JavaScript | mit | bebraw/cdnperf,cdnperf/cdnperf,cdnperf/cdnperf,bebraw/cdnperf | ---
+++
@@ -20,7 +20,7 @@
lastresponse: check.lastresponsetime,
data: results.map(function(result) {
return {
- x: result.time,
+ x: result.time * 1000, // s to ms
y: r... |
b5a89d7e56dac058396cbd417c1c0abedc5f5aac | test/app.js | test/app.js | require('dotenv/config')
const sinon = require('sinon')
const tap = require('tap')
const App = require('../lib/app')
tap.test('App', async t => {
await t.test('run', async t => {
await t.test(`logs 'Hello, $NAME!'`, async t => {
const message = `Hello, ${process.env.NAME}!`
const mock = sinon.mock(console)
... | require('dotenv/config')
const sinon = require('sinon')
const tap = require('tap')
const App = require('../lib/app')
tap.test('App', async t => {
await t.test('run', async t => {
await t.test(`logs 'Hello, $NAME!'`, async () => {
const message = `Hello, ${process.env.NAME}!`
const mock = sinon.mock(console)... | Remove unused var in test | Remove unused var in test
| JavaScript | mit | jordanbtucker/node-init,jordanbtucker/node-init | ---
+++
@@ -6,7 +6,7 @@
tap.test('App', async t => {
await t.test('run', async t => {
- await t.test(`logs 'Hello, $NAME!'`, async t => {
+ await t.test(`logs 'Hello, $NAME!'`, async () => {
const message = `Hello, ${process.env.NAME}!`
const mock = sinon.mock(console) |
39d54af818c9c1c02c79b041fc662e49c1879ec5 | app/javascript/components/Filters/FilterOverlayTrigger/component.js | app/javascript/components/Filters/FilterOverlayTrigger/component.js | import React from 'react';
import PropTypes from 'prop-types';
import Button from 'react-bootstrap/Button';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import { getButtonHintString } from '../utils';
import FilterPopover from '../FilterPopover/component';
class FilterOverlayTrigger extends React.Comp... | import React from 'react';
import PropTypes from 'prop-types';
import Button from 'react-bootstrap/Button';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import { getButtonHintString } from '../utils';
import FilterPopover from '../FilterPopover/component';
class FilterOverlayTrigger extends React.Comp... | Apply search when dismissing any popover | 9623: Apply search when dismissing any popover
| JavaScript | apache-2.0 | thecartercenter/elmo,thecartercenter/elmo,thecartercenter/elmo | ---
+++
@@ -17,6 +17,12 @@
hints: PropTypes.arrayOf(PropTypes.string),
buttonClass: PropTypes.string,
};
+
+ handleExit = () => {
+ const { onSubmit } = this.props;
+ // TODO: Don't search if nothing was modified.
+ onSubmit();
+ }
renderPopover = () => {
const { id, popoverContent, ... |
0f0e4153ad6041a834d06a7947662e6e15e3eca4 | schema/settings.js | schema/settings.js | const mongoose = require('mongoose');
const Schema = mongoose.Schema;
var SettingSchema = new Schema({
modLogID: {
type: Number,
required: false
},
filterInvites: {
type: Boolean,
required: false,
default: false
}
});
module.exports = SettingSchema; | const mongoose = require('mongoose');
const Schema = mongoose.Schema;
var SettingSchema = new Schema({
modLogID: {
type: Number,
required: false
},
muteRoleID: {
type: Number,
required: false
},
filterInvites: {
type: Boolean,
required: false,
... | Add support for mute role | Add support for mute role
| JavaScript | mit | steamboat-dev/shared | ---
+++
@@ -3,6 +3,10 @@
var SettingSchema = new Schema({
modLogID: {
+ type: Number,
+ required: false
+ },
+ muteRoleID: {
type: Number,
required: false
}, |
779fdd103374a6edb27d555e23aaace7a6f7caa3 | public/assets/default/js/thread.js | public/assets/default/js/thread.js |
$(document).ready(function(){
var simplemde = new SimpleMDE({
element: $("#postreply")[0],
autosave: {
enabled: true,
delay: 2000,
unique_id: "thread-" + window.thread_id // save drafts based on thread id
},
spellChecker: false
});
});
|
$(document).ready(function(){
var simplemde = new SimpleMDE({
element: $("#postreply")[0],
// Autosave disabled temporarily because it keeps it's content even after submitting (Clearboard will use a custom AJAX submit function)
/*autosave: {
enabled: true,
delay: 200... | Disable SimpleMDE autosaving, as it retains it would retain it's content after posting | Disable SimpleMDE autosaving, as it retains it would retain it's content after posting
| JavaScript | mit | clearboard/clearboard,mitchfizz05/clearboard,mitchfizz05/clearboard,clearboard/clearboard | ---
+++
@@ -2,11 +2,12 @@
$(document).ready(function(){
var simplemde = new SimpleMDE({
element: $("#postreply")[0],
- autosave: {
+ // Autosave disabled temporarily because it keeps it's content even after submitting (Clearboard will use a custom AJAX submit function)
+ /*autosave... |
45dfb547c46f25255759f6ebcdc95f59cf1d9c75 | commonjs/cookie-opt.js | commonjs/cookie-opt.js | var componentEvent = require('kwf/component-event');
var cookies = require('js-cookie');
var CookieOpt = {};
CookieOpt.getDefaultOpt = function() {
return 'in'; // TODO get from baseProperty
};
CookieOpt.isSetOpt = function() {
return !!cookies.get('cookieOpt');
};
CookieOpt.getOpt = function() {
if (Co... | var componentEvent = require('kwf/component-event');
var cookies = require('js-cookie');
var $ = require('jQuery');
var CookieOpt = {};
CookieOpt.getDefaultOpt = function() {
var defaultOpt = $('body').data('cookieDefaultOpt');
if (defaultOpt != 'in' && defaultOpt != 'out') defaultOpt = 'in';
return defau... | Read default cookie opt setting from body data tag | Read default cookie opt setting from body data tag
| JavaScript | bsd-2-clause | koala-framework/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework | ---
+++
@@ -1,10 +1,13 @@
var componentEvent = require('kwf/component-event');
var cookies = require('js-cookie');
+var $ = require('jQuery');
var CookieOpt = {};
CookieOpt.getDefaultOpt = function() {
- return 'in'; // TODO get from baseProperty
+ var defaultOpt = $('body').data('cookieDefaultOpt');
+ ... |
20347bfe721a0189e77978561400e5cb23132a11 | Kwf_js/Utils/YoutubePlayer.js | Kwf_js/Utils/YoutubePlayer.js | Ext.namespace('Kwf.Utils.YoutubePlayer');
Kwf.Utils.YoutubePlayer.isLoaded = false;
Kwf.Utils.YoutubePlayer.isCallbackCalled = false;
Kwf.Utils.YoutubePlayer.callbacks = [];
Kwf.Utils.YoutubePlayer.load = function(callback, scope)
{
if (Kwf.Utils.YoutubePlayer.isCallbackCalled) {
callback.call(scope || win... | Ext.namespace('Kwf.Utils.YoutubePlayer');
Kwf.Utils.YoutubePlayer.isLoaded = false;
Kwf.Utils.YoutubePlayer.isCallbackCalled = false;
Kwf.Utils.YoutubePlayer.callbacks = [];
Kwf.Utils.YoutubePlayer.load = function(callback, scope)
{
if (Kwf.Utils.YoutubePlayer.isCallbackCalled) {
callback.call(scope || win... | Revert "get dynamicly if https or http is supported for youtube iframe api" | Revert "get dynamicly if https or http is supported for youtube iframe api"
This reverts commit ffbdfe78a884b06447ff6da01137820224081962.
| JavaScript | bsd-2-clause | koala-framework/koala-framework,yacon/koala-framework,nsams/koala-framework,Ben-Ho/koala-framework,Sogl/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework,yacon/koala-framework,kaufmo/koala-framework,Sogl/koala-framework,Ben-Ho/koala-framework,yacon/koala-framework,kaufmo/koala-framework,nsams/koala... | ---
+++
@@ -19,7 +19,7 @@
var tag = document.createElement('script');
tag.setAttribute('type', 'text/javascript');
- tag.setAttribute('src', '//www.youtube.com/iframe_api');
+ tag.setAttribute('src', 'http://www.youtube.com/iframe_api');
var firstScriptTag = document.getElementsByTagName('scrip... |
a62a28a4819f038ab46a32fee32869cc54c920e2 | web/src/searchQuery.js | web/src/searchQuery.js | // This is a second entry point to speed up our query
// to fetch search results.
// We've patched react-scripts to add this as another entry
// point. E.g., the Webpack config by running lives at
// web/node_modules/react-scripts/config/webpack.config.js.
// After modifying files in react-scripts, commit the
// patche... | // This is a second entry point to speed up our query
// to fetch search results.
// We've patched react-scripts to add this as another entry
// point. E.g., the Webpack config by running lives at
// web/node_modules/react-scripts/config/webpack.config.js.
// After modifying files in react-scripts, commit the
// patche... | Enable prefetching to try it out | Enable prefetching to try it out
| JavaScript | mpl-2.0 | gladly-team/tab,gladly-team/tab,gladly-team/tab | ---
+++
@@ -9,6 +9,8 @@
// You can view the patch diff in ./web/patches.
// For this to be meaningful, we have to make sure we inject
// this script first, before all other app code.
+
+// TODO: add tests for env var and other logic
// Return an empty script when building the newtab app.
// The newtab app will... |
ba9c863de909906382b55309e1cfe0e0ce935308 | spec/html/QueryStringSpec.js | spec/html/QueryStringSpec.js | describe("QueryString", function() {
describe("#setParam", function() {
it("sets the query string to include the given key/value pair", function() {
var windowLocation = {
search: ""
},
queryString = new j$.QueryString({
getWindowLocation: function() { return windowLoca... | describe("QueryString", function() {
describe("#setParam", function() {
it("sets the query string to include the given key/value pair", function() {
var windowLocation = {
search: ""
},
queryString = new j$.QueryString({
getWindowLocation: function() { return windowLocat... | Add spec to verify custom query params are left alone | Add spec to verify custom query params are left alone
[#29578495]
| JavaScript | mit | faizalpribadi/jasmine,danielalexiuc/jasmine,GerHobbelt/jasmine,Contagious06/jasmine,tsaikd/jasmine,negherbon/jasmine,soycode/jasmine,mashroomxl/jasmine,mashroomxl/jasmine,WY08271/jasmine,GerHobbelt/jasmine,songshuangkk/jasmine,rlugojr/jasmine,paulcbetts/jasmine,IveWong/jasmine,leahciMic/jasmine,morsdyce/jasmine,daniela... | ---
+++
@@ -1,7 +1,6 @@
describe("QueryString", function() {
describe("#setParam", function() {
-
it("sets the query string to include the given key/value pair", function() {
var windowLocation = {
search: ""
@@ -13,6 +12,20 @@
queryString.setParam("foo", "bar baz");
expec... |
585467648d0ec67da6cde967a1e17b07014638b8 | src/native/app/components/Text.react.js | src/native/app/components/Text.react.js | import React, { Component, PropTypes } from 'react';
import theme from '../theme';
import { StyleSheet, Text } from 'react-native';
const styles = StyleSheet.create({
text: {
color: theme.textColor,
fontFamily: theme.fontFamily,
fontSize: theme.fontSize,
},
});
// Normalize multiline strings because T... | import React, { Component, PropTypes } from 'react';
import theme from '../theme';
import { StyleSheet, Text } from 'react-native';
const styles = StyleSheet.create({
text: { // eslint-disable-line react-native/no-unused-styles
color: theme.textColor,
fontFamily: theme.fontFamily,
fontSize: theme.fontSiz... | Fix native Text computed lineHeight | Fix native Text computed lineHeight
| JavaScript | mit | este/este,robinpokorny/este,TheoMer/Gyms-Of-The-World,skallet/este,christophediprima/este,robinpokorny/este,cjk/smart-home-app,christophediprima/este,TheoMer/Gyms-Of-The-World,TheoMer/este,christophediprima/este,christophediprima/este,steida/este,TheoMer/este,TheoMer/este,sikhote/davidsinclair,sikhote/davidsinclair,est... | ---
+++
@@ -3,10 +3,11 @@
import { StyleSheet, Text } from 'react-native';
const styles = StyleSheet.create({
- text: {
+ text: { // eslint-disable-line react-native/no-unused-styles
color: theme.textColor,
fontFamily: theme.fontFamily,
fontSize: theme.fontSize,
+ lineHeight: theme.fontSize * ... |
9692dfc1f91f9fe3c87a1afe4df8d613f78f885c | bin/startBot.js | bin/startBot.js | const RoundpiecesBot = require('./../src/roundpiecesbot');
const token = process.env.ROUNDPIECES_API_KEY;
const adminUserName = process.env.ROUNDPIECES_ADMIN_USERNAME;
const listPath = process.env.ROUNDPIECES_LIST_PATH;
const startSearch = '00 * * * * *';
const endSearch = '30 * * * * *';
const resetSearch = '55 * * ... | const RoundpiecesBot = require('./../src/roundpiecesbot');
const token = process.env.ROUNDPIECES_API_KEY;
const adminUserName = process.env.ROUNDPIECES_ADMIN_USERNAME;
const listPath = process.env.ROUNDPIECES_LIST_PATH;
const startSearch = '00 00 9 * * 4'; // 09.00 Thursdays
const endSearch = '00 00 12 * * 4'; // 12.... | Set cron ranges to match real arrangement times | Set cron ranges to match real arrangement times
| JavaScript | mit | jbroni/roundpieces-slackbot | ---
+++
@@ -4,9 +4,9 @@
const adminUserName = process.env.ROUNDPIECES_ADMIN_USERNAME;
const listPath = process.env.ROUNDPIECES_LIST_PATH;
-const startSearch = '00 * * * * *';
-const endSearch = '30 * * * * *';
-const resetSearch = '55 * * * * *';
+const startSearch = '00 00 9 * * 4'; // 09.00 Thursdays
+const end... |
cc033abb20799f36b170e607ce95297491781eda | utility.js | utility.js | const path = require( 'path' )
const fs = require( 'fs' )
// Create a new path from arguments.
const getAbsolutePath = ( ...args ) => path.resolve( path.join.apply( null, args ) )
const isExist = filePath => {
try {
fs.statSync( path.resolve( filePath ) )
return true
} catch( error ){
return false
... | const path = require( 'path' )
const fs = require( 'fs' )
// Create a new path from arguments.
const getAbsolutePath = ( ...args ) => path.resolve( path.join.apply( null, args ) )
const isExist = filePath => {
try {
fs.statSync( path.resolve( filePath ) )
return true
} catch( error ){
return false
... | Add method to read and write | Add method to read and write
| JavaScript | mit | Yacona/yacona | ---
+++
@@ -12,7 +12,12 @@
}
}
+const read = filePath => fs.readFileSync( filePath, 'utf-8' )
+const write = ( filePath, content ) => fs.writeFileSync( filePath, content )
+
module.exports = {
getAbsolutePath: getAbsolutePath,
- isExist : isExist
+ isExist : isExist,
+ read : rea... |
edeca61db29c3076b41c005eace74e2555f76be3 | test/helpers/benchmarkReporter.js | test/helpers/benchmarkReporter.js | const chalk = require('chalk');
function benchmarkResultsToConsole(suite){
console.log("\n");
console.log("==================");
console.log("Benchmark results:");
console.log("------------------");
var bench;
for(var testNo = 0; testNo < suite.length; testNo++){
bench = suite[testNo];
... | const chalk = require('chalk');
function benchmarkResultsToConsole(suite){
console.log("\n");
console.log("==================");
console.log("Benchmark results:");
console.log("------------------");
var bench;
for(var testNo = 0; testNo < suite.length; testNo++){
bench = suite[testNo];
... | Change benchmark results color to magenta | Change benchmark results color to magenta
as white on blue is barely visible in travis
| JavaScript | mit | baranga/JSON-Patch,Starcounter-Jack/JSON-Patch,baranga/JSON-Patch,Starcounter-Jack/JSON-Patch,baranga/JSON-Patch,baranga/JSON-Patch,Starcounter-Jack/JSON-Patch,Starcounter-Jack/JSON-Patch | ---
+++
@@ -8,7 +8,7 @@
for(var testNo = 0; testNo < suite.length; testNo++){
bench = suite[testNo];
console.log(chalk.green.underline(bench.name) +
- "\n Ops/sec: " + chalk.bold.bgBlue(bench.hz.toFixed(bench.hz < 100 ? 2 : 0)) +
+ "\n Ops/sec: " + chalk.bold.magenta(bench... |
f55703a7a027651e141b753058abec7cbdf28e89 | test/jsx-no-logical-expression.js | test/jsx-no-logical-expression.js | import test from 'ava';
import avaRuleTester from 'eslint-ava-rule-tester';
import rule from '../src/rules/jsx-no-logical-expression';
const ruleTester = avaRuleTester(test, {
parserOptions: {
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true
}
}
});
const ruleId = 'jsx-no-logical-expression';
const ... | import test from 'ava';
import avaRuleTester from 'eslint-ava-rule-tester';
import rule from '../src/rules/jsx-no-logical-expression';
const ruleTester = avaRuleTester(test, {
parserOptions: {
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true
}
}
});
const ruleId = 'jsx-no-logical-expression';
const ... | Add another invalid use case | Add another invalid use case
| JavaScript | mit | CoorpAcademy/eslint-plugin-coorpacademy | ---
+++
@@ -34,6 +34,18 @@
{
code: '{true || <div />}',
errors: [error]
+ },
+ {
+ code: '{false && <div />}',
+ errors: [error]
+ },
+ {
+ code: '{undefined && <div />}',
+ errors: [error]
+ },
+ {
+ code: '{0 && <div />}',
+ errors: [error]
}
... |
d05e4d520f627b555fc52f243db307275eb7ca39 | tests/unit/adapters/github-release-test.js | tests/unit/adapters/github-release-test.js | import { moduleFor, test } from 'ember-qunit';
moduleFor('adapter:github-release', 'Unit | Adapter | github release', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});
// Replace this with your real tests.
test('it exists', function(assert) {
let adapter = this.subje... | import { moduleFor, test } from 'ember-qunit';
moduleFor('adapter:github-release', 'Unit | Adapter | github release', {
// Specify the other units that are required for this test.
// needs: ['serializer:foo']
});
test('it exists', function(assert) {
let adapter = this.subject();
assert.ok(adapter);
});
test(... | Remove the boilerplate comment now that we have more tests. | Remove the boilerplate comment now that we have more tests.
| JavaScript | mit | elwayman02/ember-data-github,jimmay5469/ember-data-github,elwayman02/ember-data-github,jimmay5469/ember-data-github | ---
+++
@@ -5,7 +5,6 @@
// needs: ['serializer:foo']
});
-// Replace this with your real tests.
test('it exists', function(assert) {
let adapter = this.subject();
assert.ok(adapter); |
0b13a34c60150e8eee5394b61233d451c7a933cb | assets/js/app.js | assets/js/app.js | $( document ).ready(function() {
/* Sidebar height set */
$('.sidebar').css('min-height',$(document).height());
/* Secondary contact links */
var scontacts = $('#contact-list-secondary');
var contact_list = $('#contact-list');
scontacts.hide();
contact_list.mouseenter(function(){ scontacts.fadeIn(); });
... | $( document ).ready(function() {
/* Sidebar height set */
$('.sidebar').css('min-height',$(document).height());
/* Secondary contact links */
var scontacts = $('#contact-list-secondary');
var contact_list = $('#contact-list');
scontacts.hide();
contact_list.mouseenter(function(){ scontacts.fadeIn(); });
... | Add target _blank on article links | Add target _blank on article links
| JavaScript | mit | meumobi/meumobi.github.io,meumobi/meumobi.github.io,meumobi/meumobi.github.io | ---
+++
@@ -13,4 +13,9 @@
contact_list.mouseleave(function(){ scontacts.fadeOut(); });
+ // prevent line-breaks in links and make open in new tab
+ $('div.article_body a').not('[rel="footnote"], [rev="footnote"]').html(function(i, str) {
+ return str.replace(/ /g,' ');
+ }).attr('target','_blank');
+
... |
59c5b0cf7aade3943a2d9b664c5efacd4f23a14d | src/api-gateway-websocket/lambda-events/WebSocketDisconnectEvent.js | src/api-gateway-websocket/lambda-events/WebSocketDisconnectEvent.js | import WebSocketRequestContext from './WebSocketRequestContext.js'
// TODO this should be probably moved to utils, and combined with other header
// functions and utilities
function createMultiValueHeaders(headers) {
return Object.entries(headers).reduce((acc, [key, value]) => {
acc[key] = [value]
return ac... | import WebSocketRequestContext from './WebSocketRequestContext.js'
import { parseHeaders, parseMultiValueHeaders } from '../../utils/index.js'
export default class WebSocketDisconnectEvent {
constructor(connectionId) {
this._connectionId = connectionId
}
create() {
// TODO FIXME not sure where the heade... | Rewrite header handling in websocket disconnect event | Rewrite header handling in websocket disconnect event
| JavaScript | mit | dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline | ---
+++
@@ -1,14 +1,5 @@
import WebSocketRequestContext from './WebSocketRequestContext.js'
-
-// TODO this should be probably moved to utils, and combined with other header
-// functions and utilities
-function createMultiValueHeaders(headers) {
- return Object.entries(headers).reduce((acc, [key, value]) => {
- ... |
3a1638c1538b902bc8cebbf6b969798240f84157 | demo/server.js | demo/server.js | var config = require('./webpack.config.js');
var webpack = require('webpack');
var webpackDevServer = require('webpack-dev-server');
var compiler;
var server;
// Source maps
config.devtool = 'source-map';
config.output.publicPath = '/dist/';
// Remove minification to speed things up.
config.plugins.splice(1, 2);
//... | var config = require('./webpack.config.js');
var webpack = require('webpack');
var webpackDevServer = require('webpack-dev-server');
var compiler;
var server;
// Source maps
config.devtool = 'eval';
config.output.publicPath = '/dist/';
// Remove minification to speed things up.
config.plugins.splice(1, 2);
// Add H... | Improve hot loading compile time | Improve hot loading compile time
| JavaScript | mit | acorn421/react-html5video-subs,mderrick/react-html5video,Caseworx/inferno-html5video,Caseworx/inferno-html5video,acorn421/react-html5video-subs | ---
+++
@@ -5,7 +5,7 @@
var server;
// Source maps
-config.devtool = 'source-map';
+config.devtool = 'eval';
config.output.publicPath = '/dist/';
|
49d8d01a14fb235c999473915667144d890e125b | src/components/video_list.js | src/components/video_list.js | import React from 'react'
import VideoListItem from './video_list_item'
const VideoList = (props) => {
const videoItems = props.videos.map((video) => {
return <VideoListItem video={video} />
});
return (
<ul className="col-md-4 list-group">
{videoItems}
</ul>
);
};
export default VideoList... | import React from 'react'
import VideoListItem from './video_list_item'
const VideoList = (props) => {
const videoItems = props.videos.map((video) => {
return <VideoListItem key={video.etag} video={video} />
});
return (
<ul className="col-md-4 list-group">
{videoItems}
</ul>
);
};
export ... | Add etag as unique key | Add etag as unique key
Finish 25
| JavaScript | mit | fifiteen82726/ReduxSimpleStarter,fifiteen82726/ReduxSimpleStarter | ---
+++
@@ -4,7 +4,7 @@
const VideoList = (props) => {
const videoItems = props.videos.map((video) => {
- return <VideoListItem video={video} />
+ return <VideoListItem key={video.etag} video={video} />
});
return ( |
60b20d83f4fdc9c625b56a178c93af1533b82a60 | src/redux/modules/card.js | src/redux/modules/card.js | import uuid from 'uuid';
import { Record as record } from 'immutable';
export class CardModel extends record({
name: '',
mana: null,
attack: null,
defense: null,
portrait: null,
}) {
constructor(obj) {
super(obj);
this.id = uuid.v4();
}
}
| // import uuid from 'uuid';
import { Record as record } from 'immutable';
export const CardModel = record({
id: null,
name: '',
mana: null,
attack: null,
defense: null,
portrait: null,
});
| Remove id from Record and add id field | Remove id from Record and add id field
Reason: on CardModel.update() it doesn’t keep the id field, so shit
crashes
| JavaScript | mit | inooid/react-redux-card-game,inooid/react-redux-card-game | ---
+++
@@ -1,15 +1,11 @@
-import uuid from 'uuid';
+// import uuid from 'uuid';
import { Record as record } from 'immutable';
-export class CardModel extends record({
+export const CardModel = record({
+ id: null,
name: '',
mana: null,
attack: null,
defense: null,
portrait: null,
-}) {
- construc... |
153b9121bc2971e916ddc78045ebc6afc8a8ec5e | src/acorn_plugin/skipBlockComment.js | src/acorn_plugin/skipBlockComment.js | export default function skipSpace() {
// https://github.com/ternjs/acorn/blob/master/src/tokenize.js#L100-L116
return function ha(endSign) {
const endS = endSign ? endSign : '*/';
let startLoc = this.options.onComment && this.curPosition();
let start = this.pos, end = this.input.indexOf(endS, this.pos +... | // eslint-disable
export default function skipSpace() {
// https://github.com/ternjs/acorn/blob/master/src/tokenize.js#L100-L116
return function ha(endSign) {
const endS = endSign ? endSign : '*/';
let startLoc = this.options.onComment && this.curPosition();
let start = this.pos,
end = this.inp... | Disable eslint for this for now. | Disable eslint for this for now. | JavaScript | mit | laosb/hatp | ---
+++
@@ -1,11 +1,13 @@
+// eslint-disable
export default function skipSpace() {
// https://github.com/ternjs/acorn/blob/master/src/tokenize.js#L100-L116
return function ha(endSign) {
const endS = endSign ? endSign : '*/';
let startLoc = this.options.onComment && this.curPosition();
- let start ... |
bc24c83daef21248ee0ab141675bd6170c399403 | tests/specs/misc/on-error/main.js | tests/specs/misc/on-error/main.js | define(function(require) {
var test = require('../../../test')
var n = 0
// 404
var a = require('./a')
test.assert(a === null, '404 a')
// exec error
setTimeout(function() {
var b = require('./b')
}, 0)
require.async('./c', function(c) {
test.assert(c === null, '404 c')
done()
})
... | define(function(require) {
var test = require('../../../test')
var n = 0
// 404
var a = require('./a')
test.assert(a === null, '404 a')
// exec error
setTimeout(function() {
var b = require('./b')
}, 0)
require.async('./c', function(c) {
test.assert(c === null, '404 c')
done()
})
... | Improve specs for error event | Improve specs for error event
| JavaScript | mit | jishichang/seajs,eleanors/SeaJS,baiduoduo/seajs,ysxlinux/seajs,kaijiemo/seajs,wenber/seajs,uestcNaldo/seajs,PUSEN/seajs,zaoli/seajs,JeffLi1993/seajs,13693100472/seajs,tonny-zhang/seajs,chinakids/seajs,ysxlinux/seajs,kuier/seajs,Gatsbyy/seajs,wenber/seajs,miusuncle/seajs,mosoft521/seajs,treejames/seajs,Lyfme/seajs,imcys... | ---
+++
@@ -34,7 +34,7 @@
function done() {
if (++n === 3) {
- test.assert(w_errors.length === 2, w_errors.length)
+ test.assert(w_errors.length > 0, w_errors.length)
test.assert(s_errors.length === 4, s_errors.length)
test.next()
} |
670dff868d04ab149bd252b6835b224a202a5bd1 | lib/provider.js | lib/provider.js | 'use babel';
import {filter} from 'fuzzaldrin';
import commands from './commands';
import variables from './variables';
export const selector = '.source.cmake';
export const disableForSelector = '.source.cmake .comment';
export const inclusionPriority = 1;
function existy(value) {
return value != null;
}
functi... | 'use babel';
import {filter} from 'fuzzaldrin';
import commands from './commands';
import variables from './variables';
export const selector = '.source.cmake';
export const disableForSelector = '.source.cmake .comment';
export const inclusionPriority = 1;
function existy(value) {
return value != null;
}
functi... | Move cursor left on function completion. | Move cursor left on function completion.
| JavaScript | mit | NealRame/autocomplete-cmake | ---
+++
@@ -52,3 +52,9 @@
export function getSuggestions({prefix, scopeDescriptor: scope_descriptor}) {
return suggest(prefix, scope_descriptor);
}
+
+export function onDidInsertSuggestion({editor, suggestion}) {
+ if (suggestion && suggestion.type === 'function') {
+ editor.moveLeft(1);
+ }
+} |
7bfb2f65427182294c4582bb6bf1234daa193791 | shell/Gruntfile.js | shell/Gruntfile.js | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-atom-shell": {
version: "0.20.3",
outputDir: "./atom-shell",
rebuild: true
}
});
grunt.loadNpmTasks('grunt-download-atom-shell');
};
| module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-atom-shell": {
version: "0.19.5",
outputDir: "./atom-shell",
rebuild: true
}
});
grunt.loadNpmTasks('grunt-download-atom-shell');
};
| Revert back to older atom-shell where remote-debugging works | Revert back to older atom-shell where remote-debugging works
This allows console to work again.
In b5b1c142b6d92d3f254c93aa43432230d4d31e14 we upgraded to an
atom-shell where remote-debugging /json doesn't seem to work.
Details at atom/atom-shell#969
| JavaScript | mit | kolya-ay/LightTable,masptj/LightTable,youprofit/LightTable,kausdev/LightTable,0x90sled/LightTable,EasonYi/LightTable,youprofit/LightTable,kenny-evitt/LightTable,kenny-evitt/LightTable,brabadu/LightTable,ashneo76/LightTable,rundis/LightTable,0x90sled/LightTable,youprofit/LightTable,fdserr/LightTable,kolya-ay/LightTable,... | ---
+++
@@ -4,7 +4,7 @@
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-atom-shell": {
- version: "0.20.3",
+ version: "0.19.5",
outputDir: "./atom-shell",
rebuild: true
} |
5a3b4b8010d20793c0ffcb36caeb27283aef61c5 | src/components/Members/NavbarLink.js | src/components/Members/NavbarLink.js | import React from 'react';
import { Link } from 'react-router';
function NavbarLink({to, href, className, component, children}) {
const Comp = component || Link;
return (
<span>
{ href ?
<a href={href}>Yo</a>
:
<Comp to={to} className={className} activeStyle={{
color: '... | import React from 'react';
import { Link } from 'react-router';
function NavbarLink({ children, className, component, href, to }) {
const Comp = component || Link;
let Linkelement = (
<Comp to={to} className={className} activeStyle={{
color: '#A94545',
}}>
{children}
</Comp>
);
if (hre... | Modify link generation to allow off site links | Modify link generation to allow off site links
| JavaScript | cc0-1.0 | cape-io/acf-client,cape-io/acf-client | ---
+++
@@ -1,22 +1,25 @@
import React from 'react';
import { Link } from 'react-router';
-function NavbarLink({to, href, className, component, children}) {
+function NavbarLink({ children, className, component, href, to }) {
const Comp = component || Link;
- return (
- <span>
- { href ?
- <a... |
f6b0174625f669cef151cf8ef702d38b509fe95a | src/components/finish-order/index.js | src/components/finish-order/index.js | import { Component } from 'preact';
import style from './style';
export default class FinishOrder extends Component {
constructor(props) {
super(props);
}
render(props, state) {
return (
<div class="container">
<p class="">
Děkujeme, za Vaši objednávku. Budeme Vás kontaktovat. Detaily ... | import { Component } from 'preact';
import style from './style';
export default class FinishOrder extends Component {
constructor(props) {
super(props);
}
render(props, state) {
return (
<div class="container">
<p class="">
Děkujeme, za Vaši objednávku. Budeme Vás kontaktovat. Detaily ... | Disable redirect button on finish order page | Disable redirect button on finish order page
| JavaScript | agpl-3.0 | MakersLab/custom-print | ---
+++
@@ -12,9 +12,9 @@
<p class="">
Děkujeme, za Vaši objednávku. Budeme Vás kontaktovat. Detaily objednávky jsme Vám zaslali na email.
</p>
- <a class="button" href="http://3dtovarna.cz/" class={`button two columns offset-by-four ${style['button']}`}>
- OK
- </a>
+ {/*... |
741414856087c820963d3e688d5bbf88f5edf82a | src/components/googlemap/TaskPlot.js | src/components/googlemap/TaskPlot.js | import React, { PropTypes } from 'react';
import { List } from 'immutable';
import Polyline from './Polyline';
import Marker from './Marker';
class TaskPlot extends React.Component {
shouldComponentUpdate(nextProps) {
return (this.props.map !== nextProps.map) ||
(this.props.googlemaps !== nextProps.google... | import React, { PropTypes } from 'react';
import { List } from 'immutable';
import Polyline from './Polyline';
import Marker from './Marker';
import * as icons from './icons';
class TaskPlot extends React.Component {
shouldComponentUpdate(nextProps) {
return (this.props.map !== nextProps.map) ||
(this.pro... | Add labels to task markers. | Add labels to task markers.
| JavaScript | mit | alistairmgreen/soaring-analyst,alistairmgreen/soaring-analyst | ---
+++
@@ -2,6 +2,7 @@
import { List } from 'immutable';
import Polyline from './Polyline';
import Marker from './Marker';
+import * as icons from './icons';
class TaskPlot extends React.Component {
@@ -14,10 +15,23 @@
render() {
const { task, googlemaps, map } = this.props;
const positions = ta... |
e8a00e1baad5e8ae7baa8afd9502f20cd0cd0687 | src/store/actions.js | src/store/actions.js | import axios from 'axios';
const API_BASE = 'http://api.zorexsalvo.com/v1';
export default {
getPosts: ({ commit }) => {
axios.get(`${API_BASE}/posts/`).then(
(response) => {
commit('getPosts', response.data);
},
);
},
getPost: ({ commit }, payload) => {
axios.get(`${API_BASE}/p... | import axios from 'axios';
const API_BASE = 'https://api.zorexsalvo.com/v1';
export default {
getPosts: ({ commit }) => {
axios.get(`${API_BASE}/posts/`).then(
(response) => {
commit('getPosts', response.data);
},
);
},
getPost: ({ commit }, payload) => {
axios.get(`${API_BASE}/... | Change api url to https | Change api url to https
| JavaScript | mit | zorexsalvo/zorexsalvo.github.io,zorexsalvo/zorexsalvo.github.io | ---
+++
@@ -1,6 +1,6 @@
import axios from 'axios';
-const API_BASE = 'http://api.zorexsalvo.com/v1';
+const API_BASE = 'https://api.zorexsalvo.com/v1';
export default { |
d456e2986d4b99f09fa291c990dff7c8d6a0d9d9 | src/utils/draw/reset_g.js | src/utils/draw/reset_g.js | // remove all children of the main `g` element
// prepare for re-drawing (e.g. during resize) with margins
export default ({
g,
margin
}) => {
g.selectAll('*').remove()
g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
}
| // remove all children of the main `g` element
// and all children of the base `element` that are flagged with a css class named `--delete-on-update`
// prepare for re-drawing (e.g. during resize) with margins
export default ({
g,
element,
margin
}) => {
element.selectAll('.--delete-on-update').remove()
g.sel... | Add flag to remove stuff outside of `g` element on resize & update. | Add flag to remove stuff outside of `g` element on resize & update.
| JavaScript | mit | simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks | ---
+++
@@ -1,9 +1,12 @@
// remove all children of the main `g` element
+// and all children of the base `element` that are flagged with a css class named `--delete-on-update`
// prepare for re-drawing (e.g. during resize) with margins
export default ({
g,
+ element,
margin
}) => {
+ element.selectAll('.-... |
8d94ee098cbde06564c72cbd44574bd47fd207a5 | vmdb/app/assets/javascripts/application.js | vmdb/app/assets/javascripts/application.js | //= require cfme_application
//= require dialog_import_export
//= require widget_import_export
//= require jquery.jqplot
//= require jqplot-plugins/jqplot.pieRenderer
//= require jqplot-plugins/jqplot.barRenderer
//= require jqplot-plugins/jqplot.categoryAxisRenderer
//= require jqplot-plugins/jqplot.highlighter
//= re... | //= require cfme_application
//= require dialog_import_export
//= require widget_import_export
//= require excanvas
//= require jquery.jqplot
//= require jqplot-plugins/jqplot.pieRenderer
//= require jqplot-plugins/jqplot.barRenderer
//= require jqplot-plugins/jqplot.categoryAxisRenderer
//= require jqplot-plugins/jqpl... | Enable jqplot charts to be visible in IE8 | Enable jqplot charts to be visible in IE8
https://bugzilla.redhat.com/show_bug.cgi?id=1058261
| JavaScript | apache-2.0 | juliancheal/manageiq,jvlcek/manageiq,jameswnl/manageiq,djberg96/manageiq,maas-ufcg/manageiq,josejulio/manageiq,fbladilo/manageiq,romanblanco/manageiq,lpichler/manageiq,agrare/manageiq,romanblanco/manageiq,NaNi-Z/manageiq,aufi/manageiq,jntullo/manageiq,tinaafitz/manageiq,tinaafitz/manageiq,mfeifer/manageiq,branic/manage... | ---
+++
@@ -1,6 +1,7 @@
//= require cfme_application
//= require dialog_import_export
//= require widget_import_export
+//= require excanvas
//= require jquery.jqplot
//= require jqplot-plugins/jqplot.pieRenderer
//= require jqplot-plugins/jqplot.barRenderer |
50ff129e6e3a02a03aa63a26e5c7d782a722db0e | src/bacon.react.js | src/bacon.react.js | import Bacon from "baconjs"
import React from "react"
export default React.createClass({
getInitialState() {
return {}
},
tryDispose() {
const {dispose} = this.state
if (dispose) {
dispose()
this.replaceState({})
}
},
trySubscribe(tDOM) {
this.tryDispose()
if (tDOM)
... | import Bacon from "baconjs"
import React from "react"
export default React.createClass({
getInitialState() {
return {}
},
tryDispose() {
const {dispose} = this.state
if (dispose) {
dispose()
this.replaceState({})
}
},
trySubscribe(props) {
this.tryDispose()
const {children... | Support className & id attrs and stream of arrays. | Support className & id attrs and stream of arrays.
| JavaScript | mit | polytypic/bacon.react | ---
+++
@@ -12,21 +12,25 @@
this.replaceState({})
}
},
- trySubscribe(tDOM) {
+ trySubscribe(props) {
this.tryDispose()
- if (tDOM)
- this.setState(
- {dispose: (tDOM instanceof Bacon.Observable ? tDOM :
- Bacon.combineTemplate(tDOM instanceof Array
- ... |
02e191dabf4485f305c09c37592fcdfdf477553b | src/base/Button.js | src/base/Button.js |
mi2JS.comp.add('base/Button', 'Base', '',
// component initializer function that defines constructor and adds methods to the prototype
function(proto, superProto, comp, superComp){
proto.construct = function(el, tpl, parent){
superProto.construct.call(this, el, tpl, parent);
this.lastClick = 0;
this.listen(... |
mi2JS.comp.add('base/Button', 'Base', '',
// component initializer function that defines constructor and adds methods to the prototype
function(proto, superProto, comp, superComp){
proto.construct = function(el, tpl, parent){
superProto.construct.call(this, el, tpl, parent);
this.lastClick = 0;
this.listen(... | Use __propName as default action for button | Use __propName as default action for button
| JavaScript | mit | hrgdavor/mi2js,hrgdavor/mi2js,hrgdavor/mi2js | ---
+++
@@ -37,7 +37,7 @@
};
proto.getAction = function(){
- return this.attr("action") || "action";
+ return this.attr("action") || this.__propName;
};
proto.setValue = function(value){ |
4d949a2bc8f628dcc66ee62161ae3680b21766d0 | bin/pep-proxy.js | bin/pep-proxy.js | #!/usr/bin/env node
var proxy = require('../lib/fiware-orion-pep'),
config = require('../config');
proxy.start(function (error, proxyObj) {
if (error) {
process.exit();
} else {
var module;
console.log('Loading middlewares');
module = require('../' + config.middlewares.req... | #!/usr/bin/env node
var proxy = require('../lib/fiware-orion-pep'),
config = require('../config');
proxy.start(function(error, proxyObj) {
var module;
if (error) {
process.exit();
} else {
console.log('Loading middlewares');
module = require('../' + config.middlewares.require)... | FIX Move the module definition to the top of the function | FIX Move the module definition to the top of the function
| JavaScript | agpl-3.0 | telefonicaid/fiware-pep-steelskin,telefonicaid/fiware-pep-steelskin,agroknow/fiware-pep-steelskin,telefonicaid/fiware-pep-steelskin,telefonicaid/fiware-pep-steelskin,agroknow/fiware-pep-steelskin,agroknow/fiware-pep-steelskin,agroknow/fiware-pep-steelskin | ---
+++
@@ -3,12 +3,12 @@
var proxy = require('../lib/fiware-orion-pep'),
config = require('../config');
-proxy.start(function (error, proxyObj) {
+proxy.start(function(error, proxyObj) {
+ var module;
+
if (error) {
process.exit();
} else {
- var module;
-
console.log('L... |
a439b552acbd586615b15b86d79ed003979aeaed | static/js/sh_init.js | static/js/sh_init.js | var codes = document.getElementsByTagName("code");
var title, elTitle, elPre;
for (var i=0, l=codes.length ; i<l ; i++) {
elPre = codes[i].parentNode;
if (elPre.tagName != "PRE") continue;
// Prepare for highlighting
// elPre.className = elPre.className.replace("sourceCode ","");
if (elPre.className.match("s... | var codes = document.getElementsByTagName("code");
var title, elTitle, elPre;
for (var i=0, l=codes.length ; i<l ; i++) {
elPre = codes[i].parentNode;
if (elPre.tagName != "PRE") continue;
// Prepare for highlighting
// elPre.className = elPre.className.replace("sourceCode ","");
if (elPre.className.match("s... | Add java to automatic conversions | Add java to automatic conversions
| JavaScript | bsd-3-clause | MasseR/Blog,MasseR/Blog | ---
+++
@@ -12,6 +12,7 @@
case 'haskell':
case 'html':
case 'php':
+ case 'java':
case 'python':
elPre.className = "sourceCode sh_" + elPre.className.replace("sourceCode ", "");
break; |
c06c26a6987da66dc1722be92625065cacf73603 | src/json-chayns-call/json-calls.js | src/json-chayns-call/json-calls.js | import * as jsonCallFunctions from './calls/index';
const jsonCalls = {
1: jsonCallFunctions.toggleWaitCursor,
2: jsonCallFunctions.selectTapp,
4: jsonCallFunctions.showPictures,
14: jsonCallFunctions.requestGeoLocation,
15: jsonCallFunctions.showVideo,
16: jsonCallFunctions.showAlert,
18:... | import * as jsonCallFunctions from './calls/index';
const jsonCalls = {
1: jsonCallFunctions.toggleWaitCursor,
2: jsonCallFunctions.selectTapp,
4: jsonCallFunctions.showPictures,
14: jsonCallFunctions.requestGeoLocation,
15: jsonCallFunctions.showVideo,
16: jsonCallFunctions.showAlert,
18:... | Add support for chayns-call 52 | Add support for chayns-call 52
| JavaScript | mit | TobitSoftware/chayns-web-light,TobitSoftware/chayns-web-light | ---
+++
@@ -10,6 +10,7 @@
18: jsonCallFunctions.getGlobalData,
30: jsonCallFunctions.dateTimePicker,
50: jsonCallFunctions.selectDialog,
+ 52: jsonCallFunctions.setTobitAccessToken,
54: jsonCallFunctions.tobitLogin,
56: jsonCallFunctions.tobitLogout,
72: jsonCallFunctions.showFloating... |
e13f0ea5f5e21d63d367e61f4b247ba2a60cfd48 | 5.AdvancedReactAndRedux/test/test_helper.js | 5.AdvancedReactAndRedux/test/test_helper.js | // Set up testing enviroment to run like a browser in the command line
// Build 'renderComponent' helper that should render a given react class
// Build helper for simulating events
// Set up chai-jquery | import jsdom from 'jsdom';
import jquery from 'jquery';
import TestUtils from 'react-addons-test-utils';
// Set up testing enviroment to run like a browser in the command line
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
global.window = global.document.defaultView;
const $ = _$(global.w... | Set up running like browser in command line, build renderComponent helper function | Set up running like browser in command line, build renderComponent helper function
| JavaScript | mit | Branimir123/Learning-React,Branimir123/Learning-React | ---
+++
@@ -1,7 +1,18 @@
+import jsdom from 'jsdom';
+import jquery from 'jquery';
+import TestUtils from 'react-addons-test-utils';
+
// Set up testing enviroment to run like a browser in the command line
-
+global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
+global.window = global.documen... |
61a7bad245a6b365ff7162421545b9004d79b2d5 | firecares/firestation/static/firestation/js/controllers/home.js | firecares/firestation/static/firestation/js/controllers/home.js |
'use strict';
(function() {
angular.module('fireStation.homeController', [])
.controller('home', function($scope, map, $filter) {
var homeMap = map.initMap('map', {scrollWheelZoom: false});
homeMap.setView([40, -90], 4);
var headquartersIcon = L.FireCARESMarkers.headquarte... |
'use strict';
(function() {
angular.module('fireStation.homeController', [])
.controller('home', function($scope, map, $filter) {
var homeMap = map.initMap('map', {scrollWheelZoom: false});
homeMap.setView([40, -90], 4);
var headquartersIcon = L.FireCARESMarkers.headquartersmarker();
... | Update js to bust compressor cache. | Update js to bust compressor cache.
| JavaScript | mit | meilinger/firecares,HunterConnelly/firecares,garnertb/firecares,FireCARES/firecares,ROGUE-JCTD/vida,garnertb/firecares,HunterConnelly/firecares,ROGUE-JCTD/vida,ROGUE-JCTD/vida,ROGUE-JCTD/vida,HunterConnelly/firecares,FireCARES/firecares,meilinger/firecares,garnertb/firecares,FireCARES/firecares,FireCARES/firecares,Fire... | ---
+++
@@ -5,32 +5,32 @@
angular.module('fireStation.homeController', [])
.controller('home', function($scope, map, $filter) {
- var homeMap = map.initMap('map', {scrollWheelZoom: false});
- homeMap.setView([40, -90], 4);
- var headquartersIcon = L.FireCARESMarkers.headqu... |
6a97907ccc0ceeadcbbef6c66fda080e926c42b2 | packages/ember-metal/lib/error_handler.js | packages/ember-metal/lib/error_handler.js | import Logger from 'ember-console';
import { isTesting } from './testing';
let onerror;
// Ember.onerror getter
export function getOnerror() {
return onerror;
}
// Ember.onerror setter
export function setOnerror(handler) {
onerror = handler;
}
let dispatchOverride;
// dispatch error
export function dispatchError(... | import Logger from 'ember-console';
import { isTesting } from './testing';
// To maintain stacktrace consistency across browsers
let getStack = function(error) {
var stack = error.stack;
var message = error.message;
if (stack.indexOf(message) === -1) {
stack = message + '\n' + stack;
}
return stack;
};... | Fix Error object's stacktrace inconsistency across browsers | Fix Error object's stacktrace inconsistency across browsers
| JavaScript | mit | johanneswuerbach/ember.js,elwayman02/ember.js,kanongil/ember.js,patricksrobertson/ember.js,intercom/ember.js,Patsy-issa/ember.js,sivakumar-kailasam/ember.js,thoov/ember.js,mixonic/ember.js,kennethdavidbuck/ember.js,sivakumar-kailasam/ember.js,bekzod/ember.js,rfsv/ember.js,kaeufl/ember.js,pixelhandler/ember.js,mike-nort... | ---
+++
@@ -1,5 +1,17 @@
import Logger from 'ember-console';
import { isTesting } from './testing';
+
+// To maintain stacktrace consistency across browsers
+let getStack = function(error) {
+ var stack = error.stack;
+ var message = error.message;
+
+ if (stack.indexOf(message) === -1) {
+ stack = message + ... |
a0045dd29b77217ed86dbf2f1d26925d5416b0ad | example_test.js | example_test.js | var util = require('util'),
webdriver = require('selenium-webdriver'),
chrome = require('selenium-webdriver/chrome'),
retry = require('./index.js');
var driver = chrome.createDriver(
new webdriver.Capabilities({'browserName': 'chrome'}),
new chrome.ServiceBuilder('./chromedriver').build());
driver... | var util = require('util'),
webdriver = require('selenium-webdriver'),
chrome = require('selenium-webdriver/chrome'),
retry = require('./index.js');
// Assumes that there is a chromedriver binary in the same directory.
var driver = chrome.createDriver(
new webdriver.Capabilities({'browserName': 'chrome... | Make the example test run without requiring local server | Make the example test run without requiring local server
| JavaScript | mit | bbc/webdriverjs-retry,bbc/webdriverjs-retry,juliemr/webdriverjs-retry | ---
+++
@@ -3,11 +3,12 @@
chrome = require('selenium-webdriver/chrome'),
retry = require('./index.js');
+// Assumes that there is a chromedriver binary in the same directory.
var driver = chrome.createDriver(
new webdriver.Capabilities({'browserName': 'chrome'}),
new chrome.ServiceBuilder('./ch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.