Skip to content

Commit

Permalink
JS prettier fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tombh committed Jun 18, 2019
1 parent f8b0e55 commit d079f9a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion webext/src/background/dimensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export default class extends utils.mixins(CommonMixin) {
) {
this.log(
`Requesting browser resize for new char dimensions: ` +
`${incoming.width}x${incoming.height} (old: ${this.char.width}x${this.char.height})`
`${incoming.width}x${incoming.height} (old: ${this.char.width}x${
this.char.height
})`
);
this.char = _.clone(incoming);
this.resizeBrowserWindow();
Expand Down
6 changes: 4 additions & 2 deletions webext/src/dom/commands_mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ export default MixinBase =>
state = this.config.browsh.use_experimental_text_visibility;
state = !state;
this.config.browsh.use_experimental_text_visibility = state;
message = state ? 'on' : 'off'
this.sendMessage(`/status,info,Experimental text visibility: ${message}`);
message = state ? "on" : "off";
this.sendMessage(
`/status,info,Experimental text visibility: ${message}`
);
this.sendSmallTextFrame();
break;
}
Expand Down
4 changes: 2 additions & 2 deletions webext/src/dom/text_builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ export default class extends utils.mixins(CommonMixin, SerialiseMixin) {
// Although do note that, unlike selection ranges, sub-selections can appear seemingly
// inside other selections for things like italics or anchor tags.
_getNodeDOMBoxes() {
let rects = []
let rects = [];
// TODO: selectNode() hangs if it can't find a node in the DOM
// Node.isConnected() might be faster
// It's possible that the node has dissapeared since nodes were collected.
if (document.body.contains(this._node)){
if (document.body.contains(this._node)) {
this._range.selectNode(this._node);
rects = this._range.getClientRects();
}
Expand Down
2 changes: 1 addition & 1 deletion webext/src/dom/tty_grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default class {
// the TTY grid.
_isCharObscured(colours) {
if (!this.config.browsh.use_experimental_text_visibility) {
return false
return false;
}
return (
colours[0][0] === colours[1][0] &&
Expand Down

0 comments on commit d079f9a

Please sign in to comment.