Jump to content

Extensions and custom buttons for UXP browsers - Corrections, modifications, adjustments, and special recommendations


Recommended Posts

1 hour ago, VistaLover said:

Addendum: In a similar vein, in Serpent 52/55 I use myself the WebExtension Firefox add-on IP Geolocator:

https://addons.mozilla.org/en-US/firefox/addon/ip-geolocator/

Latest v2.1.0 works fine in St52, if using the default browser theme:

BDLuF1O.png

As you can see, the IP flag (and country's two-string code) is displayed inside the toolbar button itself, this means one less click to "view" it (compared to the extension kindly offered here :)); another screenshot, this one with the add-on's settings:

wR3cR9q.png

The IP change alert is done via browser notification, e.g.:

r4DPGmm.png

And many thanks for pointing me to IP Geolocator! I will have a look at it. At the moment, I am writing from my Android tablet, but later, back at my desktop computer, I will check this extension immediately. :yes:

Edited by AstroSkipper
Link to comment
Share on other sites


6 hours ago, VistaLover said:

The main problem I have with IP Geolocator on St52 is that its toolbar button becomes gigantic when using the third-party complete theme Photonic (my preferred one on St52):

wvW40DC.png

Inside the xpi file of IP Geolocator, one could restrict the size of the toolbar icon to a certain, desired value. I did that several times in terms of legacy extensions, and I assume it could be similar when it comes to webextensions:) My credo: What doesn't fit, is made to fit. ssuper5sur5.gif

PS: And thanks for noticing my "typo"! TBH, it wasn't a typo but German spelling. Suddenly, and for no reason at all, I was of the opinion that the word interval is spelled the same in English as in German. Stuff happens! Dementia? :P

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

On 8/8/2023 at 8:40 PM, AstroSkipper said:
On 8/8/2023 at 5:55 PM, VistaLover said:

The main problem I have with IP Geolocator on St52 is that its toolbar button becomes gigantic when using the third-party complete theme Photonic (my preferred one on St52):

wvW40DC.png

Inside the xpi file of IP Geolocator, one could restrict the size of the toolbar icon to a certain, desired value. I did that several times in terms of legacy extensions, and I assume it could be similar when it comes to webextensions:) My credo: What doesn't fit, is made to fit. ssuper5sur5.gif

@VistaLover I had a look inside the IP Geolocator xpi file. I think I have an idea how the problem with the size of the the toolbar flag might be fixed when using the Photonic theme in Serpent 52. If the standard theme is selected, the flag is sized correctly. So, it seems to be a problem caused by the Photonic theme. Anyway! Interested in fixing it? :dubbio:

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

Hi again :P; at first, I didn't want to further pursue "my" IP-Geolocator issues here, since this is, first and foremost, your own thread; I did bring that extension up, once in a post of mine ;) , because it is the kind of extension with a similar target group like your fork "Check My IP Address & Location" ;) ; then, after reading more closely the title of this thread, it states: 

Extensions and custom buttons for UXP browsers - Corrections, modifications, adjustments, and special recommendations

so, since IP-Geolocator is indeed compatible with at least one UXP browser (St52 and/or St55) and it requires some "modification/adjustment" to suit my custom needs ;),, I wasn't being completely off-topic, was I :D?

Joking aside,

5 hours ago, AstroSkipper said:

If the standard theme is selected, the flag is sized correctly. So, it seems to be a problem caused by the Photonic theme

Yes, I made that realisation long ago myself ;) ; this issue isn't, actually, exclusive to IP-Geolocator when the Photonic Complete Theme is being applied to St52; several other WebExtensions that I had tried in the past (and can't remember now off-hand :unsure:) manifested the same "huge-icon-when-placed-in-a-toolbar" issue :angry: ; all worked well with the default Australis St52 theme!

To be fair, Photonic has been developed for either official Pale Moon and/or official Basilisk, none of which currently support add-ons of the WebExtension format; so, the theme's creator (Lootyhoof of MCP) never expected it to be used together with WEs :P ...

