On 29/10/2020 09:41, Nuno Silva wrote:
On 2020-10-29, Jonathan Wilson wrote:

Does anyone know how I can get imgur images to work in SeaMonkey? All
I get when I visit such a URL is a blank screen. I tried user-agent
overrides to identify as Firefox but that did nothing.
...>

The default imgur interface requires ResizeObserver, which is supported
by 2.53.5 beta 1.

If you don't want to upgrade yet, it is (unless things have changed
recently) possible to disable the new imgur interface by visiting

     https://imgur.com/beta/disable

Or, in some UserJS loaded before imgur.com:

var ResizeObserver = function (callback)  {
    this.observe = function(el) {
            if (this._observables.some((observable) =>
                observable.el === el)) return;
            this._observables.push( {
              el: el,
              size: { height: el.clientHeight, width: el.clientWidth }
            });
    };

    this.unobserve = function(el) {
        this._observables =
                this._observables.filter((obj) => obj.el !== el);
    };

    this.disconnect = function() {
        this._observables = [];
    };
    this._check = function() {
        const changedEntries = this._observables.filter((obj) => {
                const currentHeight = obj.el.clientHeight;
                const currentWidth = obj.el.clientWidth;
                if (obj.size.height !== currentHeight ||
                    obj.size.width !== currentWidth) {
                        obj.size.height = currentHeight;
                        obj.size.width = currentWidth;
                        return true;
                }
        }).map((obj) => obj.el);
        if (changedEntries.length > 0) this._callback(changedEntries);
        window.requestAnimationFrame(this._boundCheck);
    };
    this._observables = [];
    this._boundCheck = this._check.bind(this);
    this._boundCheck();
    this._callback = callback;
 };

/df

--
London
UK
_______________________________________________
support-seamonkey mailing list
[email protected]
https://lists.mozilla.org/listinfo/support-seamonkey

Reply via email to