Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow admins to hide power button to prevent its use #2940

Closed
9 tasks done
Skinflint opened this issue Nov 6, 2023 · 24 comments
Closed
9 tasks done
Labels
declined declined enhancement New feature or request

Comments

@Skinflint
Copy link

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT an issue with YouTube, Facebook or Twitch.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

Would it be possible to add an option in the disabledPopupPanelParts settings pushed by Chrome Management to disable/hide the stickyTools Div in the popup like you do with the 4 other options/divs in that setting?

A specific URL where the issue occurs.

popup panel

Steps to Reproduce

Open the popup panel. See the big power button to enabled and disable the extension. Set the CSS to hidden for the stickyTools div to hide it. Remove the CSS to show the button again.

Expected behavior

With the addition of the setting, set the CSS to hide that div. Without that setting, keep the div as visible.

Actual behavior

No current option to hide the button.

uBO version

1.52.2

Browser name and version

Chrome 118

Operating System and version

ChromeOS 118

@gorhill
Copy link
Member

gorhill commented Nov 6, 2023

pushed by Chrome Management

?

@Skinflint
Copy link
Author

Skinflint commented Nov 6, 2023

We are using the JSON file in Google Workspace Admin Console to set some adminSettings as well as the disabledPopupPanelParts. Here is a snippet of the current JSON:
{ "adminSettings": { "Value": "{\"userSettings\":{\"advancedUserEnabled\":false,\"autoUpdate\":true,\"contextMenuEnabled\":false,\"dynamicFilteringEnabled\":false,\"popupPanelSections\":3}}" }, "disabledPopupPanelParts": { "Value": ["basicTools","extraTools","overviewPane"] } }

@gorhill
Copy link
Member

gorhill commented Nov 6, 2023

I don't understand the issue being reported. When I add the following as a policy:

{
  "3rdparty": {
    "extensions": {
      "cjpalhdlnbpafiamejdnhcphjbkeiagm": {
        "disabledPopupPanelParts": [
          "basicTools",
          "extraTools",
          "overviewPane"
        ]
      }
    }
  }
}

I don't see anything unexpected in the popup panel:

image

If I toggle the power button:

image

@gorhill
Copy link
Member

gorhill commented Nov 6, 2023

Ok you want the reload button to not show up?

@Skinflint
Copy link
Author

My apologies for not being more clear. This isn't a bug that needs to be fixed, but a feature request. I apologize if there was a different way to submit a feature request over a bug, but I was hoping to add something like the following to hide the button.

ublockOrigin

{ "3rdparty": { "extensions": { "cjpalhdlnbpafiamejdnhcphjbkeiagm": { "disabledPopupPanelParts": [ "basicTools", "extraTools", "overviewPane", "stickyTools" ] } } } }

@gorhill gorhill changed the title [Feature Request] disabledPopupPanelParts hide StickyTools [Feature Request] Allow admins to hide power button to prevent its use Nov 6, 2023
@gorhill
Copy link
Member

gorhill commented Nov 6, 2023

If the power button area is hidden, this would cause issues if extraTools is left visible, as these need the padlock/eraser/reload tools as part of their functionality, and these tools sit in the power button area.

@MasterKia MasterKia added the enhancement New feature or request label Nov 6, 2023
@Skinflint
Copy link
Author

That makes sense. In my use case I wasn't looking at the extraTools and it's dependencies since I hid them. In order to get this to work without requiring extraTools be hidden, the option couldn't hide the entire div with ID "stickyTools" just like you mentioned. It could set the div with ID "switch" to "display: none", as well as possibly changing the CSS for the class "rulesetTools" from "flex-direction: column" to "flex-direction: row" to remove some of the negative space. However, that last change isn't a requirement as the column view still looks okay when the buttons are shown.

You could also change the CSS for [id] under the class "rulesetTools" from "visibility: hidden" to "display: none" in order to completely remove the negative space. Though, I assume that change would require areas of the code to start using "display: none" and "display: inline-flex" instead of "visibility: hidden" and "visibility: visible" for those buttons.

All that said, thank you for a great extension and for being responsive on the issue tracker.

@iam-py-test
Copy link
Contributor

Dumb idea (and maybe someone already suggested this, sorry if that's the case), but what if the power button was present and correctly displayed if uBo was enabled/disabled, but could not be interacted with. I know that would be extra work for little benefit, though.
Thanks

@gwarser
Copy link

gwarser commented Nov 13, 2023

You can try using https://github.com/gorhill/uBlock/wiki/Deploying-uBlock-Origin:-configuration#advancedsettings to set https://github.com/gorhill/uBlock/wiki/Advanced-settings#uistyles to pointer-events:none. The whole popup should not respond to mouse cursor.

@u-RraaLL
Copy link
Contributor

Can probably be broken by opening popup in a new window and using inspect element. But most people won't know about that.

@gorhill
Copy link
Member

gorhill commented Nov 13, 2023

The whole popup should not respond to mouse cursor.

Good idea. I am going to go with this, this free me from working on something I am not convinced is worth it.

@gorhill gorhill closed this as completed Nov 13, 2023
@gorhill gorhill added the declined declined label Nov 13, 2023
@gwarser
Copy link

gwarser commented Nov 13, 2023

This affect dashboard too.

@SaumayTyagi
Copy link

Screenshot (735)

how to do this please help.

@gwarser
Copy link

gwarser commented Oct 5, 2024

@SaumayTyagi follow the links in my post above, or explain more your situation.

@SaumayTyagi
Copy link

like where to write this code(in registry)(pointer-events:none) this code .please can you tell detailed steps)

@SaumayTyagi
Copy link

Screenshot (736)
in this.

@SaumayTyagi
Copy link

we have to write here ? if yes how and what to write?

@gwarser
Copy link

gwarser commented Oct 5, 2024

If you have access to this computer, then just go to uBO advanced settings and copy-paste it there.

https://github.com/gorhill/uBlock/wiki/Advanced-settings

@SaumayTyagi
Copy link

thanks . done. thank you very much .

@SaumayTyagi
Copy link

but how to revert it
i am not able to revert

@SaumayTyagi

This comment was marked as duplicate.

@gorhill
Copy link
Member

gorhill commented Oct 5, 2024

Please just read the documentation carefully, we gave you the link:

If you want to reset a specific setting to its default value, just delete the value, uBO will fill the missing value with the default one.

@uBlockOrigin uBlockOrigin locked as spam and limited conversation to collaborators Oct 5, 2024
@gorhill
Copy link
Member

gorhill commented Oct 5, 2024

Seven notifications in less than an hour for a question that was already answer here and in the documentation, locking the issue.

@gwarser
Copy link

gwarser commented Oct 5, 2024

@SaumayTyagi you will need to use developer tools to remove the pointer events style from body or just reinstall uBO.

@uBlockOrigin uBlockOrigin unlocked this conversation Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
declined declined enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants