Skip to content

Commit

Permalink
Keyboard combination/shortcut to go to home (#42)
Browse files Browse the repository at this point in the history
* Resizable hostname field

* Clicking on encode checkbox doesn't update the full url #33

* Set focus on next param element after deleting

* New blue accent color

* Highlight when typing params

* RichTextBox event handling refactoring + few fixes corner cases

* Keyboard navigation - loop

* Fix riche-textbox highlighting for paths (when short)

* Autosuggest layout adjustments

* Make sure that autosuggest is always visible

* Disable spell check on input fields

* AutoSuggest: after removing last suggestion from the list the AS box stays visible #34

* Param menu (#36)

* Initial menu

* Move param options code to separate file

* Handling events

* Change func responsible for encoding

* Encoding handlers - working version

* Move menu to the same level as the button

* Mark all new params as encoded

* Move param options menu to the right position horizontally; make sure it is visible

* Set url-encoded property when param is encoded

* Remove encoding checkbox

* Make the param options button focusable by keyboard (ctrl+right)

* Adjust param menu layout

* Allow only one param encoding at the time

* Keyboard handling for param's menu

* Auto encode if param value contains ampersand

* Fix highlighting after turning on/off encoding

* Fix click handling (double click event)

* Move checkboxes to the right

* Fix for exception in base64 decoding; Fix urldecoding

* Handle escape - close menu

* Param options refactoring (#38)

* Initial refactoring

* small changes / references / idea on handling options

* Final refactored ParamOptions object

* Sample usage

* Added encoding options to paramoptions menu - it doesn't work perfectly

* Fixed click handling for options; url encoding by default; partially fixed keyboard handling

* Update to TS2.2

* Fixed base64 ancoding/decoding

* Additional fixes for param encoding (make sure base64 strings are as well urlEncoded)

* Fix for highlighting url parts: last param was including hash

* Remove redundant variables

* Bump new version; Changed icon for params menu button

* Add delete option to param-options menu; Fix for using obsoltete container for param-options action

* Update screenshots

* Small update for extension packing script

* Keyboard combination/shortcut to go to home #40
  • Loading branch information
maxwroc authored Mar 12, 2017
1 parent 97439f3 commit cc3855a
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
1 change: 1 addition & 0 deletions UrlEditorPRO/UrlEditorPRO.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
<Content Include="app\manifest.json" />
</ItemGroup>
<ItemGroup>
<TypeScriptCompile Include="app\background.ts" />
<TypeScriptCompile Include="app\modules\autosuggest.ts" />
<TypeScriptCompile Include="app\modules\helpers.ts" />
<TypeScriptCompile Include="app\modules\param_options.ts" />
Expand Down
13 changes: 13 additions & 0 deletions UrlEditorPRO/app/background.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/// <reference path="modules/url_parser.ts" />


module UrlEditor {
chrome.commands.onCommand.addListener(command => {
if (command == "goToHomepage") {
chrome.tabs.getSelected(null, function (tab) {
var uri = new UrlEditor.Uri(tab.url);
chrome.tabs.update(tab.id, { url: uri.protocol() + "//" + uri.host() });
});
}
});
}
12 changes: 11 additions & 1 deletion UrlEditorPRO/app/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "Url Editor PRO",
"description": "Url parser which makes editing complex URLs as easy as possible. Features: params decoding, auto-suggest, keyboard navigation..",
"version": "0.9.0.0",
"version": "0.9.1.1",

"permissions": [
"http://*/*",
Expand All @@ -21,11 +21,21 @@
"default_popup": "popup.html"
},
"options_page": "options.html",
"background": {
"scripts": [ "modules/url_parser.js", "background.js" ]
},
"commands": {
"_execute_browser_action": {
"suggested_key": {
"default": "Ctrl+Shift+U"
}
},
"goToHomepage": {
"suggested_key": {
"default": "Ctrl+Shift+H",
"mac": "Command+Shift+H"
},
"description": "Go to homepage (root path)"
}
},
"content_security_policy": "script-src 'self' https://www.google-analytics.com; object-src 'self'"
Expand Down
4 changes: 4 additions & 0 deletions UrlEditorPRO/app/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ <h3>Icon</h3>
<h3>Keyboard shortcuts</h3>
<div class="setting-value">
<div class="grid highlihgt-first-column">
<div>Global</div>
<div><span id="action-shortcut"></span><span>Lunch extension (action) pane</span></div>
<div><span id="goToHome-shortcut"></span><span>Go to homepage (root path)</span></div>
<div>&nbsp;</div>
<div>Action pane</div>
<div><span>Ctrl+&quot;+&quot;</span><span>Add new parameter</span></div>
<div><span>Ctrl+&quot;-&quot;</span><span>Remove currently selected parameter</span></div>
<div><span>Ctrl+Arrow</span><span>Navigate to nearest field</span></div>
Expand Down
10 changes: 7 additions & 3 deletions UrlEditorPRO/app/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,15 @@ module UrlEditor.Options {
}
}

let commandToElemIDMap: IStringMap = {
"_execute_browser_action": "action-shortcut",
"goToHomepage": "goToHome-shortcut"
};

chrome.commands.getAll((commands: any[]) => {
chrome.commands.getAll(commands => {
commands.forEach(command => {
if (command.name == "_execute_browser_action") {
document.getElementById("action-shortcut").innerText = command.shortcut;
if (commandToElemIDMap[command.name]) {
document.getElementById(commandToElemIDMap[command.name]).innerText = command.shortcut;
}
});
});
Expand Down

0 comments on commit cc3855a

Please sign in to comment.