commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
89bb5bd242b1208e4775f93ef9ce82171196b07e
tools/closure_compiler_externs/q.js
tools/closure_compiler_externs/q.js
var Q = {}; /** * @constructor */ function QDeferred () {}; QDeferred.prototype.reject = function (args) {}; QDeferred.prototype.resolve = function (args) {}; /** * @type {string} */ QDeferred.prototype.state; /** * @type {string} */ QDeferred.prototype.reason; /** * @returns {QDeferred} */ Q.defer = func...
var Q = {}; /** * @constructor */ function QDeferred () {}; /** * @param {...*} args */ QDeferred.prototype.reject = function (args) {}; /** * @param {...*} args */ QDeferred.prototype.resolve = function (args) {}; /** * @type {string} */ QDeferred.prototype.state; /** * @type {string} */ QDeferred.proto...
Fix externs definitions for Q
tools: Fix externs definitions for Q Set the method Q.resolve and Q.reject to take an optional variadic parameter of any type.
JavaScript
mit
lgeorgieff/nbuild,lgeorgieff/ccbuild
--- +++ @@ -5,8 +5,14 @@ */ function QDeferred () {}; +/** + * @param {...*} args + */ QDeferred.prototype.reject = function (args) {}; +/** + * @param {...*} args + */ QDeferred.prototype.resolve = function (args) {}; /**
c0b947f1a4cd59045092ee37a4952c015c7b9418
app/initializers/image-imgix.js
app/initializers/image-imgix.js
import BackgroundImage from 'ember-cli-image/components/background-image'; import ImageContainer from 'ember-cli-image/components/image-container'; import XImg from 'ember-cli-image/components/x-img'; import ImgixMixin from 'ember-cli-image-imgix/mixins/imgix-mixin'; import ImgixStaticMixin from 'ember-cli-image-imgix...
import BackgroundImageComponent from 'ember-cli-image/components/background-image-component'; import ImageContainerComponent from 'ember-cli-image/components/image-container-component'; import ImgComponent from 'ember-cli-image/components/img-component'; import ImgixMixin from 'ember-cli-image-imgix/mixins/imgix-mixin...
Use the updated file names for image components in import statements
Use the updated file names for image components in import statements
JavaScript
mit
bustlelabs/ember-cli-image-imgix,bustlelabs/ember-cli-image-imgix
--- +++ @@ -1,19 +1,19 @@ -import BackgroundImage from 'ember-cli-image/components/background-image'; -import ImageContainer from 'ember-cli-image/components/image-container'; -import XImg from 'ember-cli-image/components/x-img'; +import BackgroundImageComponent from 'ember-cli-image/components/background-image-compo...
5b21df123a996655337bbf83c95a3cdca6a8c201
app/js/models/business-model.js
app/js/models/business-model.js
'use strict'; var Backbone = require('backbone'); var BusinessModel = Backbone.Model.extend({ parse: function(data) { this.name = data.name; this.address = data.location.display_address.join(' '); this.rating = data.rating; this.specificCategory = data.categories[0][0]; } }); module.exports = Busines...
'use strict'; var Backbone = require('backbone'); var BusinessModel = Backbone.Model.extend({ parse: function(data) { console.log(data.name); this.name = data.name; this.address = data.location.display_address.join(' '); this.rating = data.rating; // this.specificCategory = data.categories[0][0]; ...
Bring back console.log on new data, and comment out troublesome line
Bring back console.log on new data, and comment out troublesome line
JavaScript
mit
Localhost3000/along-the-way
--- +++ @@ -3,10 +3,11 @@ var Backbone = require('backbone'); var BusinessModel = Backbone.Model.extend({ parse: function(data) { + console.log(data.name); this.name = data.name; this.address = data.location.display_address.join(' '); this.rating = data.rating; - this.specificCategory = data....
e68b3527d220cfad180273453f7d90ffadf41e36
web/index.js
web/index.js
let express = require('express'), bodyParser = require('body-parser'), morgan = require('morgan'), mustacheExpress = require('mustache-express'), path = require('path'), db = require('./lib/db'); // load configuration let config = { "mongo": { "host": "192.168.0.128", "port": 27017, "db": "g2x" } } // ...
let express = require('express'), bodyParser = require('body-parser'), morgan = require('morgan'), mustacheExpress = require('mustache-express'), path = require('path'), db = require('./lib/db'); // load configuration let config = { "mongo": { "host": "192.168.0.128", "port": 27017, "db": "g2x" } } // ...
Add imu routes and store db reference on app
Add imu routes and store db reference on app
JavaScript
bsd-3-clause
gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2
--- +++ @@ -21,7 +21,6 @@ // app configuration app.set('port', (process.env.PORT || 8081)); -app.set('db', db); // configure template engine app.engine('mustache', mustacheExpress()); @@ -34,6 +33,7 @@ // configure routes require('./routes/static')(app); +require('./routes/imu')(app); // start server ...
22c9e0ab626f0954a23093ec71ea98ea33d139d1
plugins/treeview/web_client/views/index.js
plugins/treeview/web_client/views/index.js
import TreeView from './TreeView'; import TreeDialog from './TreeDialog'; export { TreeView, TreeDialog };
import ConfigView from './ConfigView'; import FileDialog from './FileDialog'; import FolderDialog from './FolderDialog'; import ItemDialog from './ItemDialog'; import TreeDialog from './TreeDialog'; import TreeView from './TreeView'; export { ConfigView, FileDialog, FolderDialog, ItemDialog, TreeDi...
Add all views to the plugin namespace
Add all views to the plugin namespace
JavaScript
apache-2.0
jbeezley/girder,jbeezley/girder,manthey/girder,Kitware/girder,data-exp-lab/girder,Xarthisius/girder,Xarthisius/girder,kotfic/girder,RafaelPalomar/girder,jbeezley/girder,manthey/girder,girder/girder,girder/girder,RafaelPalomar/girder,jbeezley/girder,data-exp-lab/girder,Xarthisius/girder,data-exp-lab/girder,Kitware/girde...
--- +++ @@ -1,7 +1,15 @@ +import ConfigView from './ConfigView'; +import FileDialog from './FileDialog'; +import FolderDialog from './FolderDialog'; +import ItemDialog from './ItemDialog'; +import TreeDialog from './TreeDialog'; import TreeView from './TreeView'; -import TreeDialog from './TreeDialog'; export { -...
8823993762c66303ac6bebbf0ed4899b3bd1eae2
knockout-bind-html.js
knockout-bind-html.js
(function (root, factory) { if(typeof define === 'function' && define.amd) { define(['knockout'], factory); } else { factory(root.ko); } }(this, function(ko) { ko.bindingHandlers.bindHtml = { update: function(element, valueAccessor, allBindings, viewModel, bindingContext) { ko.unwrap(valueAcce...
(function (root, factory) { if(typeof define === 'function' && define.amd) { define(['knockout'], factory); } else { factory(root.ko); } }(this, function(ko) { ko.bindingHandlers.bindHtml = { update: function(element, valueAccessor, allBindings, viewModel, bindingContext) { ko.unwrap(valueAcce...
Refactor Use preprocess to handle html binding as well. Use descendants function to handle binding instead of looping through children.
Refactor Use preprocess to handle html binding as well. Use descendants function to handle binding instead of looping through children.
JavaScript
mit
calvinwoo/knockout-bind-html
--- +++ @@ -8,11 +8,12 @@ ko.bindingHandlers.bindHtml = { update: function(element, valueAccessor, allBindings, viewModel, bindingContext) { ko.unwrap(valueAccessor()); - - var children = element.children; - for (var i = 0; i < children.length; i++) { - ko.applyBindings(bindingContext....
f45dac5a23e23e3120e63e42b777ec971844d55a
lib/DefaultOptions.js
lib/DefaultOptions.js
const path = require('path'), ProjectType = require('./ProjectType'); module.exports = projectType => { projectType = projectType || ProjectType.FRONTEND; return { "projectType": projectType, "port": 5000, "liveReloadPort": 35729, "bundleFilename": "main", "distribut...
const path = require('path'), ProjectType = require('./ProjectType'); module.exports = projectType => { projectType = projectType || ProjectType.FRONTEND; return { "projectType": projectType, "port": 5000, "liveReloadPort": 35729, "bundleFilename": "main", "distribut...
Fix default folder for scripts
Fix default folder for scripts
JavaScript
mit
mtfranchetto/smild,mtfranchetto/smild,mtfranchetto/smild
--- +++ @@ -26,7 +26,7 @@ "views": "views", "assets": "assets", "autoprefixerRules": ["last 2 versions", "> 1%"], - "scripts": projectType === ProjectType.FRONTEND ? "lib/*" : "scripts/*", + "scripts": projectType === ProjectType.FRONTEND ? "scripts/*" : "lib/*", "man...
9c0a7c3d2b0f4de752b2cd8490d2c0a103e03a34
app/vendor/js/scancode.js
app/vendor/js/scancode.js
(function($) { $.fn.scancode = function(options) { var settings = $.extend({ dataAttr : 'scancode-callback-path' }, options); return this.each(function() { $(this).click(function(e) { e.preventDefault(); var callbackUrl = document.location.protocol + "//" + document.location....
(function($) { $.fn.scancode = function(options) { var settings = $.extend({ dataAttr : 'scancode-callback-path' }, options); return this.each(function() { $(this).click(function(e) { e.preventDefault(); var callbackUrl = document.location.protocol + "//" + document.location....
Handle devices without Scan Code
Handle devices without Scan Code
JavaScript
mit
enriquez/coinpocketapp.com,MrBluePotato/Dogepocket,enriquez/coinpocketapp.com,MrBluePotato/Dogepocket,enriquez/coinpocketapp.com
--- +++ @@ -11,6 +11,18 @@ var callbackUrl = document.location.protocol + "//" + document.location.host + $(this).data(settings.dataAttr); var scanCodeUrl = "scancode://scan?callback=" + encodeURIComponent(callbackUrl); window.location = scanCodeUrl; + + var iTunesUrl = 'https://itun...
092ec9f8f375233572f207059c537b4dbb397d49
app/views/comment-view.js
app/views/comment-view.js
/* global define */ define([ 'jquery', 'underscore', 'backbone', 'marionette', 'dust', 'dust.helpers', 'dust.marionette', 'views/replyable-view', 'controllers/navigation/navigator', 'content/comments/comment-template' ], function ($, _, Backbone, Marionette, dust, dustHelpers, dustMarionette, Reply...
/* global define */ define([ 'jquery', 'underscore', 'backbone', 'marionette', 'dust', 'dust.helpers', 'dust.marionette', 'views/replyable-view', 'controllers/navigation/navigator', 'content/comments/comment-template' ], function ($, _, Backbone, Marionette, dust, dustHelpers, dustMarionette, Reply...
Extend directly from replyable view
Extend directly from replyable view
JavaScript
mit
B3ST/B3,B3ST/B3,B3ST/B3
--- +++ @@ -14,7 +14,7 @@ ], function ($, _, Backbone, Marionette, dust, dustHelpers, dustMarionette, ReplyableView, Navigator) { 'use strict'; - var view = _.extend(ReplyableView, { + var CommentView = ReplyableView.extend({ template: 'content/comments/comment-template.dust', tagName: function (...
709f4ff7be7af964ad7c27378d614f7cab5a5895
app/services/session.js
app/services/session.js
import Ember from 'ember'; export default Ember.Object.extend({ savedTransition: null, isLoggedIn: false, currentUser: null, init: function() { this.set('isLoggedIn', localStorage.getItem('isLoggedIn') === '1'); this.set('currentUser', null); }, loginUser: function(user) { ...
import Ember from 'ember'; export default Ember.Object.extend({ savedTransition: null, isLoggedIn: false, currentUser: null, init: function() { var isLoggedIn; try { isLoggedIn = localStorage.getItem('isLoggedIn') === '1'; } catch (e) { isLoggedIn = fals...
Handle localStorage not being available on page load
Handle localStorage not being available on page load You won't be able to log in, but you'll at least be able to browse the site! Closes #47
JavaScript
apache-2.0
mbrubeck/crates.io,mbrubeck/crates.io,rust-lang/crates.io,mbrubeck/crates.io,steveklabnik/crates.io,Susurrus/crates.io,Gankro/crates.io,BlakeWilliams/crates.io,mbrubeck/crates.io,rust-lang/crates.io,steveklabnik/crates.io,Gankro/crates.io,chenxizhang/crates.io,steveklabnik/crates.io,sfackler/crates.io,Gankro/crates.io,...
--- +++ @@ -6,20 +6,30 @@ currentUser: null, init: function() { - this.set('isLoggedIn', localStorage.getItem('isLoggedIn') === '1'); + var isLoggedIn; + try { + isLoggedIn = localStorage.getItem('isLoggedIn') === '1'; + } catch (e) { + isLoggedIn = false;...
713ea52be0ee5bcafd7f683d420c28d85fc7b7bf
src/redux/modules/card.js
src/redux/modules/card.js
import { Record as record } from 'immutable'; export class CardModel extends record({ id: null, name: '', mana: null, attack: null, defense: null, }) { constructor(obj) { super(obj); // TODO: find a way to make this even more unique this.uniqId = this.id + +new Date(); } }
import { Record as record } from 'immutable'; let cardModelCount = 0; export class CardModel extends record({ id: null, name: '', mana: null, attack: null, defense: null, }) { constructor(obj) { super(obj); this.uniqId = cardModelCount++; } }
Add uniqueId for each CardModel instance
Add uniqueId for each CardModel instance
JavaScript
mit
inooid/react-redux-card-game,inooid/react-redux-card-game
--- +++ @@ -1,4 +1,6 @@ import { Record as record } from 'immutable'; + +let cardModelCount = 0; export class CardModel extends record({ id: null, @@ -9,8 +11,6 @@ }) { constructor(obj) { super(obj); - - // TODO: find a way to make this even more unique - this.uniqId = this.id + +new Date(); + ...
6ccb7706359674578f00a3b06aa310b9d94a9af3
config/webpack/configuration.js
config/webpack/configuration.js
// Common configuration for webpacker loaded from config/webpacker.yml const { join, resolve } = require('path') const { env } = require('process') const { safeLoad } = require('js-yaml') const { readFileSync } = require('fs') const configPath = resolve('config', 'webpacker.yml') const loadersDir = join(__dirname, 'l...
// Common configuration for webpacker loaded from config/webpacker.yml const { join, resolve } = require('path') const { env } = require('process') const { load } = require('js-yaml') const { readFileSync } = require('fs') const configPath = resolve('config', 'webpacker.yml') const loadersDir = join(__dirname, 'loade...
Update safeLoad to load to fix errer: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default.
Update safeLoad to load to fix errer: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default.
JavaScript
mit
osu-cascades/ecotone-web,osu-cascades/ecotone-web,osu-cascades/ecotone-web,osu-cascades/ecotone-web
--- +++ @@ -2,12 +2,12 @@ const { join, resolve } = require('path') const { env } = require('process') -const { safeLoad } = require('js-yaml') +const { load } = require('js-yaml') const { readFileSync } = require('fs') const configPath = resolve('config', 'webpacker.yml') const loadersDir = join(__dirname, ...
b15892304e25b368f293ae5bca7d3a3f354dcbf1
config/env/development.js
config/env/development.js
'use strict'; var _ = require('lodash'); var base = require('./base'); const development = _.merge({}, base, { env: 'development', auth0: { callbackURL: 'http://localhost:9000/auth/callback', clientID: 'uyTltKDRg1BKu3nzDu6sLpHS44sInwOu' }, cip: { client: { logRequests: true } }, site...
'use strict'; var _ = require('lodash'); var base = require('./base'); const development = _.merge({}, base, { env: 'development', auth0: { callbackURL: 'http://localhost:9000/auth/callback', clientID: 'uyTltKDRg1BKu3nzDu6sLpHS44sInwOu' }, cip: { client: { logRequests: true } }, site...
Fix duplicate keys in dev config
Fix duplicate keys in dev config
JavaScript
mit
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
--- +++ @@ -22,13 +22,9 @@ features: { feedback: true, motifTagging: true, - users: true, requireEmailVerification: true, - feedback: false, - geoTagging: false, - motifTagging: false, - requireEmailVerification: true, - users: false + geoTagging: true, + users: true } })...
f4d22437eef8e09fe8d71e095ca637a6b0129a95
app/instance-initializers/raven-setup.js
app/instance-initializers/raven-setup.js
import Ember from 'ember'; import config from '../config/environment'; export function initialize(application) { if (Ember.get(config, 'sentry.development') === true) { return; } if (!config.sentry) { throw new Error('`sentry` should be configured when not in development mode.'); } const { dsn...
import Ember from 'ember'; import config from '../config/environment'; export function initialize(application) { if (Ember.get(config, 'sentry.development') === true) { return; } if (!config.sentry) { throw new Error('`sentry` should be configured when not in development mode.'); } const { dsn...
Read sentry release from service if available
Read sentry release from service if available
JavaScript
mit
dschmidt/ember-cli-sentry,damiencaselli/ember-cli-sentry,damiencaselli/ember-cli-sentry,dschmidt/ember-cli-sentry
--- +++ @@ -15,8 +15,13 @@ dsn, debug = true, includePaths = [], - whitelistUrls = [] + whitelistUrls = [], + serviceName = 'logger', + serviceReleaseProperty = 'release' } = config.sentry; + + const lookupName = `service:${serviceName}`; + const service = application.container.lookup(...
b0998709266c2a6687f35da3f0de510e267a360e
app/routers/Play/routes/ClassroomLessons/index.js
app/routers/Play/routes/ClassroomLessons/index.js
import Passthrough from 'components/shared/passthrough.jsx'; import { getParameterByName } from 'libs/getParameterByName'; const playRoute = { path: ':lessonID', getComponent: (nextState, cb) => { System.import(/* webpackChunkName: "teach-classroom-lesson" */'components/classroomLessons/play/container.tsx') ...
import Passthrough from 'components/shared/passthrough.jsx'; import { getParameterByName } from 'libs/getParameterByName'; const playRoute = { path: ':lessonID', onEnter: (nextState, replaceWith) => { document.title = 'Quill Lessons'; }, getComponent: (nextState, cb) => { System.import(/* webpackChunk...
Update page titles on Lessons.
Update page titles on Lessons.
JavaScript
agpl-3.0
empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core
--- +++ @@ -4,6 +4,9 @@ const playRoute = { path: ':lessonID', + onEnter: (nextState, replaceWith) => { + document.title = 'Quill Lessons'; + }, getComponent: (nextState, cb) => { System.import(/* webpackChunkName: "teach-classroom-lesson" */'components/classroomLessons/play/container.tsx') .t...
31fdd792b9a32f2f9c1223240867c5e527f71f04
assets/js/components/surveys/SurveyViewTrigger.js
assets/js/components/surveys/SurveyViewTrigger.js
/** * External dependencies */ import { useMount } from 'react-use'; import PropTypes from 'prop-types'; /** * Internal dependencies */ import Data from 'googlesitekit-data'; import { CORE_SITE } from '../../googlesitekit/datastore/site/constants'; import { CORE_USER } from '../../googlesitekit/datastore/user/cons...
/** * SurveyViewTrigger component. * * Site Kit by Google, Copyright 2021 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...
Add the appropriate file header.
Add the appropriate file header.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
--- +++ @@ -1,3 +1,21 @@ +/** + * SurveyViewTrigger component. + * + * Site Kit by Google, Copyright 2021 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 + * + * http...
efbdf07b7889ed7cfc643fa71542b70e2b09d276
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ jshint: { files: ['*.js', 'client/app/*.js', 'server/**/*.js', 'database/**/*.js'], options: { ignores: [ // (TODO: add lib files here) ] } }, uglify: { my_target: { files: { 'client...
module.exports = function(grunt) { grunt.initConfig({ jshint: { files: ['*.js', 'client/app/*.js', 'server/**/*.js', 'database/**/*.js', '*.json'], options: { ignores: [ // (TODO: add lib files here) ] } }, uglify: { my_target: { files: { ...
Add bower.json and package.json to jshint checks
[chore] Add bower.json and package.json to jshint checks
JavaScript
mit
SimonDing87/MKSTream,MAKE-SITY/MKSTream,SimonDing87/MKSTream,MAKE-SITY/MKSTream
--- +++ @@ -2,7 +2,7 @@ grunt.initConfig({ jshint: { - files: ['*.js', 'client/app/*.js', 'server/**/*.js', 'database/**/*.js'], + files: ['*.js', 'client/app/*.js', 'server/**/*.js', 'database/**/*.js', '*.json'], options: { ignores: [ // (TODO: add lib files here)
ea303509f1759de77759c6a1c9bc3a8628621488
Gruntfile.js
Gruntfile.js
module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.initConfig({ jshint: { all: ['*.js', 'test/*.js'], options: { jshintrc: true } }, qunit: { all: ['test/index.html'] } }); grunt.registerTask('test', ['jshint',...
module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.initConfig({ jshint: { all: ['*.js', 'test/*.js'], options: { jshintrc: true } }, qunit: { all: ['test/index.html'] } }); grunt.re...
Convert tabs to spaces in gruntfile.js
Convert tabs to spaces in gruntfile.js
JavaScript
mit
bgrins/ExpandingTextareas,bgrins/ExpandingTextareas,domchristie/ExpandingTextareas,domchristie/ExpandingTextareas
--- +++ @@ -1,20 +1,20 @@ module.exports = function (grunt) { - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-qunit'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-qunit'); - grunt.initConfig({ - jshint: { - all: ['*.js', 'test/*.js'], + ...
4c3c39866eb0b07108be2489a5f063d0a318709a
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { var packageFile = grunt.file.readJSON("package.json"); grunt.initConfig({ pkg: packageFile, jshint: { all: ["Gruntfile.js", "app.js", "index.js", "controllers/*.js", "routes/*.js", "test/*.js"], options: packageFile.jshintConfig ...
module.exports = function(grunt) { var packageFile = grunt.file.readJSON("package.json"); grunt.initConfig({ pkg: packageFile, jshint: { all: ["Gruntfile.js", "app.js", "config.js", "index.js", "controllers/*.js", "routes/*.js", "test/*.js"], options: packageFile.jsh...
Fix jshint files in gruntfile
Fix jshint files in gruntfile
JavaScript
mit
shakeelmohamed/egress-bootstrap
--- +++ @@ -4,7 +4,7 @@ grunt.initConfig({ pkg: packageFile, jshint: { - all: ["Gruntfile.js", "app.js", "index.js", "controllers/*.js", "routes/*.js", "test/*.js"], + all: ["Gruntfile.js", "app.js", "config.js", "index.js", "controllers/*.js", "routes/*.js", "test/*.js"],...
8f5a7c13dd0f281066e74b281ba203b6cf6499d6
api/src/application/image/image-service.js
api/src/application/image/image-service.js
const s3 = require('aws-sdk').S3; const s3Bucket = require('../../../config')('/aws/s3Bucket'); const logger = require('../../lib/logger'); module.exports = () => ({ uploadImageStream(stream, key) { const contentType = (stream.hapi && stream.hapi.headers['content-type']) ? stream.hapi.headers['content-type...
const s3 = require('aws-sdk').S3; const s3Bucket = require('../../../config')('/aws/s3Bucket'); const logger = require('../../lib/logger'); module.exports = () => ({ uploadImageStream(stream, key) { const contentType = (stream.hapi && stream.hapi.headers['content-type']) ? stream.hapi.headers['content-type...
Set max-age=0 for CacheControl on profile image S3 uploads
Set max-age=0 for CacheControl on profile image S3 uploads
JavaScript
mit
synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform
--- +++ @@ -9,7 +9,7 @@ const filename = key; const bucket = new s3({ params: { Bucket: s3Bucket } }); - return bucket.upload({ Body: stream, Key: filename, ContentType: contentType }) + return bucket.upload({ Body: stream, Key: filename, ContentType: contentType, CacheControl: 'max-age=0' }) ...
e0b1be8a781a58fb17444d4abc80a175a6e088d0
app/javascript/components/update_button.js
app/javascript/components/update_button.js
import React from 'react'; import PropTypes from 'prop-types'; export default class UpdateButton extends React.Component { static propTypes = { label: PropTypes.string.isRequired, login: PropTypes.string.isRequired, path: PropTypes.string.isRequired }; constructor(props) { super(props); this...
import React from 'react'; import PropTypes from 'prop-types'; export default class UpdateButton extends React.Component { static propTypes = { label: PropTypes.string.isRequired, login: PropTypes.string.isRequired, path: PropTypes.string.isRequired }; constructor(props) { super(props); this...
Use GraphQL API to update component
Use GraphQL API to update component
JavaScript
mit
k0kubun/github-ranking,k0kubun/githubranking,k0kubun/github-ranking,k0kubun/github-ranking,k0kubun/github-ranking,k0kubun/githubranking,k0kubun/github-ranking,k0kubun/githubranking,k0kubun/githubranking,k0kubun/githubranking
--- +++ @@ -10,15 +10,25 @@ constructor(props) { super(props); - this.state = { updateStatus: 'OUTDATED' }; - - this.hookUpdateStatus(); + this.state = {}; + this.updateStatus(); } - hookUpdateStatus() { - setTimeout(function() { - this.setState({ updateStatus: 'UPDATED' }); - }...
5e516f2018c8855b3278ab1738c04ecbf0bdf388
app/assets/javascripts/active_admin.js
app/assets/javascripts/active_admin.js
//= require jquery.ui.tabs //= require vendor/select2 //= require vendor/redactor $(document).ready(function(){ if($("select.select2").length) { $("select.select2").select2(); } // In one line for easy removal using sed $('#entry_body').redactor({ focus: false, buttons: ['bold', 'italic', 'link', 'unorder...
//= require jquery.ui.tabs //= require vendor/select2 //= require vendor/redactor // ActiveAdmin //= require jquery.ui.datepicker //= require jquery_ujs //= require active_admin/application $(document).ready(function(){ if($("select.select2").length) { $("select.select2").select2(); } // In one line for ea...
Add missing ActiveAdmin js scripts
Add missing ActiveAdmin js scripts
JavaScript
bsd-3-clause
netkodo/otwartezabytki,netkodo/otwartezabytki,netkodo/otwartezabytki,netkodo/otwartezabytki
--- +++ @@ -1,6 +1,11 @@ //= require jquery.ui.tabs //= require vendor/select2 //= require vendor/redactor + +// ActiveAdmin +//= require jquery.ui.datepicker +//= require jquery_ujs +//= require active_admin/application $(document).ready(function(){ if($("select.select2").length) {
3cf9d873984cc9621197b0897cbd51520aab0847
ip_record.js
ip_record.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ module.exports = function (BLOCK_INTERVAL_MS, INVALID_AGENT_INTERVAL_MS) { function IpRecord() {} IpRecord.p...
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ module.exports = function (BLOCK_INTERVAL_MS, INVALID_AGENT_INTERVAL_MS) { function IpRecord() {} IpRecord.p...
Check for blocks against the right interval
Check for blocks against the right interval
JavaScript
mpl-2.0
ReachingOut/fxa-customs-server,mozilla/fxa-customs-server,ofer43211/fxa-customs-server,dannycoates/fxa-customs-server,ReachingOut/fxa-customs-server,chilts/fxa-customs-server,ofer43211/fxa-customs-server,mozilla/fxa-customs-server,dannycoates/fxa-customs-server,chilts/fxa-customs-server
--- +++ @@ -19,7 +19,7 @@ } IpRecord.prototype.isBlocked = function () { - return !!(this.bk && (Date.now() - this.bk < INVALID_AGENT_INTERVAL_MS)) + return !!(this.bk && (Date.now() - this.bk < BLOCK_INTERVAL_MS)) } IpRecord.prototype.block = function () {
4d402d778a574bf131f5d8c19f7deb04f192a872
lib/tests/modules/user_satisfaction_graph.js
lib/tests/modules/user_satisfaction_graph.js
module.exports = function (browser, module, suite, config) { module.axes = module.axes || {}; module.axes.x = module.axes.x || { label: 'Date' }; module.axes.y = module.axes.y || [ { label: 'User satisfaction' } ]; module.trim = module.trim === undefined ? true : module.trim; require...
module.exports = function (browser, module, suite, config) { module.axes = module.axes || {}; module.axes.x = module.axes.x || { label: 'Date' }; module.axes.y = module.axes.y || [ { label: 'User satisfaction' }, { label: 'Not satisfied' }, { label: 'Dissatisfied' }, { label: 'Neither sati...
Update default axes for user satisfaction tables
Update default axes for user satisfaction tables
JavaScript
mit
alphagov/cheapseats
--- +++ @@ -6,9 +6,12 @@ label: 'Date' }; module.axes.y = module.axes.y || [ - { - label: 'User satisfaction' - } + { label: 'User satisfaction' }, + { label: 'Not satisfied' }, + { label: 'Dissatisfied' }, + { label: 'Neither satisfied or dissatisfied' }, + { label: 'Satisfied' }...
36f040079ed2eef515bc97a2d0bdfea07afb8218
src/context.js
src/context.js
let defaultOptions = { wait: false, renderNullWhileWaiting: true, withRef: false, bindI18n: 'languageChanged loaded', bindStore: 'added removed', translateFuncName: 't', nsMode: 'default', usePureComponent: false }; let i18n; export function setDefaults(options) { defaultOptions = { ...defaultOption...
let defaultOptions = { wait: false, withRef: false, bindI18n: 'languageChanged loaded', bindStore: 'added removed', translateFuncName: 't', nsMode: 'default', usePureComponent: false }; let i18n; export function setDefaults(options) { defaultOptions = { ...defaultOptions, ...options }; } export funct...
Remove last reference to renderNullWhileWaiting
Remove last reference to renderNullWhileWaiting
JavaScript
mit
i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next,i18next/react-i18next
--- +++ @@ -1,6 +1,5 @@ let defaultOptions = { wait: false, - renderNullWhileWaiting: true, withRef: false, bindI18n: 'languageChanged loaded', bindStore: 'added removed',
ae245b42cb97532d69a55d90b84bc7ef94222426
app/controllers/application.js
app/controllers/application.js
import Em from 'ember'; import { task, timeout } from 'ember-concurrency'; const { computed } = Em; var applicationController = Em.Controller.extend({ activeNote: null, hideSidePanel: false, init: function() { Em.run.scheduleOnce('afterRender', () => { $('body div').first().addClass('app-container');...
import Em from 'ember'; import { task, timeout } from 'ember-concurrency'; const { computed } = Em; var applicationController = Em.Controller.extend({ activeNote: null, hideSidePanel: false, init: function() { Em.run.scheduleOnce('afterRender', () => { Em.$('body div').first().addClass('app-container...
Use Ember namespace for jquery use
Use Ember namespace for jquery use
JavaScript
mit
ddoria921/Notes,ddoria921/Notes
--- +++ @@ -10,7 +10,7 @@ init: function() { Em.run.scheduleOnce('afterRender', () => { - $('body div').first().addClass('app-container'); + Em.$('body div').first().addClass('app-container'); }); },
9436c1a758746b34c07ba0d5c58daff830dbbdc8
src/js/components/service-sub-entities.js
src/js/components/service-sub-entities.js
import React, { PropTypes } from 'react' import { Link } from 'react-router' //TODO make it generic (it's duplicated for gsim inputs and outputs) export default function ServiceSubEntities( { entities, uriName, remove, disabled, noMsg, makeLink }) { if (entities.length === 0) return <span className="form-con...
import React, { PropTypes } from 'react' import { Link } from 'react-router' export default function ServiceSubEntities( { entities, uriName, remove, disabled, noMsg, makeLink }) { if (entities.length === 0) return <span className="form-control">{noMsg}</span> return ( <ul className="list-group" style=...
Fix typo in propTypes which led to invalid prop type error messages
Fix typo in propTypes which led to invalid prop type error messages
JavaScript
mit
UNECE/Model-Explorer,UNECE/Model-Explorer
--- +++ @@ -1,7 +1,6 @@ import React, { PropTypes } from 'react' import { Link } from 'react-router' -//TODO make it generic (it's duplicated for gsim inputs and outputs) export default function ServiceSubEntities( { entities, uriName, remove, disabled, noMsg, makeLink }) { if (entities.length === 0) @@ ...
b5fabe752a9d325fe4f944d76fd15d60a3b86261
resources/frontend/app/authenticators/torii-oauth2.js
resources/frontend/app/authenticators/torii-oauth2.js
import Ember from 'ember'; import OAuth2 from 'simple-auth-oauth2/authenticators/oauth2'; export default OAuth2.extend({ authenticate: function (options) { return this.fetchOauthData(options).then(this.fetchAccessToken.bind(this)); }, fetchAccessToken: function (oauthCredentials) { var _this = this; ...
import Ember from 'ember'; import OAuth2 from 'simple-auth-oauth2/authenticators/oauth2'; export default OAuth2.extend({ authenticate: function (options) { return this.fetchOauthData(options).then(this.fetchAccessToken.bind(this)); }, fetchAccessToken: function (oauthCredentials) { var _this = this; ...
Add ID of current user to simple-auth session
Add ID of current user to simple-auth session
JavaScript
mit
nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf
--- +++ @@ -12,9 +12,7 @@ return new Ember.RSVP.Promise(function (resolve, reject) { _this.makeRequest(_this.serverTokenEndpoint, oauthCredentials).then(function (response) { Ember.run(function () { - var expiresAt = _this.absolutizeExpirationTime(response.expires_in); - _this.s...
ae6a1c694d46866c581ca47a07c4d561a4d89437
src/eventer.js
src/eventer.js
;(function(exports) { function Eventer() { var callbacks = {}; this.addListener = function(obj, event, callback) { callbacks[event] = callbacks[event] || []; callbacks[event].push({ obj: obj, callback: callback }); return this; }; this.addListener this.on...
;(function(exports) { function Eventer() { var callbacks = {}; this.addListener = function(obj, event, callback) { callbacks[event] = callbacks[event] || []; callbacks[event].push({ obj: obj, callback: callback }); return this; }; this.addListener this.on...
Make Eventer.removeListener actually, like, remove passed listener.
Make Eventer.removeListener actually, like, remove passed listener.
JavaScript
mit
maryrosecook/codewithisla
--- +++ @@ -16,9 +16,9 @@ this.on = this.addListener; this.removeListener = function(obj, event) { - for(var i in callbacks) { - if(callbacks[i].obj === obj) { - delete callbacks[i]; + for(var i = 0; i < callbacks[event].length; i++) { + if(callbacks[event][i].obj === obj)...
093c7b77eac28485e2b3ea10396ffb8c96bd5a2b
client/src/js/account/components/General.js
client/src/js/account/components/General.js
/** * * * @copyright 2017 Government of Canada * @license MIT * @author igboyes * */ import React from "react"; import { capitalize } from "lodash"; import { connect } from "react-redux"; import { Label } from "react-bootstrap"; import { Flex, FlexItem } from "../../base"; import ChangePassword from "./Password...
/** * * * @copyright 2017 Government of Canada * @license MIT * @author igboyes * */ import React from "react"; import { capitalize } from "lodash"; import { connect } from "react-redux"; import { Label } from "react-bootstrap"; import { Flex, FlexItem } from "../../base"; import ChangePassword from "./Password...
Add bottom margin to header in account > general
Add bottom margin to header in account > general
JavaScript
mit
igboyes/virtool,virtool/virtool,virtool/virtool,igboyes/virtool
--- +++ @@ -15,42 +15,36 @@ import ChangePassword from "./Password"; import { Identicon } from "../../base"; -class AccountGeneral extends React.Component { +const AccountGeneral = ({ id, groups, hash }) => { - constructor (props) { - super(props); - } + const groupLabels = groups.map(groupId =>...
1ef81de1fc3cc846d86adee9ed401bc233447fe8
classes/PluginManager.js
classes/PluginManager.js
const {app} = require('electron'), fs = require('fs-extra'), Path = require('path'), klaw = require('klaw-sync'); var PluginManager = { loadedPlugins: {}, LoadPlugins: function(mod, appEvents) { const appPath = Path.resolve(app.getAppPath() + '/plugins'); var pluginFolders = fs...
const {app} = require('electron'), fs = require('fs-extra'), Path = require('path'), klaw = require('klaw-sync'); var PluginManager = { loadedPlugins: {}, LoadPlugins: function(mod, appEvents) { const appPath = Path.resolve(app.getAppPath() + '/plugins'); var pluginFolders = fs...
Restructure plugin loading to pass Plugin class to each loaded plugin
Restructure plugin loading to pass Plugin class to each loaded plugin Closes #33
JavaScript
mit
ChiefOfGxBxL/Ice-Sickle,ChiefOfGxBxL/Ice-Sickle
--- +++ @@ -27,10 +27,12 @@ const pluginManifestPath = Path.resolve(dir, 'package.json'); // Register the plugin - var pluginManifest = fs.readJsonSync(pluginManifestPath); + var pluginManifest = fs.readJsonSync(pluginManifestPath), + PluginClass = new require('./Plugin.js')(pluginManifest.na...
2284bd6aa19c4e8104303ec269b306b629150ef7
app/config.js
app/config.js
import { observable } from 'mobx' import getCookie from './utils/getCookie' const config = observable({ projectName: '', spaceKey: '', requiredExtensions: [], baseURL: getCookie('BACKEND_URL') || __BACKEND_URL__ || window.location.origin, packageDev: getCookie('PACKAGE_DEV') || __PACKAGE_DEV__, packageServ...
import { observable, autorun } from 'mobx' import getCookie from './utils/getCookie' const config = observable({ projectName: '', spaceKey: '', requiredExtensions: [], baseURL: getCookie('BACKEND_URL') || __BACKEND_URL__ || window.location.origin, packageDev: getCookie('PACKAGE_DEV') || __PACKAGE_DEV__, pa...
Change title with project name
Change title with project name
JavaScript
bsd-3-clause
Coding/WebIDE-Frontend,Coding/WebIDE-Frontend
--- +++ @@ -1,4 +1,4 @@ -import { observable } from 'mobx' +import { observable, autorun } from 'mobx' import getCookie from './utils/getCookie' const config = observable({ @@ -19,5 +19,11 @@ estimatedMap: observable.map({}) }) +autorun(() => { + if (config.projectName) { + window.document.title = `${co...
e7fa6a14c96140349a5f1bf3c1a3fd954d812f8d
app/js/constants/specificSituations.js
app/js/constants/specificSituations.js
'use strict'; angular.module('ddsCommon').constant('specificSituations', [ { id: 'demandeur_emploi', label: 'Demandeur·euse d’emploi' }, { id: 'etudiant', label: 'Étudiant·e' }, { id: 'retraite', label: 'Retraité·e' }, { id: 'handicap'...
'use strict'; angular.module('ddsCommon').constant('specificSituations', [ { id: 'demandeur_emploi', label: 'En recherche d’emploi' }, { id: 'etudiant', label: 'Étudiant·e' }, { id: 'retraite', label: 'Retraité·e' }, { id: 'handicap', ...
Make gender neutrality more bearable
Make gender neutrality more bearable
JavaScript
agpl-3.0
sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui
--- +++ @@ -3,7 +3,7 @@ angular.module('ddsCommon').constant('specificSituations', [ { id: 'demandeur_emploi', - label: 'Demandeur·euse d’emploi' + label: 'En recherche d’emploi' }, { id: 'etudiant',
e777490e26317068c46884f080140c9f2bf15804
app/__tests__/app-spec.js
app/__tests__/app-spec.js
const path = require('path') const assert = require('yeoman-assert') const helpers = require('yeoman-test') describe('react-zeal', () => { beforeEach(() => { return helpers.run(path.join(__dirname, '../../app')) .withPrompts({ name: 'apples' }) }) test('creates root level files', () => { assert.fi...
const path = require('path') const assert = require('yeoman-assert') const helpers = require('yeoman-test') describe('react-zeal', () => { beforeEach(() => { return helpers.run(path.join(__dirname, '../../app')) .withPrompts({ name: 'apples' }) }) test('creates root level files', () => { assert.fi...
Adjust test for copying eslint config
Adjust test for copying eslint config
JavaScript
mit
CodingZeal/generator-react-zeal,CodingZeal/generator-react-zeal
--- +++ @@ -16,9 +16,7 @@ assert.jsonFileContent('package.json', { "name": "apples" }) }) - test('copies .eslintrc.json file', () => { - assert.jsonFileContent('.eslintrc.json', { - "extends": [ "zeal", "zeal/react" ] - }) + test('copies .eslintrc.js file', () => { + assert.fileContent('.esl...
0782bebcad92c9f8c2af152e805c167781a3f0a9
app/routes/application.js
app/routes/application.js
import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; import { action } from '@ember/object'; import { isPresent } from '@ember/utils'; export default class ApplicationRoute extends Route { @service('remotestorage') storage; @service localData; @service logger; @service...
import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; import { action } from '@ember/object'; import { isPresent } from '@ember/utils'; export default class ApplicationRoute extends Route { @service('remotestorage') storage; @service localData; @service logger; @service...
Fix redirects causing duplicate setup method calls
Fix redirects causing duplicate setup method calls Triggering a transition from the beforeModel method in the application route will cause the beforeModel method to be called again on the next transition. Moving the transition call to the redirect method fixes this.
JavaScript
mpl-2.0
67P/hyperchannel,67P/hyperchannel
--- +++ @@ -10,7 +10,7 @@ @service logger; @service coms; - async beforeModel (transition) { + async beforeModel () { super.beforeModel(...arguments); await this.storage.ensureReadiness(); @@ -18,6 +18,15 @@ await this.coms.instantiateAccountsAndChannels(); this.coms.setupListeners(); ...
5af1c17b0d1d24a310756ab6ecaa33a10c603da7
client/templates/createdoc/create_doc.js
client/templates/createdoc/create_doc.js
Template.createDoc.events({ "submit .new-doc": function(event) { console.log("test"); event.preventDefault(); var title = event.target.title.value; Documents.insert({ title: title }, function(err, _id) { Router.go('workpane', {_id: _id}) }); } })
Template.createDoc.events({ "submit .new-doc": function(event) { console.log("test"); event.preventDefault(); var title = event.target.title.value; Documents.insert({ title: title, createdAt: new Date(), owner: Meteor.userId(), collaborators: [] }, function(err, _id) { ...
Insert additional fields for documents
Insert additional fields for documents
JavaScript
mit
markdownerds/markdownerds,markdownerds/markdownerds
--- +++ @@ -5,7 +5,10 @@ event.preventDefault(); var title = event.target.title.value; Documents.insert({ - title: title + title: title, + createdAt: new Date(), + owner: Meteor.userId(), + collaborators: [] }, function(err, _id) { Router.go('workpane', {_id: _id}) ...
209a36049698406ce03c14eeeabfe4a7700639bb
app/scripts/help/index.js
app/scripts/help/index.js
'use strict'; var App = require('../app'); var Backbone = require('backbone'); var Marionette = require('backbone.marionette'); var _ = require('underscore'); var keyboardShortcuts = require('./keyboardshortcuts.json'); var marked = require('marked'); var controller = { showHelp: function () { var HelpView = re...
'use strict'; var App = require('../app'); var Backbone = require('backbone'); var Marionette = require('backbone.marionette'); var _ = require('underscore'); var keyboardShortcuts = require('./keyboardShortcuts.json'); var marked = require('marked'); var controller = { showHelp: function () { var HelpView = re...
Fix case of filename keyboardShortcuts.json
Fix case of filename keyboardShortcuts.json
JavaScript
mit
Yunheng/nusmods,mauris/nusmods,nusmodifications/nusmods,chunqi/nusmods,chunqi/nusmods,Yunheng/nusmods,zhouyichen/nusmods,nathanajah/nusmods,mauris/nusmods,nusmodifications/nusmods,chunqi/nusmods,zhouyichen/nusmods,nusmodifications/nusmods,mauris/nusmods,Yunheng/nusmods,Yunheng/nusmods,zhouyichen/nusmods,nathanajah/nusm...
--- +++ @@ -4,7 +4,7 @@ var Backbone = require('backbone'); var Marionette = require('backbone.marionette'); var _ = require('underscore'); -var keyboardShortcuts = require('./keyboardshortcuts.json'); +var keyboardShortcuts = require('./keyboardShortcuts.json'); var marked = require('marked'); var controller ...
c2e3d74abd8fc64e018d8969bc654ec6c263f084
client/app-bundle/views/StudentProfile.js
client/app-bundle/views/StudentProfile.js
var m = require('mithril'); //Components var StudentInfo = require('../components/StudentInfo.js'); var StudentJob = require('../components/StudentJob.js'); var Messaging = require('../components/Messaging.js'); var NewApp = require('../components/forms/NewApp.js'); var Graph ...
var m = require('mithril'); //Components var StudentInfo = require('../components/StudentInfo.js'); var StudentJob = require('../components/StudentJob.js'); var Messaging = require('../components/Messaging.js'); var NewApp = require('../components/forms/NewApp.js'); var Graph ...
Delete row element to fix spacing
Delete row element to fix spacing
JavaScript
mit
mksq/network,mksq/network,mksq/network
--- +++ @@ -25,8 +25,6 @@ var messagesData = Message.all(); return m('.container', [ m('h1.center-align', 'Pending Applications'), - - m('.row'), m('.row', [ // m.component(StudentInfo, { studentInfo: appsData.studentInfo } ), m.component(StudentJob, { apps: appsData.apps, studentInfo...
6c5ea6fea94d68125e9a32002a897156f64dbf87
common/predictive-text/unit_tests/in_browser/cases/basic.js
common/predictive-text/unit_tests/in_browser/cases/basic.js
var assert = chai.assert; describe('LMLayerWorkerCode', function() { it('should exist!', function() { assert.isFunction(LMLayerWorkerCode, 'Could not find LMLayerWorkerCode! Does embedded_worker.js exist?' ); }); });
var assert = chai.assert; describe('LMLayerWorker', function () { describe('LMLayerWorkerCode', function() { it('should exist!', function() { assert.isFunction(LMLayerWorkerCode, 'Could not find LMLayerWorkerCode! Does embedded_worker.js exist?' ); }); }); describe('Usage within a Web...
Write integration test for LMLayerWorker code.
Write integration test for LMLayerWorker code.
JavaScript
apache-2.0
tavultesoft/keymanweb,tavultesoft/keymanweb
--- +++ @@ -1,8 +1,33 @@ var assert = chai.assert; -describe('LMLayerWorkerCode', function() { - it('should exist!', function() { - assert.isFunction(LMLayerWorkerCode, - 'Could not find LMLayerWorkerCode! Does embedded_worker.js exist?' - ); +describe('LMLayerWorker', function () { + describe('LMLayerW...
77471e4143cc7e7bd5592236285d5209dea36496
src/html/behaviors/BaseGeometryBehavior.js
src/html/behaviors/BaseGeometryBehavior.js
import BaseMeshBehavior from './BaseMeshBehavior' // base class for geometry behaviors export default class BaseGeometryBehavior extends BaseMeshBehavior { static get type() { return 'geometry' } static get observedAttributes() { return [ 'size' ] } async attributeChangedCallback( element, a...
import BaseMeshBehavior from './BaseMeshBehavior' // base class for geometry behaviors export default class BaseGeometryBehavior extends BaseMeshBehavior { static get type() { return 'geometry' } async connectedCallback( element ) { if (! ( await super.connectedCallback( element ) ) ) return ...
Make geometry behaviors rely on the element's sizechange event rather than on the size attribute. This ensures that element.calculatedSize is up-to-date when it is used, otherwise the size of the geometry can be the wrong value and rendered at the size of the previous frame rather than the size of the current frame.
Make geometry behaviors rely on the element's sizechange event rather than on the size attribute. This ensures that element.calculatedSize is up-to-date when it is used, otherwise the size of the geometry can be the wrong value and rendered at the size of the previous frame rather than the size of the current frame.
JavaScript
mit
trusktr/infamous,trusktr/infamous,trusktr/infamous
--- +++ @@ -6,39 +6,12 @@ static get type() { return 'geometry' } - static get observedAttributes() { - return [ 'size' ] - } + async connectedCallback( element ) { + if (! ( await super.connectedCallback( element ) ) ) return - async attributeChangedCallback( element, attr, oldVa...
f7583fdf37e3d4730dbab5f1165ea0f9b22da7ef
background.js
background.js
chrome.tabs.executeScript(null, {file: "lib/jquery-3.1.1.min.js"}, function() { chrome.tabs.executeScript(null, {file: "content.js"}); });
chrome.webNavigation.onHistoryStateUpdated.addListener(function(details) { chrome.tabs.executeScript(null, {file: "lib/jquery-3.1.1.min.js"}, function() { chrome.tabs.executeScript(null, {file: "content.js"}); }); });
Fix bug when navigating insite
Fix bug when navigating insite
JavaScript
mit
nschulte/indies-stats,nschulte/indies-stats
--- +++ @@ -1,3 +1,5 @@ -chrome.tabs.executeScript(null, {file: "lib/jquery-3.1.1.min.js"}, function() { - chrome.tabs.executeScript(null, {file: "content.js"}); +chrome.webNavigation.onHistoryStateUpdated.addListener(function(details) { + chrome.tabs.executeScript(null, {file: "lib/jquery-3.1.1.min.js"}, functio...
c8013d930c6cf4bca9e053907c14d74b7b6ad3e3
libtextsecure/protobufs.js
libtextsecure/protobufs.js
;(function() { 'use strict'; window.textsecure = window.textsecure || {}; window.textsecure.protobuf = {}; function loadProtoBufs(filename) { return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}, function(error, result) { var protos = result.build('textsecure'); ...
;(function() { 'use strict'; window.textsecure = window.textsecure || {}; window.textsecure.protobuf = {}; function loadProtoBufs(filename) { return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}, function(error, result) { if (error) { throw error; ...
Throw if we get an error
Proto-loading: Throw if we get an error
JavaScript
agpl-3.0
nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop
--- +++ @@ -5,6 +5,9 @@ function loadProtoBufs(filename) { return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}, function(error, result) { + if (error) { + throw error; + } var protos = result.build('textsecure'); for (var prot...
4c7c4be66b0c5c38070bfc0c2827b440bb94bacf
app/components/Window2.js
app/components/Window2.js
// @flow import React, { Component } from 'react'; import { Link } from 'react-router'; import { Text } from 'react-dom'; import _ from 'underscore'; import styles from './Window2.css'; import ALL_DATA from '../fixtures/alldata.js'; const ALL_DATA_BY_ID = _.indexBy(ALL_DATA, 'id'); class Window2 extends Component { ...
// @flow import React, { Component } from 'react'; import { Link } from 'react-router'; import { Text } from 'react-dom'; import _ from 'underscore'; import styles from './Window2.css'; import ALL_DATA from '../fixtures/alldata.js'; const ALL_DATA_BY_ID = _.indexBy(ALL_DATA, 'id'); class Window2 extends Component { ...
Update keys to match warnings
Update keys to match warnings
JavaScript
mit
Fresh-maker/razor-client,Fresh-maker/razor-client
--- +++ @@ -12,14 +12,16 @@ class Window2 extends Component { render() { function linkify(text){ + let i=0; return ( <div className="fullText"> { text.split(' ').map( function(word){ + i++; if (word.indexOf('<Link>') ...
a90b5618409689a6455214cb83129db6a5ab9740
docs/examples/TooltipInCopy.js
docs/examples/TooltipInCopy.js
const LinkWithTooltip = React.createClass({ render() { let tooltip = <Tooltip placement="top">{this.props.tooltip}</Tooltip>; return ( <OverlayTrigger overlay={tooltip} delayShow={300} delayHide={150}> <a href={this.props.href}>{this.props.children}</a> </OverlayTrigger> ); } }); c...
const LinkWithTooltip = React.createClass({ render() { let tooltip = <Tooltip>{this.props.tooltip}</Tooltip>; return ( <OverlayTrigger overlay={tooltip} placement="top" delayShow={300} delayHide={150} > <a href={this.props.href}>{this.props.children}</a> </OverlayTri...
Fix tooltip in copy example
Fix tooltip in copy example
JavaScript
mit
dozoisch/react-bootstrap,jesenko/react-bootstrap,mmarcant/react-bootstrap,Terminux/react-bootstrap,Sipree/react-bootstrap,react-bootstrap/react-bootstrap,glenjamin/react-bootstrap,glenjamin/react-bootstrap,HPate-Riptide/react-bootstrap,react-bootstrap/react-bootstrap,apkiernan/react-bootstrap,Lucifier129/react-bootstra...
--- +++ @@ -1,9 +1,12 @@ const LinkWithTooltip = React.createClass({ render() { - let tooltip = <Tooltip placement="top">{this.props.tooltip}</Tooltip>; + let tooltip = <Tooltip>{this.props.tooltip}</Tooltip>; return ( - <OverlayTrigger overlay={tooltip} delayShow={300} delayHide={150}> + <...
aa1d70e586b13327c846841f144b6e71ac043716
forceskip.js
forceskip.js
API.on(API.ADVANCE, callback); function callback () { var a = API.getMedia().cid; setTimeout(function() { var b = API.getMedia().cid; if (a === b) { API.sendChat("Track stuck, force skipping!"); API.moderateForceSkip(); } }, (API.getMedia().duration * 1000) + 5000); } API.chatLog...
API.on(API.ADVANCE, callback); function callback () { var a = API.getMedia().cid; var a_dj = API.getDJ().id; setTimeout(function() { var b = API.getMedia().cid; var b_dj = API.getDJ().id; if ((a.cid === b.cid) && (a_dj === b_dj)) { API.sendChat("Track stuck, force skipping!"); API....
Add check on DJ id as well.
Add check on DJ id as well. To prevent a song being skipped because two different DJs play the same song.
JavaScript
mit
ronaldb/plug-forceskip
--- +++ @@ -3,9 +3,11 @@ function callback () { var a = API.getMedia().cid; + var a_dj = API.getDJ().id; setTimeout(function() { var b = API.getMedia().cid; - if (a === b) { + var b_dj = API.getDJ().id; + if ((a.cid === b.cid) && (a_dj === b_dj)) { API.sendChat("Track stuck, force s...
050c1061c114e1e1789b333aaf394f1a3e1f8ac2
dev/app/components/main/main.controller.js
dev/app/components/main/main.controller.js
(function(){ "use strict"; angular .module('VinculacionApp') .controller('MainController', MainController); function MainController () { var vm = this; vm.expand = false; vm.navItems = [ { title: "HOME", ref: "dashboard.home", icon: "glyphicon glyphicon-home", active: true }, { title:...
(function(){ "use strict"; angular .module('VinculacionApp') .controller('MainController', MainController); MainController.$inject = [ '$rootScope', '$state' ]; function MainController ($rootScope, $state) { var vm = this; vm.expand = false; vm.navItems = [ { title: "HOME", ref: "dashboard.hom...
Fix navigation active item bug
Fix navigation active item bug
JavaScript
mit
Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC
--- +++ @@ -5,23 +5,37 @@ .module('VinculacionApp') .controller('MainController', MainController); - function MainController () { + MainController.$inject = [ '$rootScope', '$state' ]; + + function MainController ($rootScope, $state) { var vm = this; vm.expand = false; vm.navItems = [ { t...
83bc0dd92d68660b6f17aecc06d9d7b3f8c4d2a3
examples/js/main.js
examples/js/main.js
/*Deal with the contene of the click on the navbar and display the page correctly.*/ $('.navbar a[data-ex]').on('click', function(event) { event.preventDefault(); //Remove the active class; document.querySelector('.navbar li.active').classList.remove('active'); //Set the new active class. event.target.parentNode....
/*Deal with the contene of the click on the navbar and display the page correctly.*/ $('.navbar a[data-ex]').on('click', function(event) { event.preventDefault(); //Remove the active class; document.querySelector('.navbar li.active').classList.remove('active'); //Set the new active class. event.target.parentNode....
Add the module pattern for the code exampl.
Add the module pattern for the code exampl.
JavaScript
mit
pierr/prez-js,pierr/prez-js
--- +++ @@ -5,7 +5,7 @@ document.querySelector('.navbar li.active').classList.remove('active'); //Set the new active class. event.target.parentNode.classList.add('active'); - //Hide all the element //Todo: simplify. + //Hide all the element //Todo: simplify. Array.prototype.forEach.call(document.querySelect...
2ebb380803ed33d22fe9c94fc876b8a9203af057
client/catalog/index.js
client/catalog/index.js
module.exports = [].concat( require('./biomedical-engineering'), require('./chemical-engineering'), require('./computer-science') );
module.exports = [].concat( require('./accounting'), require('./biomedical-engineering'), require('./chemical-engineering'), require('./computer-science') );
Add accounting courses to catalog
Add accounting courses to catalog
JavaScript
mit
KenanY/course-search,KenanY/course-search
--- +++ @@ -1,4 +1,5 @@ module.exports = [].concat( + require('./accounting'), require('./biomedical-engineering'), require('./chemical-engineering'), require('./computer-science')
11fce40a9d89ab30133917ccae3c9658c00c69af
app/index.js
app/index.js
import 'babel-polyfill'; import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { browserHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import { configure } from 'redux-auth'; import Relay from 'react-relay'; import config...
import 'babel-polyfill'; import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { browserHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import { configure } from 'redux-auth'; import Relay from 'react-relay'; import config...
Use real auth api instead of local one.
Use real auth api instead of local one.
JavaScript
mit
FuBoTeam/fubo-flea-market,FuBoTeam/fubo-flea-market
--- +++ @@ -20,7 +20,7 @@ ); store.dispatch(configure({ - apiUrl: 'http://flea-backend.dev/', + apiUrl: 'http://flea.fubotech.com.tw/', })).then(() => { const { getState } = store; render(
ced67a4959d3acc121f5029afd061c0420e8f274
packages/envision-docs/gatsby-browser.js
packages/envision-docs/gatsby-browser.js
/* globals require:false */ require('prismjs/themes/prism-solarizedlight.css'); require('./src/scss/docs.scss'); require('envision'); require('envision/dist/envision.css');
/* globals require:false */ require('prismjs/themes/prism.css'); require('./src/scss/docs.scss'); require('envision'); require('envision/dist/envision.css');
Use prism default theme for better contrast
Use prism default theme for better contrast
JavaScript
mit
albinohrn/envision,sitevision/envision,melineric/envision,albinohrn/envision,melineric/envision,sitevision/envision,melineric/envision,albinohrn/envision
--- +++ @@ -1,5 +1,5 @@ /* globals require:false */ -require('prismjs/themes/prism-solarizedlight.css'); +require('prismjs/themes/prism.css'); require('./src/scss/docs.scss'); require('envision'); require('envision/dist/envision.css');
efdb3cab14d1d7f03f08f909f3c93ceffda4cd44
gulpfile.js/tasks/sizereport.js
gulpfile.js/tasks/sizereport.js
/* global TASK_CONFIG */ const gulp = require("gulp"); const sizereport = require("gulp-sizereport"); const projectPath = require("../lib/project-path"); function sizeReportTask() { return gulp .src([ projectPath(TASK_CONFIG.basePaths.dest, "**/*"), "*!rev-manifest.json", ]) .pipe( size...
/* global TASK_CONFIG */ const gulp = require("gulp"); const sizereport = require("gulp-sizereport"); const projectPath = require("../lib/project-path"); function sizeReportTask() { return gulp .src([ projectPath(TASK_CONFIG.basePaths.dest, "**/*"), "!" + projectPath(TASK_CONFIG.basePaths.dest, "**/_...
Exclude underscore files and folders from size report
Exclude underscore files and folders from size report
JavaScript
mit
CosminAnca/fosterkit,CosminAnca/fosterkit,CosminAnca/fosterkit,CosminAnca/fosterkit
--- +++ @@ -7,6 +7,7 @@ return gulp .src([ projectPath(TASK_CONFIG.basePaths.dest, "**/*"), + "!" + projectPath(TASK_CONFIG.basePaths.dest, "**/_*{,/**/*}"), "*!rev-manifest.json", ]) .pipe(
bc876d3967e40bfa4a9ef259f597121699c2ea18
examples/data/streamer.js
examples/data/streamer.js
var baseline = { "aapl" : 92, "ibm" : 120, "wmt" : 68, "abx" : 13, "msft" : 35 }; var last = {}; setInterval(function(){ // //Add imaginary ticker // var newTicker = Math.random().toString(36).substring(7); // baseline[newTicker] = Math.random(); // // //Remove a random ticker // var keys = Object.keys(baseli...
var header = ['SYMBOL','LAST'] var baseline = { "aapl" : 92, "ibm" : 120.72, "wmt" : 68.93, "abx" : 13.36, "msft" : 35.26 }; var last = {}; setInterval(function(){ // //Add imaginary ticker // var newTicker = Math.random().toString(36).substring(7); // baseline[newTicker] = Math.random(); // // //Re...
Add header values, currency sign
Add header values, currency sign
JavaScript
mit
tecfu/tty-table
--- +++ @@ -1,36 +1,43 @@ +var header = ['SYMBOL','LAST'] var baseline = { - "aapl" : 92, - "ibm" : 120, - "wmt" : 68, - "abx" : 13, - "msft" : 35 + "aapl" : 92, + "ibm" : 120.72, + "wmt" : 68.93, + "abx" : 13.36, + "msft" : 35.26 }; var last = {}; setInterval(function(){ -// //Add imaginary ticker -//...
d363345909fd366ceba507bfb38a9ff991588478
client/templates/bets/create.js
client/templates/bets/create.js
Template.createBetForm.helpers({ photo: function(){ return Session.get("photo"); } }) Template.createBetForm.events({ "submit .create-bet" : function(event){ event.preventDefault(); var title = event.target.betTitle.value, wager = event.target.betWager.value, user = Meteor.user(), ...
Template.createBetForm.helpers({ photo: function(){ return Session.get("photo"); } }) Template.createBetForm.events({ "submit .create-bet" : function(event){ event.preventDefault(); var title = event.target.betTitle.value, wager = event.target.betWager.value, user = Meteor.user(), ...
Change camera options and remove bad function call in form event.
Change camera options and remove bad function call in form event.
JavaScript
mit
nmmascia/webet,nmmascia/webet
--- +++ @@ -36,16 +36,12 @@ event.preventDefault(); var cameraOptions = { - width: 800, - height: 600 + width: 700, + height: 500 }; MeteorCamera.getPicture(cameraOptions, function(error, data){ Session.set("photo", data); }); - }, - - getPhoto: function(){ - ...
2fb0cb2820dee31b4e48937586f7f98c7ec8aa61
lib/index.js
lib/index.js
var docxReader = require("./docx-reader"); var DocumentConverter = require("./document-to-html").DocumentConverter; var htmlPaths = require("./html-paths"); var documentMatchers = require("./document-matchers"); var style = require("./style-reader").readStyle; exports.Converter = Converter; exports.read = read; export...
var docxReader = require("./docx-reader"); var DocumentConverter = require("./document-to-html").DocumentConverter; var htmlPaths = require("./html-paths"); var documentMatchers = require("./document-matchers"); var style = require("./style-reader").readStyle; exports.Converter = Converter; exports.read = read; export...
Add proper styles for single-level (un)ordered lists to standardOptions
Add proper styles for single-level (un)ordered lists to standardOptions
JavaScript
bsd-2-clause
mwilliamson/mammoth.js,mwilliamson/mammoth.js
--- +++ @@ -14,7 +14,8 @@ style("p.Heading2 => h2"), style("p.Heading3 => h3"), style("p.Heading4 => h4"), - style("p.ListParagraph => ul > li:fresh") + style("p:unordered-list(1) => ul > li:fresh"), + style("p:ordered-list(1) => ol > li:fresh") ] };
11bc63451e7eb35c6a5759fd3ecd55c16fa7a936
lib/index.js
lib/index.js
var es = require('event-stream'), gutil = require('gulp-util'), PluginError = gutil.PluginError; module.exports = function (ops) { ops = ops || {}; var cheerio = ops.cheerio || require('cheerio'); return es.map(function (file, done) { if (file.isNull()) return done(null, file); if (file.isStream...
var es = require('event-stream'), gutil = require('gulp-util'), PluginError = gutil.PluginError; module.exports = function (ops) { ops = ops || {}; var cheerio = ops.cheerio || require('cheerio'); return es.map(function (file, done) { if (file.isNull()) return done(null, file); if (file.isStream...
Allow parser options as param
Allow parser options as param
JavaScript
mit
KenPowers/gulp-cheerio,knpwrs/gulp-cheerio,vast/gulp-cheerio
--- +++ @@ -11,7 +11,13 @@ if (file.isStream()) return done(new PluginError('gulp-cheerio', 'Streaming not supported.')); var run = typeof ops === 'function' ? ops : ops.run; if (run) { - var $ = cheerio.load(file.contents.toString()); + var parserOptions = ops.parserOptions; + var $; + ...
7de6b0f2868cfe47843a2518482fad7f410c4659
lib/index.js
lib/index.js
/*jshint node:true*/ 'use strict'; var exec = require('child_process').exec; var colors = require('colors'); module.exports = title; /** * Sets title to current CLI tab or window. * * @param {strint} input - Title to set * @param {Boolean} win - Add title to window instead of tab */ function title(input, win) {...
/*jshint node:true*/ 'use strict'; var exec = require('child_process').exec; var colors = require('colors'); module.exports = title; /** * Sets title to current CLI tab or window. * * @param {strint} input - Title to set * @param {Boolean} win - Add title to window instead of tab */ function title(input, win) {...
Add spacing to console output
Add spacing to console output
JavaScript
mit
dvdln/terminal-title
--- +++ @@ -21,7 +21,7 @@ ].join(' '); console.log( - '%s Changing %s title: %s', + '\n%s Changing %s title: %s\n', colors.green('>'), win ? 'window' : 'tab', colors.cyan(input)
5c19b7c5c701253739e68e9ecd31623b8efb704c
lib/index.js
lib/index.js
var mongoose = require('mongoose'); var ShortId = require('./shortid'); var defaultSave = mongoose.Model.prototype.save; mongoose.Model.prototype.save = function(cb) { for (fieldName in this.schema.tree) { if (this.isNew && this[fieldName] === undefined) { var idType = this.schema.tree[fieldName]; i...
var mongoose = require('mongoose'); var ShortId = require('./shortid'); var defaultSave = mongoose.Model.prototype.save; mongoose.Model.prototype.save = function(cb) { for (fieldName in this.schema.tree) { if (this.isNew && this[fieldName] === undefined) { var idType = this.schema.tree[fieldName]; i...
Handle alternate form of mongoose 11000 error
Handle alternate form of mongoose 11000 error
JavaScript
mit
leeroybrun/mongoose-shortid-nodeps,hiconversion/mongoose-shortid-nodeps
--- +++ @@ -21,7 +21,7 @@ defaultSave.call(self, function(err, obj) { if (err && err.code == 11000 && - err.err.indexOf(fieldName) !== -1 && + (err.err || err.errmsg || '').indexOf(fieldName) !== -1 && ...
15ee2ff765ca72b0636ba1523abd5c738e10864a
lib/index.js
lib/index.js
'use strict'; module.exports = function () { const trackers = []; let isFinished = false; let onFinished = () => {}; function tryToFinish () { if (all(pluck(trackers, 'executed')) && !isFinished) { isFinished = true; onFinished(pluck(trackers, 'args')); } } return { track () { ...
'use strict'; module.exports = function () { const state = createInitialState(); return { track () { const thisIdx = state.trackers.push({executed: false}) - 1; return function () { state.trackers[thisIdx] = {executed: true, args: argsToArray(arguments)}; tryToFinish(state); ...
Refactor to seperate state from operations
Refactor to seperate state from operations
JavaScript
mit
toboid/all-finished
--- +++ @@ -1,31 +1,38 @@ 'use strict'; module.exports = function () { - const trackers = []; - let isFinished = false; - let onFinished = () => {}; - - function tryToFinish () { - if (all(pluck(trackers, 'executed')) && !isFinished) { - isFinished = true; - onFinished(pluck(trackers, 'args')); -...
a74eb06d92a9c5e9daeb946297d4c5e5da005ca6
app/today/views/RTICard.js
app/today/views/RTICard.js
define(['moxie.conf', 'underscore', 'today/views/CardView', 'hbs!today/templates/rti'], function(conf, _, CardView, rtiTemplate) { var RTI_REFRESH = 60000; // 1 minute var RTICard = CardView.extend({ initialize: function() { this.model.on('change', this.render, this); }, ...
define(['moxie.conf', 'underscore', 'today/views/CardView', 'hbs!today/templates/rti'], function(conf, _, CardView, rtiTemplate) { var RTI_REFRESH = 60000; // 1 minute var RTICard = CardView.extend({ initialize: function() { this.model.on('change', this.render, this); }, ...
Test for any RTI element on the POI model
Test for any RTI element on the POI model Previously RTI would be added, now it defaults to []
JavaScript
apache-2.0
ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client
--- +++ @@ -20,7 +20,7 @@ }, afterRender: function() { this.clearRefresh(); - if (this.model.get('RTI')) { + if (this.model.get('RTI').length > 0) { this.refreshID = this.model.renderRTI(this.$('#poi-rti')[0], RTI_REFRESH); this.mo...
0e8cbc303c97564c98bf9c01b0167209555f7d3c
includeIn.js
includeIn.js
(function(_) { var validationErrorFor = { mixin: 'all mixins must be objects.', object: 'target must be a constuctor or an object.' }, withA = function(errorType, object) { if( !_.isObject(object) ) throw '_.includeIn: ' + validationErrorFor[errorType]; return object; ...
(function(_) { var validationErrors = { fn: 'target must be a function.', mixin: 'all mixins must be objects.', object: 'target must be a constuctor or an object.', }, validationStrategies = { fn: _.isFunction, mixin: _.isObject, object: _.isObject...
Add _.extendIn extension: for allow the use of mixins in functions
Add _.extendIn extension: for allow the use of mixins in functions
JavaScript
mit
serradura/lodash_ext
--- +++ @@ -1,33 +1,53 @@ (function(_) { - var validationErrorFor = { + var validationErrors = { + fn: 'target must be a function.', mixin: 'all mixins must be objects.', - object: 'target must be a constuctor or an object.' + object: 'target must be a constuctor or an object.', ...
f71f7b40017cbfd8e77b9b191e53aea73631e9b5
both/collections/groups.js
both/collections/groups.js
Groups = new Mongo.Collection('groups'); var GroupsSchema = new SimpleSchema({ name: { type: String } }); // Add i18n tags GroupsSchema.i18n("groups"); Groups.attachSchema(GroupsSchema); Groups.helpers({ 'homes': function () { // Get group ID var groupId = this._id; // Get all homes assigned ...
Groups = new Mongo.Collection('groups'); var GroupsSchema = new SimpleSchema({ name: { type: String } }); // Add i18n tags GroupsSchema.i18n("groups"); Groups.attachSchema(GroupsSchema); Groups.helpers({ 'homes': function () { // Get group ID var groupId = this._id; // Get all homes assigned ...
Add update allow rule; refactor insert rule
Add update allow rule; refactor insert rule
JavaScript
agpl-3.0
GeriLife/wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing
--- +++ @@ -24,7 +24,28 @@ }); Groups.allow({ - insert: function () { - return true; + insert () { + // Get user ID + const userId = Meteor.userId(); + + // Check if user is administrator + const userIsAdmin = Roles.userIsInRole(userId, ['admin']); + + if (userIsAdmin) { + // admin user c...
8c9b63e1e9fff3cee0f4e0df0df3e4e20c729536
extensions/renderer/xwalk_internal_api.js
extensions/renderer/xwalk_internal_api.js
// Copyright (c) 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var callback_listeners = {}; var callback_id = 0; var extension_object; function wrapCallback(args, callback) { if (callback) { var id = (callback...
// Copyright (c) 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var callback_listeners = {}; var callback_id = 0; var extension_object; function wrapCallback(args, callback) { if (callback) { var id = (callback...
Add support for persistent callback listener
[Extensions] Add support for persistent callback listener This is going to be the base of the EventTarget implementation. It is important to remove the listener at some point otherwise the object will leak.
JavaScript
bsd-3-clause
tomatell/crosswalk,alex-zhang/crosswalk,bestwpw/crosswalk,chinakids/crosswalk,siovene/crosswalk,tedshroyer/crosswalk,mrunalk/crosswalk,Pluto-tv/crosswalk,chuan9/crosswalk,xzhan96/crosswalk,crosswalk-project/crosswalk,crosswalk-project/crosswalk-efl,jondong/crosswalk,Bysmyyr/crosswalk,qjia7/crosswalk,zeropool/crosswalk,...
--- +++ @@ -18,6 +18,8 @@ // message handler. args.unshift(""); } + + return id; } exports.setupInternalExtension = function(extension_obj) { @@ -32,14 +34,23 @@ var listener = callback_listeners[id]; if (listener !== undefined) { - listener.apply(null, args); - delete callback...
07a718377a43c4be0ea960572f76754403fbd98c
client/views/settings/users/users.js
client/views/settings/users/users.js
Template.usersSettings.created = function () { // Get reference to Template instance var instance = this; // Subscribe to all users instance.subscribe("allUsers"); }; Template.usersSettings.helpers({ "users": function () { // Get all users var users = Meteor.users.find().fetch(); console.log(use...
Template.usersSettings.created = function () { // Get reference to Template instance var instance = this; // Subscribe to all users instance.subscribe("allUsers"); }; Template.usersSettings.helpers({ "users": function () { // Get all users var users = Meteor.users.find().fetch(); return users; ...
Add email and roles helpers
Add email and roles helpers
JavaScript
agpl-3.0
GeriLife/wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing
--- +++ @@ -10,12 +10,19 @@ "users": function () { // Get all users var users = Meteor.users.find().fetch(); - console.log(users); + return users; }, - email: function () { - if (this.emails && this.emails.length) { + "email": function () { + if (this.emails && this.emails.length) { + ...
df2301e1c0d4403743918ad0e4fe7afab95efb4e
ghost/admin/app/controllers/application.js
ghost/admin/app/controllers/application.js
/* eslint-disable ghost/ember/alias-model-in-controller */ import Controller from '@ember/controller'; import {inject as service} from '@ember/service'; export default class ApplicationController extends Controller { @service billing; @service customViews; @service config; @service dropdown; @servi...
/* eslint-disable ghost/ember/alias-model-in-controller */ import Controller from '@ember/controller'; import {computed} from '@ember/object'; import {inject as service} from '@ember/service'; export default Controller.extend({ billing: service(), customViews: service(), config: service(), dropdown: se...
Revert "Refactored ApplicationController to use native class"
Revert "Refactored ApplicationController to use native class" This reverts commit 9b6d4822e72425ceec192723f4d469060afe1ea5. - there is an issue with properties not being tracked correctly and the menu not being shown when returning from the editor - reverting to working version with computed properties for now
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
--- +++ @@ -1,34 +1,34 @@ /* eslint-disable ghost/ember/alias-model-in-controller */ import Controller from '@ember/controller'; +import {computed} from '@ember/object'; import {inject as service} from '@ember/service'; -export default class ApplicationController extends Controller { - @service billing; - ...
10894cf1bc17a5985c57c3e1a059803ef90b8d76
src/main/resources/public/js/constants.js
src/main/resources/public/js/constants.js
// User roles app.constant('USER_ROLES', { all: ['ROLES_ADMIN', 'ROLES_LEADER', 'ROLES_WORKER'], admin: 'ROLES_ADMIN', worker: 'ROLES_WORKER', leader: 'ROLES_LEADER' }); // Authentication events app.constant('AUTH_EVENTS', { loginSuccess: 'auth-login-success', badRequest: 'auth-bad-request', ...
// User roles app.constant('USER_ROLES', { all: ['ROLES_ADMIN', 'ROLES_LEADER', 'ROLES_WORKER'], admin: 'ROLES_ADMIN', worker: 'ROLES_WORKER', leader: 'ROLES_LEADER' }); // Authentication events app.constant('AUTH_EVENTS', { loginSuccess: 'auth-login-success', badRequest: 'auth-bad-request', ...
Add new work time value - 3/8
Add new work time value - 3/8
JavaScript
mit
fingo/urlopia,fingo/urlopia,fingo/urlopia,fingo/urlopia,fingo/urlopia
--- +++ @@ -28,6 +28,6 @@ // Cookie expiration time app.constant('COOKIE_EXP_TIME', 86400000); //set to 1 day -app.constant('WORK_TIMES', ['1', '7/8', '4/5', '3/4', '3/5', '1/2', '2/5', '1/4', '1/5', '1/8', '1/16']); +app.constant('WORK_TIMES', ['1', '7/8', '4/5', '3/4', '3/5', '1/2', '2/5', '3/8', '1/4', '1/5', ...
197ddda395067b87d02b976b03037f47af606b80
src/app/api/page_utils.js
src/app/api/page_utils.js
var _ = require('lodash'); module.exports = { fillLogin: function(form, data) { var formData = _.merge(form, data); return formData; }, headers: function() { return { 'User-Agent': 'Chrome/' + process.versions['chrome'] + ' Electron/' + process.versions['electron'] ...
var _ = require('lodash'); module.exports = { fillLogin: function(form, data) { var formData = _.merge(form, data); return formData; }, headers: function() { return { 'User-Agent': 'Chrome/' + process.versions['chrome'] + ' Electron/' + process.versions['electron'] ...
Check for actual not logged in message
Check for actual not logged in message
JavaScript
mit
kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop
--- +++ @@ -13,6 +13,6 @@ }, checkUnauthorized: function(page) { - + return /Du bist nicht eingeloggt/.test(page); } };
add64845db369da0b842f91d052324530e11287a
lib/index.js
lib/index.js
module.exports = { options: { auth: require('./options/auth'), body: require('./options/body'), callback: require('./options/callback'), cookie: require('./options/cookie'), encoding: require('./options/encoding'), end: require('./options/end'), form: require('./options/form'), gzip: ...
module.exports = { options: { auth: require('./options/auth'), body: require('./options/body'), callback: require('./options/callback'), cookie: require('./options/cookie'), encoding: require('./options/encoding'), end: require('./options/end'), form: require('./options/form'), gzip: ...
Update the list of internal modules
Update the list of internal modules
JavaScript
apache-2.0
request/core
--- +++ @@ -15,7 +15,9 @@ parse: require('./options/parse'), proxy: require('./options/proxy'), qs: require('./options/qs'), - redirect: require('./options/redirect') + redirect: require('./options/redirect'), + timeout: require('./options/timeout'), + tunnel: require('./options/tunnel') ...
c8ebc8e9e7f8559ef627491193ec55d2ec4d3b03
jquery.ziptastic.js
jquery.ziptastic.js
(function( $ ) { var requests = {}; var zipValid = { us: /[0-9]{5}(-[0-9]{4})?/ }; $.ziptastic = function(zip, callback){ // Only make unique requests if(!requests[zip]) { requests[zip] = $.getJSON('http://zip.elevenbasetwo.com/v2/US/' + zip); } // Bind to the finished request requests[zip].done(fu...
(function( $ ) { var requests = {}; var zipValid = { us: /[0-9]{5}(-[0-9]{4})?/ }; $.ziptastic = function(country, zip, callback){ country = country.toUpperCase(); // Only make unique requests if(!requests[country]) { requests[country] = {}; } if(!requests[country][zip]) { requests[country][zip] ...
Add support for other countries
Add support for other countries
JavaScript
mit
Ziptastic/ziptastic-jquery-plugin,Ziptastic/ziptastic-jquery-plugin,daspecster/ziptastic-jquery-plugin,daspecster/ziptastic-jquery-plugin
--- +++ @@ -4,19 +4,25 @@ us: /[0-9]{5}(-[0-9]{4})?/ }; - $.ziptastic = function(zip, callback){ + $.ziptastic = function(country, zip, callback){ + country = country.toUpperCase(); // Only make unique requests - if(!requests[zip]) { - requests[zip] = $.getJSON('http://zip.elevenbasetwo.com/v2/US/' + zi...
02dab375a6e1c06b84170f3a038ea6db8e5c342a
src/components/nav.js
src/components/nav.js
import React from 'react' import { Link } from 'gatsby' import MeImg from '../images/me.jpg' import { MenuIcon } from './icons/Menu' const Nav = ({ onClick }) => { return ( <div className="flex items-center justify-between py-8 text-gray-800"> <Link to="/" aria-label="link to home page"> <div clas...
import React from 'react' import { Link } from 'gatsby' import MeImg from '../images/me.jpg' import { MenuIcon } from './icons/Menu' import { GitHubIcon } from './icons/GitHub' const Nav = ({ onClick }) => { return ( <div className="flex items-center border-b justify-between py-8 text-gray-800"> <Link to=...
Add GitHub icon. Remove articles link
Add GitHub icon. Remove articles link
JavaScript
mit
dtjv/dtjv.github.io
--- +++ @@ -3,10 +3,11 @@ import MeImg from '../images/me.jpg' import { MenuIcon } from './icons/Menu' +import { GitHubIcon } from './icons/GitHub' const Nav = ({ onClick }) => { return ( - <div className="flex items-center justify-between py-8 text-gray-800"> + <div className="flex items-center borde...
a693a0a7eee07995d79033baef8fe182143f2789
blueprints/server/index.js
blueprints/server/index.js
var isPackageMissing = require('ember-cli-is-package-missing'); module.exports = { description: 'Generates a server directory for mocks and proxies.', normalizeEntityName: function() {}, afterInstall: function(options) { var isMorganMissing = isPackageMissing(this, 'morgan'); var isGlobMissing = isPac...
var isPackageMissing = require('ember-cli-is-package-missing'); module.exports = { description: 'Generates a server directory for mocks and proxies.', normalizeEntityName: function() {}, afterInstall: function(options) { var isMorganMissing = isPackageMissing(this, 'morgan'); var isGlobMissing = isPack...
Create .jshintrc only if "ember-cli-jshint" is a dependency
blueprints/server: Create .jshintrc only if "ember-cli-jshint" is a dependency
JavaScript
mit
rtablada/ember-cli,trentmwillis/ember-cli,givanse/ember-cli,scalus/ember-cli,nathanhammond/ember-cli,kanongil/ember-cli,Turbo87/ember-cli,ef4/ember-cli,xtian/ember-cli,sivakumar-kailasam/ember-cli,givanse/ember-cli,buschtoens/ember-cli,calderas/ember-cli,cibernox/ember-cli,johanneswuerbach/ember-cli,pzuraq/ember-cli,ba...
--- +++ @@ -6,7 +6,6 @@ normalizeEntityName: function() {}, afterInstall: function(options) { - var isMorganMissing = isPackageMissing(this, 'morgan'); var isGlobMissing = isPackageMissing(this, 'glob'); @@ -24,5 +23,15 @@ if (!options.dryRun && areDependenciesMissing) { return this.ad...
5373afb242a06091db3dcd0f8473b641b8d3767d
demo/script.js
demo/script.js
var base_layer = new L.tileLayer( 'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',{ attribution: '&copy <a href=" http://www.openstreetmap.org/" title="OpenStreetMap">OpenStreetMap</a> and contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" title="CC-BY-SA">CC-BY-SA</a>'...
var base_layer = new L.tileLayer( 'http://{s}.tile.cloudmade.com/63250e2ef1c24cc18761c70e76253f75/997/256/{z}/{x}/{y}.png',{ attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a ...
Use cloud made map style
Use cloud made map style
JavaScript
mit
withtwoemms/leaflet-locatecontrol,Drooids/leaflet-locatecontrol,nikolauskrismer/leaflet-locatecontrol,jblarsen/leaflet-locatecontrol,cederache/leaflet-locatecontrol,domoritz/leaflet-locatecontrol,cederache/leaflet-locatecontrol,nikolauskrismer/leaflet-locatecontrol,vivek8943/leaflet-locatecontrol,rick-frantz/leaflet-lo...
--- +++ @@ -1,8 +1,7 @@ var base_layer = new L.tileLayer( - 'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',{ - attribution: '&copy <a href=" http://www.openstreetmap.org/" title="OpenStreetMap">OpenStreetMap</a> and contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/" tit...
a1a15bda062d3e51e4c8fcfc00ab78cd27bd4fc9
packager/webSocketProxy.js
packager/webSocketProxy.js
/** * Copyright (c) 2015-present, 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. */ 'use strict...
/** * Copyright (c) 2015-present, 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. */ 'use strict...
Fix reloading in debug mode sometimes crashes packager
[ReactNative] Fix reloading in debug mode sometimes crashes packager
JavaScript
bsd-3-clause
zhangwei001/react-native,barakcoh/react-native,rebeccahughes/react-native,maskkid/react-native,dylanchann/react-native,roy0914/react-native,sunblaze/react-native,jonesgithub/react-native,Guardiannw/react-native,chsj1/react-native,mjetek/react-native,Intellicode/react-native,gabrielbellamy/react-native,wangziqiang/react...
--- +++ @@ -34,7 +34,12 @@ ws.on('message', function(message) { allClientsExcept(ws).forEach(function(cn) { - cn.send(message); + try { + // Sometimes this call throws 'not opened' + cn.send(message); + } catch(e) { + console.warn('WARN: ' + e.message); + ...
5b02710c63cb4bf86af8bbc61c0c18113a8ef5ec
config/protractor.conf.js
config/protractor.conf.js
/** * @author: @AngularClass */ require('ts-node/register'); var helpers = require('./helpers'); exports.config = { baseUrl: 'http://localhost:3000/', // use `npm run e2e` specs: [ helpers.root('src/**/**.e2e.ts'), helpers.root('src/**/*.e2e.ts') ], exclude: [], framework: 'jasmine2', allSc...
/** * @author: @AngularClass */ require('ts-node/register'); var helpers = require('./helpers'); exports.config = { baseUrl: 'http://localhost:8080/', // use `npm run e2e` specs: [ helpers.root('src/**/**.e2e.ts'), helpers.root('src/**/*.e2e.ts') ], exclude: [], framework: 'jasmine2', allSc...
Set protractor host to 8080 instead of 3000.
Set protractor host to 8080 instead of 3000.
JavaScript
mit
sebastianhaas/medical-appointment-scheduling,sebastianhaas/medical-appointment-scheduling,sebastianhaas/medical-appointment-scheduling,sebastianhaas/medical-appointment-scheduling
--- +++ @@ -6,7 +6,7 @@ var helpers = require('./helpers'); exports.config = { - baseUrl: 'http://localhost:3000/', + baseUrl: 'http://localhost:8080/', // use `npm run e2e` specs: [
e95ac0b22ab7ea7e9911d79587869112465467f4
lib/bowerPackageURL.js
lib/bowerPackageURL.js
/** * @module bowerPackageURL * @author Matthew Hasbach * @copyright Matthew Hasbach 2015 * @license MIT */ /** * The bowerPackageURL callback * @callback bowerPackageURLCallback * @param {Object} err - An error object if an error occurred * @param {string} url - The repository URL associated with the provide...
/** * @module bowerPackageURL * @author Matthew Hasbach * @copyright Matthew Hasbach 2015 * @license MIT */ /** * The bowerPackageURL callback * @callback bowerPackageURLCallback * @param {Object} err - An error object if an error occurred * @param {string} url - The repository URL associated with the provide...
Call back a simpler Error object if a package was not found on Bower
Call back a simpler Error object if a package was not found on Bower
JavaScript
mit
mjhasbach/bower-package-url
--- +++ @@ -34,6 +34,10 @@ http.get('https://bower.herokuapp.com/packages/' + packageName) .end(function(err, res) { + if (err && err.status === 404) { + err = new Error('Package ' + packageName + ' not found on Bower'); + } + cb(err, res.body.url); ...
ce0083e48b19bb661637999ae2596897f80fa719
lib/capture.js
lib/capture.js
var page = require('webpage').create(); var system = require('system'); var args = system.args; var url = args[1]; var imagePath = args[2]; var attempt = 0; function widgetsReady() { return document.querySelector('.widget') !== null && document.querySelectorAll('.widget.loading').length === 0; } function loop() { ...
var page = require('webpage').create(); var system = require('system'); var args = system.args; var url = args[1]; var imagePath = args[2]; var attempt = 0; function widgetsReady() { return document.querySelector('.widget') !== null && document.querySelectorAll('.widget.loading').length === 0; } function loop() { ...
Increase the grace period after load, because highcharts is a complete bastard
Increase the grace period after load, because highcharts is a complete bastard
JavaScript
mit
geckoboard/diffy
--- +++ @@ -21,7 +21,7 @@ setTimeout(function () { page.render(imagePath); phantom.exit(0); - }, 2e3) + }, 3e3) } else { attempt++; setTimeout(loop, 10);
5269d3c08d97c03c37f83617daba3eaf238e96b4
react-client/src/components/Bookmarks.js
react-client/src/components/Bookmarks.js
import React from 'react'; import ReactDOM from 'react-dom'; import { Link, withRouter } from 'react-router'; import $ from 'jquery'; class Bookmarks extends React.Component { constructor(props) { super(props); this.state = { bookmarks: [] } } getBookmarks() { let self = this; $.get({ ...
import React from 'react'; import ReactDOM from 'react-dom'; import { Link, withRouter } from 'react-router'; import $ from 'jquery'; class Bookmarks extends React.Component { constructor(props) { super(props); this.state = { bookmarks: [] } } getUserBookmarks() { let self = this; $.ge...
Fix function name for clarity
Fix function name for clarity
JavaScript
mit
francoabaroa/escape-reality,lowtalkers/escape-reality,francoabaroa/escape-reality,lowtalkers/escape-reality
--- +++ @@ -11,7 +11,7 @@ } } - getBookmarks() { + getUserBookmarks() { let self = this; $.get({ url: '/allBookmarks', @@ -27,7 +27,7 @@ } componentWillMount() { - this.getBookmarks(); + this.getUserBookmarks(); } render() {
c74d6cc74e697493f1c71552f9ef143ac6e5f96c
server/s3_client.js
server/s3_client.js
var fs = require('fs'); var AWS = require('aws-sdk'); module.exports = function createS3Client() { const awsConfig = (process.env.NODE_ENV === 'development') ? JSON.parse(fs.readFileSync('./tmp/aws_message_popup.json')) : { accessKeyId: process.env.MESSAGE_POPUP_S3_ACCESS_KEY_ID, secretAccess...
var fs = require('fs'); var AWS = require('aws-sdk'); module.exports = function createS3Client() { const awsConfig = (process.env.NODE_ENV === 'development') ? JSON.parse(fs.readFileSync('./tmp/aws_message_popup.json')) : JSON.parse(process.env.MESSAGE_POPUP_S3_CONFIG_JSON); return new AWS.S3(awsConfig); ...
Read AWS credentials for audio as single env var
Read AWS credentials for audio as single env var
JavaScript
mit
kesiena115/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows,kesiena115/threeflows,kesiena115/threeflows,mit-teaching-systems-lab/threeflows,mit-teaching-systems-lab/threeflows
--- +++ @@ -4,11 +4,6 @@ module.exports = function createS3Client() { const awsConfig = (process.env.NODE_ENV === 'development') ? JSON.parse(fs.readFileSync('./tmp/aws_message_popup.json')) - : { - accessKeyId: process.env.MESSAGE_POPUP_S3_ACCESS_KEY_ID, - secretAccessKey: process.env.MESSA...
2089937b11199521f112ce196e498e87db3474d5
components/taglib/TransformHelper/getComponentFiles.js
components/taglib/TransformHelper/getComponentFiles.js
var fs = require('fs'); var path = require('path'); function getComponentFiles(filename) { var ext = path.extname(filename); if (ext === '.js') { return null; } var nameNoExt = path.basename(filename, ext); var isEntry = 'index' === nameNoExt; var fileMatch = '('+nameNoExt.replace(/\...
'use strict'; var fs = require('fs'); var path = require('path'); function getComponentFiles(filename) { var ext = path.extname(filename); if (ext === '.js') { return null; } var nameNoExt = path.basename(filename, ext); var isEntry = 'index' === nameNoExt; var fileMatch = '('+nameN...
Add use-strict to fix old versions of node.
Add use-strict to fix old versions of node.
JavaScript
mit
marko-js/marko,marko-js/marko
--- +++ @@ -1,3 +1,5 @@ +'use strict'; + var fs = require('fs'); var path = require('path');
56125a7c8375404d2ff355c11d70ab5146c291f4
lib/packages.js
lib/packages.js
var Q = require("q"); var _ = require("lodash"); var path = require("path"); var Packager = require("pkgm"); var pkg = require("../package.json"); var logger = require("./utils/logger")("packages"); var manager = new Packager({ 'engine': "codebox", 'version': pkg.version, 'folder': path.resolve(__dirname,...
var Q = require("q"); var _ = require("lodash"); var path = require("path"); var Packager = require("pkgm"); var pkg = require("../package.json"); var logger = require("./utils/logger")("packages"); var manager = new Packager({ 'engine': "codebox", 'version': pkg.version, 'folder': path.resolve(__dirname,...
Add workspace to codebox context
Add workspace to codebox context
JavaScript
apache-2.0
code-box/codebox,rodrigues-daniel/codebox,ronoaldo/codebox,Ckai1991/codebox,CodeboxIDE/codebox,indykish/codebox,nobutakaoshiro/codebox,fly19890211/codebox,LogeshEswar/codebox,blubrackets/codebox,blubrackets/codebox,kustomzone/codebox,quietdog/codebox,etopian/codebox,lcamilo15/codebox,listepo/codebox,quietdog/codebox,no...
--- +++ @@ -15,6 +15,7 @@ var init = function() { var context = { + workspace: require("./workspace"), rpc: require("./rpc"), socket: require("./socket"), logger: require("./utils/logger")("package")
f1e243422f90de3f75a4acab06fc41423e8c6b06
lib/reporter.js
lib/reporter.js
const table = require('text-table') const chalk = require('chalk') class Reporter { report (results) { let output = '\n' let totalErrors = 0 let totalWarnings = 0 results.forEach((result) => { totalErrors += result.errorCount totalWarnings += result.warningCount output += chalk.un...
const table = require('text-table') const chalk = require('chalk') class Reporter { report (results) { let output = '\n' let totalErrors = 0 let totalWarnings = 0 results.forEach((result) => { totalErrors += result.errorCount totalWarnings += result.warningCount output += chalk.un...
Exit with code 0 if only warnings are present
Exit with code 0 if only warnings are present
JavaScript
mit
sourceboat/sass-lint-vue
--- +++ @@ -30,7 +30,7 @@ output += ' | ' output += chalk.yellow.bold(`warnings ${totalWarnings}`) console.log(output) - process.exit(1) + process.exit(totalErrors > 0 ? 1 : 0) } } }
c4335f69294c6ca940e80ca32050b096426b577a
src/index.js
src/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render(<App />, document.getElementById('root')); registerServiceWorker();
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import { Provider } from 'react-redux' import store from './redux/store' import registerServiceWorker from './registerServiceWorker'; ReactDOM.render( <Provider store={store}> <App /> </Provider>, document.get...
Set up Provider component for redux
Set up Provider component for redux
JavaScript
mit
cernanb/personal-chef-react-app,cernanb/personal-chef-react-app
--- +++ @@ -2,7 +2,12 @@ import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; +import { Provider } from 'react-redux' +import store from './redux/store' import registerServiceWorker from './registerServiceWorker'; -ReactDOM.render(<App />, document.getElementById('root')); +ReactDOM....
8bdfbdbd885a435d1d659ee83134fc22a6742688
src/index.js
src/index.js
'use strict'; var EXPORTABLE_RESOURCES; EXPORTABLE_RESOURCES = { Request: './Request', APIError: './APIError', JWTSecuredRequest: './JWTSecuredRequest', Responsebuilder: './ResponseBuilder', SilvermineResponseBuilder: './SilvermineResponseBuilder', responseBuilderHandler: './responseBuilderHandler',...
'use strict'; var EXPORTABLE_RESOURCES; EXPORTABLE_RESOURCES = { Request: './Request', APIError: './APIError', JWTSecuredRequest: './JWTSecuredRequest', ResponseBuilder: './ResponseBuilder', SilvermineResponseBuilder: './SilvermineResponseBuilder', responseBuilderHandler: './responseBuilderHandler',...
Correct the capitalization on ResponseBuilder export
BREAKING: Correct the capitalization on ResponseBuilder export If you have been including `ResponseBuilder` using the export `Responsebuilder`, with this commit you will now need to include it using `ResponseBuilder`.
JavaScript
mit
silvermine/apigateway-utils
--- +++ @@ -6,7 +6,7 @@ Request: './Request', APIError: './APIError', JWTSecuredRequest: './JWTSecuredRequest', - Responsebuilder: './ResponseBuilder', + ResponseBuilder: './ResponseBuilder', SilvermineResponseBuilder: './SilvermineResponseBuilder', responseBuilderHandler: './responseBuilderHa...
052e14ad23fae1bead4565ee3adb103bb03b3832
src/index.js
src/index.js
import CardIOView from './CardIO.ios'; import * as constants from './constants'; export default CardIOView; export const CardIOConstants = constants;
import { NativeModules } from 'react-native'; const { BBBCardIO: { preload, } } = NativeModules; import CardIOView from './CardIO.ios'; import * as constants from './constants'; export default CardIOView; export const CardIOConstants = constants; export { preload, };
Add preload to js api
Add preload to js api
JavaScript
mit
BBB/react-native-card.io
--- +++ @@ -1,5 +1,10 @@ +import { NativeModules } from 'react-native'; + +const { BBBCardIO: { preload, } } = NativeModules; + import CardIOView from './CardIO.ios'; import * as constants from './constants'; export default CardIOView; export const CardIOConstants = constants; +export { preload, };
18809ce25afa59e318ecf5ccab7e0d102fa982c9
chrome_extension/client.js
chrome_extension/client.js
(function($){ $.appendSolveButton = function () { var $solve = $(document.createElement('div')).text('solve').css({ cursor: 'pointer', position: 'fixed', left: 0, bottom: 0, padding: '1em 2em', color: 'white', backgroundColor: 'rgba(0, 0, 255, .4)', zIndex: 21474836...
(function($){ $.appendSolveButton = function () { var $solve = $(document.createElement('div')).text('solve').css({ cursor: 'pointer', position: 'fixed', left: 0, bottom: 0, padding: '1em 2em', color: 'white', backgroundColor: 'rgba(0, 0, 255, .4)', zIndex: 21474836...
Add handler for extension's request error
Add handler for extension's request error
JavaScript
mit
en30/online-judge-helper,en30/online-judge-helper,en30/online-judge-helper
--- +++ @@ -15,6 +15,10 @@ }; $.solve = function(params) { - $.post('http://localhost:4567/problem', params); + $.post('http://localhost:4567/problem', params).fail(function(res){ + if(res.status == 0) { + alert('It seems that background server is not working'); + } + }); }; })(j...
5d0a6b1591cf9fae6f182176d563bb284b9e493d
native/calendar/calendar-input-bar.react.js
native/calendar/calendar-input-bar.react.js
// @flow import * as React from 'react'; import { View, Text } from 'react-native'; import { connect } from 'lib/utils/redux-utils'; import Button from '../components/button.react'; import type { AppState } from '../redux/redux-setup'; import { styleSelector } from '../themes/colors'; type Props = {| onSave: () =...
// @flow import * as React from 'react'; import { View, Text } from 'react-native'; import Button from '../components/button.react'; import { useStyles } from '../themes/colors'; type Props = {| +onSave: () => void, +disabled: boolean, |}; function CalendarInputBar(props: Props) { const styles = useStyles(unbo...
Use hook instead of connect functions and HOC in CalendarInputBar
[native] Use hook instead of connect functions and HOC in CalendarInputBar Test Plan: Flow Reviewers: ashoat, palys-swm Reviewed By: ashoat Subscribers: zrebcu411, Adrian Differential Revision: https://phabricator.ashoat.com/D518
JavaScript
bsd-3-clause
Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal
--- +++ @@ -3,35 +3,29 @@ import * as React from 'react'; import { View, Text } from 'react-native'; -import { connect } from 'lib/utils/redux-utils'; - import Button from '../components/button.react'; -import type { AppState } from '../redux/redux-setup'; -import { styleSelector } from '../themes/colors'; +impo...
e5de493971c3290e037c16141332d3c487cf756c
js/chai-unindent.js
js/chai-unindent.js
"use strict"; const Chai = require("chai"); const {util} = Chai; let overwritten, unindentPattern; /** * Strip leading tabulation from string blocks when running "equal" method. * * Enables use of ES6 template strings like triple-quoted strings (Python/CoffeeScript). * * @param {Number} columns - Number of lea...
"use strict"; const Chai = global.chai || require("chai"); const {util} = Chai; let overwritten; let unindentPattern; /** Unindent a value if it's a string, and Chai.unindent has been called */ function trimIfNeeded(input){ if(unindentPattern && "[object String]" === Object.prototype.toString.call(input)){ unin...
Trim leading/trailing blank lines when unindenting
Trim leading/trailing blank lines when unindenting Refs: b3926be9112766181a6427c3d94bead82c07d9d0@2db0c90
JavaScript
isc
Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets,Alhadis/Snippets
--- +++ @@ -1,10 +1,22 @@ "use strict"; -const Chai = require("chai"); +const Chai = global.chai || require("chai"); const {util} = Chai; -let overwritten, unindentPattern; +let overwritten; +let unindentPattern; + + +/** Unindent a value if it's a string, and Chai.unindent has been called */ +function trimIf...
e53c716e76bf3ed9180b9b34b4efefb2b484819d
lib/strategy.js
lib/strategy.js
var OpenIDConnectStrategy = require('passport-openidconnect').Strategy; var passportAuthenticateWithCUstomClaims = require('PassportAuthenticateWithCustomClaims').PassportAuthenticateWithCustomClaims; function Strategy(options, verify) { var strategy = new OpenIDConnectStrategy(options, verify); var alternateA...
var OpenIDConnectStrategy = require('passport-openidconnect').Strategy; var passportAuthenticateWithCUstomClaims = require('./PassportAuthenticateWithCustomClaims').PassportAuthenticateWithCustomClaims; function Strategy(options, verify) { var strategy = new OpenIDConnectStrategy(options, verify); var alternat...
Fix broken reference to local module and missing export of the Strategy constructor.
Fix broken reference to local module and missing export of the Strategy constructor.
JavaScript
mit
promethe42/passport-franceconnect
--- +++ @@ -1,5 +1,5 @@ var OpenIDConnectStrategy = require('passport-openidconnect').Strategy; -var passportAuthenticateWithCUstomClaims = require('PassportAuthenticateWithCustomClaims').PassportAuthenticateWithCustomClaims; +var passportAuthenticateWithCUstomClaims = require('./PassportAuthenticateWithCustomClaims...
469475059353e62e85218d9f43d1ee65913aea5c
src/shared/components/nav/navItem/navItem.js
src/shared/components/nav/navItem/navItem.js
import React, { PureComponent } from 'react'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import styles from './navItem.css'; class NavItem extends PureComponent { constructor() { super(); // TODO: remove this if .eslintrc updated to parser:"babel-eslint", // allowing c...
import React, { PureComponent } from 'react'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import styles from './navItem.css'; class NavItem extends PureComponent { constructor() { super(); // TODO: remove this if .eslintrc updated to parser:"babel-eslint", // allowing c...
Edit TODO to reflect edited file
Edit TODO to reflect edited file
JavaScript
mit
alexspence/operationcode_frontend,hollomancer/operationcode_frontend,OperationCode/operationcode_frontend,tal87/operationcode_frontend,miaket/operationcode_frontend,tskuse/operationcode_frontend,sethbergman/operationcode_frontend,NestorSegura/operationcode_frontend,tal87/operationcode_frontend,sethbergman/operationcode...
--- +++ @@ -50,7 +50,8 @@ onClick: null }; -// TODO: Remove all references to notClickable and disabledClass (including .css) when -// every route has been created. +// TODO: Remove all references to notClickable and disabledClass (including .css) +// when every route has been created. +// NOTE: For the usage o...
f7c515b7c716b0a1fb75a2bb9a87d83c773b5f2f
pipeline/app/assets/javascripts/controllers/PathwayController.js
pipeline/app/assets/javascripts/controllers/PathwayController.js
'use strict' angular.module('pathwayApp') .controller('PathwayController', function ($scope, $http, $stateParams, $cookieStore, $state) { $http({method: 'GET', url: '/api/pathways/' + $stateParams.id }).success(function(data, status){ $scope.pathway = data }) $scope.user = $cookieStore.get('pathwa...
'use strict' angular.module('pathwayApp') .controller('PathwayController', function ($scope, $http, $stateParams, $cookieStore, $state) { $scope.user = $cookieStore.get('pathway_user') $http({method: 'GET', url: '/api/pathways/' + $stateParams.id }).success(function(data, status){ $scope.pathway = d...
Move global variable to the top
Move global variable to the top
JavaScript
mit
aattsai/Pathway,aattsai/Pathway,aattsai/Pathway
--- +++ @@ -2,12 +2,12 @@ angular.module('pathwayApp') .controller('PathwayController', function ($scope, $http, $stateParams, $cookieStore, $state) { + $scope.user = $cookieStore.get('pathway_user') $http({method: 'GET', url: '/api/pathways/' + $stateParams.id }).success(function(data, status){ ...
4e5a0e6fdb7d424f082205acf8f18b8edde278b1
environments/nodejs/optional.js
environments/nodejs/optional.js
'use strict' module.exports = { extends: 'javascript/standard/optional.js' }
'use strict' module.exports = { extends: 'javascript/standard/optional' }
Remove extension from extends path
Remove extension from extends path
JavaScript
bsd-3-clause
strvcom/eslint-config-javascript,strvcom/js-coding-standards,strvcom/eslint-config-javascript
--- +++ @@ -1,5 +1,5 @@ 'use strict' module.exports = { - extends: 'javascript/standard/optional.js' + extends: 'javascript/standard/optional' }
2c943d20dae87bfb9aed666644815bbb759c39fb
packages/wct-sauce/scripts/postinstall.js
packages/wct-sauce/scripts/postinstall.js
// People frequently sudo install web-component-tester, and we have to be a // little careful about file permissions. // // sauce-connect-launcher downloads and caches the sc binary into its package // directory the first time you try to connect. If WCT is installed via sudo, // sauce-connect-launcher will be unable to...
// People frequently sudo install web-component-tester, and we have to be a // little careful about file permissions. // // sauce-connect-launcher downloads and caches the sc binary into its package // directory the first time you try to connect. If WCT is installed via sudo, // sauce-connect-launcher will be unable to...
Handle the npm bug with exponential backoff for the require
Handle the npm bug with exponential backoff for the require
JavaScript
bsd-3-clause
Polymer/tools,Polymer/tools,Polymer/tools,Polymer/tools
--- +++ @@ -5,17 +5,40 @@ // directory the first time you try to connect. If WCT is installed via sudo, // sauce-connect-launcher will be unable to write to its directory, and fail. // -// So, we force a prefetch during install ourselves. This also works around a -// npm bug where sauce-connect-launcher is unable ...
e2670701f4bc717d28e59285ca9057728786259a
lib/index.js
lib/index.js
/* @flow */ import LinterUI from './main' import type Intentions from './intentions' const linterUiDefault = { instances: new Set(), signalRegistry: null, statusBarRegistry: null, activate() { if (!atom.inSpecMode()) { // eslint-disable-next-line global-require require('atom-package-deps').ins...
/* @flow */ import LinterUI from './main' import type Intentions from './intentions' const linterUiDefault = { instances: new Set(), signalRegistry: null, statusBarRegistry: null, activate() { if (!atom.inSpecMode()) { // eslint-disable-next-line global-require require('atom-package-deps').ins...
Enable the new confirmation dialog in latest package-deps
:new: Enable the new confirmation dialog in latest package-deps
JavaScript
mit
AtomLinter/linter-ui-default,steelbrain/linter-ui-default,steelbrain/linter-ui-default
--- +++ @@ -10,7 +10,7 @@ activate() { if (!atom.inSpecMode()) { // eslint-disable-next-line global-require - require('atom-package-deps').install('linter-ui-default') + require('atom-package-deps').install('linter-ui-default', true) } }, deactivate() {
84e07a26ca69f84916ca5d8cd60316d336ad268d
lib/index.js
lib/index.js
var Line = require('./line'); var simplifyGeometry = function(points, tolerance){ var dmax = 0; var index = 0; for (var i = 1; i <= points.length - 2; i++){ d = new Line(points[0], points[points.length - 1]).perpendicularDistance(points[i]); if (d > dmax){ index = i; dmax = d; } } ...
var Line = require('./line'); var simplifyGeometry = function(points, tolerance){ var dmax = 0; var index = 0; for (var i = 1; i <= points.length - 2; i++){ var d = new Line(points[0], points[points.length - 1]).perpendicularDistance(points[i]); if (d > dmax){ index = i; dmax = d; } }...
Fix 'Uncaught ReferenceError: d is not defined'
Fix 'Uncaught ReferenceError: d is not defined'
JavaScript
mit
seabre/simplify-geometry,gronke/simplify-geometry
--- +++ @@ -6,7 +6,7 @@ var index = 0; for (var i = 1; i <= points.length - 2; i++){ - d = new Line(points[0], points[points.length - 1]).perpendicularDistance(points[i]); + var d = new Line(points[0], points[points.length - 1]).perpendicularDistance(points[i]); if (d > dmax){ index = i; ...
c98232fc7b50db1cd4e62ac8991678572376211f
app/assets/javascripts/tax-disc-ab-test.js
app/assets/javascripts/tax-disc-ab-test.js
//= require govuk/multivariate-test /*jslint browser: true, * indent: 2, * white: true */ /*global $, GOVUK */ $(function () { GOVUK.taxDiscBetaPrimary = function () { $('.primary-apply').html($('#beta-primary').html()); $('.secondary-apply').html($('#dvla-secondary').html()); }; if(window.locatio...
//= require govuk/multivariate-test /*jslint browser: true, * indent: 2, * white: true */ /*global $, GOVUK */ $(function () { GOVUK.taxDiscBetaPrimary = function () { $('.primary-apply').html($('#beta-primary').html()); $('.secondary-apply').html($('#dvla-secondary').html()); }; if(window.locatio...
Increase tax disc beta AB to ~100%
Increase tax disc beta AB to ~100% This should mean most users are presented with the beta as the primary option during the August tax disc peak.
JavaScript
mit
alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend
--- +++ @@ -17,8 +17,8 @@ name: 'tax-disc-beta', customVarIndex: 20, cohorts: { - tax_disc_beta_control: { weight: 60, callback: function () { } }, //~60% - tax_disc_beta: { weight: 40, callback: GOVUK.taxDiscBetaPrimary } //~40% + tax_disc_beta_control: { weight: 0, callback...
fe266d13835b0ec76648608cab9004324c5aded4
api/utils/promise-utils.js
api/utils/promise-utils.js
'use strict'; exports.delayed = function delayed(ms, value) { return new Promise(resolve => setTimeout(() => resolve(value), ms)); }; exports.timeoutError = 'timeoutError'; /** * Waits a promise for specified timeout. * * @param {Promise} promiseToWait - promise to wait. * @param {number} ms - timeout in milli...
'use strict'; exports.delayed = function delayed(ms, value) { return new Promise(resolve => setTimeout(() => resolve(value), ms)); }; exports.timeoutError = 'timeoutError'; /** * Waits a promise for specified timeout. * * @param {Promise} promiseToWait - promise to wait. * @param {number} ms - timeout in milli...
Fix for timeout after finish.
Fix for timeout after finish.
JavaScript
mit
Dzenly/tia,Dzenly/tia,Dzenly/tia,Dzenly/tia
--- +++ @@ -17,7 +17,13 @@ exports.wait = function wait(promiseToWait, ms) { let rejectBecauseTimeout = true; return new Promise((resolve, reject) => { + + let timeoutId = null; + promiseToWait.then((result) => { + if (timeoutId) { + clearTimeout(timeoutId); + } rejectBecauseTim...
adf32503c11c443423d861c9c9c7835f3de18631
lib/techs/mock-lang-js.js
lib/techs/mock-lang-js.js
var vfs = require('enb/lib/fs/async-fs'); module.exports = require('enb/lib/build-flow').create() .name('mock-lang-js.js') .target('target', '?.js') .useSourceFilename('source', '?.lang.js') .builder(function (source) { return vfs.read(source, 'utf8') .then(function (content) { ...
var vfs = require('enb/lib/fs/async-fs'); module.exports = require('enb/lib/build-flow').create() .name('mock-lang-js.js') .target('target', '?.js') .useSourceFilename('source', '?.lang.js') .builder(function (source) { return vfs.read(source, 'utf8') .then(function (content) { ...
Append lang mock to the end of file to not make source map being invalid.
Append lang mock to the end of file to not make source map being invalid.
JavaScript
mpl-2.0
enb-bem/enb-bem-tmpl-specs,rndD/enb-bem-tmpl-specs,rndD/enb-bem-tmpl-specs,enb-bem/enb-bem-tmpl-specs
--- +++ @@ -8,19 +8,30 @@ return vfs.read(source, 'utf8') .then(function (content) { var mock = [ - '(function(global, bem_) {', - ' if(bem_.I18N) return;', - ' global.BEM = bem_;', - ' var i18n...
e8a103ff739c4daa6b90efd52dea9630cd3f491b
app/assets/javascripts/welcome.js
app/assets/javascripts/welcome.js
// # Place all the behaviors and hooks related to the matching controller here. // # All this logic will automatically be available in application.js. // # You can use CoffeeScript in this file: http://coffeescript.org/ $(document).ready(function(){ bindSearchBySubmit(); bindSearchByButton(); }) var bindSearchByS...
// # Place all the behaviors and hooks related to the matching controller here. // # All this logic will automatically be available in application.js. // # You can use CoffeeScript in this file: http://coffeescript.org/ $(document).ready(function(){ bindSearchBySubmit(); bindSearchByButton(); }) var bindSearchByS...
Implement search listener on search button
Implement search listener on search button
JavaScript
mit
robertbaker13/write-in-mvp,robertbaker13/write-in-mvp,robertbaker13/write-in-mvp,user512/write-in-mvp,user512/write-in-mvp,user512/write-in-mvp
--- +++ @@ -16,7 +16,7 @@ } var bindSearchByButton = function(){ - $('form.navbar-form').on('.glyphicon-search', function(event){ + $('form.navbar-form').on('click','.glyphicon-search', function(event){ event.preventDefault(); var data = $("#peopleSearchBar").val(); searchServer(data);
368e4a68f473259f0b59c9164ff7815868641cdc
app/components/ConceptDropTarget/index.js
app/components/ConceptDropTarget/index.js
import './index.css'; import React from 'react'; import { DropTarget } from 'react-dnd'; const ConceptDropTarget = ({ connectDropTarget, isOver, canDrop, children }) => connectDropTarget( <div className="ConceptDropTarget"> {isOver ? <div className={['ConceptDropTarget-overlay', !canDrop ? 'ConceptDropTarg...
import './index.css'; import React from 'react'; import { DropTarget } from 'react-dnd'; const ConceptDropTarget = ({ connectDropTarget, isOver, canDrop, children }) => connectDropTarget( <div className="ConceptDropTarget"> {isOver ? <div className={['ConceptDropTarget-overlay', !canDrop ? 'ConceptDropTarg...
Disable creating relations between persons and organizations
Disable creating relations between persons and organizations
JavaScript
mit
transparantnederland/browser,transparantnederland/browser,waagsociety/tnl-relationizer,transparantnederland/relationizer,transparantnederland/relationizer,waagsociety/tnl-relationizer
--- +++ @@ -24,8 +24,11 @@ const item = monitor.getItem(); const sourceConcept = item.concept; const targetConcept = props.concept; + // Don't allow person <-> organization relations until we find a way to + // decouple dates from PITs + const isSameType = (sourceConcept.type === targetConcept...
2f1c22e3c150c57c759d15da40239aec27b16c6e
models/Show.js
models/Show.js
class Show { static get INTERMISSION() { return new Show('Sendepause'); } constructor(title) { this.title = title; } isRunningNow() { return this.startTime.isBefore() && this.endTime.isAfter(); } fixMidnightTime() { if (this.startTime.isAfter(this.endTime)) { // show runs at midnight if (moment...
const moment = require('moment-timezone'); class Show { static get INTERMISSION() { return new Show('Sendepause'); } constructor(title) { this.title = title; } isRunningNow() { return this.startTime.isBefore() && this.endTime.isAfter(); } fixMidnightTime() { if (this.startTime.isAfter(this.endTime))...
Fix "moment is not defined" bug for ard channels
Fix "moment is not defined" bug for ard channels
JavaScript
mit
cemrich/zapp-backend
--- +++ @@ -1,3 +1,5 @@ +const moment = require('moment-timezone'); + class Show { static get INTERMISSION() { @@ -15,7 +17,7 @@ fixMidnightTime() { if (this.startTime.isAfter(this.endTime)) { // show runs at midnight - if (moment().hour() < 12) { + if (moment.tz('Europe/Berlin').hour() < 12) { ...
5dc37ed9c2c20fa8759a69647302feacb674d12f
addon/components/file-renderer/component.js
addon/components/file-renderer/component.js
import Ember from 'ember'; import layout from './template'; import config from 'ember-get-config'; /** * @module ember-osf * @submodule components */ /** * Render the provided url in an iframe via MFR * * Sample usage: * ```handlebars * {{file-renderer * download=model.links.download * width="800" hei...
import Ember from 'ember'; import layout from './template'; import config from 'ember-get-config'; /** * @module ember-osf * @submodule components */ /** * Render the provided url in an iframe via MFR * * Sample usage: * ```handlebars * {{file-renderer * download=model.links.download * width="800" hei...
Add detail to sample usage
Add detail to sample usage
JavaScript
apache-2.0
crcresearch/ember-osf,baylee-d/ember-osf,CenterForOpenScience/ember-osf,chrisseto/ember-osf,jamescdavis/ember-osf,hmoco/ember-osf,binoculars/ember-osf,cwilli34/ember-osf,pattisdr/ember-osf,hmoco/ember-osf,chrisseto/ember-osf,pattisdr/ember-osf,baylee-d/ember-osf,binoculars/ember-osf,crcresearch/ember-osf,CenterForOpenS...
--- +++ @@ -14,7 +14,7 @@ * ```handlebars * {{file-renderer * download=model.links.download - * width="800" height="1000"}} + * width="800" height="1000" allowfullscreen=true}} * ``` * @class file-renderer */