diff options
author | Doug Kearns <dougkearns@gmail.com> | 2008-12-30 23:34:05 +1100 |
---|---|---|
committer | Doug Kearns <dougkearns@gmail.com> | 2008-12-31 13:08:41 +1100 |
commit | 0f0d26d504940905f8f7c910a6e73771057ffceb (patch) | |
tree | 7435ee98204cfb40fefe43d0549538402f0f8471 /common/content/editor.js | |
parent | f7b110e45f8d9e78448cbc5490287a924de1c901 (diff) | |
download | pentadactyl-0f0d26d504940905f8f7c910a6e73771057ffceb.tar.gz |
Normalise element related temporary variable names (elt -> elem).
Diffstat (limited to 'common/content/editor.js')
-rw-r--r-- | common/content/editor.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/common/content/editor.js b/common/content/editor.js index 5c9ffedb..efebefd3 100644 --- a/common/content/editor.js +++ b/common/content/editor.js @@ -557,9 +557,9 @@ function Editor() //{{{ unselectText: function () { - let elt = window.document.commandDispatcher.focusedElement; - if (elt && elt.selectionEnd) - elt.selectionEnd = elt.selectionStart; + let elem = window.document.commandDispatcher.focusedElement; + if (elem && elem.selectionEnd) + elem.selectionEnd = elem.selectionStart; }, selectedText: function () @@ -570,20 +570,20 @@ function Editor() //{{{ pasteClipboard: function () { - let elt = window.document.commandDispatcher.focusedElement; + let elem = window.document.commandDispatcher.focusedElement; - if (elt.setSelectionRange && util.readFromClipboard()) + if (elem.setSelectionRange && util.readFromClipboard()) // readFromClipboard would return 'undefined' if not checked // dunno about .setSelectionRange { - let rangeStart = elt.selectionStart; // caret position - let rangeEnd = elt.selectionEnd; - let tempStr1 = elt.value.substring(0, rangeStart); + let rangeStart = elem.selectionStart; // caret position + let rangeEnd = elem.selectionEnd; + let tempStr1 = elem.value.substring(0, rangeStart); let tempStr2 = util.readFromClipboard(); - let tempStr3 = elt.value.substring(rangeEnd); - elt.value = tempStr1 + tempStr2 + tempStr3; - elt.selectionStart = rangeStart + tempStr2.length; - elt.selectionEnd = elt.selectionStart; + let tempStr3 = elem.value.substring(rangeEnd); + elem.value = tempStr1 + tempStr2 + tempStr3; + elem.selectionStart = rangeStart + tempStr2.length; + elem.selectionEnd = elem.selectionStart; } }, |