Comments (7)
Good idea, but would it be too frequent of sending requests to update stored content?
from privly-chrome.
Hello, I extended seemless posting idea as the following. Looking forward to receiving further ideas.
Design purpose:
- Seemless & easy to use
- Allowing disable/enable this function easily
- Allowing multiline
- Not breaking original posting logic of the website
- Allowing mixed content
- Not too much requests
General design direction:
- When using priv.ly in textarea, the whole content would be encrypted with a default life time (can be changed in config, or a drop down).
- If users want to add plain messages, they can use priv.ly extension button to generate a link.
Details:
- When a textarea get focus, there would be a priv.ly control icon (the same as present), indicates whether this textarea is in "private mode".
- priv.ly control icon (and the textarea) has three status: Public Mode, Private Mode, Permanent Private Mode, can be switched by clicking.
- Public Mode (default): priv.ly is not working. Textarea works as original.
- Private Mode: priv.ly is working. if the page is refreshed (more accurately, the textarea is re-generated), the textarea will return to Public Mode.
- Permanent Private Mode (remember using private mode for this textarea): this textarea will be always in Private Mode after refresh. (use XPath?)
- there could be other stuff help indicate the current status. for example, the background of the textarea could become green when in (Permanent) Private Mode.
- users can drag images to the textbox when it is in (Permanent) Private Mode. priv.ly treat it as data URI inlined images. The whole message to encrypt is an HTML document.
Use cases:
-
Users want to publish public messages
just don't do anything. the default status of the textarea is Public Mode. If it is in other two modes, just click the icon once or twice.
-
Users want to send a piece of private message
Click the icon to switch it to (Permanent) Private Mode, write messages, then hit control/command + enter to submit. (for what happens when submitting, see technical details section below)
-
Users want to send private messages in Facebook Chat for the current session
The same as case 2. Since the textarea wouldn't be regenerated, both Private Mode and Permanent Private Mode is OK.
-
Users want to send one private message in Facebook Chat
After submitting a private message, click icon to return to Public Mode.
-
Users want to send private messages for all Facebook Chat sessions
Switch to permanent private mode.
TODO: How to correctly generate feature for selecting desired textarea? A simple Xpath from document root might work in most of the cases, but not all. -
Users want to embed image in Public Mode
Impossible.
-
Users want to embed image in Private Mode
Drag image to the "Private Mode" textarea (like GitHub).
-
Users want to post private messages mixed with images and texts
Write texts, then drag images.
-
Users want to have both public and private part in one message
Switch textarea to public mode if it isn't in. Then click extension button to popup a writing window which will finally generate a privly link and it can be automatically inserted to the textarea (similar to current).
-
Users want to generate a privly link for being used in other applications
Click extension button.
-
Users want to specify a life time for the private message
Provide a drop down to change life time when hover on control icon. (see demo)
Technical details:
-
What happens when hitting ctrl/command + enter or enter in Private Mode?
- On entering private mode:
- ACTION_INIT
- On blur:
- ACTION_UPDATE
- On Keypress:
- ACTION_UPDATE (with throttle)
- On
Enter
orCtrl,Command + Enter
:- insert new line
- ACTION_UPDATE, when complete: forward the event to original textarea
Actions:
- ACTION_INIT:
- Disable submit button if there is one
- create a new link
- insert the new link to textarea/contenteditable div
- enable submit button
- onComplete callback
- ACTION_UPDATE:
- Disable submit button if there is one
- update stored content
- enable submit button
- onComplete callback
Expected behaviour: (* = the same with original behavior)
- stackoverflow:
enter or ctrl+enter: insert new line (*) - Facebook status:
enter: insert new line ()
ctrl+enter: publish () - Facebook chat:
enter: publish (*)
ctrl+enter: insert new line
- On entering private mode:
-
Content editable or ACE/CodeMirror-like stuff?
To be discussed.
-
What happens when switching between modes when there are already contents?
To be discussed.
from privly-chrome.
First thoughts:
- No encrypting whole HTML documents, only their contents. Sandboxing is pretty cool, but its attack surface is still too big.
- You have too many modes/options. I think it would be better to have a toggle for "on" and "off". If it is on, then it should be on for all elements on the domain with the same xpath. We could then also publish a default setting for things like Twitter DMs, FB chats, and gchats.
- When typing into the seamless form, keys should have the same interpretation as if you were typing them into the host page's form. This will require some clever hackery.
from privly-chrome.
For the third point, I think passing keyboard enter events to inherit potential submiting features (like Facebook Chat) is enough. Other keyboard events might be pretty hard to deal with.
For example, inputing @x
in Twitter will popup an at list, while replacing original @x
text node to something like <a href="/x">...</a>
, which means it won't work while original <div contenteditable>
doesn't contain such text nodes. In addition, even though we successfully hacked this that make it work in browsers, it still won't work in server side because the server only receives URI links. Besides, this may leak data to the host site for as far as I know some websites collect all keyboard events.
from privly-chrome.
Regarding the third point: Absolutely. I just had control characters in mind, thanks for clarifying.
from privly-chrome.
@smcgregor LOL, sounds good
from privly-chrome.
This has landed in develop
from privly-chrome.
Related Issues (20)
- Privly icon scrolls with window HOT 1
- Privly Button doesn't work with TinyMCE HOT 17
- no file as chromeOptions.html HOT 4
- Privly posting doesn't work with Youtube comment HOT 10
- Only Automatically Close Posting Window if Pasting Successful HOT 3
- Iframes don't get resized
- Privly should not try to process URLs inside editable iframe HOT 2
- Change run_at property of privly.js? HOT 3
- Merge gsoc-develop to develop HOT 6
- Right click menu does not launch new message in google chat
- Implement proper rate limiting for iframe injection
- Erratic behavior on Facebook chat box HOT 4
- Broken Build HOT 1
- Fix CodeClimate Issues HOT 1
- Add Continuous Integration System to Forks
- Draw Attention to Extension Popup Icon on Installation HOT 6
- Remove LocalStorage on Uninstall HOT 5
- Use the chrome.runtime api onInstalled event to launch the firstrun page HOT 4
- Privly button weird behaiour HOT 1
- Add Integration Test for Injection Parameters
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from privly-chrome.