commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
ec343008e4db8688acfb383a3b254a86ecfeac29
shared/reducers/favorite.js
shared/reducers/favorite.js
/* @flow */ import * as Constants from '../constants/favorite' import {logoutDone} from '../constants/login' import type {FavoriteAction} from '../constants/favorite' import type {Folder} from '../constants/types/flow-types' type State = { folders: ?Array<Folder> } const initialState = { folders: null } export ...
/* @flow */ import * as Constants from '../constants/favorite' import {logoutDone} from '../constants/login' import type {FavoriteAction} from '../constants/favorite' import type {Folder} from '../constants/types/flow-types' type State = { folders: ?Array<Folder> } const initialState = { folders: null } export ...
Use initial state instead of setting folder manually
Use initial state instead of setting folder manually
JavaScript
bsd-3-clause
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
42be88e329535f7777e0c33da7194d21bf81c6b4
gulp/tasks/html.js
gulp/tasks/html.js
var gulp = require ('gulp'); gulp.task ( 'html', ['css'], function() { gulp.src('src/main/resources/html/**') .pipe ( gulp.dest( './build/') ); gulp.src('src/test/resources/**') .pipe ( gulp.dest('./build/data/')); gulp.src(['node_modules/dat-gui/vendor/dat*.js']) .pipe ( gulp.dest('./build/js/')); /...
var gulp = require ('gulp'); gulp.task ( 'html', ['css'], function() { gulp.src('src/main/resources/html/**') .pipe ( gulp.dest( './build/') ); gulp.src('src/main/resources/js/**') .pipe ( gulp.dest( './build/js/') ); gulp.src('src/main/resources/images/**') .pipe ( gulp.dest( './build/images/') ); g...
Include JS and XTK in build
Include JS and XTK in build
JavaScript
bsd-3-clause
dblezek/webapp-skeleton,dblezek/webapp-skeleton
06a9a7400aedc0985657874c3aba35af6ab6b1fb
app/components/Settings/components/colors-panel.js
app/components/Settings/components/colors-panel.js
import React from 'react'; import PropTypes from 'prop-types'; import { Switch } from '@blueprintjs/core'; import { Themes } from '../../../containers/enums'; const ColorsPanel = ({ theme, setTheme }) => <div className="mt-1"> <h3 className="mb-3">Themes</h3> <Switch label="Dark Theme" checked={t...
import React from 'react'; import PropTypes from 'prop-types'; import { RadioGroup, Radio } from '@blueprintjs/core'; import { Themes } from '../../../containers/enums'; const ColorsPanel = ({ theme, setTheme }) => <div className="mt-1"> <RadioGroup label="Themes" selectedValue={theme} onChange...
Select themes as radio buttons
enhancement: Select themes as radio buttons
JavaScript
mit
builtwithluv/ZenFocus,builtwithluv/ZenFocus
d286a3d9d171b77651e6c81fad3970baa5584fdc
src/javascript/binary/common_functions/check_new_release.js
src/javascript/binary/common_functions/check_new_release.js
const url_for_static = require('../base/url').url_for_static; const moment = require('moment'); const check_new_release = function() { // calling this method is handled by GTM tags const last_reload = localStorage.getItem('new_release_reload_time'); // prevent reload in less than 10 minutes if (las...
const url_for_static = require('../base/url').url_for_static; const moment = require('moment'); const check_new_release = function() { // calling this method is handled by GTM tags const last_reload = localStorage.getItem('new_release_reload_time'); // prevent reload in less than 10 minutes if (las...
Check for new release in 10 minutes intervals
Check for new release in 10 minutes intervals
JavaScript
apache-2.0
binary-com/binary-static,negar-binary/binary-static,4p00rv/binary-static,ashkanx/binary-static,raunakkathuria/binary-static,raunakkathuria/binary-static,binary-static-deployed/binary-static,binary-static-deployed/binary-static,raunakkathuria/binary-static,binary-com/binary-static,kellybinary/binary-static,ashkanx/binar...
45731fa369103e32b6b02d6ed5e99997def24e08
app/client/components/Sidebar/Sidebar.js
app/client/components/Sidebar/Sidebar.js
// @flow import React, { Component } from 'react' import { Link } from 'react-router' import s from './Sidebar.scss' export default class Sidebar extends Component { constructor (props) { super(props) this.state = { links: [ { text: 'Dashboard', to: '/admin/dashboard' }, { text: 'Entr...
// @flow import React, { Component } from 'react' import { Link } from 'react-router' import s from './Sidebar.scss' export default class Sidebar extends Component { constructor (props) { super(props) this.state = { links: [ { text: 'Dashboard', to: '/admin/dashboard' }, { text: 'Entr...
Add key to sidebar links
Add key to sidebar links
JavaScript
mit
jmdesiderio/swan-cms,jmdesiderio/swan-cms
11c4c935d9bb1ab5967a8eba97cd73d6ee9df684
packages/internal-test-helpers/lib/ember-dev/setup-qunit.js
packages/internal-test-helpers/lib/ember-dev/setup-qunit.js
/* globals QUnit */ export default function setupQUnit(assertion, _qunitGlobal) { var qunitGlobal = QUnit; if (_qunitGlobal) { qunitGlobal = _qunitGlobal; } var originalModule = qunitGlobal.module; qunitGlobal.module = function(name, _options) { var options = _options || {}; var originalSetup ...
/* globals QUnit */ export default function setupQUnit(assertion, _qunitGlobal) { var qunitGlobal = QUnit; if (_qunitGlobal) { qunitGlobal = _qunitGlobal; } var originalModule = qunitGlobal.module; qunitGlobal.module = function(name, _options) { var options = _options || {}; var originalSetup ...
Add support for beforeEach / afterEach to ember-dev assertions.
Add support for beforeEach / afterEach to ember-dev assertions.
JavaScript
mit
kellyselden/ember.js,fpauser/ember.js,thoov/ember.js,kanongil/ember.js,Gaurav0/ember.js,mixonic/ember.js,csantero/ember.js,Gaurav0/ember.js,Turbo87/ember.js,kennethdavidbuck/ember.js,gfvcastro/ember.js,sandstrom/ember.js,csantero/ember.js,xiujunma/ember.js,asakusuma/ember.js,qaiken/ember.js,jasonmit/ember.js,givanse/em...
7dbdff31b9c97fb7eed2420e1e46508dee1797a2
ember-cli-build.js
ember-cli-build.js
/* global require, module */ var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function (defaults) { var app = new EmberAddon(defaults, { 'ember-cli-babel': { includePolyfill: true }, 'ember-cli-qunit': { useLintTree: false // we use standard instead } });...
/* global require, module */ var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); const cdnUrl = process.env.CDN_URL || '/'; module.exports = function (defaults) { var app = new EmberAddon(defaults, { 'ember-cli-babel': { includePolyfill: true }, 'ember-cli-qunit': { useLintTree: ...
Add fingerprinting for troubleshooter deployed app
Add fingerprinting for troubleshooter deployed app
JavaScript
mit
MyPureCloud/ember-webrtc-troubleshoot,MyPureCloud/ember-webrtc-troubleshoot,MyPureCloud/ember-webrtc-troubleshoot
294aafacd298a013881f92f7a866a8b07f5a25f5
examples/simple.js
examples/simple.js
"use strict"; const Rectangle = require('../lib/Rectangle'); const cursor = require('kittik-cursor').create().resetTTY(); Rectangle.create({text: 'Text here!', x: 'center', width: 20, background: 'green', foreground: 'black'}).render(cursor); Rectangle.create({x: 'center', y: 'middle', width: '50%', height: '20%', ba...
"use strict"; const Rectangle = require('../lib/Rectangle'); const cursor = require('kittik-cursor').create().resetTTY(); Rectangle.create({ text: 'Text here!', x: 'center', y: 2, width: 40, background: 'green', foreground: 'black' }).render(cursor); Rectangle.create({ text: 'Text here', x: 'center',...
Update shape-basic to the latest version
fix(shape): Update shape-basic to the latest version
JavaScript
mit
kittikjs/shape-rectangle
68943423f789993e2ca91cd5f76e94d524a127c8
addon/authenticators/token.js
addon/authenticators/token.js
import Ember from 'ember'; import Base from 'ember-simple-auth/authenticators/base'; import Configuration from '../configuration'; const { get, isEmpty, inject: { service }, RSVP: { resolve, reject } } = Ember; export default Base.extend({ ajax: service(), init() { this._super(...arguments); this.serverT...
import Ember from 'ember'; import Base from 'ember-simple-auth/authenticators/base'; import Configuration from '../configuration'; const { get, isEmpty, inject: { service }, RSVP: { resolve, reject } } = Ember; export default Base.extend({ ajax: service(), init() { this._super(...arguments); this.serverT...
Add JSON content type to authenticate headers
Add JSON content type to authenticate headers
JavaScript
mit
datajohnny/ember-simple-token,datajohnny/ember-simple-token
99fe3b420e9bc14a2d01fd0f3c61bb94ce970a2c
hooks/src/index.js
hooks/src/index.js
import { options } from 'preact'; let currentIndex; let component; options.beforeRender = function (vnode) { component = vnode._component; currentIndex = 0; } const createHook = (create) => (...args) => { if (component == null) return; const list = component.__hooks || (component.__hooks = []); let index = cur...
import { options } from 'preact'; let currentIndex; let component; let oldBeforeRender = options.beforeRender; options.beforeRender = vnode => { component = vnode._component; currentIndex = 0; if (oldBeforeRender) oldBeforeRender(vnode) } const createHook = (create) => (...args) => { if (component == null) retur...
Call any previous beforeRender() once we're done with ours
Call any previous beforeRender() once we're done with ours
JavaScript
mit
developit/preact,developit/preact
79788a69daa951d85f4600926c464d6fbff9fe5b
assets/javascripts/global.js
assets/javascripts/global.js
$(function () { $('input[type="file"]').on('change', function (e) { if ($(this).val()) { $('input[type="submit"]').prop('disabled', false); } else { $('input[type="submit"]').prop('disabled', true); } }); $('input[name="format"]').on('change', function (e) { var action = $('form')....
$(function () { $('input[type="file"]').on('change', function (e) { if ($(this).val()) { $('input[type="submit"]').prop('disabled', false); } else { $('input[type="submit"]').prop('disabled', true); } }); $('input[name="format"]:checked').on('change', function (e) { var action = $(...
Fix ARCSPC-45: Handle radio button form action setting correctly
Fix ARCSPC-45: Handle radio button form action setting correctly
JavaScript
apache-2.0
harvard-library/archivesspace-checker,harvard-library/archivesspace-checker
30dd01f64e5e7dc98a517c8ff2353ab2cdde0583
lib/assets/javascripts/cartodb3/components/form-components/editors/node-dataset/node-dataset-item-view.js
lib/assets/javascripts/cartodb3/components/form-components/editors/node-dataset/node-dataset-item-view.js
var CustomListItemView = require('cartodb3/components/custom-list/custom-list-item-view'); var _ = require('underscore'); module.exports = CustomListItemView.extend({ render: function () { this.$el.empty(); this.clearSubViews(); this.$el.append( this.options.template( _.extend( ...
var CustomListItemView = require('cartodb3/components/custom-list/custom-list-item-view'); var _ = require('underscore'); module.exports = CustomListItemView.extend({ render: function () { this.$el.empty(); this.clearSubViews(); this.$el.append( this.options.template( _.extend( ...
Add isSourceType to base template object
Add isSourceType to base template object
JavaScript
bsd-3-clause
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
36a53309e022f1ad6351756568bcc4d9e0df6940
app/src/common/base-styles.js
app/src/common/base-styles.js
export default function() { return ` html { height: 100%; overflow-y: scroll; } body { font-family: 'Lato', sans-serif; font-size: 14px; color: #000; background: #f6f6f6; } `; }
export default function() { return ` *, *:before, *:after { box-sizing: inherit; } html { height: 100%; overflow-y: scroll; box-sizing: border-box; } body { font-family: 'Lato', sans-serif; font-size: 14px; color: #000; background: #f6f6f6; } `; }
Use 'border-box' as default box sizing
:lipstick: Use 'border-box' as default box sizing
JavaScript
mit
vvasilev-/weatheros,vvasilev-/weatheros
b3b18edfa2e964fe76125eb53189d92c48b867d1
src/is-defined.js
src/is-defined.js
define([ ], function () { /** * @exports is-defined * * Helper which checks whether a variable is defined or not. * * @param {*} check The variable to check that is defined * @param {String} type The type your expecting the variable to be defined as. * * @retu...
define([ ], function () { /** * @exports is-defined * * Helper which checks whether a variable is defined or not. * * @param {*} check The variable to check that is defined * @param {String} type The type your expecting the variable to be defined as. * * @retu...
Fix bug in IE8 undefined returns as object
Fix bug in IE8 undefined returns as object
JavaScript
mit
rockabox/Auxilium.js
7f3804a1da20276ad309fa6554cca329f296ff64
app/assets/javascripts/districts/controllers/sister_modal_controller.js
app/assets/javascripts/districts/controllers/sister_modal_controller.js
VtTracker.SisterModalController = Ember.ObjectController.extend({ needs: ['districtSistersIndex', 'application'], districts: Ember.computed.alias('controllers.application.model'), modalTitle: function() { if (this.get('isNew')) { return 'New Sister'; } else { return 'Edit Sister'; } }....
VtTracker.SisterModalController = Ember.ObjectController.extend({ needs: ['districtSistersIndex', 'application'], districts: Ember.computed.alias('controllers.application.model'), modalTitle: function() { if (this.get('isNew')) { return 'New Sister'; } else { return 'Edit Sister'; } }....
Rollback model when modal is closed
Rollback model when modal is closed
JavaScript
mit
bfcoder/vt-ht-tracker,bfcoder/vt-ht-tracker,bfcoder/vt-ht-tracker
eb0f5fd8a337ace145c40e9b624738619542033a
Rightmove_Enhancement_Suite.user.js
Rightmove_Enhancement_Suite.user.js
// ==UserScript== // @name Rightmove Enhancement Suite // @namespace https://github.com/chigley/ // @description Keyboard shortcuts // @include http://www.rightmove.co.uk/* // @version 1 // @grant GM_addStyle // @grant GM_getResourceText // @resource style style.css // ==/UserScript== v...
// ==UserScript== // @name Rightmove Enhancement Suite // @namespace https://github.com/chigley/ // @description Keyboard shortcuts // @include http://www.rightmove.co.uk/* // @version 1 // @grant GM_addStyle // @grant GM_getResourceText // @resource style style.css // ==/UserScript== v...
Select next item with j key
Select next item with j key
JavaScript
mit
chigley/rightmove-enhancement-suite
f13ecda8d2a69f455b175d013a2609197f495bb0
src/components/outline/Link.js
src/components/outline/Link.js
// @flow import styled, { css } from 'styled-components' import * as vars from 'settings/styles' import * as colors from 'settings/colors' type Props = { depth: '1' | '2' | '3' | '4' | '5' | '6', } const fn = ({ depth: depthStr }: Props) => { const depth = parseInt(depthStr) return css` padding-left: ${(2...
// @flow import styled, { css } from 'styled-components' import * as vars from 'settings/styles' import * as colors from 'settings/colors' type Props = { depth: '1' | '2' | '3' | '4' | '5' | '6', } const fn = ({ depth: depthStr }: Props) => { const depth = parseInt(depthStr) return css` padding-left: ${(2...
Disable pointer-events of outline items
Disable pointer-events of outline items
JavaScript
mit
izumin5210/OHP,izumin5210/OHP
248b0e54a3bda3271f5735dedf61eda8395d882d
src/helpers/find-root.js
src/helpers/find-root.js
'use babel' /* @flow */ import Path from 'path' import {findCached} from './common' import {CONFIG_FILE_NAME} from '../defaults' export async function findRoot(directory: string): Promise<string> { const configFile = await findCached(directory, CONFIG_FILE_NAME) if (configFile) { return Path.dirname(configFi...
'use babel' /* @flow */ import Path from 'path' import {findCached} from './common' import {CONFIG_FILE_NAME} from '../defaults' export async function findRoot(directory: string): Promise<string> { const configFile = await findCached(directory, CONFIG_FILE_NAME) if (configFile) { return Path.dirname(configFi...
Throw error if no config is found
:no_entry: Throw error if no config is found
JavaScript
mit
steelbrain/UCompiler
e78af7ead579d2c91f461734d2bdff5910cf3a5c
server.js
server.js
// Load required modules var http = require('http'), // http server core module port = 8080, timeNow = new Date().toLocaleString('en-US', {hour12: false, timeZone: 'Europe/Kiev'}), express = require('express'), // web framework external module fs = require('fs'), httpApp = expres...
// Load required modules var http = require('http'), // http server core module port = 8080, timeNow = new Date().toLocaleString('en-US', {hour12: false, timeZone: 'Europe/Kiev'}), express = require('express'), // web framework external module fs = require('fs'), httpApp = expres...
Set reroute to index.html for /search/*, /profile/*, /repo/*
Set reroute to index.html for /search/*, /profile/*, /repo/*
JavaScript
mit
SteveBidenko/github-angular,SteveBidenko/github-angular,SteveBidenko/github-angular
5d309087a7e4cd2931a1c8e29096f9eadb5de188
src/lb.js
src/lb.js
/* * Namespace: lb * Root of Legal Box Scalable JavaScript Application * * Authors: * o Eric Bréchemier <legalbox@eric.brechemier.name> * o Marc Delhommeau <marc.delhommeau@legalbox.com> * * Copyright: * Legal-Box SAS (c) 2010-2011, All Rights Reserved * * License: * BSD License * http://creativecommon...
/* * Namespace: lb * Root of Legal Box Scalable JavaScript Application * * Authors: * o Eric Bréchemier <legalbox@eric.brechemier.name> * o Marc Delhommeau <marc.delhommeau@legalbox.com> * * Copyright: * Legal-Box SAS (c) 2010-2011, All Rights Reserved * * License: * BSD License * http://creativecommon...
Declare undefined as parameter to make sure it is actually undefined
Declare undefined as parameter to make sure it is actually undefined Since undefined is a property of the global object, its value may be replaced, e.g. due to programming mistakes: if (undefined = myobject){ // programming mistake which assigns undefined // ... }
JavaScript
bsd-3-clause
eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp
a8d2e74163cf71bb811150143089f83aca2c55a0
src/lightbox/LightboxFooter.js
src/lightbox/LightboxFooter.js
/* @flow */ import React, { PureComponent } from 'react'; import { Text, StyleSheet, View } from 'react-native'; import type { Style } from '../types'; import NavButton from '../nav/NavButton'; const styles = StyleSheet.create({ wrapper: { height: 44, flexDirection: 'row', justifyContent: 'space-between...
/* @flow */ import React, { PureComponent } from 'react'; import { Text, StyleSheet, View } from 'react-native'; import type { Style } from '../types'; import Icon from '../common/Icons'; const styles = StyleSheet.create({ wrapper: { height: 44, flexDirection: 'row', justifyContent: 'space-between', ...
Align option icon in Lightbox screen
layout: Align option icon in Lightbox screen Icon was not properly aligned due to overlay of unreadCount. As there is no need of unreadCount here, Instead of using NavButton, use Icon component directly. Fixes #3003.
JavaScript
apache-2.0
vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile
2021611229e5b6691297504fc72926b085d70ca3
src/ggrc/assets/javascripts/components/mapped-objects/mapped-objects.js
src/ggrc/assets/javascripts/components/mapped-objects/mapped-objects.js
/*! Copyright (C) 2016 Google Inc., authors, and contributors Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> */ (function (can, GGRC) { 'use strict'; var tpl = can.view(GGRC.mustache_path + '/components/mapped-objects/mapped-objects.mustache'); var tag = 'mapped-objects'; ...
/*! Copyright (C) 2016 Google Inc., authors, and contributors Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> */ (function (can, GGRC) { 'use strict'; var tpl = can.view(GGRC.mustache_path + '/components/mapped-objects/mapped-objects.mustache'); var tag = 'mapped-objects'; ...
Add filtering feature to base Mapped Objects component
Add filtering feature to base Mapped Objects component
JavaScript
apache-2.0
josthkko/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,edofic/ggrc-core,plamut/ggrc-core,andrei-karalionak/ggrc-core,josthkko/ggrc-core,kr41/ggrc-core,AleksNeStu/ggrc-core,edofic/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,kr41/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,j0gurt/ggrc-c...
cd432d2fd9ef0c76f9673990f4b2c2f8680a1831
lib/global-admin/addon/security/roles/new/route.js
lib/global-admin/addon/security/roles/new/route.js
import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; import { get } from '@ember/object'; import { hash } from 'rsvp'; export default Route.extend({ globalStore: service(), model() { const store = get(this, 'globalStore'); var role = store.createRecord({ typ...
import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; import { get } from '@ember/object'; import { hash } from 'rsvp'; export default Route.extend({ globalStore: service(), model() { const store = get(this, 'globalStore'); var role = store.createRecord({ typ...
Remove the default added resource when add a role
Remove the default added resource when add a role
JavaScript
apache-2.0
rancherio/ui,pengjiang80/ui,vincent99/ui,lvuch/ui,rancherio/ui,westlywright/ui,rancher/ui,vincent99/ui,rancherio/ui,pengjiang80/ui,lvuch/ui,vincent99/ui,lvuch/ui,rancher/ui,westlywright/ui,pengjiang80/ui,westlywright/ui,rancher/ui
08a48f04219f01fa3140a17ce6c905cbca9b54a5
spec/arethusa.core/main_ctrl_spec.js
spec/arethusa.core/main_ctrl_spec.js
"use strict"; describe('MainCtrl', function() { beforeEach(module('arethusa')); it('sets scope values', inject(function($controller, $rootScope) { var scope = $rootScope.$new(); var mystate = { init: function() {}, allLoaded: false }; var notifier = { init: function() {}, s...
"use strict"; describe('MainCtrl', function() { beforeEach(module('arethusa')); it('sets scope values', inject(function($controller, $rootScope) { var scope = $rootScope.$new(); var state = { init: function() {}, allLoaded: false }; var notifier = { init: function() {}, suc...
Update and refactor MainCtrl spec
Update and refactor MainCtrl spec Whoops, #197 broke that spec. Used the opportunity to refactor the file a bit.
JavaScript
mit
fbaumgardt/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa
0f53f3742abf00c18e14b1ad4ad2da5369586c03
filebrowser_safe/static/filebrowser/js/FB_FileBrowseField.js
filebrowser_safe/static/filebrowser/js/FB_FileBrowseField.js
function FileSubmit(FilePath, FileURL, ThumbURL, FileType) { // var input_id=window.name.split("___").join("."); var input_id=window.name.replace(/____/g,'-').split("___").join("."); var preview_id = 'image_' + input_id; var link_id = 'link_' + input_id; var help_id = 'help_' + input_id; var cl...
function FileSubmit(FilePath, FileURL, ThumbURL, FileType) { // var input_id=window.name.split("___").join("."); var input_id=window.name.replace(/____/g,'-').split("___").join("."); var preview_id = 'image_' + input_id; var link_id = 'link_' + input_id; var help_id = 'help_' + input_id; var cl...
Fix regression in displaying a thumbnail for newly selected images on FileBrowseField.
Fix regression in displaying a thumbnail for newly selected images on FileBrowseField.
JavaScript
bsd-3-clause
ryneeverett/filebrowser-safe,ryneeverett/filebrowser-safe,ryneeverett/filebrowser-safe,fawx/filebrowser-safe,ryneeverett/filebrowser-safe,fawx/filebrowser-safe,fawx/filebrowser-safe
4e4ceb2fbb9eeffdd61b1f1bfc022347d4ae46e8
app/components/appearance-verify.js
app/components/appearance-verify.js
import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { task } from 'ember-concurrency'; export default Component.extend({ store: service(), flashMessages: service(), verifyAppearance: task(function *() { try { yield this.model.verify({ 'by': this....
import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { task } from 'ember-concurrency'; export default Component.extend({ store: service(), flashMessages: service(), verifyAppearance: task(function *() { try { yield this.model.verify({ 'by': this....
Add transition failure to appearance
Add transition failure to appearance
JavaScript
bsd-2-clause
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
26ca1acc5437a717ec4f622ffb2fc63bdf090aa9
app/components/live/get_services.js
app/components/live/get_services.js
'use strict'; angular.module('adagios.live') .constant('filterSuffixes', { contains: '__contains', has_fields: '__has_field', startswith: '__startswith', endswith: '__endswith', ...
'use strict'; angular.module('adagios.live') .constant('filterSuffixes', { contains: '__contains', has_fields: '__has_field', startswith: '__startswith', endswith: '__endswith', ...
Add additinonalFields support to GetServices
Add additinonalFields support to GetServices
JavaScript
agpl-3.0
openstack/bansho,openstack/bansho,Freddrickk/adagios-frontend,stackforge/bansho,stackforge/bansho,Freddrickk/adagios-frontend,stackforge/bansho,openstack/bansho
2ac1100d313c1bd80c4230dff605c51e39048009
webpack.config.js
webpack.config.js
const path = require('path'); const webpack = require('webpack'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const config = { entry: { 'bundle': './client/js/index.js' }, output: { path: path.join(__dirname, 'dist'), filename: '[name].js' }, module: { loaders: [ { ...
const path = require('path'); const webpack = require('webpack'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const config = { entry: { 'bundle': './client/js/index.js' }, output: { path: path.join(__dirname, 'dist'), filename: '[name].js' }, module: { loaders: [ { ...
Use production build of React when deploying
Use production build of React when deploying
JavaScript
mit
flammenmensch/proverbs-and-sayings,flammenmensch/proverbs-and-sayings
91a006a3795d177d4ed12b380f43f7227d654de7
webpack.config.js
webpack.config.js
var path = require('path'); var webpack = require('webpack'); module.exports = { entry: [ './examples/index' ], output: { path: path.join(__dirname, 'examples'), filename: 'bundle.js', }, resolveLoader: { modulesDirectories: ['node_modules'] }, resolve: { extensions: ['', '.js', '.cjsx', '.coff...
var path = require('path'); var webpack = require('webpack'); module.exports = { entry: [ './examples/index' ], output: { path: path.join(__dirname, 'examples'), filename: 'bundle.js', }, resolveLoader: { modulesDirectories: ['node_modules'] }, resolve: { extensions: ['', '.js', '.cjsx', '.coff...
Build in production mode so React includes less
Build in production mode so React includes less
JavaScript
mit
idolize/react-spinkit,KyleAMathews/react-spinkit,pieter-lazzaro/react-spinkit
3839cf5bd8fa7b54ec3f06b2c27e97fbe2ccd0ec
src/components/HueResult.js
src/components/HueResult.js
import React, {Component} from 'react'; import Chart from './Chart' class HueResult extends Component { constructor(props) { super(props); } render(){ return ( <div> <h1>Results</h1> <Chart {...this.props}/> </div> ); } } export default...
import React, {Component} from 'react'; import Chart from './Chart' class HueResult extends Component { constructor(props) { super(props); } render(){ return ( <div className="hue-results"> <h1>Results</h1> <Chart {...this.props}/> <div id="hue-interpret...
Add copy to hue restults page.
Add copy to hue restults page.
JavaScript
mit
FilmonFeMe/coloreyes,FilmonFeMe/coloreyes
e905ad177f78ad40a7b8472c5e852ffc2de07471
aura-components/src/main/components/ui/outputText/outputTextRenderer.js
aura-components/src/main/components/ui/outputText/outputTextRenderer.js
/* * Copyright (C) 2013 salesforce.com, inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
/* * Copyright (C) 2013 salesforce.com, inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
Make output text not die on null value.
Make output text not die on null value. @bug W-@ @rev eric.anderson@
JavaScript
apache-2.0
badlogicmanpreet/aura,madmax983/aura,SalesforceSFDC/aura,TribeMedia/aura,lcnbala/aura,badlogicmanpreet/aura,SalesforceSFDC/aura,madmax983/aura,navyliu/aura,igor-sfdc/aura,DebalinaDey/AuraDevelopDeb,forcedotcom/aura,SalesforceSFDC/aura,madmax983/aura,navyliu/aura,igor-sfdc/aura,TribeMedia/aura,lhong375/aura,igor-sfdc/au...
0b03bc33b13dcf1a9deb4f4a7435ec77f3308371
app/components/bd-arrival.js
app/components/bd-arrival.js
import Ember from 'ember'; import moment from 'moment'; import stringToHue from 'bus-detective/utils/string-to-hue'; var inject = Ember.inject; export default Ember.Component.extend({ tagName: 'li', clock: inject.service(), attributeBindings: ['style'], classNames: ['timeline__event'], classNameBindings: ['i...
import Ember from 'ember'; import moment from 'moment'; import stringToHue from 'bus-detective/utils/string-to-hue'; var inject = Ember.inject; export default Ember.Component.extend({ tagName: 'li', clock: inject.service(), attributeBindings: ['style'], classNames: ['timeline__event'], classNameBindings: ['i...
Apply ghosted styles to past arrivals
Apply ghosted styles to past arrivals
JavaScript
mit
bus-detective/web-client,bus-detective/web-client
658812bb2ec2a3423e7c3cb0ff676e1e7b5d1f35
main.js
main.js
require( { paths: { assert: 'src/assert', bunit: 'src/bunit' } }, ['bunit', 'tests/tests'], function(bunit, tests) { require.ready(function() { var r = bunit.runner(); r.defaultUI(); r.run(); }); } );
require( { paths: { assert: 'src/assert', bunit: 'src/bunit' }, urlArgs: "bust=" + (new Date()).getTime() }, ['bunit', 'tests/tests'], function(bunit, tests) { require.ready(function() { var r = bunit.runner(); r.defaultUI(...
Set up cache buster to RequireJS
Set up cache buster to RequireJS
JavaScript
mit
bebraw/bunit.js
9dfd7d6b5cf4f56b3d2aac4e6f97ff1c2986ee6e
main.js
main.js
var googleapis = require('googleapis'); /* Example of using google apis module to discover the URL shortener module, and shorten a url @param params.url : the URL to shorten */ exports.googleapis = function(params, cb) { googleapis.withOpts({ cache: { path: 'public' }}).discover('urlshortener', 'v1').execute(fun...
var googleapis = require('googleapis'); /* Example of using google apis module to discover the URL shortener module, and shorten a url @param params.url : the URL to shorten */ exports.googleapis = function(params, cb) { // Note that, a folder named 'public' must be present in the same folder for the cache: { pat...
Add comment before googleapis.discover call
Add comment before googleapis.discover call
JavaScript
mit
RHMAP-Support/URL_shortener,RHMAP-Support/URL_shortener
32db1c929c2a7bf2bd78acf2553cd74a30fde81e
lib/taskManager.js
lib/taskManager.js
var schedule = require('node-schedule'); var syncTask = require('./tasks/sync'); // Update entries every 30 minutes schedule.scheduleJob('0,30 * * * *', syncTask);
var schedule = require('node-schedule'), syncTask = require('./tasks/sync'); // Tasks to run on startup syncTask(); // Update entries every 30 minutes and boot schedule.scheduleJob('0,30 * * * *', syncTask);
Add sync to start up tasks
Add sync to start up tasks
JavaScript
mit
web-audio-components/web-audio-components-service
18fe24f19444d24f1b453e6fcd908eddcff4165a
rollup.binary.config.js
rollup.binary.config.js
export default { input: 'bin/capnpc-es.js', output: { file: 'dist/bin/capnpc-es.js', format: 'cjs' } };
export default { input: 'bin/capnpc-es.js', output: { file: 'dist/bin/capnpc-es.js', format: 'cjs', banner: '#! /usr/bin/env node\n' } };
Add shebang to the binary file
Add shebang to the binary file
JavaScript
mit
mattyclarkson/capnp-es
867325b8ffd256a481983966da69edfc0981ef6c
addon/components/bs4/bs-navbar.js
addon/components/bs4/bs-navbar.js
import Ember from 'ember'; import Navbar from 'ember-bootstrap/components/base/bs-navbar'; export default Navbar.extend({ classNameBindings: ['breakpointClass', 'backgroundClass'], /** * Defines the responsive toggle breakpoint size. Options are the standard * two character Bootstrap size abbreviations. Use...
import Ember from 'ember'; import Navbar from 'ember-bootstrap/components/base/bs-navbar'; export default Navbar.extend({ classNameBindings: ['breakpointClass', 'backgroundClass'], type: 'light', /** * Defines the responsive toggle breakpoint size. Options are the standard * two character Bootstrap size ...
Make `navbar-light` the default type class.
Make `navbar-light` the default type class.
JavaScript
mit
kaliber5/ember-bootstrap,kaliber5/ember-bootstrap,jelhan/ember-bootstrap,jelhan/ember-bootstrap
a2eabdfe43c47342201466d0ded6392964bca4cb
src/browser/extension/devtools/index.js
src/browser/extension/devtools/index.js
chrome.devtools.panels.create( 'Redux', null, 'devpanel.html', function(panel) {} );
chrome.devtools.panels.create( 'Redux', 'img/scalable.png', 'devpanel.html', function(panel) {} );
Add the icon to the devtools panel
Add the icon to the devtools panel Related to #95.
JavaScript
mit
zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension
4197b869b65dba800fbf16c5e96088735a6c4c35
lib/factory_boy.js
lib/factory_boy.js
FactoryBoy = {}; FactoryBoy._factories = []; Factory = function (name, collection, attributes) { this.name = name; this.collection = collection; this.attributes = attributes; }; FactoryBoy.define = function (name, collection, attributes) { var factory = new Factory(name, collection, attributes); for (var i...
FactoryBoy = {}; FactoryBoy._factories = []; Factory = function (name, collection, attributes) { this.name = name; this.collection = collection; this.attributes = attributes; }; FactoryBoy.define = function (name, collection, attributes) { var factory = new Factory(name, collection, attributes); for (var i...
Make error message more helpful by providing name
Make error message more helpful by providing name
JavaScript
mit
sungwoncho/factory-boy
35ce9b283e9e19bc752a661ca608d5a3dacc292d
src/js/showcase-specials.js
src/js/showcase-specials.js
/** * * * Shows: special features for models * Requires: **/ showcase.specials = {} showcase.specials.inlinespace = 'inlinespace__' showcase.specials.onLoaded = function () { var skin_shape = $('x3d Shape#'+showcase.specials.inlinespace+'headskin_1'); if(skin_shape.length) { $('#tool-list').append($('<li class="...
/** * * * Shows: special features for models * Requires: **/ showcase.specials = {} showcase.specials.inlinespace = 'inlinespace__' showcase.specials.onLoaded = function () { var skin_shape = $('x3d Shape#'+showcase.specials.inlinespace+'headskin_1'); if(skin_shape.length) { $('#tool-list').append($('<li class="...
Test for a model without texture
Test for a model without texture
JavaScript
apache-2.0
rwth-acis/Anatomy2.0,rwth-acis/Anatomy2.0,rwth-acis/Anatomy2.0,rwth-acis/Anatomy2.0
cb8176a827b25f7e148606da45a62a312a1018a1
libs/model/user.js
libs/model/user.js
var mongoose = require('mongoose'), crypto = require('crypto'), Schema = mongoose.Schema, User = new Schema({ username: { type: String, unique: true, required: true }, hashedPassword: { type: String, required: true }, salt: { type: String, required: true }, created: { type: Da...
var mongoose = require('mongoose'), crypto = require('crypto'), Schema = mongoose.Schema, User = new Schema({ username: { type: String, unique: true, required: true }, hashedPassword: { type: String, required: true }, salt: { type: String, required: true }, created: { type: Da...
Change secure hash example to output hex
Change secure hash example to output hex
JavaScript
mit
MichalTuleja/jdl-backend,ealeksandrov/NodeAPI
6511caef65366b09792d566fc3184ba88fe6f211
app/core/views/MapBrowseLayout.js
app/core/views/MapBrowseLayout.js
define(['backbone', 'core/views/MapView', 'hbs!core/templates/map-browse'], function(Backbone, MapView, mapBrowseTemplate) { var MapBrowseLayout = Backbone.View.extend({ manage: true, template: mapBrowseTemplate, className: 'map-browse-layout', name: 'MapBrowseLayout', views...
define(['backbone', 'core/views/MapView', 'hbs!core/templates/map-browse'], function(Backbone, MapView, mapBrowseTemplate) { var MapBrowseLayout = Backbone.Layout.extend({ manage: true, template: mapBrowseTemplate, className: 'map-browse-layout', name: 'MapBrowseLayout', bef...
Create the MapView on beforeRender
Create the MapView on beforeRender This was the source of much confusion. Think of the previous code as having mapView as a class attribute. Meaning it wasn't being correctly removed from the app.
JavaScript
apache-2.0
ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client
2f9172dd0c6a5433592b97e5fc203640869654e6
app/controllers/home.js
app/controllers/home.js
import Ember from 'ember'; import $ from 'jquery'; export default Ember.Controller.extend({ spendingsMeter: 0.00, sumByCategory: null, watchAddSpending: function () { this.updateSpendingsMeter(); }.observes('model.@each'), updateSpendingsMeter () { let sumCounted = 0; let sumByCategory = []; ...
import Ember from 'ember'; import $ from 'jquery'; export default Ember.Controller.extend({ spendingsMeter: 0.00, sumByCategory: null, watchAddSpending: function () { this.updateSpendingsMeter(); }.observes('model.@each'), updateSpendingsMeter () { let sumCounted = 0; let sumByCategory = []; ...
Format pie-date to proper format each time model change
feat: Format pie-date to proper format each time model change
JavaScript
mit
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
a4cb20d83dab1560e42b4ff538b8971245ab20ef
app/users/user-links.directive.js
app/users/user-links.directive.js
{ angular.module('meganote.users') .directive('userLinks', [ 'CurrentUser', (CurrentUser) => { class UserLinksController { user() { return CurrentUser.get(); } signedIn() { return CurrentUser.signedIn(); } } ret...
{ angular.module('meganote.users') .directive('userLinks', [ 'AuthToken', 'CurrentUser', (AuthToken, CurrentUser) => { class UserLinksController { user() { return CurrentUser.get(); } signedIn() { return CurrentUser.signedIn(); ...
Add a working logout link.
Add a working logout link.
JavaScript
mit
xternbootcamp16/meganote,xternbootcamp16/meganote
2c2acda39035ee78daab8e3bcb658696533b1c36
webpack.config.js
webpack.config.js
var webpack = require("webpack"); var CopyWebpackPlugin = require("copy-webpack-plugin"); var path = require("path"); module.exports = { entry: "./src/com/mendix/widget/badge/Badge.ts", output: { path: __dirname + "/dist/tmp", filename: "src/com/mendix/widget/badge/Badge.js", libraryTar...
var webpack = require("webpack"); var CopyWebpackPlugin = require("copy-webpack-plugin"); var path = require("path"); module.exports = { entry: "./src/com/mendix/widget/badge/Badge.ts", output: { path: __dirname + "/dist/tmp", filename: "src/com/mendix/widget/badge/Badge.js", libraryTar...
Remove named define for webpack
Remove named define for webpack
JavaScript
apache-2.0
mendixlabs/badge,mendixlabs/badge
6da8f2e871e0b3c30debd93fe22df630a5b27db0
webpack.config.js
webpack.config.js
const path = require('path'); const webpack = require('webpack'); module.exports = { entry: { home: path.join(__dirname, 'app/src/home'), }, module: { loaders: [ { test: /\.sass$/, loaders: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'], }, { te...
const path = require('path'); const webpack = require('webpack'); module.exports = { entry: { home: path.join(__dirname, 'app/src/home'), }, module: { loaders: [ { test: /\.sass$/, loaders: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'], }, { te...
Add --inline autorefreshing to webpack dev server
Add --inline autorefreshing to webpack dev server
JavaScript
mit
arkis/arkis.io,arkis/arkis.io
9e80530cde993e07333bcdecde6cccf658c52a4a
webpack.config.js
webpack.config.js
/* global require, module, __dirname */ const path = require( 'path' ); module.exports = { entry: { './assets/js/amp-blocks-compiled': './blocks/index.js', './assets/js/amp-block-editor-toggle-compiled': './assets/src/amp-block-editor-toggle.js', './assets/js/amp-validation-error-detail-toggle-compiled': './as...
/* global require, module, __dirname */ const path = require( 'path' ); module.exports = { entry: { './assets/js/amp-blocks-compiled': './blocks/index.js', './assets/js/amp-block-editor-toggle-compiled': './assets/src/amp-block-editor-toggle.js', './assets/js/amp-validation-error-detail-toggle-compiled': './as...
Implement workaround to fix JS not loading issue
Implement workaround to fix JS not loading issue
JavaScript
apache-2.0
GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp
70bce90b7f1df2bbcbf9bfd4a638a20952b3bc33
webpack.config.js
webpack.config.js
'use strict'; var webpack = require('webpack'); var LodashModuleReplacementPlugin = require('lodash-webpack-plugin'); var env = process.env.NODE_ENV; var reactExternal = { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react' }; var reactDomExternal = { root: 'ReactDOM', commonjs2:...
'use strict'; var webpack = require('webpack'); var LodashModuleReplacementPlugin = require('lodash-webpack-plugin'); var env = process.env.NODE_ENV; var reactExternal = { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react' }; var reactDomExternal = { root: 'ReactDOM', commonjs2:...
Include module name in AMD definition
feat(repo): Include module name in AMD definition RequireJS needs to know which name to register an AMD module under. The name was previously mixing; this PR fixes that.
JavaScript
mit
RinconStrategies/react-web-animation,RinconStrategies/react-web-animation,bringking/react-web-animation
0ed54d51529f68fda56ad2da8f169e6dea8e5584
troposphere/static/js/components/images/search_results.js
troposphere/static/js/components/images/search_results.js
define(['react'], function(React) { var SearchResults = React.createClass({ render: function() { return React.DOM.div({}, this.props.query); } }); return SearchResults; });
define(['react', 'components/images/search', 'components/page_header', 'components/mixins/loading', 'rsvp', 'controllers/applications'], function(React, SearchBox, PageHeader, LoadingMixin, RSVP, Images) { var Results = React.createClass({ mixins: [LoadingMixin], model: function() { ret...
Add search results to, well, search results page
Add search results to, well, search results page
JavaScript
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
7700c7c436612517a03f2b7fdc7fabb7b0fd3863
template/app/controllers/application_controller.js
template/app/controllers/application_controller.js
const { ActionController } = require('backrest') class ApplicationController extends ActionController.Base { get before() { return [ { action: this._setHeaders } ] } constructor() { super() } _setHeaders(req, res, next) { // Example headers // res.header("Access-Control-Allow-O...
const { ActionController } = require('backrest') class ApplicationController extends ActionController.Base { constructor() { super() this.beforeFilters([ { action: this._setHeaders } ]) } _setHeaders(req, res, next) { // Example headers // res.header("Access-Control-Allow-Origin", ...
Update controller template for proper filter usage.
Update controller template for proper filter usage.
JavaScript
mit
passabilities/backrest
aa967b9335eb12b9af42abf9ee248b2c7b3aa9d9
apps/global-game-jam-2021/routes.js
apps/global-game-jam-2021/routes.js
const routeRegex = /^\/(global-game-jam-2021|globalgamejam2021|ggj2021|ggj21)(?:\/.*)?$/; const githubUrl = 'https://levilindsey.github.io/global-game-jam-2021'; // Attaches the route handlers for this app. exports.attachRoutes = (server, appPath, config) => { server.get(routeRegex, handleRequest); // --- --- /...
const routeRegex = /^\/(global-game-jam-2021|globalgamejam2021|ggj2021|ggj21)(?:\/.*)?$/; const githubUrl = 'https://levilindsey.github.io/global-game-jam-2021'; // Attaches the route handlers for this app. exports.attachRoutes = (server, appPath, config) => { server.get(routeRegex, handleRequest); // --- --- /...
Fix the ggj route setup
Fix the ggj route setup
JavaScript
mit
levilindsey/levi.sl,levilindsey/levi.sl
e325455147e4a0d9a02c10729a2cc45a66f149e9
client/js/models/shipment.js
client/js/models/shipment.js
define(['backbone'], function(Backbone) { return Backbone.Model.extend({ idAttribute: 'SHIPPINGID', urlRoot: '/shipment/shipments', /* Validators for shipment, used for both editables and new shipments */ validation: { SHIPPINGNAME: { required: true, pattern:...
define(['backbone'], function(Backbone) { return Backbone.Model.extend({ idAttribute: 'SHIPPINGID', urlRoot: '/shipment/shipments', /* Validators for shipment, used for both editables and new shipments */ validation: { SHIPPINGNAME: { required: true, pattern:...
Add validator for courier name
Add validator for courier name
JavaScript
apache-2.0
DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,tcspain/SynchWeb,DiamondLightSource/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,tcspain/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb,DiamondLightSource/SynchWeb
80e679cd33528d8050097e681bad0020c2cf0a4c
tests/integration/components/search-result-test.js
tests/integration/components/search-result-test.js
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('search-result', 'Integration | Component | search result', { integration: true }); test('it renders', function(assert) { // Set any properties with this.set('myProperty', 'value'); // Handle...
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('search-result', 'Integration | Component | search result', { integration: true }); test('it renders', function(assert) { // Set any properties with this.set('myProperty', 'value'); // ...
Fix CI failure due to missing thing the component needs to render
Fix CI failure due to missing thing the component needs to render [ci skip] [#PREP-135]
JavaScript
apache-2.0
laurenrevere/ember-preprints,pattisdr/ember-preprints,laurenrevere/ember-preprints,baylee-d/ember-preprints,pattisdr/ember-preprints,CenterForOpenScience/ember-preprints,caneruguz/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,hmoco/ember-preprints,baylee-d/ember-preprints,hmoco/ember-pr...
75000c3d890987385e0c3a832dc0f8a5bc247146
app/models/chart.js
app/models/chart.js
import Model from 'ember-data/model'; import DS from 'ember-data'; import { validator, buildValidations } from 'ember-cp-validations'; const Validations = buildValidations({ title: validator('presence', true), composers: validator('presence', true), lyricists: validator('presence', true), arrangers: validator(...
import Model from 'ember-data/model'; import DS from 'ember-data'; import { validator, buildValidations } from 'ember-cp-validations'; import {memberAction} from 'ember-api-actions'; const Validations = buildValidations({ title: validator('presence', true), composers: validator('presence', true), lyricists: vali...
Update status and Chart transitions
Update status and Chart transitions
JavaScript
bsd-2-clause
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
29b811034c553c20275231167c1c005d619be346
templates/urls.js
templates/urls.js
"use strict"; var URLS = (function() { var BASE = 'https://raw.githubusercontent.com/robertpainsi/robertpainsi.github.data/master/'; return { BASE: BASE, PROGRAM_STATISTICS: BASE + 'catrobat/statistics/statistics.json' }; }());
"use strict"; var URLS = (function() { var BASE = 'https://raw.githubusercontent.com/robertpainsi/robertpainsi.github.data/master/'; if (location.hostname === 'robertpainsi.localhost.io') { BASE = 'http://localhost/robertpainsi.github.data/'; } return { BASE: BASE, PROGRAM_STAT...
Add local base url (only used for hostname robertpainsi.localhost.io)
Add local base url (only used for hostname robertpainsi.localhost.io)
JavaScript
mit
robertpainsi/robertpainsi.github.io,robertpainsi/robertpainsi.github.io
b0e05495d46f45bea07de5bbdf359fdf8416c7f3
test/conjoiner.js
test/conjoiner.js
'use strict'; var conjoiners = require('../lib/conjoiners'); exports['simple inter-process communication'] = function(test) { test.expect(3); var value = 'test_value'; var cj1 = {}; var cj1Name = 'test'; var cj2 = { onTransenlightenment: function (event) { test.equal(event.pro...
'use strict'; var conjoiners = require('../lib/conjoiners'); exports['simple inter-process communication'] = function(test) { test.expect(3); var value = 'test_value'; var cj1 = {}; var cj1Name = 'test'; var cj2 = { onTransenlightenment: function (event) { test.equal(event.pro...
Test should not rely on setTimeout
Test should not rely on setTimeout
JavaScript
apache-2.0
conjoiners/conjoiners-node.js
0445f6472b615cd0915ed5b681dff162986e4903
models/Captions.js
models/Captions.js
var mongoose = require('mongoose'); var captionSchema = new mongoose.Schema({ _id: { type: String, unique: true}, url: String, captions: [{ start: Number, dur: Number, value: String, extra_data: Array }] }); module.exports = mongoose.model('Caption', captionSchema);
var mongoose = require('mongoose'); var captionSchema = new mongoose.Schema({ _id: { type: String, unique: true}, title: String, url: String, captions: [{ start: Number, dur: Number, value: String, extra_data: Array }] }); module.exports = mongoose.model('Caption', captionSchema);
Add title to mongoose caption schema
Add title to mongoose caption schema
JavaScript
mit
yaskyj/fastcaption,yaskyj/fastcaption,yaskyj/fastcaptions,yaskyj/fastcaptions
21e134c3d11e3ce688735bf1b59d37f847c19b3c
core/filter-options/index.js
core/filter-options/index.js
"use strict"; const dedent = require("dedent"); module.exports = filterOptions; function filterOptions(yargs) { // Only for 'run', 'exec', 'clean', 'ls', and 'bootstrap' commands const opts = { scope: { describe: "Include only packages with names matching the given glob.", type: "string", }, ...
"use strict"; const dedent = require("dedent"); module.exports = filterOptions; function filterOptions(yargs) { // Only for 'run', 'exec', 'clean', 'ls', and 'bootstrap' commands const opts = { scope: { describe: "Include only packages with names matching the given glob.", type: "string", }, ...
Allow --private to be configured from file
fix(filter-options): Allow --private to be configured from file
JavaScript
mit
lerna/lerna,sebmck/lerna,lerna/lerna,kittens/lerna,evocateur/lerna,lerna/lerna,evocateur/lerna
3483929b3b5610bc2ff17369bdcf356c1d05cc9e
cdn/src/app.js
cdn/src/app.js
import express from 'express'; import extensions from './extensions'; const app = express(); app.use('/extensions', extensions); export default app;
import express from 'express'; import extensions from './extensions'; const app = express(); app.use('/extensions', extensions); app.get('/', function (req, res) { res.send('The CDN is working'); }); export default app;
Add text to test the server is working
Add text to test the server is working
JavaScript
mit
worona/worona-dashboard,worona/worona,worona/worona,worona/worona-core,worona/worona-dashboard,worona/worona-core,worona/worona
764258718d976aa826e16fd470954f18f8eabf65
packages/core/src/Rules/CopyTargetsToRoot.js
packages/core/src/Rules/CopyTargetsToRoot.js
/* @flow */ import path from 'path' import State from '../State' import File from '../File' import Rule from '../Rule' import type { Command, OptionsInterface, Phase } from '../types' export default class CopyTargetsToRoot extends Rule { static parameterTypes: Array<Set<string>> = [new Set(['*'])] static descri...
/* @flow */ import path from 'path' import State from '../State' import File from '../File' import Rule from '../Rule' import type { Command, OptionsInterface, Phase } from '../types' export default class CopyTargetsToRoot extends Rule { static parameterTypes: Array<Set<string>> = [new Set(['*'])] static descri...
Add comments and check for virtual files
Add comments and check for virtual files
JavaScript
mit
yitzchak/ouroboros,yitzchak/ouroboros,yitzchak/dicy,yitzchak/dicy,yitzchak/dicy
49f1da05920d4ab335ffcd7d1be9604845f23da5
lib/logging.js
lib/logging.js
var Tracer = require('tracer'); function Logger (options) { this.options = options; this.tracer = this._setupTracer(options.enabled); } Logger.prototype.info = function () { this.tracer.info.apply(this.tracer, arguments); }; Logger.prototype.error = function (message) { this.tracer.error(message); } Logger....
'use strict'; var Tracer = require('tracer'); function Logger (options) { this.options = options; this.tracer = this._setupTracer(options.enabled); } Logger.prototype.info = function () { this.tracer.info.apply(this.tracer, arguments); }; Logger.prototype.error = function (message) { this.tracer.error(messa...
Make the syntax checker happy
Make the syntax checker happy
JavaScript
mit
madtrick/spr
599c9c809d160f0562a5e6ca69d27332585e5bc4
packages/core/strapi/lib/services/entity-service/attributes/transforms.js
packages/core/strapi/lib/services/entity-service/attributes/transforms.js
'use strict'; const { getOr, toNumber } = require('lodash/fp'); const bcrypt = require('bcrypt'); const transforms = { password(value, context) { const { action, attribute } = context; if (action !== 'create' && action !== 'update') { return value; } const rounds = toNumber(getOr(10, 'encryp...
'use strict'; const { getOr, toNumber, isString, isBuffer } = require('lodash/fp'); const bcrypt = require('bcrypt'); const transforms = { password(value, context) { const { action, attribute } = context; if (!isString(value) && !isBuffer(value)) { return value; } if (action !== 'create' && ...
Handle non-string & non-buffer scenarios for the password transform
Handle non-string & non-buffer scenarios for the password transform
JavaScript
mit
wistityhq/strapi,wistityhq/strapi
f06ce668d3c3fb8e05139cf46e0d714f5e28aa35
packages/react-jsx-highcharts/test/components/BaseChart/BaseChart.spec.js
packages/react-jsx-highcharts/test/components/BaseChart/BaseChart.spec.js
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import BaseChart from '../../../src/components/BaseChart'; import { createMockChart } from '../../test-utils'; describe('<BaseChart />', function () { describe('on mount', function () { let clock; let chart; beforeEach(fu...
import React, { Component } from 'react'; import BaseChart from '../../../src/components/BaseChart'; import { createMockChart } from '../../test-utils'; describe('<BaseChart />', function () { let clock; let chart; beforeEach(function () { chart = createMockChart(); this.chartCreationFunc = sinon.stub(...
Remove unnecessary BaseChart test code
Remove unnecessary BaseChart test code
JavaScript
mit
whawker/react-jsx-highcharts,whawker/react-jsx-highcharts
8b15314c71e91b5c6f210915d53fb6c11a5cbce2
lib/assets/javascripts/cartodb3/deep-insights-integration/legend-manager.js
lib/assets/javascripts/cartodb3/deep-insights-integration/legend-manager.js
var LegendFactory = require('../editor/layers/layer-content-views/legend/legend-factory'); var onChange = function (layerDefModel) { var styleModel = layerDefModel.styleModel; var canSuggestLegends = LegendFactory.hasMigratedLegend(layerDefModel); var fill; var color; var size; if (!styleModel) return; ...
var LegendFactory = require('../editor/layers/layer-content-views/legend/legend-factory'); var onChange = function (layerDefModel) { var styleModel = layerDefModel.styleModel; var canSuggestLegends = !LegendFactory.hasMigratedLegend(layerDefModel); var fill; var color; var size; if (!styleModel) return; ...
Fix bug in legends magic.
Fix bug in legends magic.
JavaScript
bsd-3-clause
splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb
881a22edcb6438f9d65a8794b17ae710ee44c089
listentotwitter/static/js/keyword-box.js
listentotwitter/static/js/keyword-box.js
function redirectKeyword(keyword) { document.location.href = '/keyword/' + keyword; } $(document).ready(function() { $('#keyword-form #keyword-input').focus(); $('#keyword-form').submit(function() { redirectKeyword($('#keyword-form #keyword-input').val()); }); $('#keyword-form #keyword-in...
function redirectKeyword(keyword) { document.location.href = '/keyword/' + keyword; } $(document).ready(function() { $('#keyword-form #keyword-input').focus(); $('#keyword-form').submit(function() { redirectKeyword($('#keyword-form #keyword-input').val()); }); $('#keyword-form #keyword-in...
Select text instead of move cursor to the end
Select text instead of move cursor to the end
JavaScript
agpl-3.0
musalbas/listentotwitter,musalbas/listentotwitter,musalbas/listentotwitter
23644c40350c07a5266d4f1242dd8665a076ee53
tests/CoreSpec.js
tests/CoreSpec.js
describe("Core Bliss", function () { "use strict"; before(function() { fixture.setBase('tests/fixtures'); }); beforeEach(function () { this.fixture = fixture.load('core.html'); }); // testing setup it("has the fixture on the dom", function () { expect($('#fixture-container')).to.not.be.null; }); it("...
describe("Core Bliss", function () { "use strict"; before(function() { fixture.setBase('tests/fixtures'); }); beforeEach(function () { this.fixture = fixture.load('core.html'); }); // testing setup it("has the fixture on the dom", function () { expect($('#fixture-container')).to.not.be.null; }); it("...
Revert "Check testing environment has appropriate features"
Revert "Check testing environment has appropriate features" This reverts commit dbb0a79af0c061b1de7acb0d609b05a438d52cae.
JavaScript
mit
LeaVerou/bliss,LeaVerou/bliss,dperrymorrow/bliss,dperrymorrow/bliss
574d8ec4bb13661372284f703caa48e7b387feb2
gulpfile.js/util/pattern-library/lib/parseDocumentation.js
gulpfile.js/util/pattern-library/lib/parseDocumentation.js
var path = require('path') var marked = require('marked') var nunjucks = require('nunjucks') var parseDocumentation = function (files) { files.forEach(function (file) { nunjucks.configure([ path.join(__dirname, '..', 'macros'), path.parse(file.path).dir ]) marked.setOptions({ gfm: fals...
var path = require('path') var marked = require('marked') var nunjucks = require('nunjucks') var parseDocumentation = function (files) { files.forEach(function (file) { nunjucks.configure([ path.join(__dirname, '..', 'macros'), path.parse(file.path).dir ]) var fileContents = [ `{% from...
Use github flavoured markdown as before
Use github flavoured markdown as before
JavaScript
apache-2.0
hmrc/assets-frontend,hmrc/assets-frontend,hmrc/assets-frontend
f7bd33c7211ed3d79f91da700c51379a26e64196
app/map/map.utils.js
app/map/map.utils.js
function clearEOIMarkers(scope) { // Remove existing markers. scope.placesOfInterestMarkers.forEach(function (markerObj) { scope.map.removeLayer(markerObj.marker); }); scope.placesOfInterestMarkers = []; } function clampWithinBounds(value, lowerBound, upperBound) { value = Math.max(value, ...
function clearEOIMarkers(scope) { // Remove existing markers. scope.placesOfInterestMarkers.forEach(function (markerObj) { scope.map.removeLayer(markerObj.marker); }); scope.placesOfInterestMarkers = []; } function clampWithinBounds(value, lowerBound, upperBound) { value = Math.max(value, ...
Set search area circle size to 0 on reset.
Set search area circle size to 0 on reset.
JavaScript
mit
joseph-iussa/tour-planner,joseph-iussa/tour-planner,joseph-iussa/tour-planner
483b0240eedfc44bb8105f0bdc218d16f754ccde
conf/buster-coverage.js
conf/buster-coverage.js
module.exports.unit = { environment: 'node', rootPath: process.cwd(), sources: [ 'lib/**/*.js' ], tests: [ 'test/**/*.js' ], extensions: [ require('buster-istanbul') ], 'buster-istanbul': { outputDirectory: '.bob/report/coverage' } };
module.exports.unit = { environment: 'node', rootPath: process.cwd(), sources: [ 'lib/**/*.js' ], tests: [ 'test/**/*.js' ], extensions: [ require('buster-istanbul') ], 'buster-istanbul': { outputDirectory: '.bob/report/coverage/buster-istanbul/' } };
Add buster-istanbul subdir as output directory.
Add buster-istanbul subdir as output directory.
JavaScript
mit
cliffano/bob
46d12bb8b5a302922d9ef2c6e305c78a99876701
app/javascript/app/components/footer/site-map-footer/site-map-footer-data.js
app/javascript/app/components/footer/site-map-footer/site-map-footer-data.js
export const siteMapData = [ { title: 'Tools', links: [ { title: 'Country Profiles', href: '/countries' }, { title: 'NDCs', href: '/ndcs-content' }, { title: 'NDC-SDG Linkages', href: '/ndcs-sdg' }, { title: 'Historical GHG Emissions', href: '/ghg-emissions' }, { title: 'Pathways...
export const siteMapData = [ { title: 'Tools', links: [ { title: 'Country Profiles', href: '/countries' }, { title: 'NDCs', href: '/ndcs-content' }, { title: 'NDC-SDG Linkages', href: '/ndcs-sdg' }, { title: 'Historical GHG Emissions', href: '/ghg-emissions' }, { title: 'Pathways...
Correct FAQ link on footer
Correct FAQ link on footer
JavaScript
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
2ffb9af2862202068c7dc4c7144a3340bc1dd3df
spec/www/background.js
spec/www/background.js
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. chromespec.registerJasmineTest('chrome.app.runtime'); chromespec.registerJasmineTest('chrome.app.window'); chromespec.registerJasmineTest('chrome.file...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. chromespec.registerJasmineTest('chrome.app.runtime'); chromespec.registerJasmineTest('chrome.app.window'); chromespec.registerJasmineTest('chrome.file...
Remove test.syncFileSystem.js from the load list as it doesn't exist.
Remove test.syncFileSystem.js from the load list as it doesn't exist.
JavaScript
bsd-3-clause
xiaoyanit/mobile-chrome-apps,wudkj/mobile-chrome-apps,MobileChromeApps/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,guozanhua/mobile-chrome-apps,guozanhua/mobile-chrome-apps,chirilo/mobile-chrome-apps,hgl888/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,hgl888/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,chiril...
e0a85c0e739f1d4b0b82380ec4092893f8fb996c
src/Core/Characters.js
src/Core/Characters.js
// @flow export opaque type WideBar = "W" export const WIDE_BAR: WideBar = "W" export opaque type NarrowBar = "N" export const NARROW_BAR: NarrowBar = "N" export opaque type WideSpace = "w" export const WIDE_SPACE: WideSpace = "w" export opaque type NarrowSpace = "n" export const NARROW_SPACE: NarrowSpace = "n" exp...
// @flow export opaque type WideBar = "W" export const WIDE_BAR: WideBar = "W" export opaque type NarrowBar = "N" export const NARROW_BAR: NarrowBar = "N" export opaque type WideSpace = "w" export const WIDE_SPACE: WideSpace = "w" export opaque type NarrowSpace = "n" export const NARROW_SPACE: NarrowSpace = "n" exp...
Make symbol unions non opaque types
Make symbol unions non opaque types
JavaScript
mit
mormahr/barcode.js,mormahr/barcode.js
49ad1e4378f81738f8ed59ab94dc603c4d5c1938
webpack.config.js
webpack.config.js
const path = require("path"); module.exports = { entry: path.resolve(__dirname, "./source/index.js"), externals: { buttercup: "buttercup" }, module: { rules : [ { test: /\.(js|esm)$/, use: { loader: "babel-loader", ...
const path = require("path"); module.exports = { entry: path.resolve(__dirname, "./source/index.js"), externals: { argon2: "argon2", buttercup: "buttercup", kdbxweb: "kdbxweb" }, module: { rules : [ { test: /\.(js|esm)$/, use...
Split dependencies out in webpack to reduce bundle size
Split dependencies out in webpack to reduce bundle size
JavaScript
mit
perry-mitchell/buttercup-importer
6851efdd1fd5d214c70eb8db093e6d158870eece
webpack.config.js
webpack.config.js
var webpack = require('webpack'); module.exports = { entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/dev-server', './scripts/index' ], output: { path: __dirname, filename: 'bundle.js', publicPath: '/scripts/' }, plugins: [ new webpack.HotModuleReplacementP...
var webpack = require('webpack'); module.exports = { devtool: 'eval', entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/dev-server', './scripts/index' ], output: { path: __dirname, filename: 'bundle.js', publicPath: '/scripts/' }, plugins: [ new webpack.Ho...
Add devtool: 'eval' for Chrome DevTools
Add devtool: 'eval' for Chrome DevTools
JavaScript
mit
getguesstimate/guesstimate-app
485af180a0407d2961e53609ab379bdd3bdb1c67
webpack.config.js
webpack.config.js
const TerserJsPlugin = require('terser-webpack-plugin'); const serverBuild = { mode: 'production', entry: './src/twig.js', target: 'node', node: false, output: { path: __dirname, filename: 'twig.js', library: 'Twig', libraryTarget: 'umd' }, optimization: { ...
const TerserJsPlugin = require('terser-webpack-plugin'); const commonModule = { exclude: /(node_modules)/, use: { loader: "babel-loader", options: { presets: ["@babel/preset-env"], plugins: [ "@babel/plugin-transform-modules-commonjs", "@b...
Add babel preset on serverBuild
Add babel preset on serverBuild
JavaScript
bsd-2-clause
twigjs/twig.js,justjohn/twig.js,twigjs/twig.js,twigjs/twig.js,justjohn/twig.js,justjohn/twig.js
32acbf191be290f0eccf756f5f6dc28067e3c565
client/sw-precache-config.js
client/sw-precache-config.js
module.exports = { navigateFallback: '/index.html', runtimeCaching: [{ urlPattern: /\/api\/search\/.*/, handler: 'networkFirst', options: { cache: { maxEntries: 100, name: 'search-cache', }, }, urlPattern: /\/api\/.*/, handler: 'networkFirst', options: { ...
module.exports = { navigateFallback: '/index.html', runtimeCaching: [{ urlPattern: /\/api\/search\/.*/, handler: 'networkFirst', options: { cache: { maxEntries: 100, name: 'search-cache', }, }, urlPattern: /\/api\/.*/, handler: 'fastest', options: { cach...
Use fastest method for api calls other than search
Use fastest method for api calls other than search
JavaScript
apache-2.0
customelements/v2,webcomponents/webcomponents.org,andymutton/beta,customelements/v2,andymutton/beta,andymutton/v2,andymutton/beta,andymutton/v2,andymutton/beta,webcomponents/webcomponents.org,andymutton/v2,webcomponents/webcomponents.org,andymutton/v2,customelements/v2,customelements/v2
6a15410123e9650f003c7a97ef091e08145dc4eb
src/actions/budgets.js
src/actions/budgets.js
import { ActionTypes } from '../config/constants'; import { ref } from '../config/constants'; export const addItem = payload => { return { type: ActionTypes.BUDGETS_ADD_ITEM, payload, } } export const removeItem = payload => { return { type: ActionTypes.BUDGETS_REMOVE_ITEM, payload, } } export const subs...
import { ActionTypes } from '../config/constants'; import { ref } from '../config/constants'; export const addItem = payload => { return dispatch => { const itemRef = ref.child(`items/${payload.item.id}`); itemRef.set( payload.item ); dispatch({ type: ActionTypes.BUDGETS_ADD_ITEM, payload, }); } } e...
Update items in Firebase on change
Update items in Firebase on change Initially only read operators were implemented. The following write operators are now supported: - Edit item - Delete item - Add item
JavaScript
mit
nadavspi/UnwiseConnect,nadavspi/UnwiseConnect,nadavspi/UnwiseConnect
818ff925d39f419a290ec46c28c5cea39de23906
config/ember-try.js
config/ember-try.js
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember-1.13.8', dependencies: { 'ember': '1.13.8', 'ember-data': '1.13.9' } }, { name: 'ember-release', dependencies: { 'ember': 'components/ember#relea...
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember-1.13.8', dependencies: { 'ember': '1.13.8', 'ember-data': '1.13.9' } }, { name: 'ember-release', dependencies: { 'ember': 'components/ember#relea...
Use 2.x flavor of ember data in canary and beta.
Use 2.x flavor of ember data in canary and beta.
JavaScript
mit
mixonic/ember-cli-mirage,flexyford/ember-cli-mirage,martinmaillard/ember-cli-mirage,IAmJulianAcosta/ember-cli-mirage,oliverbarnes/ember-cli-mirage,lazybensch/ember-cli-mirage,mydea/ember-cli-mirage,constantm/ember-cli-mirage,oliverbarnes/ember-cli-mirage,IAmJulianAcosta/ember-cli-mirage,HeroicEric/ember-cli-mirage,ronc...
c71f6d3aa4807e6d384846519f266a8bdb4c8e72
create-user.js
create-user.js
'use strict'; const path = require('path'); const encryptor = require('./src/encryptor'); const argv = process.argv.slice(2); if(argv.length != 2) { console.log('Usage: node create-user.js USERNAME PASSWORD'); process.exit(1); } encryptor .encrypt('{}', path.join('./data', `${argv[0]}.dat`), argv[1]) .then((...
'use strict'; const path = require('path'); const encryptor = require('./src/encryptor'); const argv = process.argv.slice(2); if(argv.length != 2) { console.log('Usage: node create-user.js USERNAME PASSWORD'); process.exit(1); } encryptor .encrypt(JSON.stringify({ services: [] }), path.join('./data', `${...
Create user adiciona json básico no arquivo
Create user adiciona json básico no arquivo
JavaScript
mit
gustavopaes/password-manager,gustavopaes/password-manager,gustavopaes/password-manager
c771edf30259bae85af719dc27fa5d07999160c8
scripts/dbsetup.js
scripts/dbsetup.js
let db; try { db = require("rethinkdbdash")(require("../config").connectionOpts); } catch (err) { console.error("You haven't installed rethinkdbdash npm module or you didn't have configured the bot yet! Please do so."); } (async function () { if (!db) return; const tables = await db.tableList(); if ...
let db; try { db = require("rethinkdbdash")(require("../config").connectionOpts); } catch (err) { console.error("You haven't installed rethinkdbdash npm module or you didn't have configured the bot yet! Please do so."); } (async function () { if (!db) return; const tables = await db.tableList(); if ...
Create the phone table when it existn't
Create the phone table when it existn't
JavaScript
mit
TTtie/TTtie-Bot,TTtie/TTtie-Bot,TTtie/TTtie-Bot
5620ebe8a3c22927e2bacba2ef7ea12157469b8d
js/mentions.js
js/mentions.js
jQuery(function( $ ) { var mOptions = $.extend({}, mOpt); console.log(mOptions); $('#cmessage').atwho({ at: "@", displayTpl: "<li>${username}<small>&nbsp;${name}</small></li>", insertTpl: "${atwho-at}${username}", callbacks: { remoteFilter: function(query, callb...
jQuery(function( $ ) { var mOptions = $.extend({}, mOpt); console.log(mOptions); $('#cmessage').atwho({ at: "@", displayTpl: "<li>${username}<small>&nbsp;${name}</small></li>", insertTpl: "${atwho-at}${username}", callbacks: { remoteFilter: function(query, callb...
Set atwho.js minLen param to 1 default was 0.
Set atwho.js minLen param to 1 default was 0.
JavaScript
agpl-3.0
arunshekher/mentions,arunshekher/mentions
6053767e229e18cb4f416a44ede954c2a90ba5ee
src/can-be-asserted.js
src/can-be-asserted.js
import _ from 'lodash'; export default function canBeAsserted(vdom) { return _.all([].concat(vdom), node => node && typeof node === 'object' && typeof node.type === 'string' && (!node.props || typeof node.props === 'object') ); }
import _ from 'lodash'; import React from 'react'; export default function canBeAsserted(vdom) { return _.all([].concat(vdom), node => React.isValidElement(node) || (node && typeof node === 'object' && typeof node.type === 'string' && (!node.props || typeof node.props === 'o...
Add validation for local component classes as well First try the official method, then fall-back to duck typing.
Add validation for local component classes as well First try the official method, then fall-back to duck typing.
JavaScript
mit
electricmonk/chai-react-element
1d92c984fc1d0876b26378015a33ba1795733404
lib/EditorInserter.js
lib/EditorInserter.js
'use babel'; import { TextEditor } from 'atom'; export default class EditorInserter { setText(text) { this.insertionText = text; } performInsertion() { if (!this.insertionText) { console.error("No text to insert."); return; } this.textEditor = atom....
'use babel'; import { TextEditor } from 'atom'; export default class EditorInserter { setText(text) { this.insertionText = text; } performInsertion() { //Make sure there's actually text to insert before continuing if (!this.insertionText) { console.error("No text to in...
Add tabbing to example insertion.
Add tabbing to example insertion.
JavaScript
mit
Coteh/syntaxdb-atom-plugin
a1daba2ef60ffb34c73932f68fefb727d45d4568
src/locale/en/build_distance_in_words_localize_fn/index.js
src/locale/en/build_distance_in_words_localize_fn/index.js
module.exports = function buildDistanceInWordsLocalizeFn () { var distanceInWordsLocale = { lessThanXSeconds: { one: 'less than a second', other: 'less than ${count} seconds' }, halfAMinute: 'half a minute', lessThanXMinutes: { one: 'less than a minute', other: 'less than ${c...
module.exports = function buildDistanceInWordsLocalizeFn () { var distanceInWordsLocale = { lessThanXSeconds: { one: 'less than a second', other: 'less than {{count}} seconds' }, halfAMinute: 'half a minute', lessThanXMinutes: { one: 'less than a minute', other: 'less than {{...
Use handlebars string format in distanceInWords localize function
Use handlebars string format in distanceInWords localize function
JavaScript
mit
date-fns/date-fns,js-fns/date-fns,date-fns/date-fns,date-fns/date-fns,js-fns/date-fns
e8b3cb735567ebc27a842c275eab9aac306c8ea2
assets/www/map/js/views/point-view.js
assets/www/map/js/views/point-view.js
var PointView = Backbone.View.extend({ initialize:function (options) { this.model = options.model; this.gmap = options.gmap; this.marker = new google.maps.Marker({ position:this.model.getGLocation(), poiType:this.model.getPoiType(), visible:true, icon:this.model.get('pin'), ...
var PointView = Backbone.View.extend({ initialize:function (options) { this.model = options.model; this.gmap = options.gmap; this.marker = new google.maps.Marker({ position:this.model.getGLocation(), poiType:this.model.getPoiType(), visible:true, icon:this.model.get('pin'), ...
Change position on model location change.
Change position on model location change.
JavaScript
bsd-3-clause
bwestlin/hermes,bwestlin/hermes,carllarsson/hermes,carllarsson/hermes,bwestlin/hermes,carllarsson/hermes
afe38c01e268a04153e8a644b5e64c2fd4897d0e
lib/poolify.js
lib/poolify.js
'use strict'; const poolified = Symbol('poolified'); const mixFlag = { [poolified]: true }; const duplicate = (factory, n) => ( new Array(n).fill().map(() => { const instance = factory(); return Object.assign(instance, mixFlag); }) ); const provide = callback => item => { setImmediate(() => { call...
'use strict'; const poolified = Symbol('poolified'); const mixFlag = { [poolified]: true }; const duplicate = (factory, n) => Array .from({ length: n }, factory) .map(instance => Object.assign(instance, mixFlag)); const provide = callback => item => { setImmediate(() => { callback(item); }); }; const p...
Use Array.from({ length: n }, factory)
Use Array.from({ length: n }, factory) PR-URL: https://github.com/metarhia/metasync/pull/306
JavaScript
mit
metarhia/MetaSync,DzyubSpirit/MetaSync,DzyubSpirit/MetaSync
d9fb86986d77688bfe606dad153b4e0c26125c83
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), qunit: { files: ['jstests/index.html'] }, jshint: { all: [ 'Gruntfile.js', 'nbdiff/server/static/*.js' ], options: { jshintrc: '.jshintrc' } } })...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), qunit: { files: ['jstests/index.html'] }, jshint: { all: [ 'Gruntfile.js', 'jstests/*.js', 'nbdiff/server/static/*.js' ], options: { jshintrc: '.jshi...
Add jstests to jshint checks
Add jstests to jshint checks
JavaScript
mit
tarmstrong/nbdiff,tarmstrong/nbdiff,tarmstrong/nbdiff,tarmstrong/nbdiff
248053f65310ee9e2702a16678f05b2076ca88f1
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json') }); grunt.loadNpmTasks('grunt-release'); grunt.registerTask('message', function() { grunt.log.writeln("use grunt release:{patch|minor|major}"); }); grunt.registerTask('defau...
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), release: { options: { tagName: 'v<%= version %>' } } }); grunt.loadNpmTasks('grunt-release'); grunt.registerTask('message', function() { grunt.log.wr...
Use correct tag with grunt-release
Use correct tag with grunt-release
JavaScript
mit
leszekhanusz/generator-knockout-bootstrap
2fc93c70a7a674bed8a9d677d5ac5b4afd36e179
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), shell: { rebuild: { command: 'npm install --build-from-source' } }, jasmine_node: { all: ['spec/'] } }); grunt.loadNpmTasks('grunt-jasmine-node'); grunt.loadNpmTasks('gru...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), shell: { rebuild: { command: 'npm install --build-from-source' } }, jasmine_node: { all: ['spec/'] } }); grunt.loadNpmTasks('grunt-jasmine-node'); grunt.loadNpmTasks('gru...
Split Grunt tasks into “build” and “test”
Split Grunt tasks into “build” and “test”
JavaScript
bsd-2-clause
mross-pivotal/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,gemfire/node-gemfire,gemfire/node-gemfire,mross-pivotal/node-gemfire,mross-pivotal/node-gemfire
cab2faf71d7b8d0e0c8950b2315879b7f39e835f
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ qunit: { files: ['test/index.html'] } }); grunt.loadNpmTasks('grunt-contrib-qunit'); // Default task. grunt.registerTask('test', 'qunit'); // Travis CI task. grunt.registerTask('travis', 'test'); }; // vim:ts=2:sw=2:et:
module.exports = function(grunt) { grunt.initConfig({ qunit: { files: ['test/index.html'] }, jshint: { all: ['Gruntfile.js', 'yt-looper.js', 'test/**/*.js'], options: { '-W014': true, // ignore [W014] Bad line breaking }, }, }); grunt.loadNpmTasks('grunt-contrib-qu...
Add jshint to a test suite
Add jshint to a test suite
JavaScript
cc0-1.0
sk4zuzu/yt-looper,sk4zuzu/yt-looper,sk4zuzu/yt-looper,lidel/yt-looper,lidel/yt-looper,lidel/yt-looper
b78927680317b26f44008debb33c2abc3db5712b
postcss.config.js
postcss.config.js
'use strict'; module.exports = { input: 'src/*.css', dir: 'dist', use: [ 'postcss-import', 'postcss-import-url', 'postcss-custom-properties', 'postcss-normalize-charset', 'autoprefixer', 'postcss-reporter' ], 'postcss-import': { plugins: [ require('postcss-copy')({ ...
'use strict'; module.exports = { input: 'src/*.css', dir: 'dist', use: [ 'postcss-import', 'postcss-custom-properties', 'postcss-normalize-charset', 'autoprefixer', 'postcss-reporter' ], 'postcss-import': { plugins: [ require('postcss-import-url'), require('postcss-...
Change the time of loading external CSS
[change] Change the time of loading external CSS
JavaScript
mit
seamile4kairi/japanese-fonts-css
bb76add5adfe95e4b95b004bf64c871cde3aaca5
reviewboard/static/rb/js/models/diffModel.js
reviewboard/static/rb/js/models/diffModel.js
/* * A diff to be uploaded to a server. * * For now, this is used only for uploading new diffs. * * It is expected that parentObject will be set to a ReviewRequest instance. */ RB.Diff = RB.BaseResource.extend({ rspNamespace: 'diff', getErrorString: function(rsp) { if (rsp.err.code == 207) { ...
/* * A diff to be uploaded to a server. * * For now, this is used only for uploading new diffs. * * It is expected that parentObject will be set to a ReviewRequest instance. */ RB.Diff = RB.BaseResource.extend({ defaults: { diff: null, parentDiff: null, basedir: '' }, payloadF...
Enhance RB.Diff to be able to create new diffs.
Enhance RB.Diff to be able to create new diffs. The existing diff model didn't do very much, and was really meant for dealing with existing diffs. This change adds some attributes and methods that allow it to be used to create new diffs. Testing done: Used this in another change to create a diff from javascript. Rev...
JavaScript
mit
reviewboard/reviewboard,davidt/reviewboard,1tush/reviewboard,1tush/reviewboard,custode/reviewboard,1tush/reviewboard,bkochendorfer/reviewboard,davidt/reviewboard,KnowNo/reviewboard,reviewboard/reviewboard,sgallagher/reviewboard,KnowNo/reviewboard,1tush/reviewboard,chipx86/reviewboard,reviewboard/reviewboard,bkochendorf...
f6d6955c6d459717a357872ae68a0b0eabc779bf
app/assets/javascripts/pageflow/media_player/volume_fading.js
app/assets/javascripts/pageflow/media_player/volume_fading.js
//= require_self //= require_tree ./volume_fading pageflow.mediaPlayer.volumeFading = function(player) { if (!pageflow.browser.has('volume control support')) { return pageflow.mediaPlayer.volumeFading.noop(player); } else if (pageflow.audioContext.get()) { return pageflow.mediaPlayer.volumeFading.webAudi...
//= require_self //= require_tree ./volume_fading pageflow.mediaPlayer.volumeFading = function(player) { if (!pageflow.browser.has('volume control support')) { return pageflow.mediaPlayer.volumeFading.noop(player); } else if (pageflow.audioContext.get() && player.getMediaElement) { return pageflow.mediaP...
Use Web Audio volume fading only if player has getMediaElement
Use Web Audio volume fading only if player has getMediaElement `pagefow-vr` player does not support accessing the media element directly.
JavaScript
mit
Modularfield/pageflow,Modularfield/pageflow,Modularfield/pageflow,tf/pageflow,codevise/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow,Modularfield/pageflow
1b20df7e99f846efc6f64c1fae20df5e6fdcd6e5
backend/app/assets/javascripts/spree/backend/store_credits.js
backend/app/assets/javascripts/spree/backend/store_credits.js
Spree.ready(function() { $('.store-credit-memo-row').each(function() { var row = this; var field = row.querySelector('[name="store_credit[memo]"]') var textDisplay = row.querySelector('.store-credit-memo-text') $(row).on('ajax:success', function(event, data) { row.classList.remove('editing'); ...
Spree.ready(function() { $('.store-credit-memo-row').each(function() { var row = this; var field = row.querySelector('[name="store_credit[memo]"]') var textDisplay = row.querySelector('.store-credit-memo-text') $(row).on('ajax:success', function(event, data) { row.classList.remove('editing'); ...
Allow admin store credit memo to be changed using rails-ujs
Allow admin store credit memo to be changed using rails-ujs rails-ujs has a different api handling ajax events than jquery_ujs. The former passes all the event information into the event.detail object while the latter accept different parameters. For more details see: - https://edgeguides.rubyonrails.org/working_wit...
JavaScript
bsd-3-clause
pervino/solidus,pervino/solidus,pervino/solidus,pervino/solidus
2be6aed059542216005f1fbd1b8f0b0ba53af1f4
examples/scribuntoConsole.js
examples/scribuntoConsole.js
var Bot = require( 'nodemw' ), readline = require( 'readline' ), c = require( 'ansi-colors' ), rl = readline.createInterface( { input: process.stdin, output: process.stdout } ), client = new Bot( { protocol: 'https', server: 'dev.fandom.com', path: '' } ), params = { action: 'scribunto-console', ti...
var Bot = require( 'nodemw' ), readline = require( 'readline' ), c = require( 'ansicolors' ), rl = readline.createInterface( { input: process.stdin, output: process.stdout } ), client = new Bot( { protocol: 'https', server: 'dev.fandom.com', path: '' } ), params = { action: 'scribunto-console', tit...
Use green for console intro instead
Use green for console intro instead
JavaScript
bsd-2-clause
macbre/nodemw
58a5b2b5c69343b684ecb6db9cd9e43bb8f37747
app/plugins/wildflower/jlm/controllers/components/write_new.js
app/plugins/wildflower/jlm/controllers/components/write_new.js
$.jlm.component('WriteNew', 'wild_posts.wf_index, wild_posts.wf_edit, wild_pages.wf_index, wild_pages.wf_edit', function() { $('#sidebar .add').click(function() { var buttonEl = $(this); var formAction = buttonEl.attr('href'); var templatePath = 'posts/new_post'; var pa...
$.jlm.component('WriteNew', 'wild_posts.wf_index, wild_posts.wf_edit, wild_pages.wf_index, wild_pages.wf_edit', function() { $('#sidebar .add').click(function() { var buttonEl = $(this); var formAction = buttonEl.attr('href'); var templatePath = 'posts/new_post'; var pa...
Write new page parent select box bug fixed
Write new page parent select box bug fixed
JavaScript
mit
klevo/wildflower,klevo/wildflower,klevo/wildflower
86e08d1d638656ff5c655bb9af4d658330907edf
test/idle-timer_test.js
test/idle-timer_test.js
(function($) { /* ======== A Handy Little QUnit Reference ======== http://docs.jquery.com/QUnit Test methods: expect(numAssertions) stop(increment) start(decrement) Test assertions: ok(value, [message]) equal(actual, expected, [message]) notEqual(actual, expected, [message]) deepEqual(actu...
(function($) { /* ======== A Handy Little QUnit Reference ======== http://docs.jquery.com/QUnit Test methods: expect(numAssertions) stop(increment) start(decrement) Test assertions: ok(value, [message]) equal(actual, expected, [message]) notEqual(actual, expected, [message]) deepEqual(actu...
Destroy idle timer instance after test has finished
Destroy idle timer instance after test has finished
JavaScript
mit
thorst/jquery-idletimer,amitabhaghosh197/jquery-idletimer,dpease/jquery-idletimer,amitabhaghosh197/jquery-idletimer,dpease/jquery-idletimer,thorst/jquery-idletimer
43906d08af184b3c20bb201dedf1d79de7dd8549
node-tests/unit/linting-compiler-test.js
node-tests/unit/linting-compiler-test.js
'use strict'; var assert = require('assert'); var buildTemplateCompiler = require('../helpers/template-compiler'); describe('Ember template compiler', function() { var templateCompiler; beforeEach(function() { templateCompiler = buildTemplateCompiler(); }); it('sanity: compiles templates', function() { ...
'use strict'; var assert = require('assert'); var _compile = require('htmlbars').compile; describe('Ember template compiler', function() { var astPlugins; function compile(template) { return _compile(template, { plugins: { ast: astPlugins } }); } beforeEach(function() { astPl...
Fix issues with HTMLBars parser transition.
Fix issues with HTMLBars parser transition.
JavaScript
mit
rwjblue/ember-cli-template-lint,oriSomething/ember-cli-template-lint,oriSomething/ember-template-lint,rwjblue/ember-cli-template-lint,rwjblue/ember-template-lint,oriSomething/ember-cli-template-lint
26e229add96b3fbf67a15bb3465832881ced5023
infrastructure/table-creation-wait.js
infrastructure/table-creation-wait.js
exports.runWhenTableIs = function (tableName, desiredStatus, db, callback) { var describeParams = {}; describeParams.TableName = tableName; db.describeTable(describeParams, function (err, data) { if (data.Table.TableStatus === desiredStatus) { callback(); } else{ va...
exports.runWhenTableIs = function (tableName, desiredStatus, db, callback) { var describeParams = {}; describeParams.TableName = tableName; db.describeTable(describeParams, function (err, data) { if (err) { console.log(err); } else if (data.Table.TableStatus === desiredStatus) ...
Check for error and print when waiting for a particular table status.
Check for error and print when waiting for a particular table status.
JavaScript
apache-2.0
timg456789/musical-octo-train,timg456789/musical-octo-train,timg456789/musical-octo-train
470b44113fc07de8ada5b10a64a938177961347b
js/locales/bootstrap-datepicker.fi.js
js/locales/bootstrap-datepicker.fi.js
/** * Finnish translation for bootstrap-datepicker * Jaakko Salonen <https://github.com/jsalonen> */ ;(function($){ $.fn.datepicker.dates['fi'] = { days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai", "sunnuntai"], daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "...
/** * Finnish translation for bootstrap-datepicker * Jaakko Salonen <https://github.com/jsalonen> */ ;(function($){ $.fn.datepicker.dates['fi'] = { days: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai", "sunnuntai"], daysShort: ["sun", "maa", "tii", "kes", "tor", "per", "...
Fix Finnish week start to Monday, add format
Fix Finnish week start to Monday, add format Finns *always* start their week on Mondays. The d.m.yyyy date format is the most common one.
JavaScript
apache-2.0
oller/foundation-datepicker-sass,abnovak/bootstrap-sass-datepicker,rocLv/bootstrap-datepicker,rstone770/bootstrap-datepicker,wetet2/bootstrap-datepicker,Azaret/bootstrap-datepicker,osama9/bootstrap-datepicker,zhaoyan158567/bootstrap-datepicker,bitzesty/bootstrap-datepicker,HNygard/bootstrap-datepicker,wetet2/bootstrap-...