conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix path expansion in assignments\n" }, { "from": "human", "value": "'use strict';\nmodule.exports = options => function * pathExpansion(tokens) {\n\tfor (const token of tokens) {\n\t\tif (token.WORD && typeof options.resolvePath === 'function') {\n\t\t\ttoken.WORD ...
javascript
chosen
[ { "from": "system", "value": "Fix Gulp config due to latest evolutions\n" }, { "from": "human", "value": "/* === PLUGINS === */\nconst gulp = require('gulp'),\n rimraf = require('gulp-rimraf'),\n webpack = require('webpack-stream'),\n sequence = require('run-sequence');\n\n/* === CONFIG...
javascript
chosen
[ { "from": "system", "value": "Add initial value for global.isProd\n" }, { "from": "human", "value": "'use strict';\n\n/*\n * gulpfile.js\n * ===========\n * Rather than manage one giant configuration file responsible\n * for creating multiple tasks, each task has been broken out into\n * its own...
javascript
chosen
[ { "from": "system", "value": "Revert \"add bootstrap and fa\"\n\nThis reverts commit be67b1f22a984c8cee25fda20a50e19d3852a045.\n" }, { "from": "human", "value": "import angular from 'angular';\nimport uiRouter from '@uirouter/angularjs';\nimport AngularMaterials from 'angular-material';\n\n// im...
javascript
chosen
[ { "from": "system", "value": "Revert \"move neXenio to sponsors\"\n\nThis reverts commit 0c8394dc9dc80df085e71560ff97f4b2c90b662f.\n" }, { "from": "human", "value": "const express = require('express');\nconst router = express.Router();\nconst _orderBy = require('lodash').orderBy;\nconst authHelp...
javascript
chosen
[ { "from": "system", "value": "Remove code that wasn't supposed to be there\n" }, { "from": "human", "value": "/**\n * Shared functions used in multiple blueprints\n */\n\n'use strict'\n\nconst Bluebird = require('bluebird')\nconst normalizeEntityName = require('ember-cli-normalize-entity-name')\...
javascript
chosen
[ { "from": "system", "value": ":bug: Move set response type for IE\n" }, { "from": "human", "value": "export default function xhr(url, type = 'json') {\n const p = new Promise((resolve, reject) => {\n const req = new XMLHttpRequest();\n req.addEventListener('load', () => resolve(...
javascript
chosen
[ { "from": "system", "value": "Update deps to add hapi-bookshelf-models\n" }, { "from": "human", "value": "'use strict';\nconst routes = require('./routes');\nconst Registry = require('./registry');\n\nmodule.exports.register = function register(server, options, next) {\n const registry = new Re...
javascript
chosen
[ { "from": "system", "value": "Add projectIds to CA service\n" }, { "from": "human", "value": "import axios from '~/lib/utils/axios_utils';\n\nexport default class CycleAnalyticsService {\n constructor(options) {\n this.axios = axios.create({\n baseURL: options.requestPath,\n });\n }...
javascript
chosen
[ { "from": "system", "value": "Remove ambiguity of desc ordering\n" }, { "from": "human", "value": "// Author: tngan\nconst request = require('superagent');\nconst path = require('path');\nconst url = require('url');\n\nconst DOMAIN = 'https://api.stackexchange.com';\nconst API_VERSION = '2.2';\n...
javascript
chosen
[ { "from": "system", "value": "Add props to section heading\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\n\nexport default class SectionHeading extends PureComponent {\n render() {\n return (\n <div>\n <h1 className=\"type-title inline\">Proyect...
javascript
chosen
[ { "from": "system", "value": "Fix eslint & jscs errors (ignore generated files in test folders)\n" }, { "from": "human", "value": "'use strict';\n\nconst gulp = require('gulp');\nconst tools = require('./src');\n\nconst unmockedModulePathPatterns = [\n 'node_modules/.*',\n 'utils/helper-tests....
javascript
chosen
[ { "from": "system", "value": "Add deep-equal to reduce component render rate\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport {\n View\n} from 'react-native';\n\nclass Page extends Component{\n shouldComponentUpdate(nextProps){\n return nextPro...
javascript
chosen
[ { "from": "system", "value": "Use BrowserRouter rather than HashRouter\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport { combineReducers } from 'redux';\nimport { Provider } from 'react-redux';\nimport { Grid, Row, Col } from 'react-bootstrap';\nim...
javascript
chosen
[ { "from": "system", "value": "Fix 2138 Require Firefox 50, since we were previously requiring 49 (1.04% of our users) but 49 had a bug.\n" }, { "from": "human", "value": "const defaultConfig = {\n isDev: true,\n minFirefoxVersion: 49,\n experimentsURL: '/api/experiments.json',\n usageCountsU...
javascript
chosen
[ { "from": "system", "value": "Use closed rescue in unit test in order to test access control\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = {\n randomRescue: function () {\n let randomName = (Date.now() - parseInt((Math.random() * Math.random()) * 1000000)).toString(36)\...
javascript
chosen
[ { "from": "system", "value": "Make modules accessible in gameLoop." }, { "from": "human", "value": ";(function(exports) {\n var Coquette = function(game, canvasId, width, height, backgroundColor, autoFocus) {\n this.renderer = new Coquette.Renderer(this, game, canvasId, width,height, backgro...
javascript
chosen
[ { "from": "system", "value": "Increase timeout from 1000 ms to 3000 when requesting ELIQ API\n" }, { "from": "human", "value": "var RSVP = require('rsvp'),\n request = require('request'),\n date = require('./date');\n\nmodule.exports = function (config) {\n 'use strict';\n var eliqUr...
javascript
chosen
[ { "from": "system", "value": "Add gulp.watch task to recompile when js files are saved\n" }, { "from": "human", "value": "var gulp = require(\"gulp\");\nvar sourcemaps = require(\"gulp-sourcemaps\");\nvar babel = require(\"gulp-babel\");\nvar concat = require(\"gulp-concat\");\n\ngulp.task(\"com...
javascript
chosen
[ { "from": "system", "value": "Remove some comments leftover from tutorial\n" }, { "from": "human", "value": "/**\n* Gulpfile to make my life easier.\n*/\n\nvar gulp = require('gulp');\nvar browserify = require('browserify');\nvar gutil = require('gulp-util');\nvar source = require('vinyl-source-...
javascript
chosen
[ { "from": "system", "value": "chore(gulp): Build before watching in default task\n" }, { "from": "human", "value": "'use strict'\n\nvar gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar sass = require('gulp-sass');\n\ngulp.task('sass', function () {\n return gulp.src('./scss/st...
javascript
chosen
[ { "from": "system", "value": "Remove testing from gulp watch\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar util = require('gulp-util');\nvar wait = require('gulp-wait');\nvar runSequence = require('run-sequence');\nvar ...
javascript
chosen
[ { "from": "system", "value": "fix(changed): Clarify early exit log message\n" }, { "from": "human", "value": "\"use strict\";\n\nconst chalk = require(\"chalk\");\n\nconst Command = require(\"@lerna/command\");\nconst collectUpdates = require(\"@lerna/collect-updates\");\nconst output = require(...
javascript
chosen
[ { "from": "system", "value": "Add .d.ts comments to flow\n" }, { "from": "human", "value": "// @flow strict\n\nimport devAssert from '../jsutils/devAssert';\n\nimport { type SourceLocation } from '../language/location';\n\nimport { type GraphQLError } from './GraphQLError';\n\n/**\n * Given a Gr...
javascript
chosen
[ { "from": "system", "value": "feat: Check that currentIndex is in indices list\n" }, { "from": "human", "value": "var React = require('react');\n\nvar utils = require('../../lib/widgetUtils.js');\n\nfunction indexSelector({container = null, indices = null}) {\n var IndexSelector = require('../....
javascript
chosen
[ { "from": "system", "value": "Update webpack to not minifiy class names.\n" }, { "from": "human", "value": "const nodeExternals = require('webpack-node-externals');\nconst NodemonPlugin = require('nodemon-webpack-plugin');\n\nmodule.exports = {\n\tmode: process.env.NODE_ENV || 'production',\n\tt...
javascript
chosen
[ { "from": "system", "value": "Add definition to webpack to obfuscate NODE_ENV\n" }, { "from": "human", "value": "var webpack = require('webpack')\nvar path = require('path')\n\nvar conf = {\n resolve: {\n extensions: [ '', '.js' ]\n },\n plugins: [],\n module: {\n loaders: [\n {\n...
javascript
chosen
[ { "from": "system", "value": "ESLint: Add more files to \"node files\" category\n" }, { "from": "human", "value": "module.exports = {\n root: true,\n parserOptions: {\n ecmaVersion: 2017,\n sourceType: 'module'\n },\n plugins: [\n 'ember'\n ],\n extends: [\n 'eslint:recommended...
javascript
chosen
[ { "from": "system", "value": "Raise error in case a module is not passed\n" }, { "from": "human", "value": "var math = require('funkit').math;\nvar is = require('annois');\nvar Render = require('tap-render');\n\nvar generators;\n\n\nfunction fuzz(fn, inv, amount) {\n amount = fuzz._amount || ...
javascript
chosen
[ { "from": "system", "value": "Add pull request in wide page\n" }, { "from": "human", "value": "// Import the page-mod API\nvar pageMod = require(\"sdk/page-mod\");\n\n// Create a page mod\n// It will run a script whenever a \".org\" URL is loaded\n// The script replaces the page contents with a ...
javascript
chosen
[ { "from": "system", "value": "Fix bug when unloading/disabling add-on\n\nBug reported by umage: Trying to unload/disable the add-on with one of its windows still open would freeze Firefox and render it unable to quit other than by killing the process. Now, we preemptively close all our windows on unload.\n"...
javascript
chosen
[ { "from": "system", "value": "Fix scanning page for phone numbers after reload/restart.\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n window.widgets = {};\n\n $(function() {\n var defaults = {\n platformUrl: 'https://partner.voipgrid.nl/',\n ...
javascript
chosen
[ { "from": "system", "value": "Remove db data from vue instance\n" }, { "from": "human", "value": "import Vue from 'vue'\nimport VueFire from 'vuefire'\nimport App from './App'\nimport db from './firebaseDatabase'\n\nimport 'jquery-ui/jquery-ui.min.js'\n\nimport imagesLoaded from 'imagesloaded'\n...
javascript
chosen
[ { "from": "system", "value": "Use the new API for jsdom\n" }, { "from": "human", "value": "/**\n * @fileoverview Setup a virtual DOM for testing in NodeJS.\n */\nimport { jsdom } from 'jsdom';\n\n\n// React needs these.\nglobal.document = jsdom('');\nglobal.window = document.defaultView;\nglobal...
javascript
chosen
[ { "from": "system", "value": "Convert invalid hyphens to underscores for Android\n" }, { "from": "human", "value": "// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved\n// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license\n\nconst _ = require(\"lodash\");\n...
javascript
chosen
[ { "from": "system", "value": "Add base API implementation stubs\n" }, { "from": "human", "value": "'use strict';\n\n" }, { "from": "gpt", "value": "'use strict';\n\nvar _baseUrl = 'http://igdb.com/api/v1/games/',\n _token = null;\n\nfunction _getCompanyGames(companyIdentifier) {\n...
javascript
chosen
[ { "from": "system", "value": "Hide password reset instruction alert after 3 seconds\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport ajax from 'ic-ajax';\n\nexport default Ember.Controller.extend({\n needs: 'application',\n auth_token: Ember.computed.alias('controllers.app...
javascript
chosen
[ { "from": "system", "value": "Store piece start location in Move constructor\n" }, { "from": "human", "value": "var _ = require('lodash');\nvar np = require('named-parameters');\n\nmodule.exports = function(args) {\n var parsedArgs = np.parse(args).\n require('name', 'string').\n require(...
javascript
chosen
[ { "from": "system", "value": "Handle errors while finding random video in the API 👻" }, { "from": "human", "value": "const express = require('express')\nconst path = require('path')\nconst findRandomVideo = require('./findRandomVideo')\n\nconst port = process.env.PORT || 3001\nconst app = expre...
javascript
chosen
[ { "from": "system", "value": "Add ∞ for infinite duration\n" }, { "from": "human", "value": "export const formatBytes = (bytes) => {\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n if (!bytes) {\n return null;\n }\n\n const k = 1000;\n const dm = 2;\n const sizes = ['Bytes', 'KB', ...
javascript
chosen
[ { "from": "system", "value": "Fix various bugs in the IndexedCache.\n" }, { "from": "human", "value": "'use strict';\n\nfunction IndexedCache(getFunc) {\n this.items = {};\n this.getFunc = getFunc;\n}\n\nIndexedCache.prototype.get = function(index, callback) {\n var item = this.items[index];\...
javascript
chosen
[ { "from": "system", "value": "Change channels from state to variable\n" }, { "from": "human", "value": "import React, {Component} from 'react';\nimport {connect} from 'react-redux';\nimport {Switch, Route} from 'react-router-dom';\nimport {bindActionCreators} from 'redux';\nimport Channels from ...
javascript
chosen
[ { "from": "system", "value": "Make filter input font-size consistent with typeaheads\n" }, { "from": "human", "value": "import styled from 'styled-components'\nimport { FONT_SIZE } from '@govuk-react/constants'\nimport { FOCUS_COLOUR, BLACK } from 'govuk-colours'\n\nimport RoutedInput from '../R...
javascript
chosen
[ { "from": "system", "value": "Add logic to retry github uploads\n\nWhen doing release, sometimes the GitHub upload fails, so try to retry it once before bailing.\n" }, { "from": "human", "value": "const GitHub = require('github')\nconst github = new GitHub()\ngithub.authenticate({type: 'token', ...
javascript
chosen
[ { "from": "system", "value": "Update frontpage build trigger to master\n" }, { "from": "human", "value": "#!/usr/bin/env node\n/* eslint-disable no-console */\n\nconst fetch = require('node-fetch');\n\nconst { CIRCLE_BRANCH, FRONTPAGE_WEBHOOK } = process.env;\n\nconsole.log('build-frontpage');\n...
javascript
chosen
[ { "from": "system", "value": "Add basic validation of commands in dispatch\n" }, { "from": "human", "value": "const { next } = require('hooter/effects')\n\nmodule.exports = function executionPlugin(lifecycle) {\n lifecycle.hookBefore('dispatch', function* (commands) {\n if (!Array.isArray(co...
javascript
chosen
[ { "from": "system", "value": "feat: Add method for user settings service that returns time periods\n\nPeeks into database, then creates object with all time periods based on user set monthBegins day" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Service.exten...
javascript
chosen
[ { "from": "system", "value": ":chart_with_upwards_trend: UPDATE JSON AT 五 2月 17 15:43:00 CST 2017\n" }, { "from": "human", "value": "var CronJob = require('cron').CronJob;\nvar exec = require('child_process').exec;\nvar buildAwesome = 'npm run awesome';\nvar buildAllRepo = 'npm run build';\nvar...
javascript
chosen
[ { "from": "system", "value": "Add tooltip to the latest ptf chart.\n" }, { "from": "human", "value": "/*global jQuery, google */\n\n(function ($, g) {\n 'use strict';\n\n g.load('visualization', '1', {\n packages: ['corechart'],\n callback: function () {\n var opti...
javascript
chosen
[ { "from": "system", "value": "Allow edit type for password fields\n" }, { "from": "human", "value": "/*eslint-disable no-unused-vars */\nimport React from \"react\";\n/*eslint-enable no-unused-vars */\n\nimport FieldInput from \"./FieldInput\";\n\nconst DEFAULT_PASSWORD_TEXT = \"default\";\n\nco...
javascript
chosen
[ { "from": "system", "value": "Make sure that the select queries return records otherwise, bail\n" }, { "from": "human", "value": "'use strict';\n\nexports.up = function (knex, Promise) {\n return knex('publishedProjects')\n .whereNull('date_created')\n .orWhereNull('date_updated')\n .select(...
javascript
chosen
[ { "from": "system", "value": "Add exclude option for medium zoom\n\n" }, { "from": "human", "value": "import mediumZoom from 'medium-zoom';\n\nexport default function () {\n return mediumZoom('.container img', {\n margin: 24,\n scrollOffset: 120,\n });\n}\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Revert \"Temporarily added an intentional failure to for the iPad UIAutomation script.\"\n\nThis reverts commit 1a81648ff54391d3836379d9d1e4f1574d89659f.\n" }, { "from": "human", "value": "#import \"tuneup_js/tuneup.js\"\n#import \"uiautomationHelpers.js\"\n\n// NOT...
javascript
chosen
[ { "from": "system", "value": "Add tests for components and assert promise rejection\n" }, { "from": "human", "value": "const path = require('path');\nconst test = require('ava');\nconst findModule = require('../lib/find_module');\n\nconst dir = path.join(__dirname, '..', 'testdata');\n\nconst ru...
javascript
chosen
[ { "from": "system", "value": "Reorganize the SurveyModel using Prototype instead of closure.\n" }, { "from": "human", "value": "var Survey = function() {\n\tvar surveys = [];\n\treturn {\n\t\tfetch : function() {\n\t\t\tvar url = Ti.App.Properties.getString('server_url') + '/api/mobile/surveys';...
javascript
chosen
[ { "from": "system", "value": "Load actions from correct path\n" }, { "from": "human", "value": "import { connect } from 'react-redux'\n\nimport { \n addTableRow, \n editTableRow, \n saveTableRow \n} from '../actions'\n\nimport InventoryTable from '../Components/InventoryTable'\n\nconst getMal...
javascript
chosen
[ { "from": "system", "value": "Handle VideoDetail when the video is empty.\n" }, { "from": "human", "value": "import React from 'react';\n\nconst VideoDetail = ({video}) => {\n const videoId = video.id.videoId;\n const url = `https://www.youtube.com/embed/${videoId}`;\n\n return (\n <div cl...
javascript
chosen
[ { "from": "system", "value": "Animation: Attach Aside to element with ng-scope\n\nngAnimate won't run correctly unless it's attached to an ng-scope.\nPreviously I was attaching to body which isn't scoped.\n" }, { "from": "human", "value": "/* global define */\n(function() {\n 'use strict';\n ...
javascript
chosen
[ { "from": "system", "value": "Fix Codding style in subtitle server.js\n" }, { "from": "human", "value": "var server;\nvar httpServer;\nvar PORT = 9999;\nvar subData = '';\nvar http = require('http');\nvar iconv = require('iconv-lite');\n\nserver = http.createServer(function (req, res) {\n if ...
javascript
chosen
[ { "from": "system", "value": "FIX move service injection to function directive\n" }, { "from": "human", "value": "(function($, pm) {\n\n pm.directive('[data-plenty-checkout-form=\"customerLogin\"]', function(i, elem, AuthenticationService) {\n $(elem).on('submit', function () {\n ...
javascript
chosen
[ { "from": "system", "value": "Use arrow function in debounce mock\n\nIn arrow functions, 'this' defaults to the enclosing scope.\nSee https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#this_and_Arrow_Functions\n" }, { "from": "human", "value": "export con...
javascript
chosen
[ { "from": "system", "value": "Add styles to dropdown component\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport { getChannels, setChannel } from '../../actions/index';\n\nclas...
javascript
chosen
[ { "from": "system", "value": "Remove hard code of date while testing\n" }, { "from": "human", "value": "import ATV from 'atvjs';\n\nimport template from './template.hbs';\n\nlet Page = ATV.Page.create({\n\tname: 'list-games',\n template: template,\n ready(options, resolve, reject) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add repeats to items that should be checked for child elements\n" }, { "from": "human", "value": "Question = function(questionData)\n{\n this.name = questionData.name;\n this.type = questionData.type;\n this.label = questionData.label;\n}\n\nQuestion.protot...
javascript
chosen
[ { "from": "system", "value": "Fix undefined telescope on createUser\n" }, { "from": "human", "value": "Accounts.onCreateUser(function(options, user){\n user = Telescope.callbacks.run(\"onCreateUser\", user, options);\n // get facebook profile picture\n if (options.profile) {\n if(user....
javascript
chosen
[ { "from": "system", "value": "Increase chrome driver start timeout\n" }, { "from": "human", "value": "import test from 'ava';\nimport electronPath from 'electron';\nimport { Application } from 'spectron';\nimport path from 'path';\n\nconst appPath = path.join(__dirname, '..');\n\ntest.beforeEach...
javascript
chosen
[ { "from": "system", "value": "Remove accidentally left console log from previous commit.\n" }, { "from": "human", "value": "module.exports = function($, window, errorHandler) {\n var Multigraph = require('../../core/multigraph.js')($),\n Point = require('../../math/point.js');\n\n i...
javascript
chosen
[ { "from": "system", "value": "Fix calling afterCommand function in ClipBoard.js\n" }, { "from": "human", "value": "import lists from '../core/lists';\n\nexport default class Clipboard {\n constructor(context) {\n this.context = context;\n this.$editable = context.layoutInfo.editable;\n }...
javascript
chosen
[ { "from": "system", "value": "Fix invalid reference to fileNameFromKey\n" }, { "from": "human", "value": "var utils = require('./utils');\n\nfunction StorageHandler (updateFiles) {\n\n this.sync = function () {\n\n if (typeof chrome === 'undefined' || !chrome || !chrome.storage || !chrome.st...
javascript
chosen
[ { "from": "system", "value": "Change bullet render to rely on GU\n" }, { "from": "human", "value": "function Bullet() {\n}\n\n\nbullet.prototype.init = function(x, y, dx, dy){\n this.x = x;\n this.y = y;\n this.dx = dx;\n this.dy = dy;\n}\n\nbullet.prototype.update = function(){\n this.x +=...
javascript
chosen
[ { "from": "system", "value": "Update docs after building Travis build 2447 of\nregro/regolith\n\nThe docs were built from the branch 'master' against the commit\n7428f7caf80c0154fc4046c7283ce44cdf4acf8d.\n\nThe Travis build that generated this commit is at\nhttps://app.travis-ci.com/regro/regolith/jobs/5482...
javascript
chosen
[ { "from": "system", "value": "Add new endpoint for refresh token\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nimport config from '../config/environment';\nimport OAuth2PasswordGrantAuthenticator from 'ember-simple-auth/authenticators/oauth2-password-grant';\n\nexport default ...
javascript
chosen
[ { "from": "system", "value": "Fix issue with failing tests\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n model: function(params) {\n return this.store.queryRecord('slugged-route', {\n slug: params.sluggedRouteSlug\n });\n }\n}...
javascript
chosen
[ { "from": "system", "value": "Switch example back to non-relay mode\n" }, { "from": "human", "value": "import path from 'path'\nimport fs from 'fs'\nimport express from 'express'\nimport graphqlHTTP from 'express-graphql'\nimport { buildSchema } from '../src/index'\nimport { connect } from '../s...
javascript
chosen
[ { "from": "system", "value": "Fix date format em nome do senhor." }, { "from": "human", "value": "var locastyle = locastyle || {};\n\nlocastyle.datepicker = (function() {\n 'use strict';\n\n var config = {\n selector: '.datepicker'\n };\n\n function init() {\n $(config.selector).each(f...
javascript
chosen
[ { "from": "system", "value": "Store fileReader in the module, not component instance\n" }, { "from": "human", "value": "import React from 'react';\nimport { processLicense } from 'processor';\n\nexport default class FileHandler extends React.Component {\n render() {\n return (\n <input\...
javascript
chosen
[ { "from": "system", "value": "Send iframe and img times separately\n" }, { "from": "human", "value": "{{template \"header.js\" .}}\nCensorshipMeter.measure = function() {\n var iframe = $('<iframe />');\n iframe.attr('width', 0);\n iframe.attr('height', 0);\n iframe.attr('src', '{{.iframeUrl...
javascript
chosen
[ { "from": "system", "value": "Use admin user for admin challenges\n" }, { "from": "human", "value": "const config = require('config')\n\ndescribe('/#/administration', () => {\n describe('challenge \"adminSection\"', () => {\n it('should be possible to access administration section even when ...
javascript
chosen
[ { "from": "system", "value": "Update logic solver to not use deprecated and removed API\n\n" }, { "from": "human", "value": "Package.describe({\n summary: \"General satisfiability solver for logic problems\",\n version: '2.0.7'\n});\n\nPackage.on_use(function (api) {\n api.export('Logic');\n ...
javascript
chosen
[ { "from": "system", "value": "Fix library folders not refreshing\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\nimport Icon from 'react-fontawesome';\n\nimport classnames from 'classnames';\n\nimport AppActions from '../../actions/AppActions';\n\n/*\n|---------...
javascript
chosen
[ { "from": "system", "value": "Fix a problem that prevents firefox users from adding a new site." }, { "from": "human", "value": "// ------------------------\n// Slug Validation\n// ------------------------\n\nrequire(['jquery'], function($) {\n\n\t/* FIXME EVDB check this is the best way to do t...
javascript
chosen
[ { "from": "system", "value": "Allow for file watching with gulp.\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar uglify = require('gulp-uglify');\nvar coffee = require('gulp-coffee');\nvar rename = require('gulp-rename');\n\ngulp.task('default', function() {\n gulp.src('src/...
javascript
chosen
[ { "from": "system", "value": "Refactor to use axios instead of fetch\n" }, { "from": "human", "value": "require('isomorphic-fetch')\nconst qs = require('querystring')\n\n// let params = {\n// t: 'la la land',\n// type: 'movie',\n// tomatoes: 'true'\n// }\nlet params = {\n t: 'passengers',...
javascript
chosen
[ { "from": "system", "value": "Fix versioning of CSS and JS.\n\nElixir requires all versioned files to be mentioned in one single version call, otherwise they don't version properly.\n" }, { "from": "human", "value": "const elixir = require('laravel-elixir');\n\nrequire('laravel-elixir-vue-2');\n...
javascript
chosen
[ { "from": "system", "value": "Save compressed files to a different directory\n" }, { "from": "human", "value": "var gulp = require('gulp')\n , concat = require('gulp-concat')\n , uglify = require('gulp-uglify');\n\ngulp.task('compress-css', function () {\n gulp.src([\n \"public/css/leaflet...
javascript
chosen
[ { "from": "system", "value": "Add tests to JSHint checks, make sure JSHint won't freak out\n" }, { "from": "human", "value": "const\n gulp = require(\"gulp\"),\n util = require(\"gulp-util\"),\n jshint = require(\"gulp-jshint\"),\n mocha = require(\"gulp-mocha\");\n\ngulp.task(\...
javascript
chosen
[ { "from": "system", "value": "Update cleanup script to use fs-extra methods\n" }, { "from": "human", "value": "/* global config, fs, module, project, require */\n\nmodule.exports = function(grunt) {\n\tgrunt.registerTask('cleanup', function() {\n\t\t// Remove temporary files\n\t\tfs.emptyDirSync...
javascript
chosen
[ { "from": "system", "value": "Fix log spam for mute/unmute\n" }, { "from": "human", "value": "module.exports = function (bot) {\n bot.on('modMute', function (data) {\n if (config.verboseLogging) {\n console.log('[EVENT] modMute ', JSON.stringify(data, null, 2));\n }\n...
javascript
chosen
[ { "from": "system", "value": "Remove commented out core footer\n\nNo clear solution, investigate why it’s needed before fixing\n" }, { "from": "human", "value": "var fs = require('fs');\n\nvar bundles = {\n 'core': {\n options: {\n banner: fs.readFileSync('./grunt/templates/version_head...
javascript
chosen
[ { "from": "system", "value": "Fix for reference line point projection\n" }, { "from": "human", "value": "var cornerstoneTools = (function ($, cornerstone, cornerstoneTools) {\n\n \"use strict\";\n\n if(cornerstoneTools === undefined) {\n cornerstoneTools = {};\n }\n if(corners...
javascript
chosen
[ { "from": "system", "value": "Update cross-site AJAX suite to include HTTPS test\n" }, { "from": "human", "value": "describe(\"ajax cross domain test\",\n{\n\ttwitter_as_async:function(callback)\n\t{\n\t\tvar timer = 0;\n\t\t\n\t\t$.ajax({\n\t\t\ttype:'GET',\n\t\t\tdataType:'json',\n\t\t\turl:'h...
javascript
chosen
[ { "from": "system", "value": "Fix test detection for testSuite HTML runner\n\nThis is a forgotten backport that should have belonged to\nef0e7e49ac95f9b22cbdb9214d3032a69f23c720.\n" }, { "from": "human", "value": "window.onload = function() {\n var framework = scala.scalajs.test.JasmineTestFram...
javascript
chosen
[ { "from": "system", "value": "Refactor Transaction to allow for async\n" }, { "from": "human", "value": "//= require ./core\n//= require_self\n\n(function () {\n\n\t\"use strict\";\n\n\tMarbles.Transaction = {\n\t\ttransaction: function (operationFn) {\n\t\t\tvar tmp = Object.create(this);\n\n\t...
javascript
chosen
[ { "from": "system", "value": "Add a guard clause to ResponseNewWindow\n" }, { "from": "human", "value": "function ResponsesNewWindow(surveyID) {\n try {\n var ResponsesIndexView = require('ui/common/responses/ResponsesIndexView');\n var ResponsesNewView = require('ui/common/responses/Response...
javascript
chosen
[ { "from": "system", "value": "Remove artifacts from transpilation of ts -> js in config.\n" }, { "from": "human", "value": "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// A real test configuration\n// @todo: consider reading from env vars\nexports.server = ...
javascript
chosen
[ { "from": "system", "value": "Use nick matching for ignore module\n" }, { "from": "human", "value": "const calmer = require(\"../lib/calmer\");\n\nmodule.exports = (config, bot) => {\n const ignoreNicks = config.ignoreNicks || [];\n const calm = calmer(config.rate, config.burst);\n\n bot.help...
javascript
chosen
[ { "from": "system", "value": "Add selection to persisted state for subject viewer\n" }, { "from": "human", "value": "var state = require(\"lib/state\"),\n User = zooniverse.models.User;\n\nmodule.exports = {\n tool_chain: {\n settings : {\n project: function() { return state.get('proje...
javascript
chosen
[ { "from": "system", "value": "Add JavaScript minification to the build task.\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n\n\tgrunt.initConfig({\n\n\t\tpkg: grunt.file.readJSON('package.json'),\n\n\t\tclean: {\n\t\t\tbuild: {\n\t\t\t\tsrc: \"build\"\n\t\t\t}\n\t\t},\n\...
javascript
chosen
[ { "from": "system", "value": "Exclude bower_components/ from watch task\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n grunt.initConfig({\n sass: {\n dist: {\n files: {\n 'sass/main.css': 'sass/main.scss'\n },\n options: {\n ...
javascript
chosen
[ { "from": "system", "value": "Set i18n task target folder\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n\t// load all grunt tasks matching the `grunt-*` pattern\n\trequire('load-grunt-tasks')(grunt);\n\n\tgrunt.initConfig({\n\t\tmakepot: {\n\t\t\ttarget: {\n\t\t\t\topti...
javascript
chosen