Jump to content

Mypal 68 in Windows XP - Custom Buttons and Extensions


Recommended Posts


To complete the report on customccsfx with @AstroSkipper's button: wunderbar. 9.7 out of 10 points, due to three minor cosmetic issues that I had not yet solved.

1- Moving the tab toollbar to the bottom leaves the close-maximize, minimize thinghie hanging half wayf off the screen (see first attached image). Nothing important, but aesthetically unpleasant.

2- The tab toollbar at the bottom doesn't pick up the lwtheme when using customccsfofx 3.3.2, but it kind of does it (it doesn't import it oin the right hand corner, with the window maximized) with 4.4.7.

3- Importing buttons_on_navbar_button_roundness.css makes buttons in the bar rounded. It does so by applying border-radius: 20px !important; to them. I took that line, and pasted it into line 33 of buttons_on_menubar_toolbar_classic_appearance.cc, into line 74 of buttons_on_navbar_classic_appearance.css (perhaps unnecessarily), and into line 61of buttons_on_tabs_toolbar_classic_appearance.css. In this last tabs toolbar, though, some of the @AstroSkipper's menus do get rounded up, but not others. See second attached image, with the memory minimization picking up the rounding (and being reduced accordingly) but not the "open about pages" button. Couldn't figure out why yet.

Other than that, it does all I want. 

The only thing missing to my taste is the equivalent of menuedit, to get rid of context items not already included in customxxsfx 3.3.2, and to consolidate file-edit-view-bookmarks-tools-help menus the way I like them. Thanks!
 

1.png

2.png

Link to comment
Share on other sites

On 11/28/2023 at 1:52 AM, dmiranda said:

Importing buttons_on_navbar_button_roundness.css makes buttons in the bar rounded

 

On 11/28/2023 at 1:52 AM, dmiranda said:

In this last tabs toolbar, though, some of the @AstroSkipper's menus do get rounded up, but not others. See second attached image, with the memory minimization picking up the rounding (and being reduced accordingly) but not the "open about pages" button. Couldn't figure out why yet.


The aboutbuttuon is a special custom button coded quite unusually. It is generated in JavaScript by the var variable and is a menu button. When hovering on all buttons, you will notice that this button renders differenly from all the others. I think the code imported by the stylesheet buttons_on_navbar_button_roundness.css can't target this kind of custom button. It is simply not recognised as a standard toolbar button by the stylesheet. To change the appearance of this button in a toolbar (e.g. nav-bar) itself, you have to change the code inside the aboutbutton.uc.js file directly.

Cheers, AstroSkipper matrix.gif

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites

On 11/29/2023 at 11:50 AM, AstroSkipper said:

 


The aboutbuttuon is a special custom button coded quite unusually. It is generated in JavaScript by the var variable and is a menu button. When hovering on all buttons, you will notice that this button renders differenly from all the others. I think the code imported by the stylesheet buttons_on_navbar_button_roundness.css can't target this kind of custom button. It is simply not recognised as a standard toolbar button by the stylesheet. To change the appearance of this button in a toolbar (e.g. nav-bar) itself, you have to change the code inside the aboutbutton.uc.js file directly.

Cheers, AstroSkipper matrix.gif

 

On 11/29/2023 at 12:58 PM, dmiranda said:

Yeah, I thought so. I will report if I manage to do so.Thanks.

