commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
6387ed56e8b5e41aa51a7994ca9f1db5b68a5644
app/assets/javascripts/multi-part.js
app/assets/javascripts/multi-part.js
// Javascript specific to guide admin $(function() { var sortable_opts = { axis: "y", handle: "a.accordion-toggle", stop: function(event, ui) { $('.part').each(function (i, elem) { $(elem).find('input.order').val(i + 1); ui.item.find("a.accordion-toggle").addClass("highlight"); ...
// Javascript specific to guide admin // When we add a new part, ensure we add the auto slug generator handler $(document).on('nested:fieldAdded:parts', function(event){ addAutoSlugGeneration(); }); function addAutoSlugGeneration() { $('input.title'). on('change', function () { var elem = $(this); ...
Fix auto slug generation for newly added parts
Fix auto slug generation for newly added parts Since moving to use nested forms, we now need to listen for a nested field added event and attach the auto slug generator handler accordingly.
JavaScript
mit
theodi/publisher,telekomatrix/publisher,alphagov/publisher,theodi/publisher,theodi/publisher,telekomatrix/publisher,alphagov/publisher,leftees/publisher,telekomatrix/publisher,leftees/publisher,leftees/publisher,theodi/publisher,alphagov/publisher,leftees/publisher,telekomatrix/publisher
940624b8bbd2d18fa4072808cb3037078d5820d3
public/javascripts/App/Search/SearchPanel.ui.js
public/javascripts/App/Search/SearchPanel.ui.js
App.Search.SearchPanelUi = Ext.extend(Ext.form.FormPanel, { title: 'Search criteria', labelWidth: 100, labelAlign: 'left', layout: 'form', tbar: { xtype: 'toolbar', items: [{ text: 'Add language', icon: urlRoot + 'images/add.png', cls: 'x-btn-text-icon', ref: '../addLanguageBut...
App.Search.SearchPanelUi = Ext.extend(Ext.form.FormPanel, { title: 'Search criteria', labelWidth: 100, labelAlign: 'left', layout: 'form', tbar: { xtype: 'toolbar', items: [{ text: 'Add language', icon: urlRoot + 'images/add.png', cls: 'x-btn-text-icon', ref: '../addLanguageBut...
Hide search saving buttons for now
Hide search saving buttons for now
JavaScript
mit
textlab/glossa,textlab/rglossa,textlab/rglossa,textlab/rglossa,textlab/glossa,textlab/rglossa,textlab/glossa,textlab/glossa,textlab/glossa,textlab/rglossa
6fe782fcd362e3cd330d22dbd17e270f26ebcf1b
app/js/arethusa/.version_template.js
app/js/arethusa/.version_template.js
'use strict'; angular.module('arethusa').constant('VERSION', { revision: '<%= sha %>', date: '<%= new Date().toJSON() %>' });
'use strict'; angular.module('arethusa').constant('VERSION', { revision: '<%= sha %>', date: '<%= new Date().toJSON() %>', repository: 'http://github.com/latin-language-toolkit/arethusa' });
Add the repo to the version CONSTANT
Add the repo to the version CONSTANT
JavaScript
mit
fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa
7d0effb1e72b0957b20676a1717e07780100dae6
app/scripts/services/auth.factory.js
app/scripts/services/auth.factory.js
angular.module('MovnThereUI').factory('AuthFactory', function($http, $window, ServerUrl) { 'use strict'; var login = function(credentials) { return $http .post(ServerUrl + 'login', credentials) .success(function(response) { $window.sessionStorage.setItem('movnTh...
angular.module('MovnThereUI').factory('AuthFactory', function($http, $window, ServerUrl) { 'use strict'; var login = function(credentials) { return $http .post(ServerUrl + 'login', credentials) .success(function(response) { $window.sessionStorage.setItem('movnTh...
Fix sessionStorage name to retrieve token.
Fix sessionStorage name to retrieve token.
JavaScript
mit
HollyM021980/movin-there
16e2183f60a66f41a78fef3f12b6321000be6357
packages/webmiddle-service-http-request/src/HttpRequest.js
packages/webmiddle-service-http-request/src/HttpRequest.js
import WebMiddle, { PropTypes } from 'webmiddle'; import request from 'request'; const HttpRequest = ({ name, contentType, url, method = 'GET', body = {}, httpHeaders = {}, cookies = {} }) => { // TODO: cookies return new Promise((resolve, reject) => { request({ uri: url, method, form: body, ...
import WebMiddle, { PropTypes } from 'webmiddle'; import request from 'request'; const HttpRequest = ({ name, contentType, url, method = 'GET', body = {}, httpHeaders = {}, cookies = {} }) => { // TODO: cookies return new Promise((resolve, reject) => { const isJsonBody = httpHeaders && httpHeaders['Content-Typ...
Fix request body conversion and passing
Fix request body conversion and passing
JavaScript
mit
webmiddle/webmiddle
6421950d93e8e34e55971e6a0a84817075ed18fc
packages/meteor-components-ioc-plugin/package.js
packages/meteor-components-ioc-plugin/package.js
/*global Package*/ Package.describe({ name: 'dschnare:meteor-components-ioc-plugin', version: '0.2.0', // Brief, one-line summary of the package. summary: 'A plugin for Meteor Components that integrates IOC Containers.', // URL to the Git repository containing the source code for this package. git: 'https:/...
/*global Package*/ Package.describe({ name: 'dschnare:meteor-components-ioc-plugin', version: '0.2.0', // Brief, one-line summary of the package. summary: 'A plugin for Meteor Components that integrates IOC Containers.', // URL to the Git repository containing the source code for this package. git: 'https:/...
Add version constraint for reactive-obj
Add version constraint for reactive-obj
JavaScript
mit
dschnare/meteor-components-ioc-plugin,dschnare/meteor-components-ioc-plugin
f972dfc1091d58884b0a5b656f0e2cf02d94ba1d
tests/integration/components/loading-bar-test.js
tests/integration/components/loading-bar-test.js
import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render, find } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; import { later } from '@ember/runloop'; module('Integration | Component | loading bar', function(hooks) { setupRenderingTest(hooks)...
import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render, find, waitFor } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; import { later } from '@ember/runloop'; module('Integration | Component | loading bar', function(hooks) { setupRenderingTe...
Improve async loading bar test
Improve async loading bar test The waitFor helper is allows us to wait for what we are actually testing instead of a time which sometimes blocks the rendering and causes the test to be flaky.
JavaScript
mit
dartajax/frontend,thecoolestguy/frontend,djvoa12/frontend,dartajax/frontend,thecoolestguy/frontend,djvoa12/frontend,jrjohnson/frontend,ilios/frontend,ilios/frontend,jrjohnson/frontend
1bbb5f18d567cc45f10b4d1a3b943ccdf93fb7d2
test/unit/analysis/camshaft-reference.spec.js
test/unit/analysis/camshaft-reference.spec.js
var camshaftReference = require('../../../src/analysis/camshaft-reference'); describe('src/analysis/camshaft-reference', function () { describe('.getSourceNamesForAnalysisType', function () { it('should return the source names for a given analyses type', function () { expect(camshaftReference.getSourceName...
var camshaftReference = require('../../../src/analysis/camshaft-reference'); describe('src/analysis/camshaft-reference', function () { describe('.getSourceNamesForAnalysisType', function () { it('should return the source names for a given analyses type', function () { expect(camshaftReference.getSourceName...
Remove expected/optional param as it was removed from reference
Remove expected/optional param as it was removed from reference
JavaScript
bsd-3-clause
splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js
f224d222e7ee47c272b168004aad4f1a344733cb
client/main.js
client/main.js
/** * @module client/main */ 'use strict'; var app = require('./app'); require('angular'); /** * Each 'index' generated via grunt process dynamically includes all browserify common-js modules * in js bundle */ require('./controllers/index'); require('./services/index'); require('./router'); var io = require('./...
/** * @module client/main */ 'use strict'; var app = require('app'); require('angular'); /** * Each 'index' generated via grunt process dynamically includes all browserify common-js modules * in js bundle */ require('./controllers/index'); require('./services/index'); require('./router'); var io = require('./li...
Change argument to require from relative to global path
Change argument to require from relative to global path
JavaScript
mit
Runnable/hyperion,Runnable/hyperion
9c11b6de5181e4825a345c103add725a2f487926
lib/curry-provider.js
lib/curry-provider.js
'use babel'; import completions from '../data/completions'; class CurryProvider { constructor() { this.scopeSelector = '.source.curry'; this.disableForScopeSelector = '.source.curry .comment'; this.suggestionPriority = 2; this.filterSuggestions = true; this.acpTypes = new Map([['types', 'type'...
'use babel'; import completions from '../data/completions'; class CurryProvider { constructor() { this.scopeSelector = '.source.curry'; this.disableForScopeSelector = '.source.curry .comment'; this.suggestionPriority = 2; this.filterSuggestions = true; this.acpTypes = new Map([['types', 'type'...
Return null as early as possible if the prefix is invalid
Return null as early as possible if the prefix is invalid
JavaScript
mit
matthesjh/autocomplete-curry
c3d64c3a782d546284955d653a88dcd41237f6f4
www/plugin.js
www/plugin.js
var exec = require('cordova/exec'); var PLUGIN_NAME = 'SystemSound'; var SystemSound = { playSound: function(cb) { exec(cb, null, PLUGIN_NAME, 'playSound', []); } }; module.exports = SystemSound;
var exec = require('cordova/exec'); var PLUGIN_NAME = 'SystemSound'; var SystemSound = { playSound: function(cb) { exec(cb, null, PLUGIN_NAME, 'playSound', [phrase]); } }; module.exports = SystemSound;
Fix exec function with no argument
Fix exec function with no argument
JavaScript
mit
Switch168/cordova-plugin-system-sound-services
0da59ee8c95f2d065b6f0b600f4d6cffd654437e
packages/ddp-client/common/getClientStreamClass.js
packages/ddp-client/common/getClientStreamClass.js
import { Meteor } from 'meteor/meteor'; // In the client and server entry points, we make sure the // bundler loads the correct thing. Here, we just need to // make sure that we require the right one. export default function getClientStreamClass() { // The static analyzer of the bundler specifically looks // for d...
import { Meteor } from 'meteor/meteor'; // In the client and server entry points, we make sure the // bundler loads the correct thing. Here, we just need to // make sure that we require the right one. export default function getClientStreamClass() { // The static analyzer of the bundler specifically looks // for s...
Switch to more concise require as suggested by Ben
Switch to more concise require as suggested by Ben
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
db1c42b80ee59bc6ab4b9757c37172a0dab55d0e
examples/index.js
examples/index.js
'use strict'; var Harmonia = require('harmonia'); // Create a new server that listens to a given queue var harmonia = new Harmonia.Server('rpc'); harmonia.route({ method : 'math.add', module : './math/add.js' }); harmonia.route({ method : 'math.subtract', module : './math/subtract.js', }); harmonia.route({...
'use strict'; var Harmonia = require('harmonia'); // Create a new server that listens to a given queue var harmonia = new Harmonia.Server('rpc'); harmonia.route({ method : 'math.add', module : './math/add.js' }); harmonia.route({ method : 'math.subtract', module : './math/subtract.js', }); harmonia.route({...
Update Harmonia client example to reflect changes in 0.4
Update Harmonia client example to reflect changes in 0.4
JavaScript
mit
linearregression/harmonia,colonyamerican/harmonia
4af7e62397088ab5e49f022f1f60f2347249920a
gulpfile.js
gulpfile.js
var gulp = require('gulp'), csslint = require('gulp-csslint'), jshint = require('gulp-jshint'), rename = require('gulp-rename'), uglify = require('gulp-uglify'), autoprefixer = require('gulp-autoprefixer'), minifyCSS = require('gulp-minify-c...
var gulp = require('gulp'), csslint = require('gulp-csslint'), jshint = require('gulp-jshint'), rename = require('gulp-rename'), uglify = require('gulp-uglify'), autoprefixer = require('gulp-autoprefixer'), minifyCSS = require('gulp-minify-css'), stylish = require('jshint-stylish'); gulp.ta...
Remove code alignment, add trailing comma, add EOF newline
Remove code alignment, add trailing comma, add EOF newline
JavaScript
mit
Lochlan/imagelightbox,Lochlan/imagelightbox
61ab0adcfc8750dda6f5aae5552cb5c282fc5282
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var react = require('gulp-react'); var git = require('gulp-git'); var fs = require('fs'); var shell = require('gulp-shell') gulp.task('brew', function () { if (fs.existsSync('homebrew')) { git.pull('origin', 'master', { cwd: 'homebrew' }, function (err) { if (err) throw err; ...
var gulp = require('gulp'); var react = require('gulp-react'); var git = require('gulp-git'); var fs = require('fs'); var shell = require('gulp-shell') gulp.task('brew', function () { if (fs.existsSync('homebrew')) { git.pull('origin', 'master', { cwd: 'homebrew' }, function (err) { if (err) throw err; ...
Add automatic running of info script
Add automatic running of info script
JavaScript
mit
zharley/ferment,zharley/ferment,zharley/ferment,zharley/ferment
670474a38b8114afd4e990ad3689f50e868ea356
resources/public/crel.min.js
resources/public/crel.min.js
(e=>{const t="function",n="isNode",r=document,o=(e,t)=>typeof e===t,i=(e,t)=>{null!==t&&(Array.isArray(t)?t.map(t=>i(e,t)):(a[n](t)||(t=r.createTextNode(t)),e.appendChild(t)))};function a(e,f){let l,d,s=arguments,c=1;if(e=a.isElement(e)?e:r.createElement(e),o(f,"object")&&!a[n](f)&&!Array.isArray(f))for(l in c++,f)d=f[...
(e=>{const t="function",n="isNode",r=document,o=(e,t)=>typeof e===t,i=(e,t)=>{null!==t&&(Array.isArray(t)?t.map(t=>i(e,t)):(a[n](t)||(t=r.createTextNode(t)),e.appendChild(t)))};function a(e,f){let l,d,s=arguments,c=1;if(e=a.isElement(e)?e:r.createElement(e),o(f,"object")&&!a[n](f)&&!Array.isArray(f))for(l in c++,f)d=f[...
Update crel to latest version from github.com/KoryNunn/crel
Update crel to latest version from github.com/KoryNunn/crel
JavaScript
mit
xSke/Pxls,xSke/Pxls,xSke/Pxls,xSke/Pxls
5ab7f8deedf44a29dffa468ffdbed7a406b46458
app/assets/javascripts/analytics/_init.js
app/assets/javascripts/analytics/_init.js
(function() { "use strict"; var cookieDomain = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain; var property = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? 'UA-49258698-1' : 'UA-49258698-3'; GOVUK.Analytics.load(); GOVU...
(function() { "use strict"; var cookieDomain = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain; var property = 'UA-49258698-1'; GOVUK.Analytics.load(); GOVUK.analytics = new GOVUK.Analytics({ universalId: property, cookieDomain: c...
Use a single UA code for Buyer App analytics
Use a single UA code for Buyer App analytics Missed out of this story (which only changed the Supplier App): https://www.pivotaltracker.com/story/show/106115458
JavaScript
mit
AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/di...
3bbb177681f8c05443f001721ebd50dfd205c4f5
ui/src/pages/blog/index.js
ui/src/pages/blog/index.js
import React from 'react' import Link from 'gatsby-link' import './index.scss' export default ({ data }) => { return ( <section> <div className="container"> <header className="major"> <h2>Blog</h2> </header> {data.allMarkdownRemark.edges.map(({ node }) => ( <sect...
import React from 'react' import Link from 'gatsby-link' import './index.scss' export default ({ data }) => { return ( <section> <div className="container"> <header className="major"> <h2>Blog</h2> </header> {data.allMarkdownRemark.edges.map(({ node }) => ( <sect...
Sort blog entries by date.
Sort blog entries by date.
JavaScript
mit
danielbh/danielhollcraft.com,danielbh/danielhollcraft.com,danielbh/danielhollcraft.com-gatsbyjs,danielbh/danielhollcraft.com
c22367e21f4f5282a8079731fd1f30cf49432ae9
ui/src/utils/formatting.js
ui/src/utils/formatting.js
export const formatBytes = (bytes) => { if (bytes === 0) { return '0 Bytes'; } if (!bytes) { return null; } const k = 1000; const dm = 2; const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; const i = Math.floor(Math.log(bytes) / Math.log(k)); return `${parseFloat((bytes...
export const formatBytes = (bytes) => { if (bytes === 0) { return '0 Bytes'; } if (!bytes) { return null; } const k = 1000; const dm = 2; const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; const i = Math.floor(Math.log(bytes) / Math.log(k)); return `${parseFloat((bytes...
Add ∞ for infinite duration
Add ∞ for infinite duration
JavaScript
mit
nooproblem/influxdb,nooproblem/influxdb,influxdata/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,influxdata...
c13d87bfb90bd3a7a1951305795c586be6afde98
lib/pick-chain-url.js
lib/pick-chain-url.js
const MAIN_API_URL = 'https://api.etherscan.io'; const OTHER_API_URL_MAP = { ropsten: 'https://api-ropsten.etherscan.io', kovan: 'https://api-kovan.etherscan.io', rinkeby: 'https://api-rinkeby.etherscan.io', homestead: 'https://api.etherscan.io', arbitrum: 'https://api.arbiscan.io', arbitrum_rinkeby: 'https...
const MAIN_API_URL = 'https://api.etherscan.io'; const OTHER_API_URL_MAP = { ropsten: 'https://api-ropsten.etherscan.io', kovan: 'https://api-kovan.etherscan.io', rinkeby: 'https://api-rinkeby.etherscan.io', goerli: 'https://api-goerli.etherscan.io', sepolia: 'https://api-sepolia.etherscan.io', homestead: '...
Add Goerli and Sepolia to the API list
Add Goerli and Sepolia to the API list Hey @sebs Thanks a lot for this amazing library. I created this PR to include the Sepolia and Goerli API endpoints. Currently I'm creating the client (with `axios.create`) to support those two, but I'd be cool if I have directly included on the library. Thanks!
JavaScript
mit
sebs/etherscan-api
69d52f1cbac1c63a3a6f05aa32f8b8274cf4854f
src/open.js
src/open.js
function readSingleFile(e) { var file = e.target.files[0]; if (!file) { return; } var reader = new FileReader(); reader.onload = function(e) { var contents = e.target.result; displayContents(contents); $('#play-input').disabled = false; }; reader.readAsText(fi...
let csv = (function () { let buildHeader = function (line) { return "<thead><tr><th scope=\"col\"><button>" + line.slice(0, -1).split(",").join("</button></th><th scope=\"col\"><button>") + "</button></th></tr></thead>" }; let buildAsHtml = function (lines) { let output = [buildHeader(lines[0...
Move csv in a module
Move csv in a module
JavaScript
mpl-2.0
aloisdg/kanti,aloisdg/kanti
0d5e7868c1cc1354748af529aca5727ffa9472c4
lib/state-snapshot.js
lib/state-snapshot.js
class StateSnapshot { constructor({ store, initialState, meta, currentState = initialState }) { this.store = store; this.initialState = { ...initialState }; this.items = { ...currentState }; this.meta = meta; this.closed = false; } async dispatchToStateSnapshot(action) { if (this.closed) ...
class StateSnapshot { constructor({ store, initialState, meta, currentState = initialState }) { this.store = store; this.initialState = { ...initialState }; this.items = { ...currentState }; this.meta = meta; this.closed = false; } _closeSnapshot() { if (this.closed) { throw new Err...
Remove code duplication from snapshot closed check
Remove code duplication from snapshot closed check
JavaScript
mit
jay-depot/cloverleaf
8513c39e48ed6bd6ff28b21c898f39d96a9a8259
src/actions/user-actions.js
src/actions/user-actions.js
import db from '../db'; import { createAction } from 'redux-actions'; export const USER_LOGIN = 'USER_LOGIN'; export const USER_LOGIN_SUCCESS = 'USER_LOGIN_SUCCESS'; export const USER_SIGNUP = 'USER_SIGNUP'; export const USER_SIGNUP_SUCCESS = 'USER_SIGNUP_SUCCESS'; export const USER_SIGNUP_FAIL = 'USER_SIGNUP_FAIL'; e...
import db from '../db'; import { createAction } from 'redux-actions'; export const USER_LOGIN = 'USER_LOGIN'; export const USER_SIGNUP = 'USER_SIGNUP'; export const USER_LOGOUT = 'USER_LOGOUT'; export const login = createAction(USER_LOGIN, (username, password) => db.login(username, password)); export const signup = c...
Add actions for user management
Add actions for user management
JavaScript
mit
andrew-filonenko/habit-tracker,andrew-filonenko/habit-tracker
c042d3fcdf6f38fc2a6562d4d4c1b17bcc2da269
client/js/directives/file-uploader-directive.js
client/js/directives/file-uploader-directive.js
"use strict"; angular.module("hikeio"). directive("fileUploader", ["$window", function($window) { return { compile: function(tplElm, tplAttr) { var mulitpleStr = tplAttr.multiple === "true" ? "multiple" : ""; tplElm.after("<input type='file' " + mulitpleStr + " accept='image/png, image/jpeg' style='display: ...
"use strict"; angular.module("hikeio"). directive("fileUploader", ["$window", function($window) { return { compile: function(tplElm, tplAttr) { var mulitpleStr = tplAttr.multiple === "true" ? "multiple" : ""; tplElm.after("<input type='file' " + mulitpleStr + " accept='image/png, image/jpeg' style='display: ...
Disable file inputs on browsers that don't support FileReader / FormData.
Disable file inputs on browsers that don't support FileReader / FormData.
JavaScript
mit
zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io
0a0e0ce83fba432df1a108925933a2a1e9a8c2f7
src/js/rishson/widget/example/nls/es/Wishlist.js
src/js/rishson/widget/example/nls/es/Wishlist.js
define({ root: { SortBy: "Ordenar por:", Descending: "Descendente", Name: "Nombre", DateAdded: "Fecha de entrada", Price: "Precio", Actions: "Acciones", Add: "Añadir", Remove: "Eliminar", Save: "Guardar" } });
define({ SortBy: "Ordenar por:", Descending: "Descendente", Name: "Nombre", DateAdded: "Fecha de entrada", Price: "Precio", Actions: "Acciones", Add: "Añadir", Remove: "Eliminar", Save: "Guardar" });
Fix mistake in Spanish i18n resource for example widget
Fix mistake in Spanish i18n resource for example widget
JavaScript
isc
rishson/dojoEnterpriseApp,rishson/dojoEnterpriseApp
55effc39da807b77262aca98a8587db369ca19e5
src/js/main.js
src/js/main.js
(function() { "use strict"; // animate moving between anchor links smoothScroll.init({ selector: "a", speed: 500, easing: "easeInOutCubic" }); // better external SVG spiresheet support svg4everybody(); // random placeholders for the contact form fields var form = document.querySelector("....
(function() { "use strict"; // animate moving between anchor hash links smoothScroll.init({ selector: "a", speed: 500, easing: "easeInOutCubic" }); // better external SVG spritesheet support svg4everybody(); // random placeholders for the contact form fields var names = [ "Paul B...
Fix typo and optimize DOM querying
[js] Fix typo and optimize DOM querying
JavaScript
mit
Pinjasaur/portfolio,Pinjasaur/portfolio
ab3f0d14c998384b161c966b114c4793e1cb2795
src/history/startListener.js
src/history/startListener.js
import { manualChange } from '../redux/actions'; /** * Dispatches a manualChange action once on app start, * and whenever a popstate navigation event occurs. */ function startListener(history, store) { store.dispatch(manualChange(history.location.path)); history.listen((location, action) => { if (action ==...
import { manualChange } from '../redux/actions'; /** * Dispatches a manualChange action once on app start, * and whenever a popstate navigation event occurs. */ function startListener(history, store) { store.dispatch(manualChange(`${history.location.pathname}${history.location.search}${history.location.hash}`)); ...
Fix location dispatched in history listener
Fix location dispatched in history listener
JavaScript
mit
mksarge/redux-json-router
2f5135c85d627805e587efbcfdc91aa0fab9afca
examples/todo/client/src/components/TaskList.js
examples/todo/client/src/components/TaskList.js
import React from 'react'; import { Redirect } from 'react-router-dom'; import TodoItem from './TodoItem'; import TodoTextInput from './TodoTextInput'; import './TaskList.css'; export default function (props) { if (!props.doesExist) { return <Redirect to="/" />; } return ( <div className=...
import React from 'react'; import { Redirect } from 'react-router-dom'; import TodoItem from './TodoItem'; import TodoTextInput from './TodoTextInput'; import './TaskList.css'; export default function (props) { if (!props.doesExist) { return <Redirect to="/" />; } return ( <div className=...
Fix input appearance in the 'All' view
Fix input appearance in the 'All' view
JavaScript
mit
reimagined/resolve,reimagined/resolve
03ea14a48ad3d8f6a1d1081295113e2ba8289727
resources/assets/js/components/BaseBlock.js
resources/assets/js/components/BaseBlock.js
import inlineFieldMixin from 'mixins/inlineFieldMixin'; import imagesLoaded from 'imagesloaded'; import { eventBus } from 'plugins/eventbus'; export default { props: [ 'type', 'index', 'fields', 'other' ], mixins: [inlineFieldMixin], data() { return { ...this.fields }; }, created() { this.fieldEl...
import inlineFieldMixin from 'mixins/inlineFieldMixin'; import imagesLoaded from 'imagesloaded'; import { eventBus } from 'plugins/eventbus'; export default { props: [ 'type', 'index', 'fields', 'other' ], mixins: [inlineFieldMixin], data() { return { ...this.fields }; }, created() { this.fieldEl...
Hide block hover overlay if it's still there when editing a field.
Hide block hover overlay if it's still there when editing a field.
JavaScript
mit
unikent/astro,unikent/astro,unikent/astro,unikent/astro,unikent/astro
a6bc03b09d04df24b049fa9f3e5c257b82040078
src/Model/Game/Levels.js
src/Model/Game/Levels.js
function Levels(prng, paletteRange, paletteBuilder) { this.prng = prng; this.paletteRange = paletteRange; this.paletteBuilder = paletteBuilder; } Levels.prototype.get = function(level) { if( typeof this.prng.seed === 'function') { this.prng.seed(level); } var hue = Math.floor(this.prng.rand...
function Levels(prng, paletteRange, paletteBuilder) { this.prng = prng; this.paletteRange = paletteRange; this.paletteBuilder = paletteBuilder; } Levels.prototype.get = function(level) { if(typeof this.prng.seed === 'function') { this.prng.seed(level); } var hue = Math.floor(this.prng.rando...
Remove extra space from if statement
Remove extra space from if statement
JavaScript
mit
mnito/factors-game,mnito/factors-game
fb44adf35090e3e03fa80cdc0cf585b611d458e5
src/chrome/lib/help-page.js
src/chrome/lib/help-page.js
(function (h) { 'use strict'; function HelpPage(chromeTabs, extensionURL) { this.showHelpForError = function (tab, error) { if (error instanceof h.LocalFileError) { return this.showLocalFileHelpPage(tab); } else if (error instanceof h.NoFileAccessError) { return this.showNoFil...
(function (h) { 'use strict'; function HelpPage(chromeTabs, extensionURL) { this.showHelpForError = function (tab, error) { if (error instanceof h.LocalFileError) { return this.showLocalFileHelpPage(tab); } else if (error instanceof h.NoFileAccessError) { return this.showNoFil...
Fix typo in the HelpPage module
Fix typo in the HelpPage module
JavaScript
bsd-2-clause
hypothesis/browser-extension,hypothesis/browser-extension,project-star/browser-extension,project-star/browser-extension,hypothesis/browser-extension,project-star/browser-extension,hypothesis/browser-extension
ee2c4f35fdcf4784b08cc341a0aff77d2f33883e
app/assets/javascripts/toggle_display_with_checked_input.js
app/assets/javascripts/toggle_display_with_checked_input.js
(function(window, $){ window.toggleDisplayWithCheckedInput = function(args){ var $input = args.$input, $element = args.$element, showElement = args.mode === 'show'; var toggleOnChange = function(){ console.log($input); console.log("args.$mode =" + args.$mode); if($input.prop("ch...
(function(window, $){ window.toggleDisplayWithCheckedInput = function(args){ var $input = args.$input, $element = args.$element, showElement = args.mode === 'show'; var toggleOnChange = function(){ if($input.prop("checked")) { $element.toggle(showElement); } else { $el...
Remove console.log debug from toggleDisplayWithCheckedInput JS
Remove console.log debug from toggleDisplayWithCheckedInput JS
JavaScript
mit
alphagov/manuals-publisher,alphagov/manuals-publisher,alphagov/manuals-publisher
f0ccc846a8e1849e3fb37fbdded2de74ce76e1ae
app/components/add-expense.js
app/components/add-expense.js
import Ember from 'ember'; import $ from 'jquery'; export default Ember.Component.extend({ attributeBindings: ['dialog-open'], didInsertElement () { var dialog = document.getElementById(this.$().attr('id')); var showDialogButton = $('[dialog-open]'); console.log(dialog, showDialogButton); if (!dial...
import Ember from 'ember'; import $ from 'jquery'; export default Ember.Component.extend({ attributeBindings: ['dialog-open'], expenseCategories: [ 'Charity', 'Clothing', 'Education', 'Events', 'Food', 'Gifts', 'Healthcare', 'Household', 'Leisure', 'Hobbies', 'Trasportat...
Set expense categories in component
feat: Set expense categories in component
JavaScript
mit
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
7b6debe0ab1c1b4beb349ec963cb7ff026a8e48a
server/model/Post/schema.js
server/model/Post/schema.js
import {DataTypes as t} from "sequelize" import format from "date-fns/format" import createSlug from "lib/helper/util/createSlug" /** * @const schema * * @type {import("sequelize").ModelAttributes} */ const schema = { id: { type: t.INTEGER.UNSIGNED, primaryKey: true, autoIncrement: true }, user...
import {DataTypes as t} from "sequelize" import format from "date-fns/format" import createSlug from "lib/helper/util/createSlug" /** * @const schema * * @type {import("sequelize").ModelAttributes} */ const schema = { id: { type: t.INTEGER.UNSIGNED, primaryKey: true, autoIncrement: true }, user...
Change slug format in Post model
Change slug format in Post model
JavaScript
mit
octet-stream/eri,octet-stream/eri
cd8a3d11287f247fe3898593f80bf1bdf3840d4f
app/js/services/apihandler.js
app/js/services/apihandler.js
'use strict'; /* * Abstration layer for various RESTful api calls */ var apihandler = angular.module('apihandler', []); apihandler.factory('apiFactory', function ($http, configFactory) { // Private API var url = configFactory.getValue('apiUrl') // Public API return {}; });
'use strict'; /* * Abstration layer for various RESTful API calls */ var apihandler = angular.module('apihandler', []); apihandler.factory('apiFactory', function ($http, configFactory) { // Private API var url = configFactory.getValue('apiUrl'); // Various different kinds of errors that can be returne...
Add error types from REST Api
Add error types from REST Api
JavaScript
mit
learning-layers/sardroid,learning-layers/sardroid,learning-layers/sardroid
a5468c3b575dfe2d04e03d72bcec34b8e353e9b7
src/lb/lb.base.js
src/lb/lb.base.js
/* * Namespace: lb.base * Adapter Modules for Base JavaScript Library * * Authors: * o Eric Bréchemier <github@eric.brechemier.name> * o Marc Delhommeau <marc.delhommeau@legalbox.com> * * Copyright: * Eric Bréchemier (c) 2011, Some Rights Reserved * Legal-Box SAS (c) 2010-2011, All Rights Reserved * * L...
/* * Namespace: lb.base * Adapter Modules for Base JavaScript Library * * Authors: * o Eric Bréchemier <github@eric.brechemier.name> * o Marc Delhommeau <marc.delhommeau@legalbox.com> * * Copyright: * Eric Bréchemier (c) 2011-2013, Some Rights Reserved * Legal-Box SAS (c) 2010-2011, All Rights Reserved *...
Add implementation of no(), copied from nada project (CC0)
Add implementation of no(), copied from nada project (CC0)
JavaScript
bsd-3-clause
eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp
97fc9bbf3ddeeec0d3f3fbae0a08346e6fad0987
app/assets/javascripts/modules/moj.submit-once.js
app/assets/javascripts/modules/moj.submit-once.js
(function () { 'use strict'; moj.Modules.SubmitOnce = { el: '.js-SubmitOnce', init: function () { this.cacheEls(); this.bindEvents(); this.options = { alt: this.$el.data('alt') || 'Please wait…' }; }, cacheEls: function () { this.$el = $(this.el); this...
(function () { 'use strict'; moj.Modules.SubmitOnce = { el: '.js-SubmitOnce', init: function () { this.cacheEls(); this.bindEvents(); this.options = { alt: this.$el.data('alt') || 'Please wait…' }; }, cacheEls: function () { this.$el = $(this.el); this...
Fix tagName selection for IE8
Fix tagName selection for IE8
JavaScript
mit
ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public
47382b8696201a939ce1394586701d1715e28ffa
src/js/plugin.js
src/js/plugin.js
// Save the other cropper Cropper.other = $.fn.cropper; // Register as jQuery plugin $.fn.cropper = function (options) { var args = toArray(arguments, 1), result; this.each(function () { var $this = $(this), data = $this.data('cropper'), fn; if (!data) { ...
// Save the other cropper Cropper.other = $.fn.cropper; // Register as jQuery plugin $.fn.cropper = function (options) { var args = toArray(arguments, 1), result; this.each(function () { var $this = $(this), data = $this.data('cropper'), fn; if (!data) { ...
Break destroy calling when not initialized
Break destroy calling when not initialized
JavaScript
mit
Paulyoufu/cropper,samudiogo/cropper,shinygang/cropper,99designs/cropper,liuyan5258/cropper,ashokpant/cropper,iacdingping/cropper,OddPrints/cropper,mesnilgr/cropper,FuYung/cropper,tekinaggul/cropper,bercanozcan/cropper,tekinaggul/cropper,websdotcom/cropper,liuyan5258/cropper,iacdingping/cropper,VANITAX/cropper,itxd/crop...
d58d68a2990c6effd98093957bb7520814508fcd
web/static/js/battle_snake/board_viewer.js
web/static/js/battle_snake/board_viewer.js
import Mousetrap from "mousetrap"; import $ from "jquery"; import socket from "../socket" import "../empties/modal"; const logError = resp => { console.error("Unable to join", resp) }; const init = (gameId) => { if(typeof gameId === "undefined") { return; } const boardViewerChannel = socket.channel(`boar...
import Mousetrap from "mousetrap"; import socket from "../socket" import "../empties/modal"; const logError = resp => { console.error("Unable to join", resp) }; const init = (gameId) => { if(typeof gameId === "undefined") { return; } const boardViewerChannel = socket.channel(`board_viewer:${gameId}`, {co...
Optimize dom replacement for board viewer
Optimize dom replacement for board viewer This one line cuts down the "loading" slice from the chrome timeline from 25% to 3%. jQuery.html performs a very expensive html validation before inserting to into the dom. Because we *hope* that we're sending valid html before hand we don't need to do this. This leaves page...
JavaScript
agpl-3.0
Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake,Dkendal/battle_snake
df039b068a097624e99755199ff86d3d4c6365be
app/components/organization/SettingsSection.js
app/components/organization/SettingsSection.js
import React from 'react'; import Relay from 'react-relay'; import SettingsMenu from './SettingsMenu'; const SettingsSection = (props) => <div className="twbs-container"> <div className="clearfix mxn2"> <div className="md-col md-col-3 px2"> <SettingsMenu organization={props.organization} /> ...
import React from 'react'; import Relay from 'react-relay'; import PageWithMenu from '../shared/PageWithMenu'; import SettingsMenu from './SettingsMenu'; const SettingsSection = (props) => <PageWithMenu> <SettingsMenu organization={props.organization} /> {props.children} </PageWithMenu> SettingsSection.propTypes...
Use the new PageWithMenu component
Use the new PageWithMenu component
JavaScript
mit
buildkite/frontend,buildkite/frontend,fotinakis/buildkite-frontend,fotinakis/buildkite-frontend
978425c95077c11682d9f01a378f0e2fd7513f63
src/middleware.js
src/middleware.js
import interceptor from "express-interceptor"; import SVGO from "svgo"; /** * SVGO middleware: optimize any SVG response. */ export function svgo(options) { const svgo = new SVGO(options); return interceptor((req, res) => { return { isInterceptable: function() { return /image\/svg\+xml(;|$)/.te...
import interceptor from "express-interceptor"; import SVGO from "svgo"; /** * SVGO middleware: optimize any SVG response. */ export function svgo(options) { const svgo = new SVGO(options); return interceptor((req, res) => { return { isInterceptable: function() { return /image\/svg\+xml(;|$)/.te...
Fix HEAD requests breaking SVG responses
Fix HEAD requests breaking SVG responses
JavaScript
mit
exogen/badge-matrix,exogen/badge-matrix,exogen/badge-matrix
98bdcd0c819a5845a9bd02a636f46a96bca851fb
andreystar/portfolio/src/main/webapp/script.js
andreystar/portfolio/src/main/webapp/script.js
function addRandomQuote() { const quotes = [ `Now. Say my name. Heisenberg. You're god damn right`, 'I am the danger.', 'You see, but you do not observe.', 'There’s a woman lying dead. Perfectly sound analysis but I was hoping you’d go deeper.', 'You\'re treading on some mighty thin ice here.' ]...
function addRandomQuote() { const quotes = [ `Now. Say my name. Heisenberg. You're god damn right`, 'I am the danger.', 'You see, but you do not observe.', 'There’s a woman lying dead. Perfectly sound analysis but I was hoping you’d go deeper.', `You're treading on some mighty thin ice here.` ];...
Remove character escape with template string.
Remove character escape with template string.
JavaScript
apache-2.0
googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020
c04bab344d7aa2eb6c25e0bcb5492b1405657f07
lib/av-extra.js
lib/av-extra.js
'use strict'; var AV = require('avoscloud-sdk'); var crypto = require('crypto'); AV._config.disableCurrentUser = true; AV.Promise.setPromisesAPlusCompliant(true); // 调用 API 时增加 prod 信息 if (!AV._old_request) { AV._old_request = AV._request; AV._request = function (route, className, objectId, method, dataObject, se...
'use strict'; var AV = require('avoscloud-sdk'); var crypto = require('crypto'); AV._config.disableCurrentUser = true; AV.Promise.setPromisesAPlusCompliant(true); AV._config.applicationProduction = AV.Cloud.__prod; AV.Object.prototype.disableBeforeHook = function() { this.set('__before', signDisableHook('__before_f...
Set API prod by AV._config.applicationProduction.
Set API prod by AV._config.applicationProduction.
JavaScript
mit
sdjcw/leanengine-node-sdk,leancloud/leanengine-node-sdk,aisk/leanengine-node-sdk
e63728b2392051b0d8d5535ae76ccb85c94ea052
src/ui/Styles.js
src/ui/Styles.js
import StyleConstants from './StyleConstants'; export default { input: { borderColor: StyleConstants.colorBorder, borderWidth: 1, borderRadius: 5, borderStyle: 'solid', paddingTop: 8, paddingRight: 8, paddingBottom: 8, paddingLeft: 8, }, hoverBox: { // gray border and box shadow ...
import StyleConstants from './StyleConstants'; export default { input: { borderColor: StyleConstants.colorBorder, borderWidth: 1, borderRadius: 5, borderStyle: 'solid', paddingTop: 8, paddingRight: 8, paddingBottom: 8, paddingLeft: 8, }, hoverBox: { // gray border and box shadow ...
Fix chat with us on intercom text wrapping
Fix chat with us on intercom text wrapping fbshipit-source-id: 498ec09
JavaScript
mit
exponentjs/xde,exponentjs/xde
ebf4e082acced0793e56506afd6ab747b3dc382d
src/utils/dom.js
src/utils/dom.js
class Dom { constructor(el) { this.el = el; this.style = window.getComputedStyle(el, ''); } set text(val) { if ('textContent' in this.el) { this.el.textContent = val; } else if ('innerText' in this.el) { this.el.innerText = val; } else { throw new Error('The browser does not...
class Dom { constructor(el) { this.el = el; this.style = window.getComputedStyle(el, ''); } set text(val) { if ('textContent' in this.el) { this.el.textContent = val; } else if ('innerText' in this.el) { this.el.innerText = val; } else { throw new Error('The browser does not...
Return 0 if an element height is not detected
Return 0 if an element height is not detected
JavaScript
mit
ktsn/truncator,ktsn/truncator
9762b789a4e94d2f4ab7fbb553f1a3d08dcd07df
src/App/Body/AboutButton.js
src/App/Body/AboutButton.js
import React from 'react'; import { version } from 'root/package.json'; import RaisedButton from 'material-ui/lib/raised-button'; import FlatButton from 'material-ui/lib/flat-button'; import Dialog from 'material-ui/lib/dialog'; export default class AboutButton extends React.Component { state = { dialogIsOpen: f...
import React from 'react'; import { version } from 'root/package.json'; import RaisedButton from 'material-ui/lib/raised-button'; import FlatButton from 'material-ui/lib/flat-button'; import Dialog from 'material-ui/lib/dialog'; export default class AboutButton extends React.Component { state = { dialogIsOpen: f...
Change one more CAPTIVA to Intelligent Capture
Change one more CAPTIVA to Intelligent Capture
JavaScript
cc0-1.0
ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer
6c8951dd0021a5d2d740627541fb78635d29d237
guefile.js
guefile.js
const gue = require('./index.js'); gue.task('default', ['lint','test']); gue.task('test', () => { return gue.shell('nyc mocha test/**/*.test.js'); }); gue.task('lint', () => { return gue.shell('jscs index.js bin/gue.js lib/Util.js'); }); gue.task('docs', () => { var command = '/bin/rm -f README.md'; command...
const gue = require('./index.js'); gue.task('default', ['lint','test']); gue.task('test', ['clean'], () => { return gue.shell('nyc --reporter lcov --reporter text ' + 'mocha test/**/*.test.js'); }); gue.task('lint', () => { return gue.shell('jscs index.js bin/gue.js lib/Util.js'); }); gue.task('docs', () => {...
Improve clean task / save lcov data
Improve clean task / save lcov data
JavaScript
mit
skarfacegc/Gue,skarfacegc/Gue
af0958d59bc9d28fffcefc95054afc1c5fadd177
lib/validate.js
lib/validate.js
'use babel' /* @flow */ import type {Provider, Declaration} from './types' export function validateDeclarations(declarations: Array<Declaration>) { } export function validateProvider(provider: Provider) { }
'use babel' /* @flow */ import type {Provider, Declaration} from './types' export function validateDeclarations(declarations: Array<Declaration>) { if (Array.isArray(declarations)) { const length = declarations.length for (let i = 0; i < length; ++i) { const entry = declarations[i] let message ...
Validate declarations and providers properly
:no_entry: Validate declarations and providers properly
JavaScript
mit
steelbrain/declarations
629ae1c460dc08f7f00b9e87a19e6f97f36c5aa1
lib/xorshift.js
lib/xorshift.js
module.exports = class XorShift { _hex2seed (size, hex) { const arr = new Array(size) for (let i = 0; i < size; ++i) { arr[i] = parseInt(hex.slice(i * 8, (i + 1) * 8), 16) >>> 0 } return arr } randomInt64 (_enc) { throw new Error('Not implemented!') } random () { const x = this...
module.exports = class XorShift { _hex2seed (size, hex) { const arr = new Array(size) for (let i = 0; i < size; ++i) { arr[i] = parseInt(hex.slice(i * 8, (i + 1) * 8), 16) >>> 0 } return arr } randomInt64 (_enc) { throw new Error('Not implemented!') } random () { const x = this...
Fix wrong fix randomBytes for new Buffer
Fix wrong fix randomBytes for new Buffer
JavaScript
mit
fanatid/xorshift.js,fanatid/xorshift.js
f59aaaa5b309248dbc3460c262af66ea99915f66
package.js
package.js
Package.describe({ name: 'aramk:file-upload', summary: 'Simple file uploads.', version: '0.4.0' }); Npm.depends({ 'mime': '1.3.4' }) Package.onUse(function(api) { api.versionsFrom('METEOR@0.9.0'); api.use([ 'coffeescript', 'underscore', 'templating', 'less', 'aramk:q@1.0.1_1', 'ara...
Package.describe({ name: 'aramk:file-upload', summary: 'Simple file uploads.', version: '0.4.0' }); Npm.depends({ 'mime': '1.3.4' }) Package.onUse(function(api) { api.versionsFrom('METEOR@1.2.0.1'); api.use([ 'coffeescript', 'underscore', 'templating', 'less', 'aramk:q@1.0.1_1', 'a...
Add support for Meteor 1.2
Add support for Meteor 1.2
JavaScript
mit
aramk/meteor-file-upload,aramk/meteor-file-upload
244520b237d4d35c0052bf5e5ea18be746b0c535
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 lsit-group"> {videoItems} </ul> ); }; export default VideoList;
Create video list component and load in the video list item component.
Create video list component and load in the video list item component.
JavaScript
mit
JosephLeon/redux-simple-starter-tutorial,JosephLeon/redux-simple-starter-tutorial
3be7abc361260753be74490fa4fd0ec2c99caff0
injectChrome.js
injectChrome.js
(function() { window.stop(); const IS_LOCAL = false, URL_REMOTE = "https://rawgit.com/ultratype/UltraTypeBot/master/OUT/OUT.js", URL_OUT = IS_LOCAL ? chrome.extension.getURL('OUT/OUT.js') : URL_REMOTE, SCRIPT_OUT = "<script src='" + URL_OUT + "'></script>\n"; let loader = new...
(function() { window.stop(); document.documentElement.innerHTML = null; const IS_LOCAL = false, URL_REMOTE = "https://rawgit.com/ultratype/UltraTypeBot/master/OUT/OUT.js", URL_OUT = IS_LOCAL ? chrome.extension.getURL('OUT/OUT.js') : URL_REMOTE, SCRIPT_OUT = "<script src='...
Remove document contents on injection
Remove document contents on injection
JavaScript
mit
ultratype/UltraTypeBot,ultratype/UltraTypeBot,ultratype/UltraTypeBot
0ea6a328654399c5b8f21508913f362fbcb99e06
tests/tests.js
tests/tests.js
var path = require('path'); var root = path.dirname(__filename); require.paths.unshift(path.join(root, '../build/default')); require.paths.unshift(path.join(root, '../lib')); var sys = require('sys'); var Buffer = require('buffer').Buffer; var archive = require('archive'); var ar = new archive.ArchiveReader(); var b...
var path = require('path'); var root = path.dirname(__filename); require.paths.unshift(path.join(root, '../build/default')); require.paths.unshift(path.join(root, '../lib')); var sys = require('sys'); var Buffer = require('buffer').Buffer; var archive = require('archive'); var ar = new archive.ArchiveReader(); var b...
Use relative path for the test tarfile
Use relative path for the test tarfile
JavaScript
apache-2.0
pquerna/node-archive,pquerna/node-archive
bc25ae335ec40367fa5229c6228a79ddc21c3b90
views/components/statusbar-container.android.js
views/components/statusbar-container.android.js
import React from "react-native"; import VersionCodes from "../../modules/version-codes"; const { Platform, StyleSheet, View } = React; const styles = StyleSheet.create({ statusbar: { height: 25 // offset for statusbar height } }); class StatusbarContainer extends React.Component { render() { return ( <...
import React from "react-native"; import VersionCodes from "../../modules/version-codes"; const { Platform, StyleSheet, View } = React; const styles = StyleSheet.create({ statusbar: { height: 25 // offset for statusbar height } }); class StatusbarContainer extends React.Component { render() { return ( <...
Fix comment in statusbar container
Fix comment in statusbar container
JavaScript
unknown
scrollback/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods
5e9343acc0eb6b9834afe558d8df7d1606930f28
tools/phantom.js
tools/phantom.js
var page = require('webpage').create() page.onConsoleMessage = function(arg) { var parts = arg.split('`') var msg = parts[1] || '[LOG] ' + arg console.log(color(msg, parts[0])) if (msg === 'END') { var result = page.evaluate(function() { return result }) if (result.error.count + result.fai...
var page = require('webpage').create() page.onConsoleMessage = function(arg) { var parts = arg.split('`') var msg = parts[1] || '[LOG] ' + arg console.log(color(msg, parts[0])) if (msg === 'END') { var result = page.evaluate(function() { return result }) if (result.error.count + result.fai...
Modify script to allow warnings
Modify script to allow warnings
JavaScript
mit
wenber/seajs,tonny-zhang/seajs,zaoli/seajs,LzhElite/seajs,lee-my/seajs,AlvinWei1024/seajs,lianggaolin/seajs,seajs/seajs,moccen/seajs,yern/seajs,lovelykobe/seajs,jishichang/seajs,AlvinWei1024/seajs,judastree/seajs,121595113/seajs,ysxlinux/seajs,zaoli/seajs,baiduoduo/seajs,JeffLi1993/seajs,eleanors/SeaJS,tonny-zhang/seaj...
ab13f32c1c42d72982ee78bb0d51111cca664044
src/validation/rules/ArgumentsOfCorrectType.js
src/validation/rules/ArgumentsOfCorrectType.js
/* @flow */ /** * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ i...
/* @flow */ /** * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ i...
Fix accidental logic error in argument checking
Fix accidental logic error in argument checking
JavaScript
mit
graphql/graphql-js,tgriesser/graphql-js,baer/graphql-js,graphql/graphql-js,enaqx/graphql-js,sogko/graphql-js,baer/graphql-js,jjergus/graphql-js,josephsavona/graphql-js,jjergus/graphql-js,sogko/graphql-js,gabelevi/graphql-js,josephsavona/graphql-js,gabelevi/graphql-js,josephsavona/graphql-js,graphql/graphql-js,sogko/gra...
a91b6aa9cb9d3d37fccdf90610dbf692b0d86cdd
test/EventBus.js
test/EventBus.js
"use strict"; var EventBus = require('../lib/messages/EventBus'); describe('Event Bus', function () { it("should publish an event", function () { var eventBus = new EventBus(), subscriber = { action: function (data) { } }; spyOn(subscriber,...
"use strict"; var EventBus = require('../lib/messages/EventBus'); describe('Event Bus', function () { it("should publish an event", function () { var eventBus = new EventBus(), subscriber = { action: function (data) { } }; spyOn(subscriber,...
Add test to event bus with different types of events
Add test to event bus with different types of events
JavaScript
mit
mtfranchetto/bunnycry
cd3025a56d13aff29e009f88a601b500199687cb
knexfile.js
knexfile.js
const config = require('./config') module.exports = { web: { client: 'mssql', connection: { host: config.DATABASE_SERVER, user: config.WEB_APP_DATABASE_USERNAME, password: config.WEB_APP_DATABASE_PASSWORD, database: config.DATABASE, options: { encrypt: true } }...
const config = require('./config') module.exports = { web: { client: 'mssql', connection: { host: config.DATABASE_SERVER, user: config.WEB_APP_DATABASE_USERNAME, password: config.WEB_APP_DATABASE_PASSWORD, database: config.DATABASE, options: { encrypt: true } }...
Update the max pool size from 10 to 500
Update the max pool size from 10 to 500
JavaScript
mit
ministryofjustice/wmt-web,ministryofjustice/wmt-web
805c32a765292c8f76d9c07ae2c426cc2748fd37
knexfile.js
knexfile.js
// Update with your config settings. module.exports = { development: { client: 'sqlite3', connection: { filename: './database.sqlite3', }, seeds: { directory: './seeds/knex', }, useNullAsDefault: true, }, test: { client: 'sqlite3', connection: { filename: ':mem...
// Update with your config settings. module.exports = { development: { // client: 'postgres', client: 'sqlite3', connection: { // database: 'fortress_dev', filename: './database.sqlite3', }, seeds: { directory: './seeds/knex', }, useNullAsDefault: true, }, test: { ...
Add commented out lines for easy postgres testing.
Add commented out lines for easy postgres testing.
JavaScript
mit
andymeneely/dev-fortress-server
4332487bb2ae15a36252d4cf59af7077bb7aebc7
packages/redux-simple-auth/test/utils/testStorage.js
packages/redux-simple-auth/test/utils/testStorage.js
export default (initialData = {}) => { let data = initialData return { reset: () => (data = initialData), getData: () => data, persist: d => (data = d), restore: jest.fn(() => data) } }
export default (initialData = {}) => { let data = initialData return { reset: () => (data = initialData), getData: () => data, persist: d => (data = d), restore: () => data } }
Remove mock around test storage restore
Remove mock around test storage restore
JavaScript
mit
jerelmiller/redux-simple-auth
3acac48bf0622b6d5e492f3b098d850a9c6c69ae
lib/game.js
lib/game.js
const $ = require('jquery'); const board = require('./board'); const Piece = require('./piece'); function Game(players, board) { this.players = players; this.turn = 0; this.winner = null; this.over = false; this.board = board; } Game.prototype.start = function(){ var square0 = this.board.squar...
const $ = require('jquery'); const board = require('./board'); const Piece = require('./piece'); function Game(players, board) { this.players = players; this.turn = 0; this.winner = null; this.over = false; this.board = board; } Game.prototype.start = function(){ welcomePlayers(this.players); ...
Refactor placing of first four pieces
Refactor placing of first four pieces I wanted this to be a separate function.
JavaScript
mit
androidgrl/othello,androidgrl/othello
8363401bc728d83bddc2ec8839ea0d432a26e091
listener.js
listener.js
// Listen for keydown events on the main document // Note: Will not trigger if focused on an element within an iframe document.addEventListener('keydown', keyListener, false); // Keyboard listener callback function keyListener(e) { var key = e.keyCode || e.charCode; var space = (key == 8 || key == 46); var contr...
// Listen for keydown events on the main document // Note: Will not trigger if focused on an element within an iframe document.addEventListener('keydown', keyListener, false); // Keyboard listener callback function keyListener(e) { var key = e.keyCode || e.charCode; var space = (key == 8 || key == 46); var contr...
Fix issue with Facebook text input elements.
Fix issue with Facebook text input elements.
JavaScript
mit
DeathIsUnknown/back-to-back
b2a99e91d887b9b3849116ce07dc1e2f1c7c37bb
apps/publisher/themes/default/js/view-asset.js
apps/publisher/themes/default/js/view-asset.js
$(document).ready(function(){ $('.image-display').click(function(){ messages.modal_pop({content:'<img src="'+$(this).attr('src')+'" />'}); }); });
$(document).ready(function () { var image = $('.image-display'); image.click(function () { messages.modal_pop({content: '<img src="' + $(this).attr('src') + '" />'}); }); image.error( function () { $(this).unbind("click").css("cursor", "default") }); });
Fix for STORE-1324: Update JS to prevent onclick action when the image link is broken
Fix for STORE-1324: Update JS to prevent onclick action when the image link is broken
JavaScript
apache-2.0
Rajith90/carbon-store,daneshk/carbon-store,wso2/carbon-store,splinter/carbon-store,daneshk/carbon-store,madawas/carbon-store,prasa7/carbon-store,wso2/carbon-store,jeradrutnam/carbon-store,jeradrutnam/carbon-store,madawas/carbon-store,cnapagoda/carbon-store,thushara35/carbon-store,wso2/carbon-store,splinter/carbon-store...
272663e414e951584b65fbcbbe957a865d0a0d7a
.eslintrc.js
.eslintrc.js
module.exports = { extends: 'airbnb-base', rules: { // Turning off errors about using console, since this is a Node app, // as recommended here: http://eslint.org/docs/rules/no-console#when-not-to-use-it 'no-console': 'off', }, };
'use strict'; module.exports = { root: true, extends: 'airbnb-base', rules: { // Turning off errors about using console, since this is a Node app, // as recommended here: http://eslint.org/docs/rules/no-console#when-not-to-use-it 'no-console': 'off', strict: ['error', 'global'], }, parserOpti...
Set ESLint to allow global strict directives.
Set ESLint to allow global strict directives. The airbnb rules expect es6 modules but with node we don't use them. This change sets the `sourceType` to "script", and enforces to have a directive "strict" in any global scope (i.e. file). More info: http://eslint.org/docs/rules/strict Signed-off-by: Arnau Siches <d0f8...
JavaScript
mit
ustwo/wordy-slack-bot
6f3ac539478417204864c8e542d8279b8d2ad743
packages/react-server-website/pages/homepage.js
packages/react-server-website/pages/homepage.js
import React from 'react'; import HomepageBody from '../components/homepage-body'; import './homepage.less'; export default class Homepage { getTitle() { return "React Server"; } getElements() { return ( <div className="homepage"> <HomepageBody /> </div> ); } }
import React from 'react'; import HomepageBody from '../components/homepage-body'; import './homepage.less'; export default class Homepage { getTitle() { return "React Server - Fast Server and Client Side Rendering"; } getElements() { return ( <div className="homepage"> <HomepageBody /> </div> ); ...
Change title for home page
Change title for home page To get more SEO traffic, we should adjust the title for what people search for. Change recommended by Joe Lei.
JavaScript
apache-2.0
redfin/react-server,redfin/react-server,emecell/react-server,szhou8813/react-server,szhou8813/react-server,emecell/react-server,lidawang/react-server,lidawang/react-server
edd900413a3973c52e65f816f9da68dbc1a1ee34
bloggify.js
bloggify.js
"use strict"; const isProduction = process.env.NODE_ENV === "production"; module.exports = { metadata: { siteTitle: "Bloggify" , description: "We make publishing easy." , domain: isProduction ? "https://bloggify.org" : "http://localhost:8080" , twitter: "Bloggify" } , theme: { ...
"use strict"; const isProduction = process.env.NODE_ENV === "production"; module.exports = { metadata: { siteTitle: "Bloggify" , description: "We make publishing easy." , domain: isProduction ? "https://bloggify.org" : "http://localhost:8080" , twitter: "Bloggify" } , theme: { ...
Load the analytics and mongoose only in the production mode.
Load the analytics and mongoose only in the production mode.
JavaScript
mit
Bloggify/newww,Bloggify/newww
fb66d1dff3f4ce359199b07a6911c131cdc03841
ui/src/components/SuggestAlert/SuggestAlert.js
ui/src/components/SuggestAlert/SuggestAlert.js
import React, { PureComponent } from 'react'; import connect from 'react-redux/es/connect/connect'; import {Callout, Tag} from '@blueprintjs/core'; import {FormattedMessage} from 'react-intl'; import SearchAlert from 'src/components/SearchAlert/SearchAlert'; import {selectAlerts, selectSession} from 'src/selectors'; c...
import React, { PureComponent } from 'react'; import connect from 'react-redux/es/connect/connect'; import {Callout, Tag} from '@blueprintjs/core'; import {FormattedMessage} from 'react-intl'; import SearchAlert from 'src/components/SearchAlert/SearchAlert'; import {selectAlerts, selectSession} from 'src/selectors'; c...
Change language a tiny bit.
Change language a tiny bit.
JavaScript
mit
alephdata/aleph,alephdata/aleph,pudo/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph
591001d48e2191e73091df20b13e6bf31d7a2bc0
eloquent_js/chapter03/ch03_ex03.js
eloquent_js/chapter03/ch03_ex03.js
function countBs(s) { let count = 0; for (let i = 0; i < s.length; ++i) { if (s[i] == "B") ++count; } return count; } function countChar(s, c) { let count = 0; for (let i = 0; i < s.length; ++i) { if (s[i] == c) ++count; } return count; } console.log(countBs("BBC")); //...
function countChar(s, c) { let count = 0; for (let i = 0; i < s.length; ++i) { if (s[i] == c) ++count; } return count; } function countBs(s) { return countChar(s, "B"); }
Add chapter 3, exercise 3
Add chapter 3, exercise 3
JavaScript
mit
bewuethr/ctci
a39c9c8871162bd1ef2963b8faed51db25358ecd
src/browser-frontend/model/shared-prop-types.js
src/browser-frontend/model/shared-prop-types.js
/* Copyright 2016 Mozilla 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 law or agreed to in writing, software distributed u...
/* Copyright 2016 Mozilla 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 law or agreed to in writing, software distributed u...
Remove unused shared prop types
Remove unused shared prop types Signed-off-by: Victor Porof <4f672cb979ca45495d0cccc37abaefc8713fcc24@gmail.com>
JavaScript
apache-2.0
victorporof/tofino,victorporof/tofino
56d5988bab49598a3be49a99e8e04fff94efc30a
examples/simple/triggers/primeStateTriggers.js
examples/simple/triggers/primeStateTriggers.js
// TODO: Switch this out with a proper import from the module when it's ready. import { createTrigger, addTrigger } from '../../../src'; import { checkNextPrimeAction } from '../middleware/primesMiddleware'; const REMOVE_FROM_QUEUE = 'REMOVE_FROM_QUEUE'; function queueMatcher( state ) { const { queue } = state.prime...
// TODO: Switch this out with a proper import from the module when it's ready. import { addTrigger } from '../../../src'; import { checkNextPrimeAction } from '../middleware/primesMiddleware'; const REMOVE_FROM_QUEUE = 'REMOVE_FROM_QUEUE'; function queueMatcher( state ) { const { queue } = state.primeState; console...
Remove createTrigger import from triggers file
Remove createTrigger import from triggers file The primeStateTriggers file still had an import for createTrigger. This removes it.
JavaScript
mit
coderkevin/redux-trigger
23b3260e6029f4dcd829e7141d5b23a4ede66a83
webapp/src/components/disease/referenceCell.js
webapp/src/components/disease/referenceCell.js
import React from 'react'; const ReferenceCell = (refs) => { return refs.map((ref) => { if (ref.pubMedId && ref.pubMedUrl) { return <a href={ref.pubMedUrl}>{ref.pubMedId}</a>; } else { return <span>{ref.publicationModId}</span>; } }) .reduce((prev, curr) => [prev, ', ', curr]); }; export...
import React from 'react'; const ReferenceCell = (refs) => { return refs && refs.map((ref) => { if (ref.pubMedId && ref.pubMedUrl) { return <a href={ref.pubMedUrl}>{ref.pubMedId}</a>; } else { return <span>{ref.publicationModId}</span>; } }) .reduce((prev, curr) => [prev, ', ', curr]); };...
Handle case where reference list is undefined due to filtering
Handle case where reference list is undefined due to filtering
JavaScript
mit
nathandunn/agr,alliance-genome/agr,alliance-genome/agr,alliance-genome/agr_prototype,nathandunn/agr,nathandunn/agr,alliance-genome/agr,alliance-genome/agr_prototype,nathandunn/agr,alliance-genome/agr
772948724dcd63c2f8df1f1beb64254fbedc4a39
js/application.js
js/application.js
;(function(lander, undefined){ var display = document.getElementById('display'); var horizon = new Array(display.width); var horizon_height = 50; horizon[0] = horizon_height; for (var index = 1; index < display.width; index++){ horizon[index] = horizon_height; } var model = { ...
;(function(lander, undefined){ var display = document.getElementById('display'); var horizon = new Array(display.width); var horizon_height = 50; horizon[0] = horizon_height; for (var index = 1; index < display.width; index++){ horizon[index] = horizon_height; } var model = { ...
Monitor if the lander is crashed
Monitor if the lander is crashed
JavaScript
mit
darwins-challenge/moonlander-game,darwins-challenge/moonlander-game
a933b68be4f8c89ac61f50b85dfc8f0d6dd5bccc
react/gameday2/components/embeds/EmbedDacast.js
react/gameday2/components/embeds/EmbedDacast.js
import React from 'react' import { webcastPropType } from '../../utils/webcastUtils' const EmbedDacast = (props) => { const channel = props.webcast.channel const file = props.webcast.file const iframeSrc = `https://static.viewer.dacast.com/b/${channel}/c/${file}` return ( <iframe src={iframeSrc} ...
import React from 'react' import { webcastPropType } from '../../utils/webcastUtils' const EmbedDacast = (props) => { const channel = props.webcast.channel const file = props.webcast.file const iframeSrc = `https://static.viewer.dacast.com/b/${channel}/c/${file}` return ( <iframe src={iframeSrc} ...
Allow full screen on dacast embeds
[GD2] Allow full screen on dacast embeds
JavaScript
mit
bdaroz/the-blue-alliance,fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,the-blue-alliance/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopreiato/the-blue-alliance...
595aec1a409d2f0b068e625f6a53f354c0584535
lib/junction/filters/dump.js
lib/junction/filters/dump.js
/** * Dump outgoing stanzas to the console. * * This filter prints XML stanzas to the console. This is useful to inspect * stanzas as they are transmitted on the wire, and aids in debugging. It is * not recommended to use this filter in a production environment. * * Examples: * * app.use(junction.filter...
/** * Dump outgoing stanzas to the console. * * This filter prints XML stanzas to the console. This is useful to inspect * stanzas as they are transmitted on the wire, and aids in debugging. It is * not recommended to use this filter in a production environment. * * Examples: * * app.filter(junction.fil...
Call `filter` and not `use` for filters.
Call `filter` and not `use` for filters.
JavaScript
mit
jaredhanson/junction
a7d6fc81e04f3bde5b05516f0f0a5cf4e58811a0
js/main.js
js/main.js
jQuery(document).ready(function($){ var timelineBlocks = $('.cd-timeline-block'), offset = 0.8; //hide timeline blocks which are outside the viewport hideBlocks(timelineBlocks, offset); //on scolling, show/animate timeline blocks when enter the viewport $(window).on('scroll', function(){ (!window.requestAnim...
jQuery(document).ready(function($){ var timelineBlocks = $('.cd-timeline-block'), offset = 0.8; // hide timeline blocks which are outside the viewport hideBlocks(timelineBlocks, offset); // on scolling, show/animate timeline blocks when enter the viewport $(window).on('scroll', function(){ (!window.requestAn...
Extend time lenght of animations
Extend time lenght of animations Extend time lenght of animations to show blocks
JavaScript
apache-2.0
soujava/historia,soujava/historia
8c656e4f14aa04f8a05ec5d5c00c1c83f845a017
lib/shared/provider/index.js
lib/shared/provider/index.js
'use strict'; var alter = require('./alter'); var batoto = require('./batoto'); var kissmanga = require('./kissmanga'); var mangafox = require('./mangafox'); /** * Retrieves a series. * @param {string} address * @return {Series} */ module.exports = function (address) { var series = batoto(address) || kissmanga...
'use strict'; var alter = require('./alter'); var batoto = require('./batoto'); var kissmanga = require('./kissmanga'); var mangafox = require('./mangafox'); var providers = [batoto, kissmanga, mangafox]; /** * Retrieves a series. * @param {string} address * @return {Series} */ module.exports = function (address) ...
Enable runtime addition of third party providers.
Enable runtime addition of third party providers.
JavaScript
mit
kenpeter/mangarack.js,kenpeter/mangarack.js
3b79034d68b983a3d2250c9c2b25eefa93c1a335
js/misc.js
js/misc.js
var round = function(num) { return (num + 0.5) | 0 } var floor = function(num) { return num | 0 } var ceil = function(num) { return (num | 0) == num ? num | 0 : (num + 1) | 0 } var abs = Math.abs var sqrt = Math.sqrt var log = function(num) { var result = Math.log(num) return result } var signed_log = func...
var round = function(num) { return (num + 0.5) | 0 } var floor = function(num) { return num | 0 } var ceil = function(num) { return (num | 0) == num ? num | 0 : (num + 1) | 0 } var abs = Math.abs var sqrt = Math.sqrt var log = function(num) { var result = Math.log(num) return result } var signed_log = func...
Add a die function to quickly throw errors
Add a die function to quickly throw errors
JavaScript
artistic-2.0
atrodo/fission_engine,atrodo/fission_engine
7ec7b9e6c088d28d9521ccf3408a6a741cbd744f
src/client/modules/Events/EventDetails/tasks.js
src/client/modules/Events/EventDetails/tasks.js
import { apiProxyAxios } from '../../../components/Task/utils' import { transformResponseToEventDetails } from '../transformers' export const getEventDetails = (eventId) => apiProxyAxios .get(`/api-proxy/v3/event/${eventId}`) .then(({ data }) => transformResponseToEventDetails(data))
import { apiProxyAxios } from '../../../components/Task/utils' import { transformResponseToEventDetails } from '../transformers' export const getEventDetails = (eventId) => apiProxyAxios .get(`/api-proxy/v4/event/${eventId}`) .then(({ data }) => transformResponseToEventDetails(data))
Update the event endpoint from v3 to v4
Update the event endpoint from v3 to v4
JavaScript
mit
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
94491a2ac736637c92ccee8c758551bf78a49d79
src/browser/page-title.js
src/browser/page-title.js
const lag = require('./lag'); module.exports = (user, pings) => { const original = document.title; user.events.on('read', () => { document.title = `${original} (${lag.humanize(pings.currentLag())})`; }); };
const lag = require('./lag'); module.exports = (user, pings) => { const original = document.title; user.events.on('read', () => { document.title = `${lag.humanize(pings.currentLag())} - ${original}`; }); };
Increase the chances of seeing the actual lag when on narrow page tabs
Increase the chances of seeing the actual lag when on narrow page tabs
JavaScript
mit
frosas/lag,frosas/lag,frosas/lag
ab57fd3f55334c6765c2cbd223d0d69e3dcf7923
app/assets/javascripts/supervisor_autocomplete.js
app/assets/javascripts/supervisor_autocomplete.js
$(document).ready(function() { var supervisor_provider = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, remote: '/employees?q=%QUERY' }); supervisor_provider.initialize(); $('.typeahead-supervisor').typeahead(null, ...
var supervisor_autocomplete = function() { var supervisor_provider = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, remote: '/employees?q=%QUERY' }); supervisor_provider.initialize(); $('.typeahead-supervisor').type...
Move supervisor autocomplete into function
Move supervisor autocomplete into function Change-Id: Iebcd27893f1801084ab8b39753b9c779bab16ead
JavaScript
agpl-3.0
Opensoftware/USI-Core,Opensoftware/USI-Core,Opensoftware/USI-Core
2f24b195620a4a8e559bde0424806fead3437957
lib/collections/betImages.js
lib/collections/betImages.js
var imageStore = new FS.Store.GridFS('images') Images = new FS.Collection('images', { stores: [imageStore] }); Images.allow({ 'insert' : function(){ return true; }, 'update' : function(){ return true; } });
var imageStore = new FS.Store.GridFS('images') Images = new FS.Collection('images', { stores: [imageStore] }); Images.allow({ 'insert' : function(){ return true; }, 'update' : function(){ return true; }, 'download' : function(){ return true; } });
Set permission to download photo from CFS
Set permission to download photo from CFS
JavaScript
mit
nmmascia/webet,nmmascia/webet
313c74aba8324a32eac65554d22df73e5d2c374d
lib/composable-middleware.js
lib/composable-middleware.js
/* * composable-middleware * https://github.com/randymized/composable-middleware * * Copyright (c) 2013 Randy McLaughlin * Licensed under the MIT license. */ 'use strict'; module.exports= function composable_middleware(components) { var stack= []; function middleware(req,res,out) { var layer= 0; v...
/* * composable-middleware * https://github.com/randymized/composable-middleware * * Copyright (c) 2013 Randy McLaughlin * Licensed under the MIT license. */ 'use strict'; module.exports= function composable_middleware(components) { var stack= []; function middleware(req,res,out) { var layer= 0; v...
Test reaching end of stack
Test reaching end of stack
JavaScript
mit
randymized/composable-middleware
bbc6c4b1a37719e4271cd2a1844b81ca198fb945
addon/transforms/ol-geometry.js
addon/transforms/ol-geometry.js
import DS from 'ember-data'; export default DS.Transform.extend({ deserialize(serialized) { return serialized; }, serialize(deserialized) { return deserialized; } });
import DS from 'ember-data'; const format = new ol.format.GeoJSON() export default DS.Transform.extend({ deserialize(serialized) { return format.readGeometry(serialized); }, serialize(deserialized) { return format.writeGeometry(deserialized); } });
Add GeoJSON transform for geometry
Add GeoJSON transform for geometry
JavaScript
mit
bjornharrtell/ember-ol,bjornharrtell/ember-ol
149ed4b0f9ffb9b1774d2e7fd5b020fefe916354
app/containers/container_viewContainer.js
app/containers/container_viewContainer.js
import React, { Component, PropTypes, StyleSheet, Text, View } from 'react-native'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import getLocationToSave from '../actions/action_dropNewPin.js'; import updatePins from '../actions/action_updatePins.js'; import deletePin from '../act...
import React, { Component, PropTypes, StyleSheet, Text, View } from 'react-native'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import getLocationToSave from '../actions/action_dropNewPin'; import updatePins from '../actions/action_updatePins'; import deletePin from '../actions/a...
Remove .js suffix in imports for consistency
Remove .js suffix in imports for consistency
JavaScript
mit
InterruptedLobster/ARO
1fd1f157d9a2605bf7b02a290adbf9ecdd6b98ea
frontend/src/constants/database.js
frontend/src/constants/database.js
/** * This file specifies the database collection and field names. */ export const COLLECTION_TRIPS = 'trips'; export const TRIPS_NAME = 'name'; export const TRIPS_DESCRIPTION = 'description'; export const TRIPS_DESTINATION = 'destination'; export const TRIPS_COLLABORATORS = 'collaborators'; export const TRIPS_START_...
/** * This file specifies the database collection and field names. */ export const COLLECTION_TRIPS = 'trips'; export const TRIPS_TITLE = 'title'; export const TRIPS_DESCRIPTION = 'description'; export const TRIPS_DESTINATION = 'destination'; export const TRIPS_COLLABORATORS = 'collaborators'; export const TRIPS_STAR...
Update timestamp and trip title fields to better naming convention.
Update timestamp and trip title fields to better naming convention.
JavaScript
apache-2.0
googleinterns/SLURP,googleinterns/SLURP,googleinterns/SLURP
6187667b8225ba629bc898c77322634cde9e6d44
lib/node_modules/@stdlib/time/now/lib/index.js
lib/node_modules/@stdlib/time/now/lib/index.js
'use strict'; /** * Time in seconds since the epoch. * * @module @stdlib/time/now * * @example * var now = require( '@stdlib/time/now' ); * * var ts = now(); * // returns <number> */ // MODULES // var bool = require( './detect.js' ); // MAIN // var now; if ( bool ) { now = require( './now.js' ); } else { now = ...
'use strict'; /** * Time in seconds since the epoch. * * @module @stdlib/time/now * * @example * var now = require( '@stdlib/time/now' ); * * var ts = now(); * // returns <number> */ // MODULES // var bool = require( './detect.js' ); var main = require( './now.js' ); var polyfill = require( './polyfill.js' ); // M...
Refactor to avoid dynamic module resolution
Refactor to avoid dynamic module resolution
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
fd5f2489ad9c376c2c8fb15b3fec4d03b8700566
src/javascript/binary_japan/trade_japan/portfolio.js
src/javascript/binary_japan/trade_japan/portfolio.js
const State = require('../../binary/base/storage').State; const Client = require('../../binary/base/client').Client; const PortfolioWS = require('../../binary/websocket_pages/user/account/portfolio/portfolio.init').PortfolioWS; const JapanPortfolio = (function() { let $portfolio, isPortfolioActive = false...
const State = require('../../binary/base/storage').State; const Client = require('../../binary/base/client').Client; const PortfolioWS = require('../../binary/websocket_pages/user/account/portfolio/portfolio.init').PortfolioWS; const JapanPortfolio = (function() { let $portfolio, isPortfolioActive = false...
Fix portolio tab loading when loaded by pjax
Fix portolio tab loading when loaded by pjax
JavaScript
apache-2.0
raunakkathuria/binary-static,raunakkathuria/binary-static,ashkanx/binary-static,binary-com/binary-static,negar-binary/binary-static,kellybinary/binary-static,fayland/binary-static,fayland/binary-static,4p00rv/binary-static,kellybinary/binary-static,binary-com/binary-static,negar-binary/binary-static,binary-static-deplo...
c65d1cee1b5dc23991726b208174f82f989cedd6
assets/src/dashboard/app/api/wpAdapter.js
assets/src/dashboard/app/api/wpAdapter.js
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
Use `_method=DELETE` instead for deletion
Use `_method=DELETE` instead for deletion
JavaScript
apache-2.0
GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp
18803808f895cc6776fb5cb0b8e1d22c8a4b9905
src/end.js
src/end.js
})();
/** * This is the default configuration for the layout algorithm. It results in * a grid-like layout. A perfect grid when the number of elements to layout * is a perfect square. Otherwise the last couple of elements will be * stretched. */ var defaultConfig = { itemSize: function(item) { return ...
Add some wrapper code which defines the public API.
Add some wrapper code which defines the public API. * There is now also a default configuration for the algorithm. Which is for now the only one.
JavaScript
mit
bbroeksema/d3-treemap
5b97687c3ccbbafa72daba26109fcebd1b26c052
app/account/views/cards-list.js
app/account/views/cards-list.js
module.exports = Zeppelin.CollectionView.extend({ tagName: 'ol', className: 'cards-list list-unstyled clearfix', subscriptions: { 'cardsList:layout': 'triggerLayout' }, itemView: function(model) { return require('account/views/' + model.get('type')); }, collection: function() { return App....
module.exports = Zeppelin.CollectionView.extend({ tagName: 'ol', className: 'cards-list list-unstyled clearfix', subscriptions: { 'cardsList:layout': 'triggerLayout' }, itemView: function(model) { return require('account/views/' + model.get('type')); }, collection: function() { return App....
Reduce grid layout logic delay.
Reduce grid layout logic delay.
JavaScript
agpl-3.0
GetBlimp/boards-web,jessamynsmith/boards-web,jessamynsmith/boards-web
33a3a86f224f9c75bf5d1cbadf2444eb71c84db7
app/controllers/balances.js
app/controllers/balances.js
RippleTransaction = require("../models/ripple_transaction"); var async = require("async"); module.exports = (function(){ function userIndex(req, res) { req.user.balances(function(err, balances) { res.send({ error: err, balances: balances }); }); } return { userIndex: userIndex } })();
RippleTransaction = require("../models/ripple_transaction"); var async = require("async"); module.exports = (function(){ function index(req, res) { req.user.balances(function(err, balances) { res.send({ error: err, balances: balances }); }); } return { index: index } })();
Rename userIndex controller action to index.
[FEATURE] Rename userIndex controller action to index.
JavaScript
isc
zealord/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,xdv/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd
b12465e783d9fc3b4d99e2f87ab924d5b60fabc4
app/routes/accept-invite.js
app/routes/accept-invite.js
import Route from '@ember/routing/route'; import ajax from 'ember-fetch/ajax'; export default Route.extend({ async model(params) { try { await ajax(`/api/v1//me/crate_owner_invitations/accept/${params.token}`, { method: 'PUT', body: '{}' }); this.set('response', { accepted: true }); return { re...
import Route from '@ember/routing/route'; import ajax from 'ember-fetch/ajax'; export default Route.extend({ async model(params) { try { await ajax(`/api/v1/me/crate_owner_invitations/accept/${params.token}`, { method: 'PUT', body: '{}' }); this.set('response', { accepted: true }); return { res...
Remove extra slash in URL
Remove extra slash in URL
JavaScript
apache-2.0
rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io
370bc7beddcdb22eb54e89d795a54e3ac05af71a
web_client/js/views/annotationSelectorWidget.js
web_client/js/views/annotationSelectorWidget.js
histomicstk.views.AnnotationSelectorWidget = histomicstk.views.Panel.extend({ events: _.extend(histomicstk.views.Panel.prototype.events, { 'click .h-annotation > span': 'toggleAnnotation' }), setItem: function (item) { if (this.collection) { this.stopListening(this.collection); ...
histomicstk.views.AnnotationSelectorWidget = histomicstk.views.Panel.extend({ events: _.extend(histomicstk.views.Panel.prototype.events, { 'click .h-annotation > span': 'toggleAnnotation' }), initialize: function () { this.listenTo(girder.eventStream, 'g:event.job_status', function (evt) { ...
Update annotation list on job completion
Update annotation list on job completion
JavaScript
apache-2.0
DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK
40ee6a7448bdad262cf62fdab69a44a14b6d2352
app/js/services/modalhandler.js
app/js/services/modalhandler.js
'use strict'; /* * Simple wrapper around $ionicPopup for modals and alerts and such */ var modalhandler = angular.module('modalhandler', []); modalhandler.factory('modalFactory', function(i$ionicPopup) { return {} });
'use strict'; /* * Simple wrapper around $ionicPopup for modals and alerts and such */ var modalhandler = angular.module('modalhandler', []); modalhandler.factory('modalFactory', function(i$ionicPopup) { return { alert: function (title, template) { return $ionicPopup.alert({ ...
Add alert functionality to modal handler
Add alert functionality to modal handler
JavaScript
mit
learning-layers/sardroid,learning-layers/sardroid,learning-layers/sardroid
f76a836f196bec69e0ebc3bc50f0676d0f24d2b8
draft-js-embed-plugin/src/modifiers/addEmbed.js
draft-js-embed-plugin/src/modifiers/addEmbed.js
import { Entity, EditorState, AtomicBlockUtils } from 'draft-js' export default (editorState, url) => { const urlType = 'embed' const entityKey = Entity.create(urlType, 'IMMUTABLE', { src: url }) const newEditorState = AtomicBlockUtils.insertAtomicBlock( editorState, entityKey, ' ' ) return...
import { Entity, EditorState, AtomicBlockUtils } from 'draft-js' export default (editorState, url) => { const urlType = 'embed' const entityKey = Entity.create(urlType, 'IMMUTABLE', { src: url }) const newEditorState = AtomicBlockUtils.insertAtomicBlock( editorState, entityKey, ' ' ) return...
Move cursor after embed when inserting
Move cursor after embed when inserting Right now, when you insert an embed the cursor is afterwards _above_ the embed, rather than below it. With this fix the cursor is correctly moved after the embed, which makes for a much nicer writing experience. Reference `image-plugin` PR with the same fix: https://github.com...
JavaScript
mit
vacenz/last-draft-js-plugins,vacenz/last-draft-js-plugins
5c6f950fcfba27fc913af5392d222400dcceee2f
node-iterator-shim.js
node-iterator-shim.js
export default function createNodeIterator(root, whatToShow, filter = null) { var iter = _create.call(window.document, root, whatToShow, filter, false); return typeof(iter.referenceNode) === 'undefined' ? shim(iter, root) : iter; } function shim(iter, root) { var _referenceNode = root; var _pointerBeforeRefer...
export default function createNodeIterator(root, whatToShow, filter = null) { let document = root.ownerDocument; var iter = document.createNodeIterator(root, whatToShow, filter, false); return typeof(iter.referenceNode) === 'undefined' ? shim(iter, root) : iter; } function shim(iter, root) { var _referenceNod...
Fix bad invocation of old, dead code
Fix bad invocation of old, dead code
JavaScript
mit
tilgovi/node-iterator-shim,tilgovi/dom-node-iterator
6a9feafbbeeb758ccbd84e48d0664d102eecc52a
src/marionette.component.js
src/marionette.component.js
// Marionette.Component // -------------------- // An object to represent an application component, typically // something visual, encapsulated in to an object that can be // instantiated and dispalyed on screen as needed. // // Marionette.Component can optionally have a `region`, `model`, // and/or `collection` pass...
// Marionette.Component // -------------------- // An object to represent an application component, typically // something visual, encapsulated in to an object that can be // instantiated and dispalyed on screen as needed. // // Marionette.Component can optionally have a `region`, `model`, // and/or `collection` pass...
Generalize and internalize view methods
Generalize and internalize view methods
JavaScript
isc
jfairbank/marionette.component
91bfb006306ff5e712fd3016d1373859b9106049
models/Tweet.js
models/Tweet.js
var mongoose = require('mongoose'); var COLLECTION_NAME = 'tweet'; var tweetSchema = new mongoose.Schema({ id: {type: String, required: true}, text: {type: String, required: true}, user: { id: {type: String, required: true} }, media: [{ url: {type: String, required: true} }], coordinates: { ...
var mongoose = require('mongoose'); var COLLECTION_NAME = 'tweet'; var tweetSchema = new mongoose.Schema({ id: {type: String, required: true}, text: {type: String}, user: { id: {type: String, required: true} }, media: [{ url: {type: String, required: true} }], coordinates: { latitude: {type:...
Add date updated, remove required from text
Add date updated, remove required from text
JavaScript
mit
magomimmo/snaptkite-engine,magomimmo/snaptkite-engine,RachBLondon/react-essentials-tutorial,Snapkite/snapkite-engine
3955739938bca7feb4e75aed5a6dab84898d26f6
GruntFile.js
GruntFile.js
module.exports = function (grunt) { 'use strict'; grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), nodeunit: { unit: ['test/unit/test*.js'], integration: ['test/integration/test*.js'] }, release: { options: { file: 'package.json', ...
module.exports = function (grunt) { 'use strict'; grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), nodeunit: { unit: ['test/unit/test*.js'], integration: ['test/integration/test*.js'] }, release: { options: { file: 'package.json', ...
Add integration tests to standard `grunt test`
Add integration tests to standard `grunt test`
JavaScript
mit
steveukx/git-js,steveukx/git-js
bbbf4f9e185aa09abdbcc710417df7acd6249f56
assets/javascript/script.js
assets/javascript/script.js
angular.module('OpenMining', []) .value('API_URL', '/process.json?') .controller('Process', function($scope, $http, $location, API_URL) { for (var key in $location.search()){ API_URL += key + "=" + $location.search()[key] + "&"; } $scope.loading = true; $http({method: 'POST', url: API_URL}). ...
angular.module('OpenMining', []) .controller('Process', function($scope, $http, $location) { $scope.loading = true; $scope.init = function(slug) { API_URL = "/process/" + slug + ".json?"; for (var key in $location.search()){ API_URL += key + "=" + $location.search()[key] + "&"; }; ...
Use dynamic process (json) ajax load
Use dynamic process (json) ajax load
JavaScript
mit
jgabriellima/mining,chrisdamba/mining,mining/mining,avelino/mining,mlgruby/mining,AndrzejR/mining,chrisdamba/mining,AndrzejR/mining,avelino/mining,mlgruby/mining,mlgruby/mining,mining/mining,jgabriellima/mining,seagoat/mining,seagoat/mining