conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix stale function reference when calling context menu handler\n\nUpon mounting, ContextMenuInterceptor retained the onWillShowContextMenu\nprop as a direct function reference; when updating the component with\na new onWillShowContextMenu, the retained function was not updated....
javascript
chosen
[ { "from": "system", "value": "Hide release notes if not found\n" }, { "from": "human", "value": "import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport styled from \"styled-components\";\nimport Dialog from \"./Dialog.js\";\n\nclass ReleaseNotes extends Compon...
javascript
chosen
[ { "from": "system", "value": "Add update to period schedule methods\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport Realm from 'realm';\n\nexport class PeriodSchedule extends Realm.Object {}\n\nexport default PeriodSchedule;\n\nPe...
javascript
chosen
[ { "from": "system", "value": "Add user messages to errors\n" }, { "from": "human", "value": "import http from 'http';\nimport _ from 'lodash';\n\n// This reponder is assuming that all <500 errors are safe to be responded\n// with their .message attribute.\n// DO NOT write sensitive data into err...
javascript
chosen
[ { "from": "system", "value": "Set global object to the parent of the current frame when inside a FIF\n\nThis fixes a problem with Same-origin security policy when analytics\nis loaded inside another iframe.\n\nThe error:\nDOMException: Blocked a frame with origin \"http://www.<domain>.com\" from accessing a...
javascript
chosen
[ { "from": "system", "value": "Add \"parent\" field to track topic ids\n" }, { "from": "human", "value": "// NNTP article\n//\n\n'use strict';\n\n\nconst Mongoose = require('mongoose');\nconst Schema = Mongoose.Schema;\n\n\nmodule.exports = function (N, collectionName) {\n\n let Article = new ...
javascript
chosen
[ { "from": "system", "value": "transloadit: Fix sending fields to an assembly\n\nPreviously this was sending a `fields` field, but that's not how it\nworks. Instead we should send separate form fields for each field.\n\nThanks @Acconut!\n" }, { "from": "human", "value": "/**\n * A Barebones HTTP ...
javascript
chosen
[ { "from": "system", "value": "Remove useless deps from latestService.\n" }, { "from": "human", "value": "\"use strict\";\r\n\r\n(function () {\r\n angular\r\n .module(\"conpa\")\r\n .factory(\"latestService\", latestService);\r\n\r\n latestService.$inject = [\"$http\", \"$q\"...
javascript
chosen
[ { "from": "system", "value": "Use different prop in test to prevent prop type warning\n" }, { "from": "human", "value": "import React from 'react'; // eslint-disable-line no-unused-vars\nimport { shallow } from 'enzyme';\n\nimport Button from '../Button';\nimport Icon from '../Icon';\n\ndescribe...
javascript
chosen
[ { "from": "system", "value": "Revert auth change made by @JavascriptFTW\n" }, { "from": "human", "value": "var CJS = require(\"../backend/contest_judging_sys.js\");\n\nlet fbAuth = CJS.fetchFirebaseAuth();\n\nvar createEntryHolder = function(entryData) {\n return $(\"<h5>\").addClass(\"center...
javascript
chosen
[ { "from": "system", "value": "Remove the scope and use the closure\n" }, { "from": "human", "value": "import { enqueueRender } from './component';\n\nexport let i = 0;\n\n/**\n *\n * @param {any} defaultValue\n */\nexport function createContext(defaultValue) {\n\tconst ctx = {};\n\n\tconst conte...
javascript
chosen
[ { "from": "system", "value": "Add tests for 'invalid' values\n" }, { "from": "human", "value": "import { formatNumber } from '../../../helpers/format-number';\nimport { module, test } from 'qunit';\n\nmodule('Unit | Helper | format number');\n\ntest('it renders 7884486213 as 7.3GB', function (as...
javascript
chosen
[ { "from": "system", "value": "Add contributing author to article query\n" }, { "from": "human", "value": "export default `\n id\n title\n search_title\n social_title\n description\n search_description\n social_description\n thumbnail_image\n thumbnail_title\n social_image\n published_...
javascript
chosen
[ { "from": "system", "value": "Fix for browser type checking when undefined or null\n\nWhen a browser called getType on an undefined or null value it returns\n“DOMWindow” instead of “[object Undefined]” (in some cases at least).\nLet’s treat undefined and null special and simply return them as\n“undefined” a...
javascript
chosen
[ { "from": "system", "value": "Allow fast access to about:config\n" }, { "from": "human", "value": "pref(\"browser.dom.window.dump.enabled\", true);\npref(\"browser.sessionstore.resume_from_crash\", false);\npref(\"layout.debug.enable_data_xbl\", true);\npref(\"dom.max_chrome_script_run_time\", 0...
javascript
chosen
[ { "from": "system", "value": "Tweak argument names for getConfig.\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\nvar existsSync = require('exists-sync');\nvar chalk = require('chalk');\n\nfunction buildDefaultConfig(ui) {\n ui.log(chalk.yellow('\\nember-cli-tem...
javascript
chosen
[ { "from": "system", "value": "Make the comment be concise\n" }, { "from": "human", "value": "//Require Module\nvar log4js = require('log4js');\nvar logger = log4js.getLogger('Logging');\n\nfunction excuteMySQLQuery (db,query,callback){\n\n /**\n * Receive the database connection, query an...
javascript
chosen
[ { "from": "system", "value": "Remove last argument to addEventListener\n" }, { "from": "human", "value": "var main = document.getElementById(\"main\");\n\nmain.addEventListener(\"click\", function(event) {\n console.log(\"event triggered on: \", event.target);\n}, false);\n" }, { "from"...
javascript
chosen
[ { "from": "system", "value": "Configure webpack to use root folder for static path\n" }, { "from": "human", "value": "// see http://vuejs-templates.github.io/webpack for documentation.\nvar path = require('path')\n\nmodule.exports = {\n build: {\n env: require('./prod.env'),\n index: path...
javascript
chosen
[ { "from": "system", "value": "Add test for value() method\n" }, { "from": "human", "value": "// These tests are run with two different test runners which work a bit\n// differently. Runners are Testem and Karma. Read more about them in\n// CONTRIBUTING.md\n// Supporting both has lead to some com...
javascript
chosen
[ { "from": "system", "value": "Remove enabled flag in production\n" }, { "from": "human", "value": "/* eslint-env node */\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'dummy',\n podModulePrefix: 'dummy/pods',\n environment,\n rootURL: '/',\...
javascript
chosen
[ { "from": "system", "value": "Remove Useless Logs and Add Error Handler\n" }, { "from": "human", "value": "module.exports = function (app) {\n var ACL = app.models.ACL\n\tvar accessControls = [\n\t\t{\n\t\t\tmodel: 'AccessToken',\n\t\t\taccessType: '*',\n\t\t\tprincipalType: 'ROLE',\n\t\t\tprin...
javascript
chosen
[ { "from": "system", "value": "Fix bug with google account refresh\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('homepageApp')\n .controller('MainCtrl', function ($scope, $http, xmlFilter, Storage, Google, Gmail) {\n $scope.calendars = [\n {src:'thibault.david@gmail...
javascript
chosen
[ { "from": "system", "value": "Throw error when site key is not defined\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('noCAPTCHA', [])\n .provider('noCAPTCHA', function NoCaptchaProvider() {\n var siteKey,\n theme;\n\n this.setSiteKey = function(_siteKey){\n ...
javascript
chosen
[ { "from": "system", "value": "Fix globals case in UMD\n" }, { "from": "human", "value": "/*globals define */\n'use strict';\n\nvar root = this; // jshint ignore:line\n\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n define(['es6-promise'], function (es6Prom...
javascript
chosen
[ { "from": "system", "value": "Set the home page as default\n" }, { "from": "human", "value": "function rebuildTOC() {\n\tvar ToC =\n\t\t\"<div class='table-of-contents'>\" +\n\t\t\"<h2>On this page:</h2>\" +\n\t\t\"<ul>\";\n\tvar newLine, el, title, link;\n\t$(\"#content h1\").each(function() {\...
javascript
chosen
[ { "from": "system", "value": "Add check for `creep.my` in `isPlayerHazard`\n" }, { "from": "human", "value": "'use strict'\n\nRoom.prototype.getPlayerHostiles = function () {\n if (!this.__playerHostiles) {\n const hostiles = this.find(FIND_HOSTILE_CREEPS)\n this.__playerHostiles = _.filt...
javascript
chosen
[ { "from": "system", "value": "CB-6465: Add license headers to Tizen code\n" }, { "from": "human", "value": "module.exports = {\n vibrate: function(milliseconds) {\n if (navigator.vibrate) {\n navigator.vibrate(milliseconds);\n }\n }\n};\n\nrequire(\"cordova/tizen/c...
javascript
chosen
[ { "from": "system", "value": "Fix my problems after realizing that arrays do not automatically get\ncopied\n" }, { "from": "human", "value": "var SudokuBoard = {\n defaultSetup: [\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n ...
javascript
chosen
[ { "from": "system", "value": "Mark internal/technical tasks with an _\n" }, { "from": "human", "value": "/* === PLUGINS === */\nconst gulp = require('gulp'),\n rimraf = require('gulp-rimraf'),\n webpack = require('webpack-stream'),\n path = require('path'),\n sequence = require('run-...
javascript
chosen
[ { "from": "system", "value": "Add check if updates to not exist for a certain trigger\n" }, { "from": "human", "value": "'use strict'\n\nconst getNode = require('./getNode')\nconst err = require('./err')\n\nrequire('setimmediate')\n\nmodule.exports = (db, path) => {\n\n let fns = db.updates.fns...
javascript
chosen
[ { "from": "system", "value": "Add an error check to make sure we have the authentication URL parameter\n" }, { "from": "human", "value": "var _ = require('underscore'),\nunderscoreDeepExtend = require('underscore-deep-extend'),\nasync = require('async'),\ngetSamlBody = require('./online/samlBody...
javascript
chosen
[ { "from": "system", "value": "Use POST instead of get\n" }, { "from": "human", "value": "\"use strict\";\nangular.module('services.jsonp', [])\n.factory('jsonp', ['$rootScope', '$q', '$http', '$parse', '$interpolate',\n function ($rootScope, $q, $http, $parse, $interpolate) {\n // We return ...
javascript
chosen
[ { "from": "system", "value": "Add special entropy generators for Node and browsers with crypto\n" }, { "from": "human", "value": "module.exports = function(options) {\n var sjcl = options.sjcl;\n var base58 = require(__dirname+'/base58.js')({ sjcl: sjcl });\n\n function MasterKey(key){ \n ...
javascript
chosen
[ { "from": "system", "value": "Set script to execute using Node\n" }, { "from": "human", "value": "/*\n * pilot-fish\n * https://github.com/jeffminnear/pilot-fish\n *\n * Copyright (c) 2016 Jeff Minnear\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nexports.awesome = function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Clean up the HSTS code a little bit\n" }, { "from": "human", "value": "/*\nHTTP Strict Transport Security (HSTS)\n\nhttp://tools.ietf.org/html/rfc6797\n\n*/\n\nmodule.exports = function (maxAge, includeSubdomains) {\n if (!maxAge) maxAge = '15768000'; // Approxim...
javascript
chosen
[ { "from": "system", "value": "Hide pagination when is not necessary\n" }, { "from": "human", "value": "import React from 'react'\nimport {Hits} from 'react-instantsearch'\n\nimport Pagination from '../Pagination'\nimport Stats from '../Stats'\nimport Hit from '../Hit'\n\nfunction CustomHits ({hi...
javascript
chosen
[ { "from": "system", "value": "[js] Set default rule to `program`\n" }, { "from": "human", "value": "module.exports = (function() {\n return function(options) {\n var src, rule, syntax, getTokens, mark, rules, tokens;\n\n if (!options || !options.src) throw new Error('Please, pas...
javascript
chosen
[ { "from": "system", "value": "Remove 'only' that was hogging the test suites\n" }, { "from": "human", "value": "/**\n * WPCOM module\n */\n\nvar util = require('./util');\nvar assert = require('assert');\n\n/**\n * Testing data\n */\nfunction trueAssertion( done ) { return function() { done(); }...
javascript
chosen
[ { "from": "system", "value": "Modify schema to enforce validation, required fields cannot be just formed by whitespaces\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nSchema = mongoose.Schema;\n\n\n//This defines each entry in the phonebook and the data\n//which is requi...
javascript
chosen
[ { "from": "system", "value": "Replace carousel-example-generic with carousel-widget ids\n" }, { "from": "human", "value": "function setCarouselSize() {\n var wWidth = $(window).width();\n var wHeight = $(window).height();\n \n var originalImageHeight = 1080;\n var originalImageWid...
javascript
chosen
[ { "from": "system", "value": "Correct JavaScript files require order.\n" }, { "from": "human", "value": "//= require foundation/foundation.abide\n//= require foundation/foundation.accordion\n//= require foundation/foundation.alert\n//= require foundation/foundation.clearing\n//= require foundati...
javascript
chosen
[ { "from": "system", "value": "Remove all sections containing Kellerman\n" }, { "from": "human", "value": "alert(\"You're on an ESPN page. Hello from MERA.\");" }, { "from": "gpt", "value": "var body = document.getElementsByTagName(\"body\")[0];\r\n\r\nhandleChildren(body);\r\n\r\nfu...
javascript
chosen
[ { "from": "system", "value": "Allow opening projects with no config file\n" }, { "from": "human", "value": "import fs from \"fs-extra\"\nimport path from \"path\"\nimport _ from \"underscore\"\n\nexport default class ProjectStore {\n static displayName = \"ProjectStore\"\n\n constructor() {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove JSON stringify from markdown loader.\n" }, { "from": "human", "value": "const FrontMatter = require('front-matter');\nconst { markdown } = require('markdown');\n\nmodule.exports = function load(source) {\n const frontmatter = FrontMatter(source);\n return J...
javascript
chosen
[ { "from": "system", "value": "Create a source map file\n" }, { "from": "human", "value": "'use strict';\n\nlet gulp = require('gulp'),\n rename = require('gulp-rename'),\n rollup = require('rollup').rollup;\n\nmodule.exports = () => {\n gulp.task('copy-dependencies', ()...
javascript
chosen
[ { "from": "system", "value": "Load the logger before the app so that the logging actually happens\n" }, { "from": "human", "value": "\"use strict\";\n\nvar express = require('express'),\n serverApp = require('./test-server-app');\n\nserverApp.use(express.logger('dev'));\n\nserverApp.liste...
javascript
chosen
[ { "from": "system", "value": "Increase delay for loading toolbarbutton so that other components have a\nchance to load.\n" }, { "from": "human", "value": "var self = require(\"sdk/self\");\nvar panel = require(\"sdk/panel\");\n\n\n\nvar initToolbar = function(freedom) {\n // create toolbarbutto...
javascript
chosen
[ { "from": "system", "value": "Add a couple more logs for Travis debugging\n" }, { "from": "human", "value": "'use strict'\n\nimport keytar from 'keytar'\n\nconst SERVICE = 'gh-notifications-snoozer'\nconst ACCOUNT = process.env.NODE_ENV === 'test' ? 'github-test' : 'github'\n\nclass GitHubAuth {...
javascript
chosen
[ { "from": "system", "value": "Fix ajax request in Stimulus maps controller\n" }, { "from": "human", "value": "import {Controller} from \"stimulus\"\n\nexport default class extends Controller {\n\n static targets = [\"mapInfo\"]\n\n connect() {\n const courseId = this.mapInfoTarget.d...
javascript
chosen
[ { "from": "system", "value": "Reorder to require Routes last.\n" }, { "from": "human", "value": "var React = require('react');\nvar Router = require('react-router');\nvar Fetcher = require('fetchr/libs/fetcher.client');\n\nvar App = require('../shared/App');\nvar Routes = require('../shared/Comp...
javascript
chosen
[ { "from": "system", "value": "Add credentials to psql production.\n" }, { "from": "human", "value": "const databaseName = 'awstest';\n\nmodule.exports = {\n development: {\n client: 'postgresql',\n connection: `postgres://localhost:5432/${databaseName}`,\n migrations: {\n director...
javascript
chosen
[ { "from": "system", "value": "Add adsID to settings slugs and sort.\n" }, { "from": "human", "value": "/**\n * `modules/analytics` base data store\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use t...
javascript
chosen
[ { "from": "system", "value": "Make username search in login case-insensitive\n\nFixes #60\n" }, { "from": "human", "value": "var error = require('./error')\nvar passport = require('passport')\nvar LocalStrategy = require('passport-local').Strategy\nvar User = require('./mod...
javascript
chosen
[ { "from": "system", "value": "Handle case of zero forms more gracefully for JSON option.\n" }, { "from": "human", "value": "const xml2js = require('xml2js');\nconst parser = new xml2js.Parser({explicitArray: false, attrkey: \"attributes\"});\nconst createFormList = require('openrosa-formlist');\...
javascript
chosen
[ { "from": "system", "value": "Add JSDoc for isolation level\n" }, { "from": "human", "value": "module.exports = {\n // Makes all records visible\n READ_UNCOMMITTED: 0,\n\n // non-transactional and COMMITTED transactional records are visible. It returns all data\n // from offsets smaller than...
javascript
chosen
[ { "from": "system", "value": "Handle case where these values can be zero, and would be set to null\n" }, { "from": "human", "value": "/*\n *\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this w...
javascript
chosen
[ { "from": "system", "value": "Switch to use file access (-file) or http access (default)\n" }, { "from": "human", "value": "\"use strict\";\n\nvar path = require(\"path\"),\n gpfPath = path.resolve(__dirname, \"../..\"),\n args = process.argv.slice(2),\n browser = args[0],\n version,...
javascript
chosen
[ { "from": "system", "value": "Update the default application name\n" }, { "from": "human", "value": "/*global angular: true, appInsights: true */\n\n\n(function () {\n \"use strict\";\n\n angular.module('angular-appinsights', [])\n\n .provider('insights', function () {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Update standing on button click\n" }, { "from": "human", "value": "/**\n * @flow\n */\n\nimport React, { Component } from 'react';\nimport {\n StyleSheet,\n Text,\n View,\n ScrollView,\n Image,\n Alert\n} from 'react-native';\nimport MyButton from './MyButton'...
javascript
chosen
[ { "from": "system", "value": "Remove reference to static pages, which isn't needed any more\n" }, { "from": "human", "value": "var express = require('express'),\n app = express(),\n radiodan = require('radiodan-client'),\n mdns = require('./lib/mdns'),\n port = process....
javascript
chosen
[ { "from": "system", "value": "Set initial edit mode to corner_mode\n" }, { "from": "human", "value": "var graph = new Graph();\n\nfunction render_part(part){ part.render();};\n\ngraph.on(\"add\",render_part);\ngraph.on(\"change:x\",render_part);\ngraph.on(\"change:y\",render_part);\n\nvar menu =...
javascript
chosen
[ { "from": "system", "value": "Add breadcrumb comment for future debugging purposes\n\n[#129559315]\n" }, { "from": "human", "value": "'use strict';\n\nimport localForage from 'localforage';\nimport React, { Component, PropTypes } from 'react';\nimport { Provider } from 'react-redux';\nimport { R...
javascript
chosen
[ { "from": "system", "value": "Use shallowMount instead of mount\n" }, { "from": "human", "value": "import RemoveModal from '~/components/RemoveModal'\nimport BaseModal from '~/components/BaseModal'\nimport { mount } from 'helper'\n\ndescribe('Remove modal component', () => {\n let wrapper, base...
javascript
chosen
[ { "from": "system", "value": "Move routing reducer last in redux store\n" }, { "from": "human", "value": "import {createStore, applyMiddleware, compose} from 'redux'\nimport {combineReducers} from 'redux'\nimport {routerReducer, routerMiddleware} from 'react-router-redux'\nimport thunkMiddleware...
javascript
chosen
[ { "from": "system", "value": "Fix fail when some action has a null payload\n" }, { "from": "human", "value": "export const getActionPayload = action =>\n action.payload === undefined ? action : action.payload;\n\nexport const isRequestAction = action => {\n const actionPayload = getActionPaylo...
javascript
chosen
[ { "from": "system", "value": "[test] Fix tests for improved lazy loading\n" }, { "from": "human", "value": "/*\n * require-directory-test.js: Tests for `requireDir` and `requireDirLazy`\n * methods.\n *\n * (C) 2011, Nodejitsu Inc.\n * MIT LICENSE\n *\n */\n\nvar assert = require('assert'),\n ...
javascript
chosen
[ { "from": "system", "value": "Allow transform builder to be used with 'transformMatching' sinon matcher\n" }, { "from": "human", "value": "import { eq } from 'orbit/lib/eq';\nimport {\n serializeOps\n} from './operations';\n\nfunction transformMatching({ operations: expectedOps }) {\n return s...
javascript
chosen
[ { "from": "system", "value": "Remove comments and use `JSON.parse` for `~/.jshintrc`.\n" }, { "from": "human", "value": "var jshint = require('jshint').JSHINT\n , puts = require('util').puts\n , stdin = process.openStdin()\n , fs = require('fs')\n , jshintrc = process.argv[2] ? fs.readFileSy...
javascript
chosen
[ { "from": "system", "value": "Change way plugins are structured and executed\n\nThe module will now consist of an object of lifecycle functions, like `onLoad` and `onMenuClick`\n" }, { "from": "human", "value": "const\n {app} = require('electron'),\n fs = require('fs-extra'),\n Path = r...
javascript
chosen
[ { "from": "system", "value": "[minor] Move `keys` to outer scope\n" }, { "from": "human", "value": "var child_process = require('child_process');\n\nmodule.exports = function (cb) {\n var result = {};\n\n child_process.exec('lsb_release -a', function (err, stdout, stderr) {\n if (err) retur...
javascript
chosen
[ { "from": "system", "value": "Fix minor typo in jsdoc" }, { "from": "human", "value": "'use strict';\n/**\n * Lazy oading of \"koa-*\" middlewares in `package.json`.\n *\n * @lib/middlewares\n */\nmodule.exports = require('koa-load-middlewares')({\n pattern: ['koa-*', 'kcors', '!koa-adapter-*']...
javascript
chosen
[ { "from": "system", "value": "Add dfs for walk files\n\nneed to add the bfs one, in order to show a tree view\n" }, { "from": "human", "value": "/**\n * Created by Pillar on 2015/6/20.\n */\n// a util to traverse folder and filter files\n'use strict';\n\n// do a bfs search to certain folder with...
javascript
chosen
[ { "from": "system", "value": "Use default avatar also when loading\n" }, { "from": "human", "value": "import {Emitter} from 'event-kit';\n\nconst LOADING_AVATAR_URL = 'https://github.com/simurai.png';\n\nexport default class AvatarCache {\n constructor(request) {\n this.byEmail = new Map();\...
javascript
chosen
[ { "from": "system", "value": "Update UI init method to accept selector.\n" }, { "from": "human", "value": "/*\n * Mushpup-UI Module\n *\n * Requires jQuery, jQuery-UI\n *\n */\nvar MushpupUI = (function() {\n\n var VERSION = '2.0';\n\n var init = function(parentId) {\n var $parentElement = ...
javascript
chosen
[ { "from": "system", "value": "Remove phone battery levelchange instrumentation\n" }, { "from": "human", "value": "/* global Pebble navigator */\nfunction pebbleSuccess(e) {\n // do nothing\n}\nfunction pebbleFailure(e) {\n console.error(e);\n}\n\nvar reportPhoneBatt;\n\nPebble.addEventListener...
javascript
chosen
[ { "from": "system", "value": "OHM-301: Make changes to footer directive html\n" }, { "from": "human", "value": "'use strict';\n\n/* global isCoreVersionCompatible:false */\n\n// Common directive for Footer Version\nangular.module('openhimConsoleApp')\n .directive('footerVersion', function(Api, ...
javascript
chosen
[ { "from": "system", "value": "Fix ndcs documents meta provider\n" }, { "from": "human", "value": "import groupBy from 'lodash/groupBy';\n\nexport const initialState = {\n loading: false,\n loaded: false,\n data: {}\n};\n\nconst setLoading = (loading, state) => ({ ...state, loading });\nconst ...
javascript
chosen
[ { "from": "system", "value": "Add moon phase tooltip detail\n\nAdded moon phase detail to tooltip (you can see the numeric value of the\nmoon phase now)\n" }, { "from": "human", "value": "import {Component} from 'react';\n\nclass MoonPhaseIcon extends Component{\n\n render() {\n\n // Yahoo ...
javascript
chosen
[ { "from": "system", "value": "Fix a syntax error inside the CSP\n" }, { "from": "human", "value": "const csp =\n \"default-src 'self' https:;\" +\n \"style-src 'self' https: 'unsafe-inline';\" +\n \"script-src 'self' https: 'unsafe-eval' 'unsafe-inline';\" +\n \"connect-src 'self' raw.github...
javascript
chosen
[ { "from": "system", "value": "Update headings to match new tab title" }, { "from": "human", "value": "module.exports = {\n pageTitle: 'Review your application',\n eligibilityInfo: 'Eligibility information',\n\n netAnnualIncomeLabel: 'Your net annual income:',\n minAgeOrOlderLabel: '65 or old...
javascript
chosen
[ { "from": "system", "value": "Change the javascript in the source file.\n" }, { "from": "human", "value": "$(document).ready(function() {\n $('#documentation').addClass('animated bounceIn').addClass('btn-lg btn-default download-btn-style');\n $('#download').addClass('animated bounceIn').ad...
javascript
chosen
[ { "from": "system", "value": "Fix extension for babel/react loaders.\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n entry: [\n 'webpack-dev-server/client?http://localhost:3000',\n 'webpack/hot/only-dev-server',\n ...
javascript
chosen
[ { "from": "system", "value": "Update function to no longer wait until document head has finished loading\n" }, { "from": "human", "value": "/**\n * @desc appendCss() appends css once jQuery + head element have finished\n * loading\n *\n * @param {String} string of css rules, with or without styl...
javascript
chosen
[ { "from": "system", "value": "Add function name polyfill for IE\n" }, { "from": "human", "value": "// ES2015 APIs used by developer tools integration\nimport 'core-js/es6/map';\nimport 'core-js/es6/promise';\nimport 'core-js/fn/array/fill';\nimport 'core-js/fn/array/from';\nimport 'core-js/fn/ob...
javascript
chosen
[ { "from": "system", "value": "Disable delay on server responses\n" }, { "from": "human", "value": "var express = require('express');\nvar path = require('path');\nvar logger = require('morgan');\nvar slow = require('connect-slow');\nvar HttpError = require('./lib/http-error');\n\nvar rootRouter ...
javascript
chosen
[ { "from": "system", "value": "Replace route template with XML style closing tags\n" }, { "from": "human", "value": "// @ngInject\nmodule.exports = function($stateProvider, $urlRouterProvider, $provide) {\n $stateProvider\n .state('root', {\n abstract: true,\n url: '',\n templa...
javascript
chosen
[ { "from": "system", "value": "Use css to truncate tab url\n\nFix #80\n" }, { "from": "human", "value": "import React from 'react'\n\nconst urlStyle = {\n opacity: 0.3,\n fontSize: '0.7rem'\n}\n\nexport default class Url extends React.Component {\n getUrlStyle = () => Object.assign(\n {},\n...
javascript
chosen
[ { "from": "system", "value": "Convert PointLight to a subclass of DirectionalLight.\n" }, { "from": "human", "value": "'use strict';\n\nvar Object3D = require( '../object3d' );\nvar Filter = require( '../math/filter' );\n\nfunction PointLight( color, intensity, distance ) {\n Object3D.call( thi...
javascript
chosen
[ { "from": "system", "value": "[tasks] Fix wrong rendering of priority\n" }, { "from": "human", "value": "/*\n * Set of functions to make data more readable.\n */\nimport { mapGetters } from 'vuex'\n\nimport { formatDate, formatFullDate, formatSimpleDate } from '@/lib/time'\n\nexport const format...
javascript
chosen
[ { "from": "system", "value": "Sort the modes by mode_id\n" }, { "from": "human", "value": "class SelectController {\n constructor(ModeFactory, SocketFactory) {\n 'ngInject';\n\n this.modes = [];\n\n ModeFactory.getList().success( (result) => {\n this.modes = result;\n });\n\n ...
javascript
chosen
[ { "from": "system", "value": "stylelint: Replace deprecated selector-no-id with selector-max-id\n" }, { "from": "human", "value": "module.exports = {\n \"rules\": {\n \"max-empty-lines\": 2,\n \"indentation\": 2,\n \"length-zero-no-unit\": true,\n \"no-duplicate-se...
javascript
chosen
[ { "from": "system", "value": "Fix a minor bug in import code\n" }, { "from": "human", "value": "var fs = require('fs')\nvar tabNewline = require('./tab-newline.js')\n\nmodule.exports = function (name, type) {\n\tif (type === 'tab/newline') {\n\t\tvar file = fs.readFileSync(name)\n\t\treturn tabN...
javascript
chosen
[ { "from": "system", "value": "Use the <meta> description as the snippet if there's no selection\n" }, { "from": "human", "value": "var shareData = {};\nif (window.getSelection().rangeCount) {\n var selectionHtml = new XMLSerializer().serializeToString(window.getSelection().getRangeAt(0).cloneCo...
javascript
chosen
[ { "from": "system", "value": "Revert \"just poll instead of sometimes trying subscribe\"\n\nThis reverts commit e900fa6d3396dd38717b33e27ef6817434800647.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar startPollingForBlocks = require(\"./start-polling-for-blocks\");\n\nfunction listenF...
javascript
chosen
[ { "from": "system", "value": "Use more thorough error checking in search results to ensure that all expected fields exist.\n" }, { "from": "human", "value": "var _ = require('underscore')._;\n\nfunction SearchResult(options) {\n\t_.extend(this, _.pick(options, \n\t\t'url', 'permalink', 'siteMedi...
javascript
chosen
[ { "from": "system", "value": "TEST (asciidoc): fix bad import\n" }, { "from": "human", "value": "import Asciidoc from 'components/common/AsciiDoc';\n\nconst setup = (props) => shallow(<Asciidoc { ...props }/>);\nconst text = `bold *constrained* & **un**constrained\n\nitalic _constrained_ & __un_...
javascript
chosen
[ { "from": "system", "value": "Support default value in null client\n" }, { "from": "human", "value": "export default {\n initialize() {},\n identify(_user, _hash, cb) {\n cb();\n },\n allFlags() {\n return {};\n },\n variation() {\n return false;\n }\n}\n" }, { "from": "g...
javascript
chosen
[ { "from": "system", "value": "Rework node-server-generator to use new util.\n" }, { "from": "human", "value": "const generators = require('yeoman-generator');\n\nconst util = require('../util.js');\n\nconst generator = generators.Base.extend({\n\t// Cannot use arrow notation due to this object ...
javascript
chosen
[ { "from": "system", "value": "Fix Action Already In Progress exception in submit button directive [SENTRY-3013]\n" }, { "from": "human", "value": "// @ngInject\nexport default function submitButton($q) {\n return {\n restrict: 'A',\n scope: {\n submit: '&submitButton'\n },\n li...
javascript
chosen