Coder Social home page Coder Social logo

command's People

Contributors

adamclark64 avatar bsiddiqui avatar e-jigsaw avatar eliecharra avatar jessepollak avatar readmecritic avatar theramis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

command's Issues

build/ path broken in Windows development environment

I am trying to setup up command for development. When I run npm install followed by npm run dev I get the following error message shown in the npm-debug.log file.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose run-script [ 'predev', 'dev', 'postdev' ]
6 info predev [email protected]
7 info dev [email protected]
8 verbose unsafe-perm in lifecycle true
9 info [email protected] Failed to exec dev script
10 error [email protected] dev: `NODE_ENV=development ./node_modules/.bin/babel-node ./dev-env/dev.js`
10 error Exit status 1
11 error Failed at the [email protected] dev script.
11 error This is most likely a problem with the Command package,
11 error not with npm itself.
11 error Tell the author that this fails on your system:
11 error     NODE_ENV=development ./node_modules/.bin/babel-node ./dev-env/dev.js
11 error You can get their info via:
11 error     npm owner ls Command
11 error There is likely additional logging output above.
12 error System Windows_NT 6.1.7601
13 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
14 error cwd C:\Users\%username%\Documents\Github\slash-command
15 error node -v v0.10.35
16 error npm -v 1.4.28
17 error code ELIFECYCLE
18 verbose exit [ 1, true ]

Writing an extension

i want to make a thing that lets you type in all lower case:

lazy typers are still people too. let's help them look dignified in their emails and make the world a better place. am i right?

and then you type in /caps

and it takes your entire textbox and properly capitalizes it:

Lazy typers are still people too. Let's help them look dignified in their emails and make the world a better place. Am I right?


I haven't dug into the source yet to figure out if I can write this extension, but it'd be helpful to have some pointers / best practices / etc.

Only gif URL will be inserted on Gitlab

Thanks for sharing your very funny project.

The image markdown wasn't inserted on Gitlab(latest v8.6.5), only url was inserted.

  1. Type /giphy, search by keyword
    0413-00
  2. Click one image then
    0413-01

So close!

I'd appreciate it if you could fix this. If you need some info, please ask me.

Thank you.

Uncaught TypeError: Cannot read property 'replace' of null

Sometimes on page load I get this error in the console (in development):
Uncaught TypeError: Cannot read property 'replace' of null

This error ultimately causes the extension not to run at all.
image

Its hard to track down exactly what causes the error because sometimes a refresh causes it to go away, other times it will load fine as expected.. Any thoughts?

twitter.com is currently unsupported

Currently, all Twitter properties are unsupported. These include:

  • twitter.com

Here's what we know so far. Twitter uses contenteditable fields for all user input. Unfortunately, their usage of contenteditable does not conform to standard protocols, so our general solution that uses the built in Range functionality of the browser does not work.

Firefox

This isn't really an existing issue with command itself. It works great. I'm just wondering if you have any plans to bring this over to Firefox?

facebook.com and related properties are currently unsupported

Currently, all Facebook properties are unsupported. These include:

  • facebook.com
  • messenger.com

Here's what we know so far. Facebook uses contenteditable fields for all user input. I believe these contenteditable fields are backed by React and use the virtual DOM. This means that the normal way we handle contenteditable fields (with the browser's built in Range functionality) do not work. We've tried:

  • replacing innerHTML for the whole contenteditable field
    • this doesn't work at all — the field becomes completely inaccessible

Update CONTRIBUTING.md to provide a more involved example of creating a command

How do you create your own slash command? How do you get the slash command to do more than just open a new tab which is what is shown in the example given in the documentation here.

I would like to create a /google command that would search the web with google and get the url and title of the search result the user selected and insert it into the textarea.

Funkiness when placing cursor around slashes

I was writing an email that had a paragraph with a slash in it. Found something funky –– if you place your cursor after the slash, then move it away, the cursor jumps back to right next to the slash.

