Skip to content

Commit

Permalink
3.1.6: update some script overrides.
Browse files Browse the repository at this point in the history
  • Loading branch information
aminomancer committed Apr 7, 2022
1 parent d93808f commit e2f3ceb
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 1,168 deletions.
10 changes: 5 additions & 5 deletions JS/restorePreProtonArrowpanels.uc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name Restore pre-Proton Arrowpanels
// @version 1.0.2
// @version 1.0.3
// @author aminomancer
// @homepage https://github.com/aminomancer/uc.css.js
// @description The mother of all proton reversals. Probably my least favorite "feature" of the UI refresh has been the removal of arrows from arrowpanels. I'd call it misguided, except I can't comprehend what guided it in the first place. I mean — they're called arrowpanels, and that should really say it all. The point of arrows is to point at something. In this case, to point at the node to which the panel is anchored. Some might think it's enough that the popup simply be anchored to the node. That might be true for small elements like tooltips. But panels are big enough that they can be lined up with many nodes, especially when they're opened on a toolbar that's full of other buttons. It's not like there aren't other ways to see where the panel is anchored, but why give the user less information? Moreover, don't the arrows look good? This change, more than any of the other ones, feels like change for change's sake. Stripping things down merely for the sake of simplifying them. Anyway, this script will basically restore a bunch of stuff that was removed in Nightly 96.0a1. Arrowpanels' glory days are not behind them, not if I have anything to say about it...
Expand All @@ -21,7 +21,7 @@
},
});
spec.prototype._setSideAttribute = function (event) {
if (!this.isArrowPanel || !this.isAnchored) {
if (!this.isArrowPanel || !event.isAnchored) {
return;
}

Expand All @@ -46,7 +46,7 @@

let arrow = this.shadowRoot.querySelector(".panel-arrow");
if (arrow) {
arrow.hidden = !this.isAnchored;
arrow.hidden = !event.isAnchored;
this.shadowRoot.querySelector(".panel-arrowbox").style.removeProperty("transform");
}

Expand Down Expand Up @@ -97,15 +97,15 @@
this.panelContent.style.display = "";
}
if (this.isArrowPanel && event.target == this) {
if (this.isAnchored && this.anchorNode) {
if (event.isAnchored && this.anchorNode) {
let anchorRoot =
this.anchorNode.closest("toolbarbutton, .anchor-root") || this.anchorNode;
anchorRoot.setAttribute("open", "true");
}

let arrow = this.shadowRoot.querySelector(".panel-arrow");
if (arrow) {
arrow.hidden = !this.isAnchored;
arrow.hidden = !event.isAnchored;
this.shadowRoot
.querySelector(".panel-arrowbox")
.style.removeProperty("transform");
Expand Down
3 changes: 2 additions & 1 deletion resources/in-content/ext-ublock.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

/* uBlock Origin dark theme */

@-moz-document regexp("^moz-extension://.*/.*")
/* @-moz-document regexp("^moz-extension://.*/.*") */
@-moz-document url("disabled")
{
@media (prefers-color-scheme: dark) {
:root[uc-extension-id="uBlock0@raymondhill.net"] {
Expand Down
3 changes: 2 additions & 1 deletion resources/in-content/system.css
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@
}

.container {
margin-inline-start: calc(3% + 65px) !important;
/* below: left align the text in about:reader */
/* margin-inline-start: calc(3% + 65px) !important; */
max-width: var(--final-content-width) !important;
}

Expand Down
Loading

0 comments on commit e2f3ceb

Please sign in to comment.