@dmiranda The solution to let the custom button aboutbutton recognise by the CSS stylesheet buttons_on_navbar_button_roundness.css is a bit more complicated than I thought. You have indeed to change the code of the script aboutbutton.uc.js. It seems to be a class issue. This is the first part of the original script code from line 1 to 26:
 

   (function() {

    if (location != 'chrome://browser/content/browser.xul')
       return;

    try {
       CustomizableUI.createWidget({
          id: 'about-toolbarbutton',
          type: 'custom',
          defaultArea: CustomizableUI.AREA_NAVBAR,
          onBuild: function(aDocument) {
             var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
             var attrs = {
                 id: 'about-toolbarbutton',
                 class: 'chromeclass-toolbar-additional',
                 type: 'menu',
                 removable: true,
                 label: 'about Seiten öffnen',
                 tooltiptext: 'about Seiten öffnen'
             };
             for (var a in attrs)
                toolbaritem.setAttribute(a, attrs[a]);
             return toolbaritem;
        }
       });
   } catch(e) { };

I changed the class of this button in line 15 from 'chromeclass-toolbar-additional' to 'toolbarbutton-1 chromeclass-toolbar-additional':

   (function() {

    if (location != 'chrome://browser/content/browser.xul')
       return;

    try {
       CustomizableUI.createWidget({
          id: 'about-toolbarbutton',
          type: 'custom',
          defaultArea: CustomizableUI.AREA_NAVBAR,
          onBuild: function(aDocument) {
             var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
             var attrs = {
                 id: 'about-toolbarbutton',
                 class: 'toolbarbutton-1 chromeclass-toolbar-additional',
                 type: 'menu',
                 removable: true,
                 label: 'about Seiten öffnen',
                 tooltiptext: 'about Seiten öffnen'
             };
             for (var a in attrs)
                toolbaritem.setAttribute(a, attrs[a]);
             return toolbaritem;
        }
       });
   } catch(e) { };

This change seems to be enough to let the CSS stylesheet buttons_on_navbar_button_roundness.css recognise the custom button aboutbuttuon as a standard toolbar button. Thus, the button can be rounded by this CSS stylesheet. Here is a screenshot to show the result of my change (I added borders around the buttons via CSS code for better visibility :P):

Mypal-68-13-7-aboutbutton-rounded.png


The positive side effect of this modification is that the custom button aboutbuttuon behaves as a normal toolbar button from now on, even if it is not rounded off by such a CSS stylesheet. :thumbup

Cheers, AstroSkipper matrix.gif

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites

And the proof is in the pudding, or something like that. Thanks, mate. BTW, looking at the code it seems very easy to change the order of the about items. I will try that.

Noname.png

Edited by dmiranda
Link to comment
Share on other sites

35 minutes ago, dmiranda said:

And the proof is in the pudding, or something like that. Thanks, mate. BTW, looking at the code it seems very easy to change the order of the about items. I will try that.

Noname.png

Editing and changing the order of the about items is very easy, BTW, some items don't work in Mypal 68. Thus, I deleted them months ago.

Edited by AstroSkipper
Link to comment
Share on other sites

On 10/26/2023 at 8:11 PM, AstroSkipper said:

Mypal 68 comes with a few search engines pre-installed by @feodor2. In his latest release 68.13.4b, the search engine Qwant is set as default. Other available search engines are Brave, Mojeek and Startpage.

Another way: once you have already set up your search engines the way you want, you can copy and save somewhere the file youprofile/search.json.mozlz4 and later on, routinely, replace the one in your polluted profile. That way, you will always have them as you want them. The same applies to sp52, and you may in fact use your already sp52 profile/search.json.mozlz4 in mypal. The issue with mojeek and brave is more complicated, because mypal installs them from yourprofile/extensions.json. As described before in this forum, you need to open this extensions.json file, and delete the items to prevent them from reappearing.

PS: two caveats. 1) When copying your archived use ready search.json.mozlz4 you are likely to need to go to prefs and reassign your default search engine. Otherwise, GG (oh surprise) takes over. 2) the text for mojeek and brave in extensions.json will have changes in uid, as per your installation, so copy and paste over won't do the trick. you will have to find the code, and delete it manually)

Edited by dmiranda
Link to comment
Share on other sites

mozlz4-edit

The extension mozlz4-edit lets you edit and/or add custom search engines to Mypal 68 without using an internet connection. Actually, mozlz4-edit is a simple mozlz4 file editor. You can open, edit and save mozlz4 files. Tested version: 4.1.2

How to

1. Find the search.json.mozlz4 file inside of your Mypal 68 profile folder.
2. Backup the search.json.mozlz4 file first.
2. Open the search.json.mozlz4 file with the mozlz4-edit extension.
3. Edit and/or add a custom search engine entry.
4. Save the modified search.json.mozlz4 file in your Mypal 68 profile folder.
5. Restart Mypal 68.

Here is a screenshot:

203978.png?modified=1622132985

Warning! You should not delete default search engines from a search.json.mozlz4 file if you edit the file. If you delete a default search engine, then the Firefox will reset search engine list to a default state. But you can add new search engines.

Download link: https://addons.mozilla.org/de/firefox/addon/mozlz4-edit/

The extension mozlz4-edit is the other one of those I mentioned in my post about Managing search engines in Mypal 68. I tested this extension by editing a custom search engine and adding it to Mypal 68. It also worked without any problems. :thumbup

Edited by AstroSkipper
Link to comment
Share on other sites

Menu bar items on hover when using themes

I don't know if anyone has ever noticed the following display annoyance in Mypal 68. I recently started using a theme (containing a black cat. What else! :P) in Mypal 68 and when I move my mouse over the menu entries, the respective entry is difficult to read and is not displayed correctly. Here is a screenshot when the default theme is enabled, and everything is fine:

Mypal-68-13-7-Menu-on-hover.png

And now a screenshot when another theme such as my black cat theme is enabled:

Mypal-68-13-7-Menu-on-hover-2.png

The Bookmarks entry is barely legible. Same with the entries File, Edit, View, History, Tools and Help. That's annoying. Therefore, I have created a small fix in form of a CSS stylesheet. Here is the code:

menu[_moz-menuactive="true"],
menuitem[_moz-menuactive="true"] {
  background-color: -moz-menuhover !important;
  color: -moz-menuhovertext !important;
}

And here is the result:

Mypal-68-13-7-Menu-on-hover-3.png

Now, the inverted colour is displayed correctly again when hovering. Although a little blurred due to the activated theme (I think it is an overlay effect), it is much better to read than before. Save the code in a CSS file and import it to the userChrome.css file if you are affected too! Or simply download the file menubar-items-on-hover.css I uploaded to my file-hosting service!

Edit: I checked this little blurred effect again and could fix it. spanachee.gif Here is the new code:

menu[_moz-menuactive="true"],
menuitem[_moz-menuactive="true"] {
  background-color: -moz-menuhover !important;
  color: -moz-menuhovertext !important;
  text-shadow: none !important;
}

This is a screenshot when using the modified code above with my favourite theme:

Mypal-68-13-7-Menu-on-hover-4.png

You see it looks now as it was when using the default theme. :cheerleader: And here is the download link of the file menubar-items-on-hover.css containing the modified code: 
https://www.mediafire.com/file/ciprmjkzcgnzprz/menubar-items-on-hover.css/file

Cheers, AstroSkipper matrix.gif

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites

On 12/3/2023 at 11:25 PM, dmiranda said:

Another way: once you have already set up your search engines the way you want, you can copy and save somewhere the file youprofile/search.json.mozlz4 and later on, routinely, replace the one in your polluted profile. That way, you will always have them as you want them. The same applies to sp52, and you may in fact use your already sp52 profile/search.json.mozlz4 in mypal. The issue with mojeek and brave is more complicated, because mypal installs them from yourprofile/extensions.json. As described before in this forum, you need to open this extensions.json file, and delete the items to prevent them from reappearing.

PS: two caveats. 1) When copying your archived use ready search.json.mozlz4 you are likely to need to go to prefs and reassign your default search engine. Otherwise, GG (oh surprise) takes over. 2) the text for mojeek and brave in extensions.json will have changes in uid, as per your installation, so copy and paste over won't do the trick. you will have to find the code, and delete it manually)

