alecperkins / coffeetable Goto Github PK
View Code? Open in Web Editor NEWA drop-in workbench for experimentation, CoffeeTable is a CoffeeScript-fluent browser console.
Home Page: http://alecperkins.net/coffeetable/
License: The Unlicense
A drop-in workbench for experimentation, CoffeeTable is a CoffeeScript-fluent browser console.
Home Page: http://alecperkins.net/coffeetable/
License: The Unlicense
After typing a (, the autosuggest regex starts throwing lots of 'SyntaxError: Invalid regular expression'. It doesn't break anything, but the console gets flooded with the errors as the user types. CoffeeTable should catch and suppress these errors.
The code needs to run in the global context so that commands entered don't conflict with the CoffeeTable internals. Also, @ would then no longer be needed to have variables accessible from command to command.
Similar to console.log
and console.dir
, be able to programmatically log to the CoffeeTable history.
Show methods inherited through the prototype chain, and visually indicate how many levels.
eg window.foobar
, when foobar
is undefined, results in an error (attempting to call .toString on undefined) when generating output for the log.
Various sites with keyboard shortcuts, eg http://twitter.com, cause the widget to miss certain keypresses and not receive all of the input.
The instruction on how to submit code in multi-line mode are only displayed when there are no items in history. Instead, the instructions should be displayed when no history, and additionally whenever the mode is toggled.
Styles are applied using $.css (to avoid conflicts, which it does unsuccessfully). Instead, the widget should get a unique ID, and have a <style>
block with a reset and the necessary styles appended to <head>
.
As the user types, show global variables that match what the user has typed so far. When the user hits '.', start drilling down into the properties of the object. When the user presses 'tab', auto complete using the top suggestion.
Basically how the Chrome console does it, but with an actual list of suggestions.
Toggling multi-line mode doesn't actually enable enter to be used as a new line.
Certain rules, like color
, are not set, and so are inherited from the document. (color: white makes the widget partially useless)
Currently, calling CoffeeTable.log
, etc, before the widget has finished loading results in an error since the widget's DOM isn't complete. DOM ready isn't reliable, since the widget is already initializing after DOM ready by default. Calls to the API need to be buffered if the widget hasn't finished initializing. Or perhaps a 'ready' event on the widget that can handle a callback.
Not just the + in front of it. (User testing FTW)
Self explanatory
Import and export input history from and to a file.
(And perhaps to GitHub gists. This needs some research.)
When using the bookmarklet on a page with the widget already loaded, it simply loads a second widget on top of the first. The intended behavior is to reinitialize the existing widget.
The history entries need to be html escaped
Add an panel that can show the compiled JS.
When used in Firefox, the instructions do not switch to "shift+enter" when multiline is checked.
Eliminate the need for jQuery as a dependency, but allow it (and perhaps Underscore?) to be easily loaded with a single click.
I entered document.write("hello") which overwrote the page. But since it automatically stores the code and replays it, the page was no longer visible. Until I manually deleted the row from localstorage using chrome's javascript console.
Perhaps just load the last typed line in the textbox without actually executing it.
When the user enters localStorage.clear()
, the storage does get cleared, but CoffeeTable then puts its data back in, negating the clear command.
Actually list all of the methods available, with examples.
Set a max width, or some sort of truncation, on the results.
The widget should be easy to reposition and resize, since it can easily get in the way of the actual page.
window.location
(an instance of Location) simply results in https://github.com/alecperkins/coffeetable/issues/new
whereas it should inspect the object and list its members.
Twitter is intercepting the keyboard events, making it so I can't type commands into CoffeeTable.
FireBug Lite works well on twitter.com, so this should hopefully be doable.
When there is only one item in history, pressing 'up' or clicking on the history item doesn't load the corresponding source.
Allow users to replay the history on demand. Useful if it depends on stuff in the page that didn't happen prior to CoffeeTable loading.
Right now the objects are listed simply as [object Object], which is kind of useless. The user should be able to click on the object and have its properties enumerated.
See the Chrome console for an example.
When the user hits 'esc' in the textarea, close the widget
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.