X-Git-Url: https://git.donarmstrong.com/?p=dactyl.git;a=blobdiff_plain;f=common%2Fcontent%2Fmow.js;h=770929dd5fb580df96979c5d50810aa2b7bfb297;hp=5c7a28c698e9c1a09cc859f194261cde1382f06d;hb=9044153cb63835e39b9de8ec4ade237c03e3888a;hpb=70740024f9c028c1fd63e1a1850ab062ff956054 diff --git a/common/content/mow.js b/common/content/mow.js index 5c7a28c..770929d 100644 --- a/common/content/mow.js +++ b/common/content/mow.js @@ -4,7 +4,7 @@ // // This work is licensed for reuse under an MIT license. Details are // given in the LICENSE.txt file included with this file. -"use strict"; +/* use strict */ var MOW = Module("mow", { init: function init() { @@ -21,11 +21,9 @@ var MOW = Module("mow", { if (modes.have(modes.OUTPUT_MULTILINE)) { this.resize(true); - if (options["more"] && this.isScrollable(1)) { + if (options["more"] && this.canScroll(1)) // start the last executed command's output at the top of the screen - let elements = this.document.getElementsByClassName("ex-command-output"); - elements[elements.length - 1].scrollIntoView(true); - } + DOM(this.document.body.lastElementChild).scrollIntoView(true); else this.body.scrollTop = this.body.scrollHeight; @@ -37,14 +35,14 @@ var MOW = Module("mow", { events.listen(window, this, "windowEvents"); modules.mow = this; - let fontSize = util.computedStyle(document.documentElement).fontSize; + let fontSize = DOM(document.documentElement).style.fontSize; styles.system.add("font-size", "dactyl://content/buffer.xhtml", "body { font-size: " + fontSize + "; } \ html|html > xul|scrollbar { visibility: collapse !important; }", true); XML.ignoreWhitespace = true; - util.overlayWindow(window, { + overlay.overlayWindow(window, { objects: { eventTarget: this }, @@ -67,7 +65,7 @@ var MOW = Module("mow", { - +