From 2dfc574d1b6e48d1837dba86714b8b900b1da3ab Mon Sep 17 00:00:00 2001 From: LordJZ Date: Sat, 6 Apr 2013 18:40:12 +0400 Subject: [PATCH 01/16] Fix Market.getElementRect function. The current coffee code compiles to the following javascript code: if (computedStyle.getPropertyValue('float' !== 'none' || computedStyle.getPropertyValue('position' === 'absolute'))) { if (childRect = getElementRect(childElement)) { childRect; } } return void 0; That is obviously not the expected behavior. --- extension/packages/marker.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/packages/marker.coffee b/extension/packages/marker.coffee index 79a3f48..1506e9c 100644 --- a/extension/packages/marker.coffee +++ b/extension/packages/marker.coffee @@ -231,10 +231,10 @@ getElementRect = (element) -> if rect.width == 0 or rect.height == 0 for childElement in element.children computedStyle = window.getComputedStyle childElement, null - if computedStyle.getPropertyValue 'float' != 'none' or \ - computedStyle.getPropertyValue 'position' == 'absolute' + if computedStyle.getPropertyValue('float') != 'none' or \ + computedStyle.getPropertyValue('position') == 'absolute' - childRect if childRect = getElementRect childElement + return childRect if childRect = getElementRect childElement return undefined -- 2.39.3 From 00018ef68f2cbd0c5988ef5d011a3428d4b70d19 Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Wed, 24 Apr 2013 01:10:04 +0300 Subject: [PATCH 02/16] Closes #102. Fixed bug that was causing issues with markers for some elements --- extension/packages/marker.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extension/packages/marker.coffee b/extension/packages/marker.coffee index 1506e9c..7f97a5f 100644 --- a/extension/packages/marker.coffee +++ b/extension/packages/marker.coffee @@ -230,12 +230,12 @@ getElementRect = (element) -> for rect in rects if rect.width == 0 or rect.height == 0 for childElement in element.children - computedStyle = window.getComputedStyle childElement, null - if computedStyle.getPropertyValue('float') != 'none' or \ - computedStyle.getPropertyValue('position') == 'absolute' + if computedStyle = window.getComputedStyle childElement, null + if computedStyle.getPropertyValue('float') != 'none' or \ + computedStyle.getPropertyValue('position') == 'absolute' - return childRect if childRect = getElementRect childElement + return childRect if childRect = getElementRect childElement return undefined -exports.Marker = Marker +exports.Marker = Marker -- 2.39.3 From 9b893ce34268aa418d7d826a09702da8a0ff985f Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Wed, 24 Apr 2013 01:11:13 +0300 Subject: [PATCH 03/16] Closes #95. Search will now focus the element that contains the matching text --- extension/packages/commands.coffee | 4 ++-- extension/packages/find.coffee | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/extension/packages/commands.coffee b/extension/packages/commands.coffee index ef7ba1f..7d5366a 100644 --- a/extension/packages/commands.coffee +++ b/extension/packages/commands.coffee @@ -254,12 +254,12 @@ command_find_hl = (vim) -> # Search for the last pattern command_n = (vim) -> if vim.findStr.length > 0 - vim.findRng = find.find vim.window, vim.findStr, vim.findRng, find.DIRECTION_FORWARDS + vim.findRng = find.find vim.window, vim.findStr, vim.findRng, find.DIRECTION_FORWARDS, true # Search for the last pattern backwards command_N = (vim) -> if vim.findStr.length > 0 - vim.findRng = find.find vim.window, vim.findStr, vim.findRng, find.DIRECTION_BACKWARDS + vim.findRng = find.find vim.window, vim.findStr, vim.findRng, find.DIRECTION_BACKWARDS, true # Close the Help dialog and cancel the pending hint marker action command_Esc = (vim) -> diff --git a/extension/packages/find.coffee b/extension/packages/find.coffee index f68ee64..db1d18e 100644 --- a/extension/packages/find.coffee +++ b/extension/packages/find.coffee @@ -23,6 +23,7 @@ injectFind = (document, cb) -> # Call back on (Shift)-Enter with proper direction input.addEventListener 'keypress', (event) -> if event.keyCode == event.DOM_VK_RETURN + focusSelection(document, Ci.nsISelectionController.SELECTION_FIND) removeFind(document, false) document.documentElement.appendChild div @@ -36,6 +37,14 @@ removeFind = (document, clear = true) -> if clear clearSelection(document.defaultView) +focusSelection = (document, selectionType) -> + if controller = getController(document.defaultView) + if selection = controller.getSelection(selectionType) + if selection.rangeCount > 0 + element = selection.getRangeAt(0).commonAncestorContainer?.parentNode + if element.focus + element.focus() + createFindContainer = (document) -> div = document.createElement 'div' div.className = 'VimFxReset' @@ -62,7 +71,7 @@ findFactory = (selectionType) -> .createInstance() .QueryInterface(Components.interfaces.nsIFind) - return (window, findStr, findRng = null, direction = DIRECTION_FORWARDS) -> + return (window, findStr, findRng = null, direction = DIRECTION_FORWARDS, focus = false) -> # `find` will also recursively search in all frames. # `innerFind` does the work: # searches, selects, scrolls, and optionally reaches into frames innerFind = (window) -> @@ -87,7 +96,10 @@ findFactory = (selectionType) -> if range = finder.Find(findStr, searchRange, startPt, endPt) controller.getSelection(selectionType).addRange(range) - controller.scrollSelectionIntoView(selectionType, range, 0) + controller.scrollSelectionIntoView(selectionType, range, Ci.nsISelectionController.SCROLL_CENTER_VERTICALLY) + if focus + focusSelection(window.document, selectionType) + return range clearSelection(window, selectionType) -- 2.39.3 From a0d4d357dc417e8fce005ee2bac172cad431a1b9 Mon Sep 17 00:00:00 2001 From: LordJZ Date: Mon, 6 May 2013 08:26:10 -0700 Subject: [PATCH 04/16] Start with proper marker index for each frame. Fixes #107 --- extension/packages/hints.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/packages/hints.coffee b/extension/packages/hints.coffee index 102ba41..f3f48c8 100644 --- a/extension/packages/hints.coffee +++ b/extension/packages/hints.coffee @@ -35,7 +35,7 @@ injectHints = (document) -> document.documentElement.appendChild container for frame in document.defaultView.frames - markers = markers.concat inner(frame.document, markers.length) + markers = markers.concat inner(frame.document, markers.length+1) return markers -- 2.39.3 From 61604c22e9d378947a3744124fc492859f47a81d Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Tue, 7 May 2013 12:35:14 +0300 Subject: [PATCH 05/16] Closes #101. Will reenter normal mode on page reloads --- extension/packages/events.coffee | 1 + extension/packages/vim.coffee | 2 ++ 2 files changed, 3 insertions(+) diff --git a/extension/packages/events.coffee b/extension/packages/events.coffee index e181e12..09a5d6d 100644 --- a/extension/packages/events.coffee +++ b/extension/packages/events.coffee @@ -142,6 +142,7 @@ tabsListener = onLocationChange: (browser, webProgress, request, location) -> blacklisted = utils.isBlacklisted location.spec, getPref 'black_list' if vim = vimBucket.get(browser.contentWindow) + vim.enterNormalMode() vim.blacklisted = blacklisted if rootWindow = utils.getRootWindow vim.window setWindowBlacklisted rootWindow, vim.blacklisted diff --git a/extension/packages/vim.coffee b/extension/packages/vim.coffee index d9531cf..04f27d8 100644 --- a/extension/packages/vim.coffee +++ b/extension/packages/vim.coffee @@ -25,6 +25,8 @@ class Vim enterHintsMode: (@markers, @cb) -> @mode = MODE_HINTS + # TODO: This function should probably remove + # hint markers (if they are present) as well enterNormalMode: -> @mode = MODE_NORMAL @markers = @cb = undefined -- 2.39.3 From 478f9bfd706ae1ae1138621c7f825246c9864b72 Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Tue, 7 May 2013 12:47:52 +0300 Subject: [PATCH 06/16] Closes #97. Reimplemented the 't' command. It should now play nicer with other extensions like SuperStart --- extension/packages/commands.coffee | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/extension/packages/commands.coffee b/extension/packages/commands.coffee index 7d5366a..47e40b3 100644 --- a/extension/packages/commands.coffee +++ b/extension/packages/commands.coffee @@ -45,12 +45,7 @@ command_P = (vim) -> # Open new tab and focus the address bar command_t = (vim) -> if chromeWindow = utils.getRootWindow vim.window - if gBrowser = chromeWindow.gBrowser - # Get the default url for the new tab - newtab_url = getFirefoxPref 'browser.newtab.url' - gBrowser.selectedTab = gBrowser.addTab newtab_url - # Focus the address bar - chromeWindow.focusAndSelectUrlBar() + chromeWindow.BrowserOpenTab() # Copy element URL to the clipboard command_yf = (vim) -> -- 2.39.3 From 6c111e8111fa8600e8d332767e2ca4d545390a0e Mon Sep 17 00:00:00 2001 From: Mozillazg Date: Sat, 11 May 2013 21:30:12 +0800 Subject: [PATCH 07/16] Updated Simplified Chinese translation. --- extension/locale/zh-CN/options.dtd | 6 +++--- extension/locale/zh-CN/vimfx.properties | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extension/locale/zh-CN/options.dtd b/extension/locale/zh-CN/options.dtd index bb0a9f0..f17f3c3 100644 --- a/extension/locale/zh-CN/options.dtd +++ b/extension/locale/zh-CN/options.dtd @@ -9,10 +9,10 @@ - + - - + + diff --git a/extension/locale/zh-CN/vimfx.properties b/extension/locale/zh-CN/vimfx.properties index 05f8bbf..5d0cbfa 100644 --- a/extension/locale/zh-CN/vimfx.properties +++ b/extension/locale/zh-CN/vimfx.properties @@ -9,8 +9,8 @@ help_section_urls =处理 URL help_command_o =聚焦地址栏 help_command_p =打开剪贴板中的链接 help_command_P =在新标签页中打开剪贴板中的链接 -help_command_yf =Copy link url or text input value to the clipboard(needs translation) -help_command_vf =Focus element (needs translation) +help_command_yf =复制链接地址或输入框文本到剪贴板 +help_command_vf =聚焦元素 help_command_yy =复制当前标签页链接到剪贴板 help_command_r =重新载入当前页面 help_command_R =重新载入当前页面及所有外部资源(js,css,img) @@ -55,7 +55,7 @@ help_command_find =进入查找模式 help_command_find_hl=进入查找模式 (needs translation) help_command_n =跳到下一个查找匹配项 help_command_N =跳到上一个查找匹配项 -help_command_dev =Open Developer Toolbar(needs translation) +help_command_dev =打开开发者工具栏 help=帮助 help_version=版本 -- 2.39.3 From e179767da93fe47969b86c1f4872df2487204f8f Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Wed, 12 Jun 2013 14:20:41 +0300 Subject: [PATCH 08/16] Closes #110. Use default hint chars if custom hint chars string is empty --- extension/packages/marker.coffee | 6 ++++-- extension/packages/prefs.coffee | 5 ++++- extension/packages/vim.coffee | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/extension/packages/marker.coffee b/extension/packages/marker.coffee index fae7ff9..4911403 100644 --- a/extension/packages/marker.coffee +++ b/extension/packages/marker.coffee @@ -1,7 +1,9 @@ { interfaces: Ci } = Components XPathResult = Ci.nsIDOMXPathResult -{ getPref } = require 'prefs' +{ getPref +, getDefaultPref +} = require 'prefs' # All elements that have one or more of the following properties # qualify for their own marker in hints mode @@ -106,7 +108,7 @@ class Marker # # The array of markers is returned Marker.createMarkers = (document, startIndex) -> - hintChars = getPref('hint_chars').toLowerCase() + hintChars = getPref('hint_chars').toLowerCase() or getDefaultPref('hint_chars') set = getMarkableElements(document) markers = []; diff --git a/extension/packages/prefs.coffee b/extension/packages/prefs.coffee index 9d868b1..4ee1610 100644 --- a/extension/packages/prefs.coffee +++ b/extension/packages/prefs.coffee @@ -35,7 +35,9 @@ getPref = do -> return (key, defaultValue=undefined) -> value = getBranchPref branch, key, defaultValue - return if value == undefined then DEFAULT_PREF_VALUES[key] else value + return if value == undefined then getDefaultPref(key) else value + +getDefaultPref = (key) -> return DEFAULT_PREF_VALUES[key] getFirefoxPref = do -> prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService) @@ -98,6 +100,7 @@ isCommandDisabled = (key) -> return false exports.getPref = getPref +exports.getDefaultPref = getDefaultPref exports.getFirefoxPref = getFirefoxPref exports.setPref = setPref exports.isCommandDisabled = isCommandDisabled diff --git a/extension/packages/vim.coffee b/extension/packages/vim.coffee index 04f27d8..93771a9 100644 --- a/extension/packages/vim.coffee +++ b/extension/packages/vim.coffee @@ -5,6 +5,7 @@ utils = require 'utils' } = require 'commands' { getPref +, getDefaultPref , isCommandDisabled } = require 'prefs' @@ -36,7 +37,7 @@ class Vim result = maybeCommand @keys.concat([keyStr]) else if !keyboardEvent.ctrlKey and !keyboardEvent.metaKey if @mode == MODE_HINTS - hintChars = getPref('hint_chars').toLowerCase() + hintChars = getPref('hint_chars').toLowerCase() or getDefaultPref('hint_chars') result = hintChars.search(regexpEscape(keyStr)) > -1 if result -- 2.39.3 From 670e37df333fcd3e97d3a21187f12ac57a1f450b Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Wed, 12 Jun 2013 15:47:34 +0300 Subject: [PATCH 09/16] Closes #111. Validating custom hint characters. If there are less than 3 custom hint characters the the default hint characters are used. Custom hint characters are filtered to remove duplicates. --- extension/packages/marker.coffee | 9 ++-- extension/packages/utils.coffee | 73 ++++++++++++++++++++------------ extension/packages/vim.coffee | 4 +- 3 files changed, 51 insertions(+), 35 deletions(-) diff --git a/extension/packages/marker.coffee b/extension/packages/marker.coffee index 4911403..aeebf90 100644 --- a/extension/packages/marker.coffee +++ b/extension/packages/marker.coffee @@ -1,9 +1,9 @@ { interfaces: Ci } = Components XPathResult = Ci.nsIDOMXPathResult -{ getPref -, getDefaultPref -} = require 'prefs' +{ getPref } = require 'prefs' + +utils = require 'utils' # All elements that have one or more of the following properties # qualify for their own marker in hints mode @@ -32,7 +32,6 @@ MARKABLE_ELEMENTS = [ "object" ] - # Marker class wraps the markable element and provides # methods to manipulate the markers class Marker @@ -108,7 +107,7 @@ class Marker # # The array of markers is returned Marker.createMarkers = (document, startIndex) -> - hintChars = getPref('hint_chars').toLowerCase() or getDefaultPref('hint_chars') + hintChars = utils.getHintChars() set = getMarkableElements(document) markers = []; diff --git a/extension/packages/utils.coffee b/extension/packages/utils.coffee index a3dd0bd..278ad49 100644 --- a/extension/packages/utils.coffee +++ b/extension/packages/utils.coffee @@ -13,7 +13,9 @@ ChromeWindow = Ci.nsIDOMChromeWindow _sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService) _clip = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard) -{ getPref } = require 'prefs' +{ getPref +, getDefaultPref +} = require 'prefs' class Bucket constructor: (@idFunc, @newFunc) -> @@ -246,29 +248,46 @@ removeClass = (element, klass) -> name = element.className.replace new RegExp("\\s*#{ klass }"), "" element.className = name or null -exports.Bucket = Bucket -exports.getCurrentTabWindow = getCurrentTabWindow -exports.getEventWindow = getEventWindow -exports.getEventRootWindow = getEventRootWindow -exports.getEventTabBrowser = getEventTabBrowser - -exports.getWindowId = getWindowId -exports.getRootWindow = getRootWindow -exports.isTextInputElement = isTextInputElement -exports.isElementEditable = isElementEditable -exports.getSessionStore = getSessionStore - -exports.loadCss = loadCss - -exports.simulateClick = simulateClick -exports.smoothScroll = smoothScroll -exports.readFromClipboard = readFromClipboard -exports.writeToClipboard = writeToClipboard -exports.timeIt = timeIt -exports.isBlacklisted = isBlacklisted -exports.getVersion = getVersion -exports.parseHTML = parseHTML -exports.isURL = isURL -exports.browserSearchSubmission = browserSearchSubmission -exports.addClass = addClass -exports.removeClass = removeClass +# Get hint characters, convert them to lower case and fall back +# to default hint characters if there are less than 3 chars +getHintChars = do -> + # Remove duplicate characters from string (case insensitive) + removeDuplicateCharacters = (str) -> + seen = {} + return str.toLowerCase() + .split('') + .filter((char) -> if seen[char] then false else (seen[char] = true)) + .join '' + + return -> + hintChars = removeDuplicateCharacters(getPref('hint_chars')) + if hintChars.length < 3 + hintChars = getDefaultPref('hint_chars') + +exports.Bucket = Bucket +exports.getCurrentTabWindow = getCurrentTabWindow +exports.getEventWindow = getEventWindow +exports.getEventRootWindow = getEventRootWindow +exports.getEventTabBrowser = getEventTabBrowser + +exports.getWindowId = getWindowId +exports.getRootWindow = getRootWindow +exports.isTextInputElement = isTextInputElement +exports.isElementEditable = isElementEditable +exports.getSessionStore = getSessionStore + +exports.loadCss = loadCss + +exports.simulateClick = simulateClick +exports.smoothScroll = smoothScroll +exports.readFromClipboard = readFromClipboard +exports.writeToClipboard = writeToClipboard +exports.timeIt = timeIt +exports.isBlacklisted = isBlacklisted +exports.getVersion = getVersion +exports.parseHTML = parseHTML +exports.isURL = isURL +exports.browserSearchSubmission = browserSearchSubmission +exports.addClass = addClass +exports.removeClass = removeClass +exports.getHintChars = getHintChars diff --git a/extension/packages/vim.coffee b/extension/packages/vim.coffee index 93771a9..a2188e2 100644 --- a/extension/packages/vim.coffee +++ b/extension/packages/vim.coffee @@ -5,7 +5,6 @@ utils = require 'utils' } = require 'commands' { getPref -, getDefaultPref , isCommandDisabled } = require 'prefs' @@ -37,8 +36,7 @@ class Vim result = maybeCommand @keys.concat([keyStr]) else if !keyboardEvent.ctrlKey and !keyboardEvent.metaKey if @mode == MODE_HINTS - hintChars = getPref('hint_chars').toLowerCase() or getDefaultPref('hint_chars') - result = hintChars.search(regexpEscape(keyStr)) > -1 + result = utils.getHintChars().search(regexpEscape(keyStr)) > -1 if result @lastKeyStr = keyStr -- 2.39.3 From 49935f994d9e98ad3cd9463bacbfe5ef1f443c06 Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Wed, 12 Jun 2013 18:21:40 +0300 Subject: [PATCH 10/16] Bumped version to 0.4.7 and updated changelogs --- CHANGELOG.md | 95 +++++++++++++++++++++++++++++++++++++++++++ README.md | 85 -------------------------------------- extension/install.rdf | 4 +- 3 files changed, 97 insertions(+), 87 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4df33d2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,95 @@ +# Release Notes + +0.1 (26 Oct 2012) + +- Initial Release + +0.1.1 (27 Oct 2012) + +- Just to deal with AMO - no changes + +0.2 (5 Nov 2012) + +- document.designMode='on' is now honored. Will also provide hint markers for iframes on the page. +- Bug fixed where it would completely reset the toolbar while installing the toolbar button. +- Bug fixed where it's not possible to change the text in the blaclisting textbox +- Changed u/d to scroll half a page, added c-f/c-b to scroll full page +- Added tab movement commands: c-J and c-K. +- Invisible markers bug fixed. +- Global hotkey to disable the commands (equal to the toolbar button click): Alt-Shift V +- ^u and ^d are removed from the command list. ^u is commonly used to show the page source code +- Opening new tab with now focuses the Address Bar +- Other small bugs nailed down. + +0.3 (19 Nov 2012) + +- Fixed [Desktop](https://addons.mozilla.org/en-us/firefox/addon/desktop/) extension compatibility problem +- Removed c-b/c-f for now. c-f is a standard search hotkey. Will put c-f back when proper Vim-like search with / is implemented +- Scrolling with G will now reach the bottom of the page +- Implemented localization, currently there is only Russian localization. Community is welcome + [to contribute your localizations](https://github.com/akhodakivskiy/VimFx/tree/master/extension/locale)! +- Implemented simple smooth scolling + +0.3.2, 0.3.2, 0.3.3 (20-21 Nov 2012) + +- Hotfixes for the build script to include localization related files and folders + +0.4 (9 Dec 2012) + +- Implemented find with `/` and `n/N` +- Added `ar` and `aR` commands to reload pages in all open tabs. +- Added a preference that enables bluring from any element that has input focus in the browser on Esc keydown (on by default) +- Fixed bug where markers and help dialog would blow up some of the pages. +- Marker hints are now sorted with respect to the underlying element area. Elements with larger area get shorter hints +- Added *mail.google.com* to the default black list +- Various bug fixed and improvements. + +0.4.1, 0.4.2 (12-14 Dec 2012) + +- Small tweaks of the find feature. +- Bugfix for keyboard handling on non-english keyboard layouts + +0.4.3 (27 Dec 2012) + +- Toolbar button bugfix +- Added an option to disable individual commands via the help dialog + +0.4.4 (30 Jan 2013) + +- Thanks to @mozillazg and @mcomella for translation contributions. +- Added `gh` command that will navigate to the home page. +- Added `o` command to focus address bar. +- `p` and `P` will parse the contents of the clipboard. If the string in the clipboard appears to be a url then it will navigate to this url. Otherwise it will search for the string in the clipboard using currently selected search provider. +- Now hint markers for links will stay on top of all the markers for different kinds of elements. +- Esc will now also close the focused default search bar. +- Fixed bugs related to keyboard events handling, XUL documents, and some other issues. +- Bug fixed where not all the commands could be disabled via the Help dialog. + +0.4.5 (12 Mar 2013) + +- `:` to open Firefox Developer Toolbar, `Esc` to close it. +- Add Hungarian locale (@thenonameguy). +- Add Polish locale (@grn). +- Don't close pinned tabs when pressing x (@grn). +- Switched to Makefile for building the extension release (@carno). +- Mrakers CSS tweaks (@helmuthdu) + +0.4.6 (27 Mar 2013) + +- Reimplemented find mode: CJK support, performace boost +- `a/` or `a.` to highlight all matches of the search string on the page +- Hint markers will now reach into iframes +- Key handling is disabled when a popupmenu or panel are shown +- `yf` will now also focus links and copy values from text/textarea element +- `vf` will show hit markers to focus the underlying element + +0.4.7 (12 Jun 2013) + +- `embed` and `object` tags will now have their own hints +- Bug fixes related to custom hint chars (@LordJZ) +- Fixed `t` - now it will be nice to other extensions +- Updated Chineese translations (@mozillazg) +- Reenter Normal mode on page reloads to avoid getting stuck in Hints mode withou any hints +- Search will focus element that contains matching text +- Fixed hint markers for iframes +- Marker bug fixes (@LordJZ) diff --git a/README.md b/README.md index 6c5c484..da11e0e 100644 --- a/README.md +++ b/README.md @@ -95,88 +95,3 @@ Global shortcut to enable/disable VimFx: `Shift-Alt-v` N Go to the previous Find match ?,> Show Help Dialog Esc Close this dialog and cancel hint markers - -## Release Notes - -0.1 (26 Oct 2012) - -- Initial Release - -0.1.1 (27 Oct 2012) - -- Just to deal with AMO - no changes - -0.2 (5 Nov 2012) - -- document.designMode='on' is now honored. Will also provide hint markers for iframes on the page. -- Bug fixed where it would completely reset the toolbar while installing the toolbar button. -- Bug fixed where it's not possible to change the text in the blaclisting textbox -- Changed u/d to scroll half a page, added c-f/c-b to scroll full page -- Added tab movement commands: c-J and c-K. -- Invisible markers bug fixed. -- Global hotkey to disable the commands (equal to the toolbar button click): Alt-Shift V -- ^u and ^d are removed from the command list. ^u is commonly used to show the page source code -- Opening new tab with now focuses the Address Bar -- Other small bugs nailed down. - -0.3 (19 Nov 2012) - -- Fixed [Desktop](https://addons.mozilla.org/en-us/firefox/addon/desktop/) extension compatibility problem -- Removed c-b/c-f for now. c-f is a standard search hotkey. Will put c-f back when proper Vim-like search with / is implemented -- Scrolling with G will now reach the bottom of the page -- Implemented localization, currently there is only Russian localization. Community is welcome - [to contribute your localizations](https://github.com/akhodakivskiy/VimFx/tree/master/extension/locale)! -- Implemented simple smooth scolling - -0.3.2, 0.3.2, 0.3.3 (20-21 Nov 2012) - -- Hotfixes for the build script to include localization related files and folders - -0.4 (9 Dec 2012) - -- Implemented find with `/` and `n/N` -- Added `ar` and `aR` commands to reload pages in all open tabs. -- Added a preference that enables bluring from any element that has input focus in the browser on Esc keydown (on by default) -- Fixed bug where markers and help dialog would blow up some of the pages. -- Marker hints are now sorted with respect to the underlying element area. Elements with larger area get shorter hints -- Added *mail.google.com* to the default black list -- Various bug fixed and improvements. - -0.4.1, 0.4.2 (12-14 Dec 2012) - -- Small tweaks of the find feature. -- Bugfix for keyboard handling on non-english keyboard layouts - -0.4.3 (27 Dec 2012) - -- Toolbar button bugfix -- Added an option to disable individual commands via the help dialog - -0.4.4 (30 Jan 2013) - -- Thanks to @mozillazg and @mcomella for translation contributions. -- Added `gh` command that will navigate to the home page. -- Added `o` command to focus address bar. -- `p` and `P` will parse the contents of the clipboard. If the string in the clipboard appears to be a url then it will navigate to this url. Otherwise it will search for the string in the clipboard using currently selected search provider. -- Now hint markers for links will stay on top of all the markers for different kinds of elements. -- Esc will now also close the focused default search bar. -- Fixed bugs related to keyboard events handling, XUL documents, and some other issues. -- Bug fixed where not all the commands could be disabled via the Help dialog. - -0.4.5 (12 Mar 2013) - -- `:` to open Firefox Developer Toolbar, `Esc` to close it. -- Add Hungarian locale (@thenonameguy). -- Add Polish locale (@grn). -- Don't close pinned tabs when pressing x (@grn). -- Switched to Makefile for building the extension release (@carno). -- Mrakers CSS tweaks (@helmuthdu) - -0.4.6 (27 Mar 2013) - -- Reimplemented find mode: CJK support, performace boost -- `a/` or `a.` to highlight all matches of the search string on the page -- Hint markers will now reach into iframes -- Key handling is disabled when a popupmenu or panel are shown -- `yf` will now also focus links and copy values from text/textarea element -- `vf` will show hit markers to focus the underlying element diff --git a/extension/install.rdf b/extension/install.rdf index 7ad8d8f..bde421b 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -9,7 +9,7 @@ VimFx@akhodakivskiy.github.com http://www.github.com/akhodakivskiy/VimFx - 0.4.6 + 0.4.7 2 true 2 @@ -24,7 +24,7 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 12.0 - 20.* + 22.* -- 2.39.3 From 3393d9bc76545d30148dc6a3cafcf119f077029d Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Wed, 12 Jun 2013 18:30:33 +0300 Subject: [PATCH 11/16] Reversed change log order --- CHANGELOG.md | 130 +++++++++++++++++++++++++-------------------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4df33d2..f6824ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,38 +1,54 @@ -# Release Notes +# Change Log -0.1 (26 Oct 2012) +0.4.7 (12 Jun 2013) -- Initial Release +- `embed` and `object` tags will now have their own hints +- Bug fixes related to custom hint chars (@LordJZ) +- Fixed `t` - now it will be nice to other extensions +- Updated Chineese translations (@mozillazg) +- Reenter Normal mode on page reloads to avoid getting stuck in Hints mode withou any hints +- Search will focus element that contains matching text +- Fixed hint markers for iframes +- Marker bug fixes (@LordJZ) -0.1.1 (27 Oct 2012) +0.4.6 (27 Mar 2013) -- Just to deal with AMO - no changes +- Reimplemented find mode: CJK support, performace boost +- `a/` or `a.` to highlight all matches of the search string on the page +- Hint markers will now reach into iframes +- Key handling is disabled when a popupmenu or panel are shown +- `yf` will now also focus links and copy values from text/textarea element +- `vf` will show hit markers to focus the underlying element -0.2 (5 Nov 2012) +0.4.5 (12 Mar 2013) -- document.designMode='on' is now honored. Will also provide hint markers for iframes on the page. -- Bug fixed where it would completely reset the toolbar while installing the toolbar button. -- Bug fixed where it's not possible to change the text in the blaclisting textbox -- Changed u/d to scroll half a page, added c-f/c-b to scroll full page -- Added tab movement commands: c-J and c-K. -- Invisible markers bug fixed. -- Global hotkey to disable the commands (equal to the toolbar button click): Alt-Shift V -- ^u and ^d are removed from the command list. ^u is commonly used to show the page source code -- Opening new tab with now focuses the Address Bar -- Other small bugs nailed down. +- `:` to open Firefox Developer Toolbar, `Esc` to close it. +- Add Hungarian locale (@thenonameguy). +- Add Polish locale (@grn). +- Don't close pinned tabs when pressing x (@grn). +- Switched to Makefile for building the extension release (@carno). +- Mrakers CSS tweaks (@helmuthdu) -0.3 (19 Nov 2012) +0.4.4 (30 Jan 2013) -- Fixed [Desktop](https://addons.mozilla.org/en-us/firefox/addon/desktop/) extension compatibility problem -- Removed c-b/c-f for now. c-f is a standard search hotkey. Will put c-f back when proper Vim-like search with / is implemented -- Scrolling with G will now reach the bottom of the page -- Implemented localization, currently there is only Russian localization. Community is welcome - [to contribute your localizations](https://github.com/akhodakivskiy/VimFx/tree/master/extension/locale)! -- Implemented simple smooth scolling +- Thanks to @mozillazg and @mcomella for translation contributions. +- Added `gh` command that will navigate to the home page. +- Added `o` command to focus address bar. +- `p` and `P` will parse the contents of the clipboard. If the string in the clipboard appears to be a url then it will navigate to this url. Otherwise it will search for the string in the clipboard using currently selected search provider. +- Now hint markers for links will stay on top of all the markers for different kinds of elements. +- Esc will now also close the focused default search bar. +- Fixed bugs related to keyboard events handling, XUL documents, and some other issues. +- Bug fixed where not all the commands could be disabled via the Help dialog. -0.3.2, 0.3.2, 0.3.3 (20-21 Nov 2012) +0.4.3 (27 Dec 2012) -- Hotfixes for the build script to include localization related files and folders +- Toolbar button bugfix +- Added an option to disable individual commands via the help dialog + +0.4.1, 0.4.2 (12-14 Dec 2012) + +- Small tweaks of the find feature. +- Bugfix for keyboard handling on non-english keyboard layouts 0.4 (9 Dec 2012) @@ -44,52 +60,36 @@ - Added *mail.google.com* to the default black list - Various bug fixed and improvements. -0.4.1, 0.4.2 (12-14 Dec 2012) - -- Small tweaks of the find feature. -- Bugfix for keyboard handling on non-english keyboard layouts - -0.4.3 (27 Dec 2012) +0.3.2, 0.3.2, 0.3.3 (20-21 Nov 2012) -- Toolbar button bugfix -- Added an option to disable individual commands via the help dialog +- Hotfixes for the build script to include localization related files and folders -0.4.4 (30 Jan 2013) +0.3 (19 Nov 2012) -- Thanks to @mozillazg and @mcomella for translation contributions. -- Added `gh` command that will navigate to the home page. -- Added `o` command to focus address bar. -- `p` and `P` will parse the contents of the clipboard. If the string in the clipboard appears to be a url then it will navigate to this url. Otherwise it will search for the string in the clipboard using currently selected search provider. -- Now hint markers for links will stay on top of all the markers for different kinds of elements. -- Esc will now also close the focused default search bar. -- Fixed bugs related to keyboard events handling, XUL documents, and some other issues. -- Bug fixed where not all the commands could be disabled via the Help dialog. +- Fixed [Desktop](https://addons.mozilla.org/en-us/firefox/addon/desktop/) extension compatibility problem +- Removed c-b/c-f for now. c-f is a standard search hotkey. Will put c-f back when proper Vim-like search with / is implemented +- Scrolling with G will now reach the bottom of the page +- Implemented localization, currently there is only Russian localization. Community is welcome + [to contribute your localizations](https://github.com/akhodakivskiy/VimFx/tree/master/extension/locale)! +- Implemented simple smooth scolling -0.4.5 (12 Mar 2013) +0.2 (5 Nov 2012) -- `:` to open Firefox Developer Toolbar, `Esc` to close it. -- Add Hungarian locale (@thenonameguy). -- Add Polish locale (@grn). -- Don't close pinned tabs when pressing x (@grn). -- Switched to Makefile for building the extension release (@carno). -- Mrakers CSS tweaks (@helmuthdu) +- document.designMode='on' is now honored. Will also provide hint markers for iframes on the page. +- Bug fixed where it would completely reset the toolbar while installing the toolbar button. +- Bug fixed where it's not possible to change the text in the blaclisting textbox +- Changed u/d to scroll half a page, added c-f/c-b to scroll full page +- Added tab movement commands: c-J and c-K. +- Invisible markers bug fixed. +- Global hotkey to disable the commands (equal to the toolbar button click): Alt-Shift V +- ^u and ^d are removed from the command list. ^u is commonly used to show the page source code +- Opening new tab with now focuses the Address Bar +- Other small bugs nailed down. -0.4.6 (27 Mar 2013) +0.1.1 (27 Oct 2012) -- Reimplemented find mode: CJK support, performace boost -- `a/` or `a.` to highlight all matches of the search string on the page -- Hint markers will now reach into iframes -- Key handling is disabled when a popupmenu or panel are shown -- `yf` will now also focus links and copy values from text/textarea element -- `vf` will show hit markers to focus the underlying element +- Just to deal with AMO - no changes -0.4.7 (12 Jun 2013) +0.1 (26 Oct 2012) -- `embed` and `object` tags will now have their own hints -- Bug fixes related to custom hint chars (@LordJZ) -- Fixed `t` - now it will be nice to other extensions -- Updated Chineese translations (@mozillazg) -- Reenter Normal mode on page reloads to avoid getting stuck in Hints mode withou any hints -- Search will focus element that contains matching text -- Fixed hint markers for iframes -- Marker bug fixes (@LordJZ) +- Initial Release -- 2.39.3 From 2903ba2ee9f7d9d1966f77352adc16643952ae3d Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Wed, 12 Jun 2013 22:58:07 +0300 Subject: [PATCH 12/16] Closes #117. Hotfix for custom hint chars --- extension/packages/utils.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extension/packages/utils.coffee b/extension/packages/utils.coffee index 278ad49..ff66a35 100644 --- a/extension/packages/utils.coffee +++ b/extension/packages/utils.coffee @@ -264,6 +264,8 @@ getHintChars = do -> if hintChars.length < 3 hintChars = getDefaultPref('hint_chars') + return hintChars + exports.Bucket = Bucket exports.getCurrentTabWindow = getCurrentTabWindow exports.getEventWindow = getEventWindow -- 2.39.3 From a315e6cb7e46b3b1d32bc6cee00e3aff81b4594f Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Wed, 12 Jun 2013 22:59:17 +0300 Subject: [PATCH 13/16] Version bump and changedlog update --- CHANGELOG.md | 2 +- extension/install.rdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6824ba..b28e010 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -0.4.7 (12 Jun 2013) +0.4.8 (12 Jun 2013) - `embed` and `object` tags will now have their own hints - Bug fixes related to custom hint chars (@LordJZ) diff --git a/extension/install.rdf b/extension/install.rdf index bde421b..efaff0e 100644 --- a/extension/install.rdf +++ b/extension/install.rdf @@ -9,7 +9,7 @@ VimFx@akhodakivskiy.github.com http://www.github.com/akhodakivskiy/VimFx - 0.4.7 + 0.4.8 2 true 2 -- 2.39.3 From 1ab19509394dd0f27bedc62955246d8b490fc246 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Fri, 19 Jul 2013 21:53:27 +0200 Subject: [PATCH 14/16] Add contribution steps/help/info to the readme --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index da11e0e..1aa214f 100644 --- a/README.md +++ b/README.md @@ -4,29 +4,29 @@ *Contribute your localization! See `locale` folder* -[VimFx](https://addons.mozilla.org/en-US/firefox/addon/vimfx/) -is a [Mozilla Firefox](https://www.mozilla.org/en-US/firefox/fx/#desktop) -extension which introduces Vim-style keyboard shortcuts for browsing and navigation, +[VimFx](https://addons.mozilla.org/en-US/firefox/addon/vimfx/) +is a [Mozilla Firefox](https://www.mozilla.org/en-US/firefox/fx/#desktop) +extension which introduces Vim-style keyboard shortcuts for browsing and navigation, significantly reducing the use of mouse, and allowing your hands to rest on the home row. -VimFx was inspired by [Vimperator](http://www.vimperator.org/) -and designed after [Vimium](http://vimium.github.com/) for +VimFx was inspired by [Vimperator](http://www.vimperator.org/) +and designed after [Vimium](http://vimium.github.com/) for [Google Chrome](https://www.google.com/intl/en/chrome/browser/) preserving the shortcuts and behavior. If your are used to Vimium then it will be easy to get started with VimFx. ## Why VimFx was created -Even before Vimium there was Vimperator for Firefox. In my opinion the problem -with Vimperator is that it has too many features and aggressively changes +Even before Vimium there was Vimperator for Firefox. In my opinion the problem +with Vimperator is that it has too many features and aggressively changes the default Firefox appearance and behavior. Vimium was developed for Google Chrome -and it was exactly what I needed in terms of added functionality. That's why I decided +and it was exactly what I needed in terms of added functionality. That's why I decided to develop similar extension for Firefox. VimFx will be nice to your browser and to your habits. Promise. ## Credits - + ## Key Features @@ -36,7 +36,7 @@ VimFx will be nice to your browser and to your habits. Promise. ## Shortcuts -Might not be up to date. Please refer to the Help dialog withing the extension +Might not be up to date. Please refer to the Help dialog withing the extension for the most relevant list. Global shortcut to enable/disable VimFx: `Shift-Alt-v` @@ -95,3 +95,35 @@ Global shortcut to enable/disable VimFx: `Shift-Alt-v` N Go to the previous Find match ?,> Show Help Dialog Esc Close this dialog and cancel hint markers + +## Contributing + +tl;dr: Pull request to the **develop** branch! + +1. Fork. + +2. Clone. + +3. Checkout the **develop** branch: `git checkout develop` + +4. Create a new branch (using develop as base): `git checkout -b myTopicBranch` + + Using develop (and not master) as base makes it easier to pull request to develop when you're done. + +5. Code! Try to follow the style of the rest of the code. There are no written rules (yet?). + +6. Push your branch to your fork on GitHub. + +7. Pull request to the **develop** branch. + +Tips: + +- Compile the .coffee files with the **`--bare`** option! Otherwise you will get errors. + +- Run `coffee -cbw .` from the root of the project to automatically compile on changes. + +- Put a file called exactly `VimFx@akhodakivskiy.github.com` in the extensions/ folder of a Firefox + profile, containing the absolute path to the extension/ folder in the project. Then you just need + to restart Firefox (use some add-on!) after each change. More details in [this MDN article][mdn-extdevenv]. + +[mdn-extdevenv]: https://developer.mozilla.org/en-US/docs/Setting_up_extension_development_environment#Firefox_extension_proxy_file -- 2.39.3 From b02d7d945d628a1233c660e658618a544a660f3c Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Fri, 19 Jul 2013 23:18:57 +0300 Subject: [PATCH 15/16] Small update to README.md after @lydell --- README.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1aa214f..cff888e 100644 --- a/README.md +++ b/README.md @@ -96,34 +96,27 @@ Global shortcut to enable/disable VimFx: `Shift-Alt-v` ?,> Show Help Dialog Esc Close this dialog and cancel hint markers -## Contributing +## Contributing and Reporting Issues -tl;dr: Pull request to the **develop** branch! +tl;dr: Pull request to the **develop** branch! Report in English! 1. Fork. - 2. Clone. - 3. Checkout the **develop** branch: `git checkout develop` - 4. Create a new branch (using develop as base): `git checkout -b myTopicBranch` - Using develop (and not master) as base makes it easier to pull request to develop when you're done. - 5. Code! Try to follow the style of the rest of the code. There are no written rules (yet?). - 6. Push your branch to your fork on GitHub. - 7. Pull request to the **develop** branch. -Tips: +## sm::WillTips: - Compile the .coffee files with the **`--bare`** option! Otherwise you will get errors. - - Run `coffee -cbw .` from the root of the project to automatically compile on changes. - - Put a file called exactly `VimFx@akhodakivskiy.github.com` in the extensions/ folder of a Firefox profile, containing the absolute path to the extension/ folder in the project. Then you just need to restart Firefox (use some add-on!) after each change. More details in [this MDN article][mdn-extdevenv]. +- Only create tickets for issues and feature requests in English. Otherwise duplicate + tickets in different languages will pile up. [mdn-extdevenv]: https://developer.mozilla.org/en-US/docs/Setting_up_extension_development_environment#Firefox_extension_proxy_file -- 2.39.3 From 75e98ac4ed4c5734d4b03bc19e959f001a86814c Mon Sep 17 00:00:00 2001 From: Anton Khodakivskiy Date: Fri, 19 Jul 2013 23:23:42 +0300 Subject: [PATCH 16/16] Added link to the contributions section at the top of README.md --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cff888e..cf2c224 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,13 @@ # VimFx - Vim keyboard shortcuts for Firefox -*Extension AMO page*: https://addons.mozilla.org/en-US/firefox/addon/vimfx/ +*Extension AMO page*: https://addons.mozilla.org/en-US/firefox/addon/vimfx. -*Contribute your localization! See `locale` folder* +Contribute your localization! See `locale` folder. + +Read [Contributing and Reporting Issues section](#contributing-and-reporting-issues) for tips. +> Tl;dr: Pull request to the **develop** branch! Issues in **English**! + +## Overview [VimFx](https://addons.mozilla.org/en-US/firefox/addon/vimfx/) is a [Mozilla Firefox](https://www.mozilla.org/en-US/firefox/fx/#desktop) @@ -24,10 +29,6 @@ to develop similar extension for Firefox. VimFx will be nice to your browser and to your habits. Promise. -## Credits - - - ## Key Features - Concise shortcuts for most commonly performed actions @@ -98,8 +99,6 @@ Global shortcut to enable/disable VimFx: `Shift-Alt-v` ## Contributing and Reporting Issues -tl;dr: Pull request to the **develop** branch! Report in English! - 1. Fork. 2. Clone. 3. Checkout the **develop** branch: `git checkout develop` @@ -109,7 +108,7 @@ tl;dr: Pull request to the **develop** branch! Report in English! 6. Push your branch to your fork on GitHub. 7. Pull request to the **develop** branch. -## sm::WillTips: +### Tips: - Compile the .coffee files with the **`--bare`** option! Otherwise you will get errors. - Run `coffee -cbw .` from the root of the project to automatically compile on changes. -- 2.39.3