Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
GaurangTandon committed Oct 7, 2015
2 parents 842cb74 + fc5c406 commit aabcbbf
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 133 deletions.
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## [ProKeys](https://chrome.google.com/webstore/detail/prokeys/ekfnbpgmmeahnnlpjibofkobpdkifapn)
[![logo of prokeys](http://s27.postimg.org/7z02emgg3/main_logo.png)](https://chrome.google.com/webstore/detail/prokeys/ekfnbpgmmeahnnlpjibofkobpdkifapn)

**Latest version**: 2.5.4
**Status**: active, stable build

A completely free Google Chrome and Opera extension that lets you be productive in online text-related work with its number of features like:
ProKeys is a completely free, [Google Chrome](https://chrome.google.com/webstore/detail/prokeys/ekfnbpgmmeahnnlpjibofkobpdkifapn) and [Opera](https://addons.opera.com/en/extensions/details/prokeys/?display=en) extension that lets you be productive in online text-related work with its number of features like:

[More info on all these in Help section inside the app]
1. **Snippets** - define custom abbreviations, and retrieve the text associated with them simply by pressing the hotkey (default: Shift+Space). Example: "brb" can expand to "Be right back!"
Expand All @@ -29,7 +30,7 @@ First of all, thanks for contribution! Every small bit of it counts! You can:
3. Fork the repo, make changes, and submit a pull request, describing the changes made.
4. Help me translate ProKeys to your native language.
5. Share the word about ProKeys with people!
6. [Flattr ProKeys](https://flattr.com/thing/3a21a326ed09014a80254c2938cd5bee) - buy me a beer!
6. [Flattr ProKeys](https://flattr.com/thing/3a21a326ed09014a80254c2938cd5bee) - buy me a ~~beer~~ coffee!

**Contact me** - [email protected] - to discuss anything related to the above if you want to.

Expand All @@ -39,12 +40,32 @@ First of all, thanks for contribution! Every small bit of it counts! You can:

1. Snippets/settings access in context menus
2. Clipboard access in snippet body
3. Update Opera with latest release
4. Create ProKeys for Firefox, IE, Edge, Safari
3. Get started with gaurangtandon.github.io/prokeys. Use http://dns.js.org/ for hosting. Use: https://github.com/Khan/tota11y
4. Update Opera with latest release
5. Create ProKeys for Firefox, IE, Edge, Safari

## Change Log

**2.5.4** - Current - 14/08/2015
**2.6.2** - upcoming
- settings access in context menu // (show modal in settings page on context menu click)

**2.6.1** - upcoming
- remove case-sensitivity for snippet names!
- highlight snippet on save, edit to indicate save
- fix for certain keycodes not corresponding with their actual key name (in hotkey feature)
- support for http://ckeditor.com/demo // (if possible)

**2.6.0** - Current - 06/10/2015
- shorter image names
- minified images - saving nearly 10 KB :)
- new Google Plus logo in About page
- fix for [excessive CPU usage issue](https://github.com/GaurangTandon/ProKeys/issues/3)
- disabled ProKeys for input boxes using ReactJS (they possess `reactid ` in `dataset`)
- refactored detector.js code and others with ESLint
- fix for bug when pressing hotkey while having some text selected
- fix for GitHub, JSFiddle, and other sites which use their own editor (CodeMirror, ace, etc. which interferes with ProKeys)

**2.5.4** - 14/08/2015
- changes in links to the tryit editor in Help section
- fix super ugly bug of "Search" button in popup

Expand Down
35 changes: 26 additions & 9 deletions css/options.css
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,19 @@ ol{
display: none;
}

#help dd a{
color: #1143BB;
}

#help dd a[data-target="#tryit"]{
display: inline-block;
min-width: 150px;
max-width: 350px;
margin: 10px 0;
color: #1143BB;
cursor: pointer;
}

#help h3{
font-size: 26px;
margin-bottom: 15px;
Expand Down Expand Up @@ -319,35 +332,39 @@ ol{
font-size: 15px;
}

.tryit{
#tryit{
margin: auto;
width: 70%;
height: 210px;
border: 1px solid grey;
}

.tryit .nav{
#tryit .nav{
width: 100%;
height: 30px;
background: rgb(232, 232, 232);
}

.tryit .nav p{
#tryit .nav span{
padding-left: 10px;
}

#tryit .nav p{
display: inline-block;
height: 100%;
max-width: 200px;
padding: 5px;
cursor: pointer;
min-width: 50px;
margin: auto 10px;
margin: auto 0 auto 5px;
font-family: 'Segoe UI', Tahoma, sans-serif;
}

.tryit .nav .show{
#tryit .nav .show{
background: white;
}

.tryit > .show{
#tryit > .show{
display: block;
height: 180px;
width: 100%;
Expand All @@ -358,11 +375,11 @@ ol{
overflow-y: auto;
}

.tryit textarea{
#tryit textarea{
resize: none;
}

.tryit > :not(.nav):not(.show){
#tryit > :not(.nav):not(.show){
display: none;
}

Expand Down Expand Up @@ -656,4 +673,4 @@ td{
width: 55px;
height: 55px;
}
}
}
2 changes: 1 addition & 1 deletion css/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -716,4 +716,4 @@ body.darkened .fade{

.zoom75 .new_user_msg button{
font-size: 25px;
}
}
2 changes: 1 addition & 1 deletion css/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ body {
table {
border-collapse: collapse;
border-spacing: 0;
}
}
23 changes: 12 additions & 11 deletions html/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ <h1>Help</h1>

<section>
<p class="warning"><em><strong>Heads up!</strong> "Using a snippet" means performing snippet substitution in a web page with an already created snippet. "Creating a snippet" means creating a new snippet in the popup box.</em></p>
<p>Click the question you want to know about. Try the features as you learn them in this editor.</p>
<p>Click the question you want to know about. Try the features in this editor</p>

<div class="tryit">
<div id="tryit">
<div class="nav">
<span>Swap editor mode: </span>
<p class="show" data-selector="textarea">Textarea</p>
<p data-selector=".editor">Editable Div</p>
</div>
<textarea class="show">This is a normal text editor. It does not support HTML formatting.
<textarea class="show">This is a normal text editor. It does not support bold, italics, etc. formatting using HTML.

But multiline text is still supported.</textarea>
<div class="editor" contenteditable=true>This is a contenteditable or editable div. These editors are generally found in your email client like Gmail, Outlook, etc.<br><br><i>This editor supports </i><b>HTML formatting</b>. You can use the "my_sign" sample snippet here, and see the effect.</div>
Expand All @@ -104,15 +105,15 @@ <h2>Info</h2>
<p><b>Example:</b> Snippet with snippet name - "brb". The snippet name is the abbreviation. It is <b>case-sensitive</b>, so "brb", "BRB", and "bRb" are all different.
Typing "brb" and pressing the hotkey, would replace it with the snippet body, which here is "be right back".
Snippets can be created in the popup box.</p>
<p><b>Try this in editor:</b> in the editor above, use any of the sample snippets that have been provided to you in the popup box.</p></dd>
<a href="#tryit">Try snippets in editor</a> - you can view the snippets in the popup box</dd>

<dt>Can a deleted snippet be restored?</dt>
<dd>No, unfortunately, snippets once deleted cannot be restored. Therefore, it is recommended you take a backup regularly.</dd>

<dt>What are Placeholders?</dt>
<dd><p>Placeholders are fields in the snippet body which are populated with dynamic values provided by you on using the snippet. A placeholder has the format `%text%` such that the text can only contain alphabets, digits and the underscore symbol.</p>
<p><b>Example:</b> snippet "wishBDay", which you can use to wish your friends Happy Birthday! Since the name of the friend keeps changing, so you can add a placeholder to the snippet body, as "%name%"(without quotes). It would be auto-highlighted whenever you use the snippet and you can type your friend's name into it.</p>
<p><b>Try this in editor:</b> in the editor above, use the "letter" sample snippet to see placeholders in action.</p>
<a href="#tryit">Try the "letter" sample snippet in editor</a>
<p><b>Usage</b> of a placeholder:
<ol>
<li>Insert placeholders into the snippet body while creating or editing a snippet. Then, use this snippet.</li>
Expand All @@ -133,7 +134,7 @@ <h2>Info</h2>
<li>Press `=` (equals) key and the result of evaluation would replace the `[[...=]]`!</li>
</ol>
</p>
<p><b>Try this in editor:</b>Type some expression like: "[[5^3=]]"</p>
<a href="#tryit">Try math expressions in the editor</a> (like "[[5^3=]]")
</dd>

<dt>What are Date/Time macros?</dt>
Expand Down Expand Up @@ -239,8 +240,8 @@ <h2>Info</h2>
<p><B>Evaluation</b> of these symbols is from left to right, and the symbol that appears first (at the top) in the symbols list, is evaluated first.</p></p>
<p><b>Example: </b>Consider this date/time macro: <span class="code">[[%d(YYYY:MM:D)]]</span>. If you want to move 10 days forward and 5 months backward,
you could write: <span class="code">[[%d(YYYY:MM-5:D+10)]]</span> This was independent calculation. If you it to be relative, use <span class="code">[[%d(!YYYY:MM-5:D+10)]]</span> (with that <span class="code">!</span>)</p>
<p><b>Try this in editor: </b>In the editor above, use the "dateArithmetic" sample snippet to see magic of date and time arithmetic.</p>
<p><b>Limitation</b>: The "date" and "time" symbols do not support date and time arithmetic (for now; I might fix this in future).</p>
<a href="#tryit">Try date and time arithmetic in editor</a> (use dateArithmetic sample snippet)
<p><b>Limitation</b>: The "date" and "time" symbols do not support date and time arithmetic (I might fix this in future).</p>
</dd>
<dt>What are Variables?</dt>
<dd><p>Variables are used to insert dynamic values at any time while typing. They are inbuilt and cannot be created by you. Of course, I would love a recommendation from you for a new variable! (email: [email protected])</p>
Expand Down Expand Up @@ -273,7 +274,7 @@ <h2>Info</h2>
</tr>
</table>
</p>
<p><b>Try this in editor:</b> Use any of the three variables (usage as specified above)</p>
<a href="#tryit">Try these variables in editor</a>
</dd>
<dt>How are Variables different from Snippets?</dt>
<dd>Variables are more useful when you need to retrieve system-related dynamic values. Like the version of the browser, which would need to be manually entered into a snippet. A Variable would get it automatically.</dd>
Expand All @@ -297,7 +298,7 @@ <h2>Troubleshoot</h2>
<div id="about">
<h1>About</h1>
Made by <a href="https://plus.google.com/u/0/110764286121755681313/posts">Gaurang Tandon</a><br>
Version: 2.5.3<br>
Version: 2.5.4<br>
&copy; 2015 Copyright Reserved<br><br>

Check out the <a href="https://github.com/GaurangTandon/ProKeys">change log and source code on GitHub!</a><br><br>
Expand Down Expand Up @@ -377,4 +378,4 @@ <h1>Backup, Restore and Print</h1>
</div>
</main>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@
<!--used to fade the body when modal is shown-->
<div class="fade"></div>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ chrome.runtime.onInstalled.addListener(function(details){
}else if(details.reason === "update"){
version = chrome.runtime.getManifest().version;
title = "ProKeys updated successfully to v" + version;
text = "Please reload active tabs to use new version. Major changes:\nArithmetic support in date/time macros. For more, visit the changelog in \"About\" page.";
text = "Please reload active tabs to use new version.\nThis version implements bug fixes and other updates";
}

// either update or install was there
Expand All @@ -47,4 +47,4 @@ chrome.runtime.onMessage.addListener(function(msg, sender){
}
});
}
});
});
7 changes: 3 additions & 4 deletions js/detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -1556,9 +1556,8 @@
return node.className.search('(\\s|^)' + className + '(\\s|$)') != -1 ? true : false;
}

// attaches event to document
// receives `this` as the function to call
// on event
// attaches event to document receives
// `this` as the function to call on event
function eventAttacher(event){
var node = event.target;

Expand Down Expand Up @@ -1649,4 +1648,4 @@
}
});
}
})();
})();
Loading

0 comments on commit aabcbbf

Please sign in to comment.