Skip to content

Commit

Permalink
Update urlbar.js
Browse files Browse the repository at this point in the history
  • Loading branch information
117649 committed Sep 1, 2021
1 parent e02b189 commit 70d5c73
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions AdvancedLocationbar/chrome/content/urlbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

gURLBar.addEventListener("input", (event) => { this._syncValue(); });

gURLBar.addEventListener("ValueChange", (event) => { if (!this._noSync) { this._syncValue()} })
gURLBar.addEventListener("ValueChange", (event) => { if (!this._noSync) { this._syncValue() } })

gURLBar.textbox.addEventListener("mouseover", (event) => {
if (this._mouseover)
Expand All @@ -86,10 +86,14 @@
}
this._mouseover = true;
var bO = this.getBoundingClientRect();
if (this.linkify_on_mouse_icon && this._iconWasHovered || this.linkify_on_keys && (event.shiftKey || event.ctrlKey || event.metaKey || event.altKey) ||
this.linkify_on_mouse_top && event.screenY < this.screenY + bO.height / 4 ||
this.linkify_on_mouse_bottom && event.screenY >= this.screenY + bO.height / 4)
if (this.linkify_on_mouse_icon &&
this._iconWasHovered ||
this.linkify_on_keys && (event.shiftKey || event.ctrlKey || event.metaKey || event.altKey) ||
this.linkify_on_mouse_top && event.screenY < this.inputBox.screenY + bO.height / 4 ||
this.linkify_on_mouse_bottom && event.screenY >= this.inputBox.screenY + bO.height / 4) {
this.prettyView();
this.setAttribute("linkify", "true");
}
else
setTimeout(function (self) {
if (self._mouseover && self.getAttribute("linkify") != "true") {
Expand All @@ -106,10 +110,10 @@
return;
this.removeAttribute("linkify");
this._mouseover = false;
if (/* !this._focused && */ this.plain) {
if (!this._focused && this.plain) {
this.prettyView();
document.removeEventListener("keydown", this, false);
} /* else */
} else this.plain = true;
gURLBar._updateUrlTooltip();
});

Expand Down

0 comments on commit 70d5c73

Please sign in to comment.