Git Product home page Git Product logo

ghosttext-for-chrome's People

Contributors

bfred-it avatar cacodaimon avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

ghosttext-for-chrome's Issues

Send the syntax, guessed by the tab's URL, to the server.

We need a UI where people can configure which syntax has to be send to server guessed by the tab's URL.
There is already a method stub in GhostText.guessSyntax() for performing this task in the background.

For example:
"github.com" --> "markdown",
"cacodaemon.de" --> "html",
"wikipedia.*" -> "wikitext"

Create website blacklist

Some websites like Facebook don't use the textarea conventionally (they use one textarea for the whole website and move it around) so don't work as intended, so they should be excluded and the user will need to be informed.

blank render

When I click into my editable area, my sublime text renders blank. It is only occuring in Marketo, Marketing software.

Support of g_editable elements

Google Mail uses their own "content editable" element, those are in a iframe therefore #36 has to be solved first before start researching how this kind of element works.

Keyboard hotkey for Linux collides with "Show bookmarks bar"

The keyboard hotkey currently defined in manifest.json - Ctrl + Shift + B - is already in use by Google Chrome, controlling the visibility of the bookmarks bar.

I would recommend setting it to a different key combination, e.g. Ctrl + Shift + H.

Time to celebrate

I did just wanted to mention that we were on place one in trending at Package Control yesterday evening.

screenshot - 07152014 - 10 36 57 pm

Make the icon a simple on/off button

  • Click to activate the already-focused textarea
  • Click to deactivate it
  • Options/about can be accessed with the right click, so no need for a popup

Once GT is connected on a page, "follow field focus", use whatever focused field

We don't support multiple fields on a page, but apparently there are use cases for them. #33 is one, CodePen.io is the other very-nice-to-have is the other one (CodeMirror)

Instead of opening a connection and editor tab for each field, we could just automatically follow the user focus:

  1. User focuses on a field
  2. Clicks on GT icon to open connection
  3. User focuses a different field
  4. GT deactivates the previous field and automatically activates on the new field

follow focus
(this gif highlights on hover, but I mean on focus)

Instead of connecting 1 Field <-> 1 ST tab, we can just keep it 1 Ch tab <-> 1 ST tab

Connection errors

The chrome addon highlights the textarea in IPBoard admin panel and shows message to switch to editor. Editor creates new tab/window but without textarea content and console spills out this :

windows
WebSocketServer id: 1
Setting on message handler
Setting on close handler
Start
Listening on: 58562
Exception in thread Thread-5:
Traceback (most recent call last):
  File "X/threading.py", line 639, in _bootstrap_inner
  File "GhostText in C:\Users\SEJBR\AppData\Roaming\Sublime Text 3\Installed Packages\GhostText.sublime-package", line 33, in run
  File "WebSocket.WebSocketServer in C:\Users\SEJBR\AppData\Roaming\Sublime Text 3\Installed Packages\GhostText.sublime-package", line 72, in start
OverflowError: Python int too large to convert to C ssize_t

Exception in thread Thread-2:
Traceback (most recent call last):
  File "X/threading.py", line 639, in _bootstrap_inner
  File "GhostText in C:\Users\SEJBR\AppData\Roaming\Sublime Text 3\Installed Packages\GhostText.sublime-package", line 74, in run
  File "Http.HttpServer in C:\Users\SEJBR\AppData\Roaming\Sublime Text 3\Installed Packages\GhostText.sublime-package", line 29, in start
  File "Http.HttpServer in C:\Users\SEJBR\AppData\Roaming\Sublime Text 3\Installed Packages\GhostText.sublime-package", line 91, in _parse_request
ValueError: need more than 1 value to unpack```

Both Chrome addon and sublime plugin are set to 4001 port.

The above error seems to fix everytime I change port to different one.

Also
When you close connection you have to restart sublime to create a new one.
I haven't noticed anything in console when that happens.

Should we split the content.js code from background.js code?

Right now it's not entirely clear which functions are meant to be used on the page and which are not. From what I understand, most of them are exclusive to either side (e.g. GhostText.connections is only filled in background.js; GhostText.connectTextArea() can't be used anywhere but content.js) so it would make sense to split libs.js into two files, perhaps only leaving common functions in there—if any.

What do you think?

TextArea chrome highlighting bug

TextArea highlighting remains when tab inside website is changed but the connection is being terminated.

Video showing the bug : https://www.youtube.com/watch?v=Zym294o8HlY

EDIT:
Well sortof connected with this bug I think.
You're able to connect multiple pages at once it They are in different chrome tabs. If They're as in the video above, you can connect only one sice by changing website tab you get disconnected. I'm not sure if that can be fixed. Would be great if it does.

Either allow typing in Chrome when the connection is open, or disable the textarea until it's disconnected

Right now it seems that once the connection is open, if I type in the textarea, any key will replace the entire content.

I would be best to allow two-way synchronization, but if that's too hard, I'd suggest making it <textarea readonly>.

If we go with the latter, a click on the read-only textarea should enable it and close the connection. Before we do that we should implement #6 so that the user knows that the connection has been closed.

Update logo/icon

I asked for a new logo on a Facebook group of webdesigners, hopefully someone will come forward with something nice. We'll need something 128x128 for the Chrome Store and 19x19 specifically for the browser button.

Show connect instructions if multiple non-focused textareas are present on the page

#4

When one textarea is present or if one is focused, the button now automatically connects. If more than one unfocused textareas are present, we wait for the user selection of a textarea.

We need to let the user know what he has to do.

  • Implement notification system. Currently we communicate with alert(): not great
  • Show instructions and errors with this new system

GhostText can't handle multiple file tabs in Codecademy

Codecademy's HTML & CSS track lets the user switch between separate files for HTML and CSS. I'm not sure whether the same textarea is used, but the file contents are replaced when switching tabs, and the same part of the screen stays highlighted as if it were connected to GhostText. However, the new file contents are not shown in Sublime Text.

Once GhostText is connected, it binds to the active file, and won't edit the other file unless the page is entirely reloaded. For instance, disconnecting, switching files and reconnecting just connects to the original file.

This also means GhostText can keep updating a file which is no longer visible (eg it keeps editing HTML after the user switches the view to CSS). (When this happens, Codecademy doesn't notice the changes, unless the user switches to the file again and makes another change in Sublime Text.)

Fails after switching to Sublime Text (OSX 10.9.4, Sublime Text 3)

When I click on the button in chrome, it switches to sublime text and nothing happens. The error in the console is:

WebSocketServer id: 1
Setting on message handler
Setting on close handler
Start
Listening on: 52672
Exception in thread Thread-82:
Traceback (most recent call last):
  File "WebSocket.WebSocketServer in /Users/JConnolly/Library/Application Support/Sublime Text 3/Installed Packages/GhostText.sublime-package", line 61, in start
  File "WebSocket.Frame in /Users/JConnolly/Library/Application Support/Sublime Text 3/Installed Packages/GhostText.sublime-package", line 52, in parse
IndexError: index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./threading.py", line 901, in _bootstrap_inner
  File "GhostText in /Users/JConnolly/Library/Application Support/Sublime Text 3/Installed Packages/GhostText.sublime-package", line 33, in run
  File "WebSocket.WebSocketServer in /Users/JConnolly/Library/Application Support/Sublime Text 3/Installed Packages/GhostText.sublime-package", line 63, in start
UnboundLocalError: local variable 'e' referenced before assignment

No longer working in Chrome

Since Chrome updated last week to

  • Version 43.0.2357.124 m

GhostText is no longer able to connect to Sublime Text
ghosttext

Optionally, automatically connect to editor when the user starts typing in a supported field

We could make Sublime Text come up automatically (as an option) as soon as the user starts typing in a field, to make it as seamless as possible

It might take a bit to implement correctly, though, we don't want this to be annoying

  • Add option to automatically connect to editor when you start typing in a supported field
  • Detect windows closed too quickly, we don't want to re-connect instantly if the user doesn't want it sometimes.
  • It would be great to create a properly-sized and -positioned window just for GhostText, to overlay the field (we'd need to pass coordinates from Chrome to ST)

The only problem with this is that we need again the permission to run code on all pages, even though it could be minimal This for example support dynamically-added fields and it even works with ACE and CodeMirror:

document.addEventListener('onkeypress', function (e) {
  GhostText.enableIfFieldIsSupported(e.target);
});

Close connection after form submission

On GitHub, the same textarea is reused after leaving a comment. We could implement some generic submit detection as well some site-specific listeners.

GhostText for Chrome developers tools

Idea: use Sublime Text to write in the browser's developer console.

It seems like its natural evolution: you write code in the console—exclusively; why not use your text editor to do it? It could be integrated into the current Chrome extension or made as a separate extension (for visibility).

Bypass Chrome 36+ web security by moving connections from content.js to background.js

Chrome 36+ does not allow insecure connections within https pages, currently the WebSockets gets opened by the content script which causes a SecurityError. Using --disable-web-security is only a dirty and not user friendly workaround.

By opening the connection by the background script and messaging between the content script and the background script should bypass this security check.

Origin: fregante/GhostText#5

Guess syntax using elements of the page

Initially discussed on #3, it can be expanded to use elements of the page to detect the platform and therefore the format (HTML for WordPress blogs, BB code for forums, etc)

'Could not find key specification' error when adding the extension to Chrome on Linux

Hi there,

I discovered this extension and corresponding Sublime Text plugin while browsing the "new packages" section on PackageControl and I am very thrilled to try it out!

Unfortunately I get the following error message when adding the extension manually (as described in the README):

screen

The installation from the web store fails with the following message:

There was a problem adding the item to Chrome. Please refresh the page and try again.

I would appreciate any help in getting GhostText to work. I've been looking for something like this for a while.

BR, Feltzer

Encourage feedback and contribution every once in a while

After successful use and disconnection, we could prompt the user to leave feedback on the Chrome Web Store and more importantly to contribute and report issues on GitHub.

This could happen every week/month (a longer message) and/or at every disconnection (a short message like "Disconnected! Issues? Report on GitHub. Happy? Leave rating")

Fixing the repo

Before we go any further, can we agree to follow this procedure to restore the repo?

  1. I trim the repo to my last commit and add the latest commit
  2. You clone the repo from GitHub, discarding your local version

On pressing ctrl+shift+h, 4-5 sublime windows pop up and the text-to-chrome doesn't work

It's not working properly while writing a mail in Yahoo or writing text in titanpad.
When I press ctrl+shift+h 4-5 sublime windows pop up over the chrome. If I enter text in any sublime window, then it's not getting synced with the browser text box.
When I close those windows, then the following error is displayed on the browser

Connection error. 
Make sure that Sublime Text is open and has GhostText installed. 
Try closing and opening it and try again. 
Make sure that the port matches (4001 is the default). 

Which I understand happens because I am closing all the sublime windows. But why 4-5 windows are being opened?
I have enabled the new_window_on_connect mode.

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.