Unfortunately, copying and pasting the file search.json.mozlz4 is not a solution due to the search engines that are delivered with Mypal 68. These search engines are then displayed without their icons.

On 12/4/2023 at 5:22 PM, AstroSkipper said:

mozlz4-edit

The extension mozlz4-edit lets you edit and/or add custom search engines to Mypal 68 without using an internet connection. Actually, mozlz4-edit is a simple mozlz4 file editor. You can open, edit and save mozlz4 files. Tested version: 4.1.2

How to

1. Find the search.json.mozlz4 file inside of your Mypal 68 profile folder.
2. Backup the search.json.mozlz4 file first.
2. Open the search.json.mozlz4 file with the mozlz4-edit extension.
3. Edit and/or add a custom search engine entry.
4. Save the modified search.json.mozlz4 file in your Mypal 68 profile folder.
5. Restart Mypal 68.

Here is a screenshot:

203978.png?modified=1622132985

Warning! You should not delete default search engines from a search.json.mozlz4 file if you edit the file. If you delete a default search engine, then the Firefox will reset search engine list to a default state. But you can add new search engines.

Download link: https://addons.mozilla.org/de/firefox/addon/mozlz4-edit/

The extension mozlz4-edit is the other one of those I mentioned in my post about Managing search engines in Mypal 68. I tested this extension by editing a custom search engine and adding it to Mypal 68. It also worked without any problems. :thumbup

