conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Rename 'name' to 'title' in test\n" }, { "from": "human", "value": "/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\n\ndescribe('bespoke generator', function () {\n beforeEach(f...
javascript
chosen
[ { "from": "system", "value": "Add collapsing to the logger\n" }, { "from": "human", "value": "/** @babel */\n\nimport { applyMiddleware, createStore } from 'redux'\nimport createLogger from 'redux-logger'\nimport createSagaMiddleware from 'redux-saga'\nimport reducers from './reducers'\nimport r...
javascript
chosen
[ { "from": "system", "value": "Use sourceIds instead of hardcoded attribute name\n\nThe source_id attr just happened to work, use the sourceIds method\ninstead\n" }, { "from": "human", "value": "var template = require('./default-layer-analysis-view.tpl');\n\n/**\n * View for an analysis node with...
javascript
chosen
[ { "from": "system", "value": "Add percentage value to points\n\npoints contained their ending % position and original decimal value however did not contain a percentage value from the total of the series, this has been added." }, { "from": "human", "value": "// @flow\nimport type Series from '.....
javascript
chosen
[ { "from": "system", "value": "[core] Use ESM default export for dataset prompt\n" }, { "from": "human", "value": "import debug from '../../debug'\nimport promptForDatasetName from './datasetNamePrompt'\n\nmodule.exports = async (context, options = {}) => {\n const {apiClient, prompt} = context\...
javascript
chosen
[ { "from": "system", "value": "Allow all URI schemes for setting reset password page" }, { "from": "human", "value": "import * as yup from 'yup';\nimport { translatedErrors } from '@strapi/helper-plugin';\n\nconst URL_REGEX = new RegExp('(^$)|((https?://.*)(d*)/?(.*))');\n\nconst schema = yup.obj...
javascript
chosen
[ { "from": "system", "value": "BB-1315: Test and merge to master\n- revert select cell functionality\n" }, { "from": "human", "value": "define([\n 'underscore',\n 'backgrid',\n 'orodatagrid/js/datagrid/editor/select-cell-radio-editor'\n], function(_, Backgrid, SelectCellRadioEditor) {\n ...
javascript
chosen
[ { "from": "system", "value": "Use class instead of stateless component in `withContext`\n" }, { "from": "human", "value": "import {noop, pick} from 'lodash';\nimport createReactContext from 'create-react-context';\nimport React from 'react';\n\nconst TypeaheadContext = createReactContext({\n ac...
javascript
chosen
[ { "from": "system", "value": "Fix Menu reload after re-login\n\nThis bug existed for ages. After re-login there always was this 'this.tr is undefined' error.\nProblem was that two menu objects where created and the one actually rendered was not set to Kwf.menu. That caused the reload for the wrong object.\n...
javascript
chosen
[ { "from": "system", "value": "Send 1k messages on startup for testing.\n" }, { "from": "human", "value": "\nvar ProtoBuf = dcodeIO.ProtoBuf;\nvar Builder = ProtoBuf.loadProtoFile(\"proto/ClientMessage.proto\");\nProtoBuf.loadProtoFile(\"proto/Login.proto\", Builder);\n\n\n\nvar Message = Builder...
javascript
chosen
[ { "from": "system", "value": "Revert \"fix deprecated mongoose methods\"\n\nThis reverts commit 4dce797\n" }, { "from": "human", "value": "const mongoose = require('mongoose');\nconst Grid = require('gridfs-stream');\n\nconst mongoURI = process.env.MONGODB_URI || process.env.MONGOHQ_URL;\nmongoo...
javascript
chosen
[ { "from": "system", "value": "Fix time tests by adding Date to sandbox.\n\nSince tests are now run in their own sandbox, assert.deepEqual was not\nproperly testing the returned Date objects for equality, as they weren't\ninstances of the same Date class used by the test itself, causing type\ninference to fa...
javascript
chosen
[ { "from": "system", "value": "Fix error in Ember 2.0\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Mixin.create({\n componentFor(name, owner) {\n let component = this._super(name, owner);\n\n // Ensure components are always managed my the container ...
javascript
chosen
[ { "from": "system", "value": "Add confirm on end game door\n" }, { "from": "human", "value": "import NormalDoor from 'entities/Door';\nimport state from 'state';\nimport finish from 'finish';\nimport action from 'action';\nimport { changeScene } from 'currentScene';\nimport entrance from 'scenes...
javascript
chosen
[ { "from": "system", "value": "Make the tooltips hide when they are clicked.\n" }, { "from": "human", "value": "window.FactRelationView = Backbone.View.extend({\n tagName: \"li\",\n className: \"fact-relation\",\n\n events: {\n \"click .relation-actions>.weakening\": \"disbelieveFactRelatio...
javascript
chosen
[ { "from": "system", "value": "Fix issue with Safari on IOS which caused the title to be hidden when entering data.\n" }, { "from": "human", "value": "/*jshint browser: true */\n(function () {\n \"use strict\";\n\n var root = this,\n $ = root.jQuery,\n body = $('body');\n\n ...
javascript
chosen
[ { "from": "system", "value": "Refactor and other ways to close the aside\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Open and close button for aside-menu\n */\n$('show-aside-button').addEvent('click', function (event) {\n // Get the aside current margin-left as integer\n va...
javascript
chosen
[ { "from": "system", "value": "Correct shebang to use /usr/bin/env node.\n\n/bin/env is not the usual location for the shebang line. Instead use /usr/bin/env." }, { "from": "human", "value": "#!/bin/env node\n\n'use strict';\n\nvar agent = require('superagent');\nvar program = require('commander'...
javascript
chosen
[ { "from": "system", "value": "Watch for changes on HYP_CONTENT_FOR_IDS\n" }, { "from": "human", "value": "angular.module(\"hypContentFor\", [])\n .constant(\"HYP_CONTENT_FOR_IDS\", [ ])\n\n .directive(\"content\", function (HYP_CONTENT_FOR_IDS) {\n return {\n scope: { \"for\": \"@\" },...
javascript
chosen
[ { "from": "system", "value": "Change from local storage to chrome storage\n" }, { "from": "human", "value": "import getWeatherInfo from './get-weather-info';\nimport fetchRandomPhoto from './fetch-random-photo';\nimport { lessThanOneHourAgo, lessThan24HoursAgo } from './helpers';\n\n/*\n * Load ...
javascript
chosen
[ { "from": "system", "value": "Revert \"delete undefined properties from http config params\"\n\nThis reverts commit f52b94743e6539bf8088e773310359762b3d9cb5.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('gc.ngHttpGetParamInterceptor', [\n 'gc.utils'\n]).factory('httpGetPar...
javascript
chosen
[ { "from": "system", "value": "Add http to skoli.fr link\n" }, { "from": "human", "value": "import React from 'react';\nimport withStyles from 'isomorphic-style-loader/lib/withStyles';\n\nimport Link from '../Link';\nimport s from './Brand.css';\n\nfunction Brand(){\n return (\n <Link classNa...
javascript
chosen
[ { "from": "system", "value": "Allow failure based off run status\n\nAdd a default message when an error message is not passed\n" }, { "from": "human", "value": "'use strict';\n\nvar remark = require('remark');\nvar engine = require('unified-engine');\n\nmodule.exports = function(grunt) {\n grun...
javascript
chosen
[ { "from": "system", "value": "Define AO_VERSION before require process-request\n" }, { "from": "human", "value": "/*!\n * AllOrigins\n * written by Gabriel Nunes <gabriel@multiverso.me>\n * http://github.com/gnuns\n */\n\nconst express = require('express')\n\nconst {version} = require('./package...
javascript
chosen
[ { "from": "system", "value": "Create a conference variable that can be played with by forkers\n" }, { "from": "human", "value": "RTC({\n // use the public google stun servers :)\n ice: [\n { url: 'stun1.l.google.com:19302' },\n { url: 'stun2.l.google.com:19302' },\n { url: 'stun3.l.go...
javascript
chosen
[ { "from": "system", "value": "Refactor less than two neighbours then cell dies\n" }, { "from": "human", "value": "var ALIVE = \"alive\", DEAD = \"dead\";\n\nfunction Cell(initialState) {\n var state = initialState || DEAD;\n return {\n setNeighbours: function (neighbours) {\n ...
javascript
chosen
[ { "from": "system", "value": "Refactor common logic for setting up RootCtrl and scope\n" }, { "from": "human", "value": "'use strict';\n\n/* jasmine specs for controllers go here */\n\ndescribe('RootCtrl', function(){\n beforeEach(module('swiftBrowser.controllers'));\n\n it('should list co...
javascript
chosen
[ { "from": "system", "value": "Add block ui to ajax call for creating new timeslot\n" }, { "from": "human", "value": "$(document).ready(function(){\n\n $(\"#new-timeslot-form\").submit(function(event){\n event.preventDefault();\n var data = createDate();\n $(\"#modal_new_timeslot\").mod...
javascript
chosen
[ { "from": "system", "value": "Add an API for formatter functionality.\n" }, { "from": "human", "value": "\"use strict\";\n\n/*\n default options\n*/\nvar defaultOptions = {\n // force additionalProperties and additionalItems to be defined on \"object\" and \"array\" types\n forceAdditio...
javascript
chosen
[ { "from": "system", "value": "Add forceIframe as a protected export\n" }, { "from": "human", "value": "/* @flow */\n\nimport { isPayPalDomain } from '@paypal/sdk-client/src';\nimport { PopupOpenError as _PopupOpenError, destroy as zoidDestroy, destroyComponents } from 'zoid/src';\n\nimport { set...
javascript
chosen
[ { "from": "system", "value": "Use firebase here, server never imports this\n\n" }, { "from": "human", "value": "import User from 'src/models/User';\nimport { auth } from 'src/config/firebase-admin';\n\nUser.prototype.login = function login(email, password) {\n return auth\n .signInWithEmailA...
javascript
chosen
[ { "from": "system", "value": "Fix syntax error - missing function declaration\n" }, { "from": "human", "value": "module.exports = function sendJSON(res, next) {\n return _sendJSON(error, data) {\n if (error) {\n return next(error);\n }\n return res.json(data);\n }\n};" }, { ...
javascript
chosen
[ { "from": "system", "value": "Add display of new status\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('impactApp').constant('banettes', [\n {\n id: 'toutes',\n label: 'Toutes'\n },\n {\n id: 'emise',\n label: 'Émise'\n },\n {\n id: 'complet',\n label: ...
javascript
chosen
[ { "from": "system", "value": "Fix broken redirect after login\n" }, { "from": "human", "value": "import React from 'react';\nimport { connect } from 'react-redux';\nimport { Redirect } from 'react-router-dom';\nimport { Toolbar, ToolbarTitle } from 'material-ui/Toolbar';\nimport Paper from 'mate...
javascript
chosen
[ { "from": "system", "value": "Set page title on render\n" }, { "from": "human", "value": "Template.taggedCourses.helpers({\n 'courses': function () {\n return Courses.find().fetch();\n },\n 'tag': function () {\n // Get reference to template instance\n var instance = th...
javascript
chosen
[ { "from": "system", "value": "Fix passing opts through carbon client to oxide client" }, { "from": "human", "value": "var util = require('util'),\n OxideClient = require('./oxide_client.js'),\n Metric = require('../metrics/metric.js');\n\nfunction CarbonClient (opts) {\n OxideClient.call(...
javascript
chosen
[ { "from": "system", "value": "Add *useful* tests for the ArtworkImage component\n" }, { "from": "human", "value": "var __path__ = '../../src/components/ArtworkImage.js';\n\njest.dontMock(__path__);\n\ndescribe('ArtworkImage', function() {\n var React, TestUtils, ArtworkImage;\n var artworkImag...
javascript
chosen
[ { "from": "system", "value": "Add the ability to cross off items on the list\n" }, { "from": "human", "value": "import React from 'react';\n\nexport default class Todo extends React.Component {\n static propTypes = {\n text: React.PropTypes.string.isRequired\n }\n\n render() {\n return ...
javascript
chosen
[ { "from": "system", "value": "Add assignJSON/toJSON to Number types\n" }, { "from": "human", "value": "\"use strict\";\n\nlet errors = require('../errors.js');\nlet Type = require('./type.js');\nlet Value = require('./value.js');\n\nclass NumberValue extends Value {\n constructor(type) {\n s...
javascript
chosen
[ { "from": "system", "value": "Correct culture code for Español\n" }, { "from": "human", "value": "/*!\n * numbro.js language configuration\n * language : spanish Spain\n * author : Hernan Garcia : https://github.com/hgarcia\n */\n(function () {\n var language = {\n delimiters: {\n ...
javascript
chosen
[ { "from": "system", "value": "Add some additional logging for ajax failures.\n" }, { "from": "human", "value": "// Common ajax-handling functions for dashboard-like pages. Looks for <reload/>\n// elements to reload the page, and reports errors or failures via alerts.\n\ng_action_url = \"action....
javascript
chosen
[ { "from": "system", "value": "Initialize collection for anonymous data\n" }, { "from": "human", "value": "CommitMessages = new Mongo.Collection(\"CommitMessages\");\nRepositoryList = new Mongo.Collection(\"RepositoryList\");\nAnnouncements = new Mongo.Collection(\"Announcements\");\nMentorQueue...
javascript
chosen
[ { "from": "system", "value": "Set each bookmark's identifier on its DOM element 'id' attribute.\n" }, { "from": "human", "value": "\n( function( global, chrome, d )\n{\n // I know, UGLY, but it's just a prototype.\n function View( $element, manager )\n {\n this.manager = manager...
javascript
chosen
[ { "from": "system", "value": "Make sure that the reload only triggers once for multiple file updates.\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar browserSync = require('browser-sync');\n\ngulp.task('default', ['serve']);\n\ngulp.task('serve', function() {\n browserSync.i...
javascript
chosen
[ { "from": "system", "value": "Include accordion.js in list of JavaScript files for testing.\n" }, { "from": "human", "value": "var gulp = require( 'gulp' ),\n\tbower = require( 'gulp-bower' ),\n\tdel = require( 'del' ),\n\tvui = require( 'vui-helpers' );\n\ngulp.task( 'clean', function( cb ) {\n...
javascript
chosen
[ { "from": "system", "value": "Remove gulp html task; done by webpack\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar webpack = require('webpack');\n\nvar clientConfig = require('./config/webpack.prod.client.js')\nvar serverConfig = require('./config/webpack.prod.server.js')\n...
javascript
chosen
[ { "from": "system", "value": "Update up to changes in dbjs\n" }, { "from": "human", "value": "'use strict';\n\nvar Db = require('dbjs')\n , relation = module.exports = require('dbjs/lib/_relation');\n\nrequire('./base');\n\nrelation.set('toDOMInputBox', function (document/*, options*/) {\...
javascript
chosen
[ { "from": "system", "value": "Add tracking sign as a border of the container element\n" }, { "from": "human", "value": "'use strict';\n\n/* global TbplJob, Notification */\n\nsetTimeout(checkResult, 5000);\n\nfunction checkResult() {\n var tbpl = new TbplJob();\n var result = 'Fail!';\n if (t...
javascript
chosen
[ { "from": "system", "value": "Sort null risk levels correctly\n\nI'm a little surprised that the Tablesort comparator works in the exact\nopposite way to pretty much every other comparator, but it's late, and I\ncould be missing something.\n\naddresses #344\n" }, { "from": "human", "value": "(fu...
javascript
chosen
[ { "from": "system", "value": "Fix bug not letting default values through in ${} templates" }, { "from": "human", "value": "(function registerStackProcessor() {\n\n widget.parser.register( 'stack', {\n prefix: '$',\n doc: {\n name: \"${<i>variable</i>}\"\n },\n recursive: true,\...
javascript
chosen
[ { "from": "system", "value": "Replace tabs coming from bad editor conf with spaces\n" }, { "from": "human", "value": "L.RotatedMarker = L.Marker.extend({\n options: {\n angle: 0\n },\n\tstatics: {\n\t\t// determine the best and only CSS transform rule to use for this browser\n\t\tbe...
javascript
chosen
[ { "from": "system", "value": "Add test for options transfomr\n" }, { "from": "human", "value": "var test = require('tap').test;\nvar browserify = require('browserify');\nvar vm = require('vm');\n\nfunction bundle (file) {\n test('bundle transform', function (t) {\n t.plan(1);\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add webL10n missing definition path\n" }, { "from": "human", "value": "var tests = Object.keys(window.__karma__.files).filter(function (file) {\n return (/Spec\\.js$/).test(file);\n});\n\nrequirejs.config({\n // Karma serves files from '/base'\n baseUrl: \"...
javascript
chosen
[ { "from": "system", "value": "Use underscore rather than jQuery for array utils" }, { "from": "human", "value": "define([\n 'rivets',\n 'jquery',\n\n 'rivets-backbone-adapter'\n], function (rivets, $) {\n 'use strict';\n\n rivets.formatters.join = function (array, separator) {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove some debug statements in config parsing\n" }, { "from": "human", "value": "import fs from 'fs';\nimport path from 'path';\n\nimport { logFatal } from '../log';\n\nconst configPath = path.resolve(__dirname, 'config.js');\n\nif (!fs.existsSync(configPath)) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add messages link to the floating actions bubble\n" }, { "from": "human", "value": "var React = require('react'),\n {Link} = require('react-router');\n\nmodule.exports = React.createClass({\n render: function() {\n let channel = '';\n if (this.props.params &...
javascript
chosen
[ { "from": "system", "value": "Update URL for new cross-platform endpoint\n" }, { "from": "human", "value": "const autoUpdater = require('electron').autoUpdater\nconst Menu = require('electron').Menu\n\nvar state = 'checking'\n\nexports.initialize = function () {\n autoUpdater.on('checking-for-u...
javascript
chosen
[ { "from": "system", "value": "Fix default sort order. azawawi--\n" }, { "from": "human", "value": "jQuery(function ($) {\n setup_search_box();\n $('.tablesorter').tablesorter({\n sortList: [[1,0]],\n headers: {\n 1: { sorter: 'text'},\n 2: { sorter: fals...
javascript
chosen
[ { "from": "system", "value": "Apply functionality from the number format to the money format solution.\n" }, { "from": "human", "value": "'use strict';\n\nfunction formatMoney(value) {\n var rem = value - ~~value;\n var arr = String(~~value).split('');\n var result = [];\n\n while (arr.lengt...
javascript
chosen
[ { "from": "system", "value": "Remove unnessary line from home page\n" }, { "from": "human", "value": "import React from 'react'\nimport { getSiteProps } from 'react-static'\n//\nimport logoImg from '../logo.png'\n\nexport default getSiteProps(() => (\n<div>\n <div id=\"social-media-links\">\n ...
javascript
chosen
[ { "from": "system", "value": "Use fly.io app env when available\n" }, { "from": "human", "value": "if (!global) {\n global = self;\n}\n\nlet { fetch, Request, Response, Headers, URL, URLSearchParams } = global;\nfetch = fetch.bind(global);\nexport { fetch, Request, Response, Headers, URL, URLSe...
javascript
chosen
[ { "from": "system", "value": "Update babel-plugin-react-server to use new react-server-module-tagger interface\n" }, { "from": "human", "value": "import loggerSpec from 'react-server-module-tagger';\nimport path from 'path';\n\nmodule.exports = function() {\n\treturn {\n\t\tvisitor: {\n\t\t\tIde...
javascript
chosen
[ { "from": "system", "value": "Fix bug in job run get() method.\n" }, { "from": "human", "value": "'use strict';\n\nimport JobClient from '../client';\n\nlet apiClient;\n\nclass DrushIORun {\n\n constructor(client, project, job, identifier, data = {}) {\n apiClient = client;\n this.project...
javascript
chosen
[ { "from": "system", "value": "[cli] Print more complete error message\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar parseArgs = require('minimist');\nvar gonzales = require('..');\nvar fs = require('fs');\nvar path = require('path');\n\nvar options = getOptions();\nprocess.stdin....
javascript
chosen
[ { "from": "system", "value": "Add comment pointing to appropriate version of protractor API\n" }, { "from": "human", "value": "// An example configuration file.\nexports.config = {\n sauceUser: process.env.SAUCE_USERNAME,\n sauceKey: process.env.SAUCE_ACCESS_KEY,\n allScriptsTimeout: 11000,\n...
javascript
chosen
[ { "from": "system", "value": "Allow copy and paste in electron app\n" }, { "from": "human", "value": "var app = require('app');\nvar BrowserWindow = require('browser-window');\n\nvar menu = module.exports = [];\nvar isDarwin = process.platform === 'darwin';\n\nmenu.push(\n\t{\n\t\tlabel: '&File'...
javascript
chosen
[ { "from": "system", "value": "Fix issue checking date when creating new item\n" }, { "from": "human", "value": "/**\n * Controller to bring functionality for the modal.\n *\n * @author Claire Wilgar\n */\n\n/**\n * Module export of controller function.\n *\n * @ngInject\n * @param {angular.Servi...
javascript
chosen
[ { "from": "system", "value": "Add action for fiddling with the show table button\n" }, { "from": "human", "value": "\n// All actions, used by actions or reducers, go here\n\nexport const CLOSE_CARD = 'CLOSE_CARD'\nexport const LOAD_CARD_PAGE = 'LOAD_CARD_PAGE'\nexport const NAVIGATE = 'NAVIGATE'...
javascript
chosen
[ { "from": "system", "value": "Simplify dateFns locale data handling + add map\n\nPreviously cached it internally, but the import() gets cached\nanyway.\n" }, { "from": "human", "value": "import Vue from 'vue'\nimport distanceInWords from 'date-fns/distance_in_words'\n\nexport default new Vue({\n...
javascript
chosen
[ { "from": "system", "value": "Use make infallible for win load handlers\n" }, { "from": "human", "value": "/* See license.txt for terms of usage */\n\n\"use strict\";\n\nconst { Trace, TraceError } = require(\"../core/trace.js\").get(module.id);\nconst { once } = require(\"sdk/dom/events.js\");\...
javascript
chosen
[ { "from": "system", "value": "Use consistent exports for plugins\n\nThis allows us to use them generically\n" }, { "from": "human", "value": "import { PLUGIN_TYPE } from 'rotonde-plugin';\n\nexport const TYPE = PLUGIN_TYPE.ISOMORPHIC;\nexport { default as ChatClientPlugin } from './client';\nexp...
javascript
chosen
[ { "from": "system", "value": "Remove comment in the while loop\n" }, { "from": "human", "value": "!function(){\n\n window.attachSpinnerEvents = function () {\n\n var spinners = document.querySelectorAll('.toggle-spinner'),\n i = spinners.length;\n\n while (i--) {\n console.log('...
javascript
chosen
[ { "from": "system", "value": "Allow using meteor-coverage 2.x.x, needed for code-coverage support from meteor 1.6.0 and onwards\n" }, { "from": "human", "value": "Package.describe({\n name: 'meteortesting:mocha',\n summary: 'Run Meteor package or app tests with Mocha',\n git: 'https://github....
javascript
chosen
[ { "from": "system", "value": "Make sure config isn't undefined for any env\n" }, { "from": "human", "value": "var env = process.env.NODE_ENV || 'development'\n , config = require('../config/config')[env]\n , nodemailer = require('nodemailer')\n ;\n\nvar transporter = nodemailer.createTranspor...
javascript
chosen
[ { "from": "system", "value": "Fix enum (how did this work?)\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = function(sequelize, DataTypes) {\n var Task = sequelize.define(\"Task\", {\n taskID: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true },\n ...
javascript
chosen
[ { "from": "system", "value": "Add finishLine state to Game object\n" }, { "from": "human", "value": "function Game(){\n this.$track = $('#racetrack');\n}\n\nfunction Player(id){\n this.player = $('.player')[id - 1];\n this.position = 10;\n}\n\nPlayer.prototype.move = function(){\n this.posit...
javascript
chosen
[ { "from": "system", "value": "Set the api token from a successful authorization\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n beforeModel: function(transition) {\n var win = window.open('/github_login', 'Authorization',\n ...
javascript
chosen
[ { "from": "system", "value": "Add parameter to UML constants\n" }, { "from": "human", "value": "/**\n * Created by Leandro Luque on 24/07/17.\n */\n\n/* JSHint configurations */\n/* jshint esversion: 6 */\n/* jshint -W097 */\n\n'use strict';\n\n// A.\nconst ATTRIBUTE = \"A1\";\n\n// C.\nconst CL...
javascript
chosen
[ { "from": "system", "value": "Comment NavbarController.back() and update default state\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n // TODO: This should likely be a directive, something like nih-navbar once\n // we have profiles to link to\n\n /* ngInject...
javascript
chosen
[ { "from": "system", "value": "style(validate-platforms): Update test to move context code to context block\n" }, { "from": "human", "value": "'use strict';\n\nconst expect = require('../../helpers/expect');\n\nconst ValidatePlatforms = require('../../../src/utils/validate-platforms');\n\n...
javascript
chosen
[ { "from": "system", "value": "Add method to set base destination\n" }, { "from": "human", "value": "const { remote } = require('electron');\nconst path = require('path');\nconst Config = require('electron-config');\n\nconst DEFAULT_BASE_DESTINATION = path.join(remote.app.getPath('videos'), 'YouT...
javascript
chosen
[ { "from": "system", "value": "Store generated public key on chrome.storage.local.\n" }, { "from": "human", "value": "function generate_key_pair() {\n generateKeyPair().then(function(key) {\n exportKey(key.privateKey).then(function(exported_private_key) {\n chrome.storage.local.set(\n ...
javascript
chosen
[ { "from": "system", "value": "Add .when for each current partial.\n" }, { "from": "human", "value": ";(function(){\n angular.module('flockTogether', ['ngRoute'], function($routeProvider, $httpProvider) {\n $routeProvider\n .when('/', {\n templateUrl: 'partials/home.html',\n ...
javascript
chosen
[ { "from": "system", "value": "Make Headroom pin even if scroll position has not changed\n" }, { "from": "human", "value": "(function() {\n // construct Headroom\n var headroom = new Headroom(document.querySelector(\".js-nvbr\"), {\n \"offset\": Options.navbarOffset,\n \"tolerance\": Opt...
javascript
chosen
[ { "from": "system", "value": "Add name, prepare test filename to be Windows-friendly" }, { "from": "human", "value": "Package.describe({\n summary: \"Fast and reactive jQuery DataTables using standard Cursors / DataTables API. Supports Bootstrap 3.\",\n version: \"1.0.1\",\n git: \"https://gi...
javascript
chosen
[ { "from": "system", "value": "Rename method name (stop -> pause)\n" }, { "from": "human", "value": "/*global MusicPlayer, Vue */\n(function (global, undefined) {\n 'use strict';\n\n document.addEventListener('DOMContentLoaded', function () {\n var musicPlayer = new MusicPlayer();\n ...
javascript
chosen
[ { "from": "system", "value": "Watch for html instead of ejs files\n" }, { "from": "human", "value": "module.exports = {\n\tscripts: {\n\t\tloader: 'browserify',\n\t\tfiles: [\n\t\t\t'public/scripts/main.js'\n\t\t]\n\t},\n\tstyles: {\n\t\tdirectory: 'public/styles'\n\t},\n\tserver: {\n\t\tfiles: ...
javascript
chosen
[ { "from": "system", "value": "Update header filter, passing props down\n" }, { "from": "human", "value": "'use strict'\n\nimport React from 'react'\nimport FormSelect from '../../components/form-select'\nimport FormSearch from './form-search'\n\nconst filterFields = [{\n icon: { id: 'date', lab...
javascript
chosen
[ { "from": "system", "value": "Remove CKEditor-jquery JS from default app JS\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/asse...
javascript
chosen
[ { "from": "system", "value": "Add \\n\\n even when only concat'ing and not compressing JS assets\n" }, { "from": "human", "value": "\"use strict\";\n\nvar util = require('util'),\n path = require('path'),\n jsParser = require('uglify-js').parser,\n compressor = require('uglify-js').ugli...
javascript
chosen
[ { "from": "system", "value": "Add scripting for Foundation to fix issue with carousel\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory...
javascript
chosen
[ { "from": "system", "value": "Update to nav-header dropdown active highlighting\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport function initialize(/*application */) {\n Ember.LinkComponent.reopen({\n attributeBindings: ['tooltip', 'data-placement'],\n\n // Set act...
javascript
chosen
[ { "from": "system", "value": "Allow theme to be changed\n" }, { "from": "human", "value": "import Router from '@ember/routing/router';\n\nexport function initialize() {\n const isEmbedded = window !== window.top;\n\n if (isEmbedded) {\n Router.reopen({\n notifyTopFrame: function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Use first method instead of zero indexing into an array to fix jasmine spec\n" }, { "from": "human", "value": "describe('bootstrap toggle', function() {\n var header;\n beforeEach(function() {\n setFixtures('<li class=\"dropdown\" id=\"menuOrgs\">'+\n ...
javascript
chosen
[ { "from": "system", "value": "Use isNaN() to check for NaN. Comparison op '!==='\ndoesn't work.\n\nAlso add a method 'selected' to factor out\nretrieval of selected value\n" }, { "from": "human", "value": "(function () {\n \n var mr = sparks.activities.mr;\n var str = sparks.string;\n ...
javascript
chosen
[ { "from": "system", "value": "Update comments to apply better to core\n" }, { "from": "human", "value": "\"use strict\";\n\nvar settings = require(\"./settings\");\n\n/*\n * This file defines socket routes for data-transmission to the client-side.\n */\n\n//function initUserSockets(Socket) {\n//...
javascript
chosen
[ { "from": "system", "value": "Fix global variable name for browser usage" }, { "from": "human", "value": "(function(){\n\n function random(a,b) {\n return Math.floor(Math.random() * b) + a;\n };\n\n function obfuscateEmail(email) {\n if (!email) return email;\n var re = /^(.*)(@)(.*?...
javascript
chosen
[ { "from": "system", "value": "[CHORE] Initialize StatusCtrl and add basic tests\n\nTest that private functions and functions on $scope are present\n" }, { "from": "human", "value": "'use strict';\nvar expect = chai.expect;\n\ndescribe('StatusCtrl', function(){\n \n});\n" }, { "from": "g...
javascript
chosen
[ { "from": "system", "value": "Fix 'Maximum call stack size exceeded' in PhantomJS... again\n" }, { "from": "human", "value": "(function(window, karma) {\n window.should = window.chai.should();\n window.expect = window.chai.expect;\n window.assert = window.chai.assert;\n\n var chaiConfig = ka...
javascript
chosen
[ { "from": "system", "value": "Fix undefined quotes causing error\n" }, { "from": "human", "value": "// @flow\n\nimport React, { Component } from 'react';\nimport Quote from './Quote';\n\ntype Props = {\n quotes: Array<Object>,\n approve: number => Promise<*>,\n deleteQuote: number => Promise<...
javascript
chosen