kopia lustrzana https://github.com/browsh-org/browsh
JS prettier fixes
rodzic
f8b0e5592b
commit
d079f9a353
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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] &&
|
||||
|
|
Ładowanie…
Reference in New Issue