Recreation steps:

Given I'm a command user,
And I am composing an email in Gmail,
And I have some text with a slash in it:

My favorite Michael Jackson song is Black / White

When I place my cursor immediately to the right of the slash,
And I move my cursor one space away from the slash with the right arrow key,
Then the cursor should remain one space to the right of the slash,
And the cursor should not jump back one space to the left (to the spot just following the slash)


This was done in Gmail, not sure if that matters. Hope this makes sense :)

I've also seen the cursor jump to the end of a paragraph sometimes, but haven't figured out the recreation steps yet.

Improve the landing page

Before I take this thing public, there are a few things I would like to do to improve the landing page.

  • Add a contenteditable text field (with the main Command script loaded) where people can demo what Command does
  • Add sections for all active commands
  • Add an email list (or at least a link to a Github issue) for other browser support (with auto-detection)

Closing command box

As closing command outside the command box is bit of a pain. I'd suggest a closure of the window after a click outside of the box or a tiny 'x'.

Sometimes event listener is attached too late

Sometimes the event listener for the field is attached too late, so Command isn't activated. To fix this, we should switch the listener from happening on focus to attempting on every keyup and short-circuiting if the field is already active.

Slashes randomly inserted on Canvas (usecanvas.com)

To reproduce:

  1. Create a new Canvas
  2. Type a slash, then any other character
  3. Observe the extra slash placed after the cursor (also that it can't be deleted by pressing delete or backspace)
  4. Attempt to delete the letter (delete produces pessimal results, backspace just inserts slashes)
  5. Observe that extra slashes and letters are added after the cursor

The only way to recover from this is by selecting all text containing a slash (either with the mouse or the home/end buttons) and deleting it, as all attempts to use backspace/delete without text selected simply cause the characters to reproduce.

Google hangouts is unsupported

Hello and thanks for the fantastic extension,

After toying around with it in a bunch of places I have found that it does not work with Google hangouts. Here is an example of the DOM element where text is edited in GH:
<div id=":8g.f" class="vE dQ editable" aria-label=" Text entry field for [redacted]. History is on. " g_editable="true" role="textbox" contenteditable="true" dir="ltr" style="text-align: left;"></div>

I might give this a look during the weekend, but I'm creating an issue for reference purposes.

/giphy command on Inbox, GroupMe not working

Hey! Just testing Command on different services and ran into a few things with / giphy (no spaces):

  • On GroupMe's web client the ID of the gif content is displayed instead of the actual gif. so in ![words-jenkins-1229mlttgo8aR2](https://media0.giphy.com/media/1229mlttgo8aR2/giphy.gif) I only see words-jenkins-1229mlttgo8aR2 in my text box after selecting the gif.
  • Also on Inbox by Gmail's web client, when I type / giphy and select the giphy option, my input textbox outputs / giphy.
  • there would be an advantage to adding a 'disable on this page' option, so like on this issue I can actually type out / giphy without spaces haha!

Chromebook.

Plz Make A Version That Supports Chrome OS. Also Can You Add Some More Cmds. Like Me Being Able To Change My Router Name.

Windows Build

I am unable to create the development build. On command prompt for windows I do npm install and then do npm run dev. However, command/build doesn't exist. So I can't add the development to my chrome browser. What should I do? Are there different instructions for building on windows?

No emoji available in chrome

When using the chrome extension the following warning appears:
image

I know the emoji are a limitation in chrome, but is it not possible to import a font with the emojis and used it?

Cheers! 🍻

Selfie on GitHub appears to fail

I see index.js:26 POST https://api.imgur.com/3/image 400 (Bad Request) in the console and a never ending pinwheel on my selfie :-(

Reply from imgur is:

{"data":{"error":"Image format not supported, or image is corrupt.","request":"\/3\/image","method":"POST"},"success":false,"status":400}

Request details:

Request URL:https://api.imgur.com/3/image
Request Method:POST
Status Code:400 Bad Request
Remote Address:185.31.19.193:443
Response Headers
view source
Access-Control-Allow-Headers:Authorization, Content-Type, Accept, X-Mashape-Authorization, IMGURPLATFORM, IMGURUIDJAFO, SESSIONCOUNT, IMGURMWBETA, IMGURMWBETAOPTIN
Access-Control-Allow-Methods:GET, PUT, POST, DELETE, OPTIONS
Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:X-RateLimit-ClientLimit, X-RateLimit-ClientRemaining, X-RateLimit-UserLimit, X-RateLimit-UserRemaining, X-RateLimit-UserReset
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:close
Content-Type:application/json
Date:Thu, 07 Apr 2016 10:56:04 GMT
ETag:"24afc5360c7059b109030ec5c25246db47d3eaa1"
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Pragma:no-cache
Server:nginx
Transfer-Encoding:chunked
X-Post-Rate-Limit-Limit:1250
X-Post-Rate-Limit-Remaining:1248
X-Post-Rate-Limit-Reset:3511
Request Headers
view source
Accept:application/json
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Authorization:Client-ID 0fc1ab7322aa20c
Connection:keep-alive
Content-Length:15262
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
Cookie:IMGURUIDJAFO=00a681a0925b0f100002096eb4635f1bfa59a57f5a3d436582e81b764611b574; __cfduid=d94c494865207fa65e4abd35ed0a4a4621457625414; IMGURSESSION=2pamg29j12i0ee05gpntp3osi2; _nc=1; UPSERVERID=i-c6111e42
Host:api.imgur.com
Origin:https://github.com
Referer:https://github.com/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36
Form Data
view source
view URL encoded
image:UklGRggqAABXRUJQVlA4IPwpAAAw7gCdASqQASwBPm0wlUikIqIiI9ErmIANiWVtPECYztO1ERRuYBIqf0vceqSW2KY3mfI44f0VPwLzm93/AgyP8Bzre3R9Az9P0M+0fSF4/X4j/t+wd/Sv9J/3faG/5PNvqMdM8r22eg...snip...4gyV50vv8kdficAZi2OEBcQIHq8mPobSBJMagSGQQSaY2eBP+O1zd2NTCf2cGImfBvn83PPV3BZms2vAAAA==
type:base64

API key is banned

This ties into my last issue #59

Seems like we should have a config that lets a user enter their own keys in.

I wonder if it's banned because it's a public key, it was overused, or for some other reason like a TOS violation?

Messenger.com /giphy problems

Sup.

So when using the giphy command in messenger.com I've noticed a number of issues:

  • the pop-up window that contains gifs after a search won't take into consideration the space around it and makes y overflow like crazy all over the place:

screen shot 2016-03-03 at 19 25 10

Secondly, when clicking a gif, the image doesn't insert and send, it just goes back to the menu where you can enter more slash commands, any thoughts on this?

Emojis appearing as unknown characters on GitHub

When opening the emoji command on GitHub, I get a screen mostly full of question mark characters.

screenshot 113

But the screen works as expected in the test field on the Command homepage. Any ideas what could cause this?

Chrome 54 on Windows 10

Fix unsupported fields

There are a number of important fields that currently aren't supported:

  • Twitter
  • Facebook

We are working to fix all of these!

3o8dp4AJDl5aI4qqI0

Hitting Giphy API Rate limit D:

Could we supply our own keys in a configuration to avoid hitting this rate limit with a shared key?

image

Response

{
      "data": [],
      "meta": {
        "status": 429,
        "msg": "API rate limit exceeded",
        "response_id": ""
      }
    }

How do I use this thing?

slash

It's this easy:

  1. 💻 - Install the Slash extension here
  2. 💬 - Click on the comment field below, say something witty, then type /giphy
  3. 🔍 - Add the perfect GIF
  4. 🌟 - Star this repo

Give it a try and say hi below!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.