Skip to content

Commit

Permalink
Redesign highlighting logic to use an overlay div
Browse files Browse the repository at this point in the history
This approach fixes issues with caret positioning and accidental sending
of JNS markup in the email text under certain conditions [#12]

[#31]
  • Loading branch information
sbrudz committed Apr 2, 2016
1 parent 20dfa4a commit 3f9a854
Show file tree
Hide file tree
Showing 13 changed files with 230 additions and 784 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
just-not-sorry*.zip
.idea
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ The Chrome Extension can be found at https://chrome.google.com/webstore/detail/j
### Requests to add or change warning phrases
Please [create a GitHub issue](https://github.com/cyrusinnovation/just-not-sorry/issues/new) with your request. If you're a developer, you're welcome to submit a pull request.

**NOTE:** All warning phrases must include a link to an article that explains why the phrase could negatively impact someone's message.

### Development Setup
* `git clone` the repo
* Follow the [instructions on the Chrome docs](https://developer.chrome.com/extensions/getstarted#unpacked) to load the extension
Expand All @@ -37,8 +39,9 @@ Open 'SpecRunner.html' in your web browser to run the test suite.
### Libraries Used
For production:
* [gmail.js](https://github.com/KartikTalwar/gmail.js)
* [findAndReplaceDOMText](https://github.com/padolsey/findAndReplaceDOMText)
* A custom fork of [Caret.js](https://github.com/sbrudz/Caret.js) that takes line breaks into account
* [head.js](http://headjs.com/)
* [dom-regexp-match](https://github.com/webmodules/dom-regexp-match)
* [chrome-platform-analytics](https://github.com/GoogleChrome/chrome-platform-analytics)
* [jQuery](https://jquery.com/)
* Based on [gmail-chrome-extension-boilerplate](https://github.com/KartikTalwar/gmail-chrome-extension-boilerplate)

Expand All @@ -48,4 +51,4 @@ For test:

### License

Just Not Sorry is Copyright © 2015 Cyrus Innovation, Inc. It is free software, and may be redistributed under the terms specified in the (MIT) LICENSE file.
Just Not Sorry is Copyright © 2015-16 Cyrus Innovation, Inc. It is free software, and may be redistributed under the terms specified in the (MIT) LICENSE file.
5 changes: 3 additions & 2 deletions SpecRunner.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
<script src="spec/lib/jasmine-2.3.4/boot.js"></script>

<script src="lib/jquery-2.1.4.min.js"></script>
<script src="lib/dom-regexp-match-1.1.0.js"></script>
<script src="spec/lib/jasmine-jquery.js"></script>

<script src="lib/findAndReplaceDOMText.js"></script>

<!-- include source files here... -->
<script src="src/WarningChecker.js"></script>
<script src="src/HighlightGenerator.js"></script>

<!-- include spec files here... -->
<script src="spec/WarningCheckerSpec.js"></script>
<script src="spec/HighlightGeneratorSpec.js"></script>

</head>

Expand Down
1 change: 1 addition & 0 deletions lib/dom-regexp-match-1.1.0.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3f9a854

Please sign in to comment.