Zoom

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
LAR Grizzly
Lunatic
Lunatic
Posts: 352
Joined: 2017-08-11, 16:49
Location: Upstate Ohio, USA
Contact:

Re: Zoom

Unread post by LAR Grizzly » 2021-08-19, 20:07

Quorx wrote:
2021-08-19, 19:50
...with the increasing "mobile first" doctrine on the internet
Off-topic:
Cellphones have ruined the Web for desktop users. I wish there was a way that there could be two versions of a website and that desktop browsers could detect which one was desktop and which one was mobile.
Win7 Pro SP1 64 Bit
Comodo Internet Security
Pale Moon 33.0.2, Epyrus Mail 2.1.2, Firefox 115.8.0esr, Thunderbird 115.8.1, and SeaMonkey 2.53.18

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5151
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Zoom

Unread post by Night Wing » 2021-08-19, 20:59

I retired from the maritime industry work force at the age of sixty which was eleven years ago. Since I've been retired, I have lots of free time on my hands.

Some mornings I go outside to my back yard and shoot some target arrows with my recurve bow at a 25 yard target for 30 minutes. Some mornings I go down to the private lake in our subdivision and go standup flat water paddle boarding for 60-120 minutes depending how hot it gets. If the waves are going to be surfable at Surfside, I'll take one of my sups or a prone surfboard and surf some waves for 2 hours.

It is a shame I don't comprehend coding because I have been using NoSquint, first in windows for Pale Moon and now in linux Pale Moon, when I first found NoSquint. Coding for me is like trying to decipher sentences written in chinese.

I only use two extensions in Pale Moon and NoSquint is one of the two. Because of my poor eyesight, most of the sites I visit everyday are enlarged to 135%, 145% and 150%.

This is one of the reasons I have a 27" external wide screen monitor since I like to sit 44 inches away from the monitor. If NoSquint would go the way of the dinosaurs, this means I would have to be 12 inches from the monitor which is not feasible.

In the maritime industry, contingency plans were always a "must have" for any unforeseen events. I always had a "Plan A", a "Plan B" and a "Plan C" if and when.......things went south.......as they say.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

astewart
Moonbather
Moonbather
Posts: 53
Joined: 2013-12-19, 02:34
Location: San Diego, CA, US

Re: Zoom

Unread post by astewart » 2021-08-28, 20:30

I use two addons that include Application.storage references (FUEL), NoSquint and FEBE (by Chuck Baker), both from the Pale Moon addon site. Other users have noted the problem with NoSquint on the author's github issue page, but the author has not responded yet. The FEBE forum has no recent activity and I can't find any working button to register.

While googling for some replacement Application code, I found:
Alternative to 'Application.storage' - Add-ons / Development - Mozilla Discourse
https://discourse.mozilla.org/t/alternative-to-application-storage/3198/4
(Aug '15) where Mr. Baker provides a replacement that met his needs.

In FEBE version 8.9.2 for Firefox, he already made that substitution, but not in the 10.x versions for Pale Moon. I applied that code and replaced all Application.storage uses in version 10.4 febe.js and it seems to work. I have not tried all features.

I also applied a variation of Mr. Baker's function to NoSquint in init.js and replaced the two uses of Application.storage in lib.js. The addon seems fully functional, except the about:NoSquint page. The buttons there don't work, but they are only a another way to launch the regular dialogs, which do work.

Added to FEBE file febe.js:

Code: Select all

// Replacement for deprecated Application.storage
var FEBEstorage = {
	topWin: Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator).getMostRecentWindow("navigator:browser"),
	setItem: function setItem(key, value){
			if(typeof this.topWin.storage == "undefined") this.topWin.storage = {};
			if(key == null || key == "") return false;
			this.topWin.storage[key] = value;
			return true;
	},
	getItem: function getItem(key,dFault){
			if(key == null || key == "") return false;
			if(typeof this.topWin.storage[key] == "undefined") return dFault;
			let value = this.topWin.storage[key];
			return value;
	}
}
Application.storage.get() becomes FEBEstorage.getItem()
Application.storage.set() becomes FEBEstorage.setItem()

Added to NoSquint file init.js:

Code: Select all

// Replacement for deprecated Application.storage - C. Baker / AGS
var NSQApp = {
    topWin: Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser"),
    storage: {
        setItem: function setItem(key, value){
            if(typeof NSQApp.topWin.storage == "undefined") NSQApp.topWin.storage = {};
            if(key == null || key == "") return false;
            NSQApp.topWin.storage[key] = value;
            return true;
        },
        getItem: function getItem(key, def){
            if(key == null || key == "") return false;
            if(typeof NSQApp.topWin.storage == "undefined") NSQApp.topWin.storage = {};
            if(typeof NSQApp.topWin.storage[key] == "undefined") return def;
            let value = NSQApp.topWin.storage[key];
            return value;
        },
    }
};
In NoSquint file lib.js:

Application.storage.get() becomes NSQApp.storage.getItem()
Application.storage.set() becomes NSQApp.storage.setItem()

There are some browser version checks that use Application.version. I replaced those with hardcoded true or false, since we are well beyond Firefox 4.0.

WORKS FOR ME but I'm not offering to rigorously test a fork.

Alan

_yuyu_
Lunatic
Lunatic
Posts: 253
Joined: 2015-03-02, 14:18

Re: Zoom

Unread post by _yuyu_ » 2021-08-28, 23:02

tman801 wrote:
2021-08-19, 17:33
_yuyu_ wrote:
2021-08-19, 07:52
tman801 wrote:
2021-08-19, 02:51
Since Zoom Page will not work in Pale Moon Windows and NoSquint may in the future not work, is there anything else that can replace them?
Zoom Page still works perfectly for me on PM 29.4
Is this in W 10? what version of Zoom Page are you using? I could not get it to work in W10 on PM 29.3.
Sorry missed your post. I am at Win7, latest PM and Zoom Page 15.8. May be I tweaked it to work with latest PM versions though.
Pale Moon 32-bit on Win 7 x64

User avatar
Gordon Dry
Fanatic
Fanatic
Posts: 121
Joined: 2014-10-14, 19:54
Location: Germany

Re: Zoom

Unread post by Gordon Dry » 2021-08-29, 12:37

astewart wrote:
2021-08-28, 20:30
WORKS FOR ME

I guess it works only on PM 29.4.0, but not on the 29.4.0.1 and 29.4.0.2 ?

On my side it did not work on 29.4.0.2 so I ask.

User avatar
Scribe
Moon lover
Moon lover
Posts: 80
Joined: 2016-01-29, 09:35
Location: West London, England

Re: Zoom

Unread post by Scribe » 2021-08-29, 13:31

For anyone that only wants the zoom function, 'Zoom Pages Tool 1.0.0' by Riiis, works fine in 29.4.0.2. I installed it before it was deactivated on the PM extensions page, but it might be an option for someone with the necessary skills to fork it. http://developer.palemoon.org/docs/phoenix-extensions/

astewart
Moonbather
Moonbather
Posts: 53
Joined: 2013-12-19, 02:34
Location: San Diego, CA, US

Re: Zoom

Unread post by astewart » 2021-08-29, 15:04

Gordon Dry wrote:
2021-08-29, 12:37
astewart wrote:
2021-08-28, 20:30
WORKS FOR ME

I guess it works only on PM 29.4.0, but not on the 29.4.0.1 and 29.4.0.2 ?

On my side it did not work on 29.4.0.2 so I ask.
I'm running 29.4.0.2 also. My change just eliminates Application.storage and doesn't add anything unique to 29.4.0. I didn't actually try it on 29.4.0. I just observed that the 29.4.0.2 DEPRECATED message was gone in the error console and the addon functioned. Just to repeat, the whole change to lib.js is:

Code: Select all

    /* Setup global (spans all windows) storage object.  The storage object
     * exists once, and is referenced for each window.  (In contrast, doing
     * Application.storage.set('foo', [1,2]) will store a copy of the list.)
     */

    /*
     * NSQApp.storage replaces Application.storage - defined in init.js - AGS
     */
    this.storage = NSQApp.storage.getItem('nosquint-global', null);
    if (this.storage === null) {
        // Initialize global defaults.
        this.storage = {
            disabled: false,
            quitting: false,
            origSiteSpecific: null,
            dialogs: {},
            NoSquint: NoSquint
        };
        NSQApp.storage.setItem('nosquint-global', this.storage);
    }

    this.is30 = (function() {
        let is30 = false; // Application.version.substr(0, 4) == '3.0.';
        return () => is30;
    })();

    this.is36 = (function() {
        let is36 = false; // Application.version.substr(0, 4) == '3.6.';
        return () => is36;
    })();

    this.is3x = (function() {
        let is3x = false; // parseInt(Application.version.split('.')[0]) < 4;
        return () => is3x;
    })();

    this.is40 = (function() {
        let is40 = true; // parseInt(Application.version.split('.')[0]) >= 4;
        return () => is40;
    })();
including the hardcoded version checks. Also make sure .get and .set are changed to .getItem and .setItem.

Alan

User avatar
JoeyG
Astronaut
Astronaut
Posts: 653
Joined: 2017-06-12, 13:27
Location: How can you be in two places at once, when you're not anywhere at all?

Re: Zoom

Unread post by JoeyG » 2021-08-29, 18:55

Maybe I misunderstand the issue, but if it's "only" making the pages bigger, I use the Quick Page Zoom add-on (v. 1.6.3), which can still be found in the Classic Add-ons Archive
caa:addon/6715

I'm not sure if we're supposed to use these add-ons or not. Sorry if I've violated any rules.

By the way, I'm using today's unstable portable version of Pale Moon.
"And you can believe me because I never lie - and I'm always right."
(Asserted by George Leroy Tirebiter* and my wife; only the latter is telling the truth.)
*Firesign Theater version

User avatar
Tharthan
Board Warrior
Board Warrior
Posts: 1409
Joined: 2019-05-20, 20:07
Location: New England

Re: Zoom

Unread post by Tharthan » 2021-08-29, 19:54

Off-topic:
LAR Grizzly wrote:
2021-08-19, 20:07
Cellphones have ruined the Web for desktop users. I wish there was a way that there could be two versions of a website and that desktop browsers could detect which one was desktop and which one was mobile.
There was a period of time when it was like that, in between the normal age of the Internet and the smartphone & social media age.

But then website developers said "Why bother? I can get away with only offering an ugly smartphone-oriented site, so I have no particular incentive to keep the desktop site."
"This is a war against individuality and intelligence. Only thing we can do is stand strong."adesh, 9 January 2020

"I used to think I was a grumpy old man, but I don't hold a candle compared to Tharthan."Cassette, 9 September 2020

Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35481
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Zoom

Unread post by Moonchild » 2021-08-29, 21:10

Off-topic:
Tharthan wrote:
2021-08-29, 19:54
"Why bother? I can get away with only offering an ugly smartphone-oriented site, so I have no particular incentive to keep the desktop site."
Which is why now everyone from across the room can read what I browse to without even trying, and my mousewheel has seen more mileage than ever.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Zoom

Unread post by BenFenner » 2021-08-31, 16:46

I realize I'm not in the target group for this. I run 4k monitors with no scaling and would kill for 8k to make things even tinier (without scaling).
But maybe someone can explain to me what these zoom extensions do that the normal zoom controls don't accomplish?

Those controls being:
Ctrl++
Ctrl+-
Ctrl+0
Ctrl+[scroll wheel]
View → Zoom → *

User avatar
Gordon Dry
Fanatic
Fanatic
Posts: 121
Joined: 2014-10-14, 19:54
Location: Germany

Re: Zoom

Unread post by Gordon Dry » 2021-08-31, 18:04

Normal zoom controls are generic. The addon remembers specific zoom levels for specific sites and even got a timer to forget settings of sites not visited for X weeks / months.
Or just install it, see the settings for yourself. There is more.

Potkeny
Fanatic
Fanatic
Posts: 129
Joined: 2018-08-03, 17:00

Re: Zoom

Unread post by Potkeny » 2021-08-31, 18:53

Gordon Dry wrote:
2021-08-31, 18:04
Normal zoom controls are generic. The addon remembers specific zoom levels for specific sites
I'm quite sure site-specific zoom-levels are a generic (PM) feature too? Not saying there is no place for zoom-addons with extra features of course.

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5151
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Zoom

Unread post by Night Wing » 2021-08-31, 23:12

Potkeny wrote:
2021-08-31, 18:53
Gordon Dry wrote:
2021-08-31, 18:04
Normal zoom controls are generic. The addon remembers specific zoom levels for specific sites
I'm quite sure site-specific zoom-levels are a generic (PM) feature too?

They're not. Once the site specific zoom levels in Pale Moon are set for a site and then you leave the site, once back on the site, the generic zoom levels in Pale Moon which were set for that site are gone. Gordon Dry is correct.

I've got 20/600 vision without glasses and even with glasses to help me with my poor vision, some sites text are so tiny on my 27" monitor, if it wasn't for NoSquint, I wouldn't revisit those sites.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Zoom

Unread post by coffeebreak » 2021-09-01, 00:54

Night Wing wrote:
2021-08-31, 23:12
They're not. Once the site specific zoom levels in Pale Moon are set for a site and then you leave the site, once back on the site, the generic zoom levels in Pale Moon which were set for that site are gone.
The browser does remember site-specific zoom levels natively.

As I recall, NoSquint preempts this when it is installed by changing the browser setting that controls the native feature. See this post.

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5151
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Zoom

Unread post by Night Wing » 2021-09-01, 02:17

@ coffeebreak

I forgot about that link you re-posted in early January of 2019. :oops:

I've been using NoSquint since I can't remember when. Probably since late 2011. I'm going to get on my experimental linux Mint 20.2 (at this time) hard drive and see if this will work and if it does, then I can quit using NoSquint.

Most of my percentages using NoSquint range from 135% to 150%. I use 150% for the Pale Moon Forums site. Especially now that I have a cataract in each eye. Both cataracts are too small to operate on at this time, but those cataracts do cause problems for me seeing wise.

If I can quit using NoSquint, then I'll be down to using only one extension for Pale Moon and that is uBlock Origin.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5151
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Zoom

Unread post by Night Wing » 2021-09-01, 03:15

@ coffeebreak

Long story short. The "browser.zoom.siteSpecific" in (about:config) set to "true" works! :D

The default "zoom in" settings stayed put even after I restarted the browser and even after rebooting Mint (20.2). :thumbup:

I had to zoom in four times to be able to see the Pale Moon Forums site without eye strain. Now I have to change many sites I go to everyday.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Zoom

Unread post by coffeebreak » 2021-09-01, 06:28

@Night Wing

A couple more things...

If you like, it's possible to adjust the size of the zoom % increments (up/down) in about:config (details here);

And you can also adjust the maximum and minimum end limits of the zoom range (default is max: 300%, min: 30%) - settings for that are: zoom.maxPercent and zoom.minPercent .

User avatar
Scribe
Moon lover
Moon lover
Posts: 80
Joined: 2016-01-29, 09:35
Location: West London, England

Re: Zoom

Unread post by Scribe » 2021-09-01, 06:50

BenFenner wrote:
2021-08-31, 16:46
I realize I'm not in the target group for this. I run 4k monitors with no scaling and would kill for 8k to make things even tinier (without scaling).
But maybe someone can explain to me what these zoom extensions do that the normal zoom controls don't accomplish?
For me it's the ability to see the zoom percentage on a toolbar (the default zoom control only has minus and plus); AND the ability to change the zoom level by holding down the RH mouse button and rotating the wheel. I used to use 'Zoom Page' for the percentage but that stopped zooming images in PM 29 and broke in 29.2, in conjunction with 'Mouse Zoom' but that broke in PM 29.2.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35481
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Zoom

Unread post by Moonchild » 2021-09-01, 14:03

Potkeny wrote:
2021-08-31, 18:53
I'm quite sure site-specific zoom-levels are a generic (PM) feature too?
Yes they are; although if an extension overwrites/removes those settings to enforce a "global zoom" then that of course may seem to not be the case.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked