mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-29 03:41:51 +00:00
feat: Dont show reset line if the location is empty, b=no-bug, c=tabs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
|
||||
index e2e0526a0ddd617291f1f6c17bcfb807954b481f..c3d2afff6eaa788309d1c1a7fa40f9b8b4f0fffe 100644
|
||||
index e2e0526a0ddd617291f1f6c17bcfb807954b481f..1373fe072b3c74a52413859d4ad3612cbe1a2bda 100644
|
||||
--- a/browser/base/content/browser.js
|
||||
+++ b/browser/base/content/browser.js
|
||||
@@ -33,6 +33,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
||||
@@ -28,7 +28,7 @@ index e2e0526a0ddd617291f1f6c17bcfb807954b481f..c3d2afff6eaa788309d1c1a7fa40f9b8
|
||||
AboutReaderParent.updateReaderButton(gBrowser.selectedBrowser);
|
||||
TranslationsParent.onLocationChange(gBrowser.selectedBrowser);
|
||||
|
||||
+ gZenPinnedTabManager.onLocationChange(gBrowser.selectedBrowser);
|
||||
+ gZenPinnedTabManager.onLocationChange(gBrowser.selectedBrowser, location);
|
||||
+
|
||||
PictureInPicture.updateUrlbarToggle(gBrowser.selectedBrowser);
|
||||
|
||||
|
||||
@@ -818,8 +818,15 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
||||
}
|
||||
}
|
||||
|
||||
onLocationChange(browser) {
|
||||
const tab = gBrowser.getTabForBrowser(browser);
|
||||
onLocationChange(aBrowser, aLocation) {
|
||||
if (
|
||||
(aLocation == "about:blank" &&
|
||||
BrowserUIUtils.checkEmptyPageOrigin(aBrowser)) ||
|
||||
aLocation == ""
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const tab = gBrowser.getTabForBrowser(aBrowser);
|
||||
if (
|
||||
!tab ||
|
||||
!tab.pinned ||
|
||||
@@ -830,7 +837,7 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
||||
}
|
||||
// Remove # and ? from the URL
|
||||
const pinUrl = tab._zenPinnedInitialState.entry.url.split("#")[0];
|
||||
const currentUrl = browser.currentURI.spec.split("#")[0];
|
||||
const currentUrl = aLocation.split("#")[0];
|
||||
// Add an indicator that the pin has been changed
|
||||
if (pinUrl === currentUrl) {
|
||||
this.resetPinChangedUrl(tab);
|
||||
|
||||
Reference in New Issue
Block a user