OTOH, Australis comes with native support for Fx52-era WEs (and so do some other Complete Themes that originally supported Fx52, e.g. FT DeepDark v14.3), and this support has been inherited and kept in the default (Australis) theme of both St52/55...

5 hours ago, AstroSkipper said:

Interested in fixing it? :dubbio:

Unlike you and UCyborg :D, I don't "speak" CSS, so I'm unable myself to pinpoint what needs to be changed inside Photonic for it to become on par with Australis where WE-toolbar-icons are concerned :(; if you do have a clue, please come forth! ;) :P

Thanks in advance :) .

Edited by VistaLover
Link to comment
Share on other sites

@VistaLover Here is a fixed version of IP Geolocator when using the Photonic theme in Serpent 52. I resized all flag images from 48 x 48 to 24 x 24 and saved them in a new folder img/flags/24/. Then I changed the code inside the file main.js in the folder js/:
Original code:

function setIcon(country_code) {
    var showFlags = lp.isSet(KEY_SETTINGS_SHOW_FLAGS) ? lp.get(KEY_SETTINGS_SHOW_FLAGS) : true;
    if (country_code == "ERR" || !showFlags || !(countriesSupported.includes(country_code))) {
        chrome.browserAction.setIcon({ path: "img/icon48.png" });
    } else {
        chrome.browserAction.setIcon({ path: "img/flags/48/" + country_code + ".png" });
    }
}

Modified code:

function setIcon(country_code) {
    var showFlags = lp.isSet(KEY_SETTINGS_SHOW_FLAGS) ? lp.get(KEY_SETTINGS_SHOW_FLAGS) : true;
    if (country_code == "ERR" || !showFlags || !(countriesSupported.includes(country_code))) {
        chrome.browserAction.setIcon({ path: "img/icon.png" });
    } else {
        chrome.browserAction.setIcon({ path: "img/flags/24/" + country_code + ".png" });
    }
}

Screenshot:
Serpent-52-IP-Geolocator-Photonic.png
Now, the toolbar icon and the flag images are shown in a suitable size. Here is the download link of my mod: https://www.mediafire.com/file/xkha44rjidj5maw/ip_geolocator-2.1.0-Photonic-mod.xpi/file

Greetings from Germany, AstroSkipper matrix.gif

Link to comment
Share on other sites

Thanks a bunch :worship: :

TMFCrNi.png

(see what I did there? :P Since you changed your IP to a Greek one, I changed mine to a German one ;) )

Technically speaking, your skilled coding :) just patched the specific extension to accommodate Photonium, i.e. Photonium itself wasn't patched with a generic fix for all WE toolbar icons (this was asking too much, I fear :P) ; FWIW, not all WEs exhibit this very issue on Photonic, e.g. both Stylus and Violentmonkey's icons display correctly (not "oversized", taking the whole toolbar with them :( ) ...

Again, congrats and many thanks :thumbup !

Link to comment
Share on other sites

16 hours ago, VistaLover said:

Thanks a bunch :worship: :

TMFCrNi.png

(see what I did there? :P Since you changed your IP to a Greek one, I changed mine to a German one ;) )

Technically speaking, your skilled coding :) just patched the specific extension to accommodate Photonium, i.e. Photonium itself wasn't patched with a generic fix for all WE toolbar icons (this was asking too much, I fear :P) ; FWIW, not all WEs exhibit this very issue on Photonic, e.g. both Stylus and Violentmonkey's icons display correctly (not "oversized", taking the whole toolbar with them :( ) ...

Again, congrats and many thanks :thumbup !

And here is an alternative solution without modifying the IP Geolocator xpi file. Just install the extension Classic Theme Restorer and set the navigation toolbar attribute 'iconsize' to large icons! ;)

Here is a screenshot:

Serpent-52-IP-Geolocator-Photonic-CTR.pn

I could imagine that this solution could also help with other toolbar icons (especially provided by webextensions) that are too large. idee.gif

Cheers, AstroSkipper matrix.gif

Edited by AstroSkipper
Link to comment
Share on other sites

On 8/8/2023 at 9:40 PM, AstroSkipper said:

My credo: What doesn't fit, is made to fit. 

... Can I push "my luck" even further? :whistle:Due to Photonic's imperfect support for WEs, IP Geolocator exhibits a second "bug" there :( (though it's Photonic that is "bugged" in this case, not by a fault of its author); when one clicks its toolbar icon in the default St52 (Australis) theme, the popup is being sized so as to accommodate all strings, including the UA one:

3bM6HFo.png

On Photonic however, the popup ends up truncated :( :

PeAOCdu.png

Truth be told :sneaky:, I don't have an immediate need for that UA info from inside the IP Geolocator popup, but it's rather a "cosmetic" issue for me, if nothing else :D ...

Can your credo (because not everyone here took Latin at school, it's "belief system") be applied in this second "bug"? 

Best regards :)

Link to comment
Share on other sites

7 minutes ago, AstroSkipper said:

Just install the extension Classic Theme Restorer and set the navigation toolbar attribute 'iconsize' to large icons! ;)

I already have CTR installed together with Photonic, thanks :); but the iconsize attribute you suggested is set to its default value of

#nav-bar[iconsize='small']

in an effort to save some additional pixels of vertical screen space ;) ; current default setting:

cUGLLCH.png

OTOH, with

#nav-bar[iconsize='large']

the toolbar grows taller by several pixels (due to the bigger/round "back-page" button):

48lL1Cv.png

I hope the screenshots are good to tell this for yourself :) ...

Thanks and goodnight (hitting bed now, tschüss :P) ...

Link to comment
Share on other sites

13 hours ago, VistaLover said:

I already have CTR installed together with Photonic, thanks :); but the iconsize attribute you suggested is set to its default value of

#nav-bar[iconsize='small']

in an effort to save some additional pixels of vertical screen space ;) ; current default setting:

cUGLLCH.png

OTOH, with

#nav-bar[iconsize='large']

the toolbar grows taller by several pixels (due to the bigger/round "back-page" button):

48lL1Cv.png

I hope the screenshots are good to tell this for yourself :) ...

Thanks and goodnight (hitting bed now, tschüss :P) ...

The reason I suggested to use CRT's iconsize attribute setting to large icons was that it might fix problems with other extensions in terms of correct toolbar icon sizes, too. In such cases, there would be no need to modify the affected extensions. :yes: The Photonic theme is unfortunately buggy. Therefore, you have to do a lot of trickery to correct any display errors of pop-up windows or anything else, as they do not actually occur when using the default theme. Actually, these extensions are working properly for themselves. I fear the truncated pop-up window of IP Geolocator can't be fixed easily. Using the Photonic theme, changes in IP Geolocator's file main.css are not really taken into account. :( Many settings are simply overwritten by this theme. I already tested that. smilie_denk_24.gif I believe a proper fix can only be done to the Photonic theme by the author. Inside its xpi file, there are tons of css files. suisjebete.gif Trial and error would be a never-ending story.
And TBH, I personally haven't used any themes at all for a long time, neither in New Moon nor in Serpent. Themes cause very often display errors sooner or later. At least, that's how it was for me. smilie_winke_055.gif

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

10 hours ago, VistaLover said:

Thanks a bunch :worship: :

TMFCrNi.png

(see what I did there? :P Since you changed your IP to a Greek one, I changed mine to a German one ;) )

You're welcome! I thought you perhaps wanted to see a correctly sized "Hellenic" flag. You see, I can always learn something new. :P

11 hours ago, VistaLover said:

Hi again :P; at first, I didn't want to further pursue "my" IP-Geolocator issues here, since this is, first and foremost, your own thread; I did bring that extension up, once in a post of mine ;) , because it is the kind of extension with a similar target group like your fork "Check My IP Address & Location" ;) ; then, after reading more closely the title of this thread, it states: 

Extensions and custom buttons for UXP browsers - Corrections, modifications, adjustments, and special recommendations

so, since IP-Geolocator is indeed compatible with at least one UXP browser (St52 and/or St55) and it requires some "modification/adjustment" to suit my custom needs ;),, I wasn't being completely off-topic, was I :D?

This thread here is the absolutely correct place for such discussions. That was actually the reason I created this thread. :yes: And I think you already know this, I love extensions. amoureuxcoeur.gif

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