The perfect method to transfer custom search engines from one profile to another one is using the extension mozlz4-edit by copying the code of the desired, custom search engine entries from the file search.json.mozlz4 of the source profile and pasting it into the file search.json.mozlz4 of the target profile. Of course, the syntax and the structure of the search.json.mozlz4 file must be observed. I did it, and it works perfectly. :thumbup

Cheers, AstroSkipper matrix.gif

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites

7 hours ago, AstroSkipper said:

The perfect method to transfer custom search engines from one profile to another one is using the extension mozlz4-edit by copying the code of the desired, custom search engines entries from the file search.json.mozlz4 of the source profile and pasting it into the file search.json.mozlz4 of the target profile. Of course, the syntax and the structure of the search.json.mozlz4 file must be observed. Of course, the syntax and the structure of the search.json.mozlz4 file must be observed. I did it, and it works perfectly. :thumbup

And should anyone now ask whether there's an easier way, then my answer is: No! :no: Thank the Firefox developers who have made everything worse over the last few years! :realmad: That's one of the reasons I love so much the legacy UXP browsers. amoureuxcoeur.gif

Edited by AstroSkipper
Link to comment
Share on other sites

1 minute ago, AstroSkipper said:

That's one of the reasons I love so much the legacy UXP browsers. amoureuxcoeur.gif

Agreed!

I've been of the same thought for the past couple of years.  I heavily modify my Serpent 52 and the ability to modify-to-liking 360Chrome is why I don't see myself ditching either it or Serpent 52 for a very long time.

I have dipped my toe into Mypal 68 also, but I haven't fully vetted it yet in comparison to Serpent 52.

Link to comment
Share on other sites

I am now running 17 scripts (uc.js files) and 13 CSS stylesheets (css files) just to revert the things the developers have done to the Firefox version which Mypal 68 is based on. Not to mention the extensions that I have installed to get back previous features. I have also modified themes and deactivated signature verification. Some CSS code has been created or modified by myself and some script files, too. But now, the feeling is much better when using Mypal 68. :cheerleader:

Cheers, AstroSkipper matrix.gif

Edited by AstroSkipper
Update of content
Link to comment
Share on other sites

2 hours ago, NotHereToPlayGames said:

Agreed!

I've been of the same thought for the past couple of years.  I heavily modify my Serpent 52 and the ability to modify-to-liking 360Chrome is why I don't see myself ditching either it or Serpent 52 for a very long time.

I have dipped my toe into Mypal 68 also, but I haven't fully vetted it yet in comparison to Serpent 52.

I also have no intention to ditch your 360 Chrome. You won't be disappointed with Mypal 68 as I use it 90% of the time now. Let us know when you decide and what you think of it. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...