jessepollak / command Goto Github PK
View Code? Open in Web Editor NEW:black_nib: Making the web better with Slack-like slash commands.
Home Page: http://slashcommand.club
License: MIT License
:black_nib: Making the web better with Slack-like slash commands.
Home Page: http://slashcommand.club
License: MIT License
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 ]
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.
Some ideas so far:
After typing '/giphy' and hitting space, the text disappears and the search prompt that shows up in github, etc doesn't show up.
https://www.dropbox.com/s/rxbyqqu8l0kg8k1/Screenshot%202016-02-22%2011.12.35.png?dl=0
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.
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?
Currently, all Twitter properties are unsupported. These include:
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.
slashcommand.club will happily use HTTP, which is a security risk and (at least for me) breaks the /selfie command. Additionally, it accepts HTTPS connections, but serves a certificate for github.com, causing security warnings.
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?
Currently, all Facebook properties are unsupported. These include:
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:
innerHTML
for the whole contenteditable
field
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.
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.
Before I take this thing public, there are a few things I would like to do to improve the landing page.
contenteditable
text field (with the main Command script loaded) where people can demo what Command doesThe /selfie
command should automatically terminate the connection to the webcam when it unmounts so the user doesn't continue having the video source used and the green light on.
Small thing, the page a user arrives at when a page isn't supported has a GIF (the flashing "work") that flashes. It's a nice touch, but should probably be slowed down or just replaced with another fun GIF as this one can unnecessarily trigger seizures, and generally just disorient or distract readers.
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'.
Can this be used as an independent react component? That would be amazing!
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.
Selfie command doesn't show up on drop down in gmail:
https://www.dropbox.com/s/7hg61md3l0pl19x/Screenshot%202016-02-22%2011.08.23.png?dl=0
the
To reproduce:
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.
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.
Hey! Just testing Command on different services and ran into a few things with / giphy
(no spaces):
![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./ giphy
and select the giphy option, my input textbox outputs / giphy
./ giphy
without spaces haha!Plz Make A Version That Supports Chrome OS. Also Can You Add Some More Cmds. Like Me Being Able To Change My Router Name.
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?
options.html page is required for adding some extension settings. How to include that while building project? @jessepollak
Would be nice.
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
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?
Sup.
So when using the giphy command in messenger.com I've noticed a number of issues:
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?
My company just migrated from Slack to Basecamp 😢 which has left much to be desired in the chat world. Just tried using Command on the Basecamp site and it doesn't seem to work (https://www.useloom.com/share/06a1d7950c2d4b71a5f774e9075cac32). FYI.
Thanks for your work on this!
It's this easy:
/giphy
Give it a try and say hi below!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.