Update notification! update.gif

GetEmAll! has been updated and is now in the version 1.2.4 available. I mention it because the automatic update function in New Moon 28 won't offer it. For this browser, the extension has to be downloaded manually, and its compatibility has to be adjusted in the file install.rdf manually, too, such as shown here:

Original:
  			</Description>
		</em:localized>
		<em:targetApplication name="Pale Moon">
			<Description
				em:id="{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}" em:minVersion="29.0"
				em:maxVersion="32.*"/>
		</em:targetApplication>
Modified:
  			</Description>
		</em:localized>
		<em:targetApplication name="Pale Moon">
			<Description
				em:id="{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}" em:minVersion="28.0"
				em:maxVersion="32.*"/>
		</em:targetApplication>

Here is the link: https://addons.palemoon.org/addon/getemall/

Cheers, AstroSkipper matrix.gif

Edited by AstroSkipper
Link to comment
Share on other sites

23 minutes ago, AstroSkipper said:

I mention it because the automatic update function in New Moon won't offer it.
For this browser, the extension has to be downloaded manually, and its compatibility has to be adjusted
in the file install.rdf manually, too

... As a side note, the extension natively supports the official Basilisk browser application; the XML block below:

		</em:targetApplication>
		<em:targetApplication name="Basilisk">
			<Description
				em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" 
				em:minVersion="52.0"
				em:maxVersion="52.*"/>
		</em:targetApplication>

suggests it should install (and auto-update, as needed ;)) on Serpent 52.9.0, too :P ; FWIW, should you wish to install on St55, you'd have to "raise" :whistle:em:maxVersion to "55.0.0" ...

Greetings.

Link to comment
Share on other sites

User Agent Status - An extension to control the useragent for the currently loaded website

In order for our legacy UXP browsers, which are regularly updated by @roytam1 and adapted to the modern web, to function properly with certain pages, the user agent used must be changed more and more frequently. This can be done via about:config or much more conveniently with the help of an extension. My favourite is User Agent Status. Here is a small screenshot:

preview.png

This extension lets you set a new site-specific user agent override (SSUAO) or reset it to its default string. Everything is displayed in the status bar and done by clicking on the corresponding button. There are five different actions when middle-clicking on the status bar icon: Reset the UA (default), Set the UA, Show the current website's SSUAO preference in about:config, Cycle between UA compatibility modes, and Nothing. You can set what action the middle-click does either via the context menu or the preferences manager in about:addons! In the status bar, you can see additionally three icon colours. Blue means no SSUAO, purple means a vendor-provided/default SSUAO, and red means a user-set SSUAO was assigned for the currently loaded web page.

Here is the link to User Agent Status where you can find more detailed information: https://addons.palemoon.org/addon/ua-status/

Cheers, AstroSkipper matrix.gif

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

On 8/18/2023 at 6:35 PM, AstroSkipper said:

User Agent Status - An extension to control the useragent for the currently loaded website

In order for our legacy UXP browsers, which are regularly updated by @roytam1 and adapted to the modern web, to function properly with certain pages, the user agent used must be changed more and more frequently. This can be done via about:config or much more conveniently with the help of an extension. My favourite is User Agent Status. Here is a small screenshot:

preview.png

This extension lets you set a new site-specific user agent override (SSUAO) or reset it to its default string. Everything is displayed in the status bar and done by clicking on the corresponding button. There are five different actions when middle-clicking on the status bar icon: Reset the UA (default), Set the UA, Show the current website's SSUAO preference in about:config, Cycle between UA compatibility modes, and Nothing. You can set what action the middle-click does either via the context menu or the preferences manager in about:addons! In the status bar, you can see additionally three icon colours. Blue means no SSUAO, purple means a vendor-provided/default SSUAO, and red means a user-set SSUAO was assigned for the currently loaded web page.

Here is the link to User Agent Status where you can find more detailed information: https://addons.palemoon.org/addon/ua-status/

Cheers, AstroSkipper matrix.gif

The best site [in my opinion] to check. 

https://browserleaks.com/javascript

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...