GithubHelp home page GithubHelp logo

martok / palefill Goto Github PK

View Code? Open in Web Editor NEW
79.0 11.0 9.0 187 KB

Inject Polyfills for various web technologies into pages requiring them

Home Page: https://martok.github.io/palefill/

License: Mozilla Public License 2.0

Ruby 0.45% JavaScript 99.55%
palemoon palemoon-addon polyfill seamonkey webcomponents github

palefill's Introduction

Palefill is an add-on for Pale Moon that injects polyfills into pages to improve compatibility.

Installation

  • Install from Github Releases: Latest
  • Find it on the official Add-Ons repository: Extensions

Features

  • Targets Pale Moon browser
  • "runs on" any UXP toolkit browser (with limited support)
  • load polyfills for things like Web Components
  • fix/shim unsupported JS syntax elements
  • fix other minor compatibility issues

Documentation

Full documentation including technical details is on its own site.

Reporting Issues

Something doesn't work? Report an issue on Github. To make this as efficient as possible, remember to provide some key information:

  • Was a similar issue already reported? Use the search, reference others if a previous problem came back.
  • What is the nature of the issue? Missing site parts, errors on the console (provide in full!), ... ?
  • What browser and version is used? Anything that is not the latest Pale Moon might be out of scope.
  • Any privacy add-ons? Cookie whitelisting breaks a surprising amount of sites (because it affects not just cookies).

Credits

This add-on is heavily based on GitHub Web Components Polyfill, which does the same thing for GitHub and a few other sites.

 Portions based on GitHub Web Components Polyfill Add-on
 Copyright (c) 2020 JustOff. All rights reserved.
 Copyright (c) 2022 SeaHOH. All rights reserved.
 https://github.com/JustOff/github-wc-polyfill

The polyfills themselves have different contributors, see lib/polyfills.js.

The following people have contributed to this add-on:

palefill's People

Contributors

g4jc avatar jobbautista9 avatar martok avatar ucyborg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

palefill's Issues

`import` keyword polyfill?

It seems that more and more websites started using import keyword in their javascript frameworks.
I wonder if palefill will support this?

DeepL Translator support?

I would like first to thanks you about this amazing plugins that helps me to still use Basilisk instead of Chrome/Firefox.
A couple of months ago DeepL translator stopped working for me using Pale Moon and Basilisk.
I saw as the first error in the F12 errors log:

ReferenceError: customElements is not defined[Learn More]

I thus added those lines to the main.js file, (thinking to be clever):

    {
      selector: ["www.deepl.com"],
      fix: ["std-customElements"]
    }

So the custom element error is gone, however I now got more errors in the log;

The page was reloaded, because the character encoding declaration of the HTML document was not found when prescanning the first 1024 bytes of the file. The encoding declaration needs to be moved to be within the first 1024 bytes of the file.  
translator:47
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
            if (typeof window.__REACT_D....  
translator:88
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
            function initializeDapCooki....  
translator:93
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 

        (function() {
            var ....  
translator:172
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
    (function(){
        const loc = ((....  
translator:319
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
        (function(){
            const ....  
translator:395
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/translator_early.min.$f76974.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
    (function(){
        var isActive =....  
translator:411
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
    (function(){
        var isActive =....  
translator:422
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: onclick attribute on BUTTON element.  
translator
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
        if (!(!!window.MSInputMethodCon....  
translator:459
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
        var dl_dropdown = {
           ....  
translator:596
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
        window.dl_texts || (window.dl_t....  
translator:611
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: if(window._initialTranslatorState && win....  
translator:625
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
        if(window._initialTranslatorSta....  
translator:781
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
        (function() {
            if (!....  
translator:853
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
    dl_documentReady(function() {
     ....  
translator:865
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
        window.LMT_WebTranslator_Instan....  
translator:902
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/sentry.min.$52b0f5.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/ext/all3.min.$16b60e.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/utils.chunk.$ed0c4a.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/vendor.chunk.$c44191.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/common.chunk.$2d1c41.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/translator_late.min.$12f916.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/webVitals.min.$2cc2fa.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/cookieBanner.min.$33b880.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/footer.min.$5f82eb.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
        M.define('LMT_InitializedWebTra....  
translator:949
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
M.requireAsync(['H2', 'dlPageState'], f....  
translator:971
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
M.requireAsync(['H2', 'dlPageState'], f....  
translator:978
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/busyIndicator.min.$ba9bdd.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
if (window.dl_texts) { Object.assign(wi....  
translator:1019
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/translatorFeatures.min.$4bb2ce.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at https://static.deepl.com/js/ext/shariff.min.$adfca3.js (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”).  
(unknown)
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
        M.define('Shariff', [], functio....  
translator:1034
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs=' https://unpkg.com 'sha256-OwZ01+Rm14aWus1qtEB+J9IFIvCkuxScfJMBbQFlDUs='”). Source: 
      M.requireAsync([
        'LMT_Ini....  
translator:1039

So I still cannot use deepl translator, it is a bit sad because I do prefer it over google translate, I thus have to use a separate Firefox windows Just for this page...

I have No knowledge in term of JS programming, so sorry If I am asking something stupid.
My question is: Would it be possible to fix the problem? It seems there is an integrity check on the script, maybe there is a way to bypass it? I am doing something wrong? I am even supposed to add more websites to the main.js file?

GitHub: Soft-Navigation to and within Actions will not work!

Browser: Serpent v52.9.0 (2022-08-24) (32-bit)
Extension version: palefill-1.22-3-git-20221016-g01a436b
(the most recent snapshot where soft navigation (aka "turbo") isn't disabled)

STR:

1st test:

  1. Visit/load : https://github.com/martok/palefill
    By default, the <> Code tab should have been selected 😉 ...
  2. Select the Actions tab; the blue line on top will start to move to the right very slowly, end result being:

GHA2

2nd test:

  1. Visit/load: https://github.com/martok/palefill/actions
    By default, the All workflows vertical tab should have been selected...
  2. Select the pages-build-deployment vertical tab; result (as previously):

GHA3

DESCRIPTION: This has started happening just a few days ago, when MS started messing (again) with the Actions tab 😡 (read from "them" here 😉 ) ; below is an excerpt from Web Console:

02:34:41.989 TypeError: 'root' member of IntersectionObserverInit does not implement interface Element.[Learn More]  
chunk-app_components_primer_experimental_split-page-layout-element_ts-16a80eadd5af.js:1:1753

02:36:47.627 TypeError: 'root' member of IntersectionObserverInit does not implement interface Element.
Stack trace:
setupStickyPane@https://github.githubassets.com/assets/chunk-app_components_primer_experimental_split-page-layout-element_ts-16a80eadd5af.js:1:1753
connectedCallback@https://github.githubassets.com/assets/chunk-app_components_primer_experimental_split-page-layout-element_ts-16a80eadd5af.js:1:1549
connectedCallback@https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-accdbcccdc1b.js:1:10883
CatalystDelegate/a.prototype.connectedCallback@https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-accdbcccdc1b.js:1:9615
a.prototype.connectedCallback@https://github.githubassets.com/assets/compat-838cedbb.js:1:3432
s@https://github.githubassets.com/assets/compat-838cedbb.js:1:1447
@https://github.githubassets.com/assets/compat-838cedbb.js:1:10357
renderElement@https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:22619
loadFrameElement@https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:22973
render/<@https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:22746
preservingPermanentElements@https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:20078
preservingPermanentElements@https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:21497
render@https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:1:22708
  
vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-7ca92c8d513d.js:15:42942

02:36:47.780 TypeError: k(...) is undefined[Learn More]  
chunk-app_components_primer_experimental_split-page-layout-element_ts-16a80eadd5af.js:1:1595

I am by no means Javascript savvy, but my searching skills tell me it's most probably:
microsoft/TypeScript#40454 😞
UXP does have support for IntersectionObserver, first implemented in Fx55, but, as linked in the documentation, support for options.root other than Element was first implemented in Fx76...

WORKAROUND: Blocking the culprit script in uBO offers a kludge:

! Enable "soft" navigation to and within GitHub "Actions" tab
||github.githubassets.com/assets/chunk-app_components_primer_experimental_split-page-layout-element_ts-16a80eadd5af.js$script,domain=github.com,important

NB: In palefill-1.23+, "soft" navigation has been disabled, thus this issue has been "swept under the rug" 😜 ; but, Web/Error Consoles will still generate messages about the culprit script(s) 😠 ...

GitHub profile: member's "GitHub Stats" not displaying

Browser: Serpent v52.9.0 (2022-08-24) (32-bit)
Extension version: palefill-1.23 (latest stable release)

STR

  1. Navigate to: https://github.com/danyalasif
  2. Scroll a bit down until you reach the section
    https://github.com/danyalasif#languages-and-tools
    In it you'll see an image/"wizard" displaying (correctly) the percentages of "Most Used Languages"; but just under it, two (almost) empty "wizards" are being displayed:

GHstats

OTOH, on a Chromium-based browser, everything looks OK:

GHstats1

I've searched it a bit and came to the conclusion the issue is CSP related...
All 3 "images" are being served from a camo.githubusercontent.com hostname; while the first displays OK, the other two (with dynamic content?) don't...
2nd "image":
https://camo.githubusercontent.com/ece0c8060b134effe1fc5358eac0dd567d35b8c3bb7be2e73510f970a15cd8de/68747470733a2f2f6769746875622d726561646d652d73746174732e76657263656c2e6170702f6170693f757365726e616d653d64616e79616c617369662673686f775f69636f6e733d74727565266c6f63616c653d656e
3rd "image":
https://camo.githubusercontent.com/910a8cef836efb36af907d2754ce875141fc1c563c427abe18a60c8f2aed2473/68747470733a2f2f6769746875622d726561646d652d73747265616b2d73746174732e6865726f6b756170702e636f6d2f3f757365723d64616e79616c6173696626

If I set security.csp.enable;false in my browser's about:config, then these two links above open and display fully in a new tab (but disabling CSP globally won't make them display inside the profile page...).

Could palefill help reproduce Chromium's behaviour of displaying correctly the member's GitHub Stats?

Thanks for the wonderful job you're doing here with palefill ! 🥇

Configuration Options

The addon should have interactive options, for example en/disabling some fixes.

Maybe use a config file like ABL/uBlock instead of the object definition block?

Need to research how this works with bootstrap addons.

performance.mark function

22-06-27--1656333906_scrot

Just started to happen even after updating plug to 1.14, I must hit F5 to update the page.

Pale Moon 31.1.0 - linux5.4

Reaction tooltips missing in GitHub

Many thanks for this most valuable extension 👍 .
I'm currently in the process of migrating from gh-wc-polyfill to palefill, but stumbled across a bug/irritation:

STR
Version of extension: 1.11

  1. Load, e.g.,
    #8 (comment)
  2. Hover over the reaction emoji, to see the identity of the GH-member that reacted
  3. Expected behaviour: A tooltip pops-up with the GH-username (among other things):

rt1

This is currently working as expected with gh-wc-polyfill-v1.2.19 😉

  1. Actual behaviour: No tooltip pops up when the reaction emoji is hovered over... 😞

I can also reproduce with latest palefill ALL the problems reported in upstream issue #54: JustOff/github-wc-polyfill#54

problems fixed by
JustOff/github-wc-polyfill@c0f5ff3
and
JustOff/github-wc-polyfill@74179c2

Thanks in advance for any eventual resolution... 😄

GitHub Actions: "Show more" buttons unresponsive...

Browser: Serpent v52.9.0 (2022-08-24) (32-bit)
Extension version: palefill-1.23 (latest stable release)

STR

Visit/load: https://github.com/ytdl-patched/yt-dlp/actions/runs/3258194065

Under Annotations, you'll notice 14 warnings, 12 of which have a "Show more" button:

GHA-SM1

Current behaviour:

Clicking any of those (12) "Show more" buttons will have no effect at all 😢 ...

Expected behaviour:

In a Chromium-based browser, clicking a "Show more" button will reveal additional text (and a "Show less" button will also display):

UXP:
GHA-SM2

Chromium 86:
GHA-SM3

Nothing I can spot is printed in Web Console... 😭

github - invalid identity escape in regular expression

Serpent52(20220929) Palefill1.21

Error: SyntaxError: invalid identity escape in regular expression
Source File: https://github.githubassets.com/assets/issues-22d3222922e5.js
Line: 1, Column: 23158
Source Code:
k=d.querySelector(".js-sync-filename");k.value=`${f.replace(/[^\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}\p{E

if I go in issues e.g. https://github.com/martok/palefill/issues

GitHub: "Error: A custom element with name 'toggle-switch' has already been defined."

Browser: Serpent 52.9.0 (2022-08-05) (32-bit)
Extension version: Latest master HEAD (palefill-v1.20-2-git-20220907-g5c251f5)

Description

Over the last few days, when browsing any GitHub page, I couldn't help noticing the below Web Console error:

Error: A custom element with name 'toggle-switch' has already been defined.

The error is generated by GH script:

https://github.githubassets.com/assets/compat-838cedbb.js

Screengrab attached:

GHerror

Is this something to worry about?
Can it be eliminated?

Thanks for your stupendous, hard, work! 👍

Domain Wildcards

Currently not possible: selectors for *.notion.site etc.

Implementation is not as obvious as it might seem because it needs to be fast and work well with the exclusion list, isSiteEnabled is the first fast check for any request.

Since the wildcard is often going to be at the start, reverse-matching (in hierarchy order) might make sense.

Better support for self-hosted sites

Gitlab already has it via the gitlab-urls pref, but for example Nextcloud instances need the same handling.

Looks like a generic solution is required. Maybe even something with "template" parts for domain selectors?

SyntaxError: expected expression, got keyword 'import'

Thanks for all the work everyone has done on this so far.

Would it be possible to polyfill (or transpile, if necessary), the "import" keyword?

Unfortunately, some sites seem to be using that in the browser now.

It's constant whack-a-mole these days with browser breakage and cleaning up everyone's mess.

SyntaxError: expected expression, got keyword 'import'

duolingo.com

At Seamonkey duolingo fail to load because

SyntaxError: invalid identity escape in regular expression

Can't install on Serpent

____
Originally posted by @NEO-SPECTRUMAN in #20 (comment)

We define the supported versions for Basilisk/Iceweasel-UXP as:

        <em:minVersion>52.9.2020.10.05</em:minVersion>
        <em:maxVersion>52.9.*</em:maxVersion>

Yeah, that can't work. Serpent reports itself as "52.9.0", ".0" being less than ".2020" causes that to be rejected. The generic toolkit version is never checked if an explicit definition with the matching UUID exists, can't save us here.

So there is at least a third version format using the same browser UUID (see 17c39ef for the other two).

@roytam1 @g4jc Anything in particular I should be aware of or is it okay to just the minVersion to 52.9.0 and be done with it? IIRC Basilisk has a much longer history than 2020.10.05, what was the reason for that particular version?

youtube.com: CE polyfill or not?

Investigate if we want to polyfill webcomponents & co on youtube.com or not. Current (2022-04-10) state: we do not, and do not need to as youtube supplies their own polyfill in webcomponents-ce-sd.js.

Quote @UCyborg in #11:

YouTube: You're right, window.customElements is actually defined with default user agent Pale Moon spoofs for it, haven't noticed, thought it does non customElements way in that case. Another funny thing, SeaMonkey says by default in its user agent that it's both Firefox 68 and SeaMonkey and then those preview thumbnails work (unlike with UA that just says Firefox 60), video description section has different appearance and customElements is also defined in this case by YouTube. Seems the only case when it isn't defined is with UA of Firefox 65 or newer.

I like the latter combination simply because then it seems to behave like it does on popular browsers. But yes, since the behavior is quirky, no problem, I'll throw that commit out and just use it on my locally installed copy.

PM UA override: Mozilla/5.0 (%OS_SLICE% rv:60.0) Gecko/20100101 Firefox/60.0

Performance measured to scroll-interactive, in seconds:

action           palefill   UA
channel/videos   14         11
video page       20         20
youtube.com      18         18

So currently, their polyfill is a bit faster than ours on one page and the same on all others. Both versions get the same design (flyout thumbnails etc.).

Conclusion: not needed for PM, may be needed for SM.

Fix www.virustotal.com (not really a polyfill)

Maybe this demand is slightly out of the scope of this plugin but given that many users that are using palemoon and other UXP derivative will be using it to fix a lot of broken sites, I thought this might be of interest to you.

So the problem is that virustotal.com does not load anymore see on palemoon forums and here is a fix that also works for palemoon Feodor2/Mypal68#78.

The fix is to set dom.moduleScripts.enabled fo false in this case virustotal works with the full-feature modern interface.

This setting change could also fix or break other sites so it is not an option to let it disabled and forget about it just for a couple of websites.
It should not be hard to add to the list of rules a way to change this setting in the context of given sites. So I thought it could be added to palefill. A plugin was also written by a palemoon forum member but I cannot get it to run on other UXP based platforms such as SeaMonkey or BNavigator, even after changing the install.rdf file.

[Left-]Clicking GitHub download links results in blank page...

Specifics:

Browser: Serpent 52.9.0 (2022-08-05) (32-bit)
Extension version: 1.19 (latest stable)

STR

  1. Say you arrive in a GitHub Releases page, e.g.
    https://github.com/Feodor2/Mypal68/releases

  2. In the Assets area, (left-)click the *.zip download link:
    mypal-68.12.5.en-US.win32.zip

Expected behaviour:

This is dependent on a browser setting, e.g. in my case I have it as

Preferences -> General -> Downloads: Always ask me where to save files

so the default in my user case is to be presented with a "File Save" pop-up/window.

Actual behaviour:

The currently open (Releases) tab is being redirected to an empty (blank) tab, the URL bar now holds the actual download link:

GH1

Web Console tells this is CSP related... 😞

Disabling palefill, reloading the Releases page and (left-)clicking anew the download link restores the default behaviour:

GH2

No CSP errors in Web Console this time... 😉

Currently, one workaround is to right-click the download link and from the generated context menu select Save Link As...; but I'm accustomed to left-clicking, most of the times...

Palefill 1.21 stopped working on SeaMonkey (nonce CSP fix)

Hi there!

Just updated Palefill to 1.21 here to notice that it does absolutely nothing at all on SeaMonkey! At first I thought it was something deprecated/broke with its latest update (as 2.53.14 got released two days ago), but managed to replicate it on a clean profile on a machine that hasn't been updated yet. Downgrading Palefill to 1.20 restores functionality (but then I miss the fixes for Google Docs and Pixiv). The offending commit seems to be dedc16d

No errors get logged anywhere, AFAIK.

GitHub Optional chaining resurgent

See JustOff/github-wc-polyfill#68 (comment) for an example of this nonsense.

So I thought it should be possible to apply an edit to the GH scripts using this nice extension. If they say a.b.c?.d, we should be able to replace that with ((_x=>(_x==null)?undefined:_x.d)(a.b.c)). There was already a minor example in the gh-script-optchain fix (which I renamed below after removing that).

I edited lib/main.js, also removing an undefined diagnostic for fixes.a:

--- a/lib/main.js
+++ b/lib/main.js
@@ -78,10 +78,14 @@ function evaluateFix(fix, script, csp, contentReplace) {
                           "data-module-id": "./chunk-index2.js",
                           "data-src": "https://github.githubassets.com/assets/chunk-index2-a3fdc9f7.js"});
             break;
-        case "gh-script-optchain":
+        case "gh-script-nullish":
             // works only for this specific minimizer output...
-            contentReplace.push([/([a-zA-Z]+)\?\?/g, "((typeof($1)!==undefined)&&($1!==null))?($1):"]);
-            contentReplace.push([`this.matchFields?.join("-")`, `((y)=>y?y.join("-"):y)(this.matchFields)`]);
+            contentReplace.push([/([a-zA-Z_$][a-zA-Z_$0-9]*)\?\?/g, "((typeof($1)!==undefined)&&($1!==null))?($1):"]);
+            contentReplace.push([`H.integrity=S.sriHashes[t],`, ``]);
+            break;
+        case "gh-script-optchain":
+            contentReplace.push([/(([a-zA-Z_$][a-zA-Z_$0-9]*\.)*([a-zA-Z_$][a-zA-Z_$0-9]*))\?\.([a-zA-Z_$][a-zA-Z_$0-9]*)/g,
+                                "((_x => (_x==null)?undefined:_x.$3)($1))"]);
             contentReplace.push([`H.integrity=S.sriHashes[t],`, ``]);
             break;
         case "gh-worker-csp":
@@ -158,7 +162,7 @@ function supersededFixes(service) {
         superseded.add("tmx-optchain");
     }
     if (service.isNullishCoalescingSupported) {
-        superseded.add("gh-script-optchain");
+        superseded.add("gh-script-nullish");
     }
     return superseded;
 }
@@ -814,7 +818,7 @@ class HTTPObserver {
                 }
                 break;
             case "http-on-modify-request":
-                if (gService.isSeaMonkey && fixes.a.includes("sm-cookie")) {
+                if (gService.isSeaMonkey && fixes.fixes.includes("sm-cookie")) {
                     try {
                         this.cookie = subject.getRequestHeader("Cookie");
                     } catch (e) {

and lib/builtin-rules.js:

--- a/lib/builtin-rules.js
+++ b/lib/builtin-rules.js
@@ -11,7 +11,7 @@
 // For easier maintainability, please keep in logical-alphabetical order:
 //   generally sorted by host name part, minus "www."
 //   "www.dhl.de" sorts as "dhl"
-//   "static.ce-cdn.net" sorts together with it's parent, "godbolt.org"
+//   "static.ce-cdn.net" sorts together with its parent, "godbolt.org"
 
 exports = String.raw`
 developer.apple.com
@@ -31,6 +31,9 @@ gist.github.com/socket-worker.js$script
 github.com/assets-cdn/worker/socket-worker-*.js$script
 gist.github.com/assets-cdn/worker/socket-worker-*.js$script
     gh-worker-csp
+github.githubassets.com/assets/*.js$script
+    $script-content,gh-script-optchain
+
 ! --
 godbolt.org
     std-queueMicrotask

(Anyone who asks why this isn't a GH PR should try making one when GH scripts aren't working)

Now, I've abolished the console errors, but apparently the scripts are failing silently. I'm getting this
None of the "sha512" hashes in the integrity attribute match the content of the subresource.
apparently from the catch at the end of TracingListener.onStopRequest.

Any advice?

Use feature checking instead of version checking

If you run palefill on platform code which just changed version but not getting opchain code in (i.e. https://repo.palemoon.org/MoonchildProductions/UXP/commit/062a5085b12f33e8f7c4bb76bd539bd60f3c3686) then palefill doesn't rewrite optchain code (even platform code returns 5.1.0 but it can't parse optchain javascript code)

instead, feature checking will be better-fit:

const isOptionalChainingSupported = () => {
  try {
    eval('const foo = {}; foo?.bar');
  } catch(e) {
    return false;
  }

  return true;
}

const isNullishCoalescingSupported = () => {
  try {
    eval('const foo = null ?? "default string";');
  } catch(e) {
    return false;
  }

  return true;
}

(credits: copied and rewrote from https://stackoverflow.com/a/69935847)

Support more UXP projects

(Separated from #18)

First, I'm not going to add any more supported browsers. This is simply because I don't lie to people: I have no way (or care, really) of testing anything besides Pale Moon and unless someone specifically wants to maintain relevant features on even more niche browsers, that's not gonna happen. In retrospect, even the two that are currently in were a mistake.

After further consideration: not happening. Everybody is free to create their own forks of course, but the UXP ecosystem is apparently aready so fractured that it is impossible to target anything reliably without extensive testing.

However. With recent changes that take Platform Version into account, there is another route. It is possible to switch based on the "Toolkit Version", for which the addon compat checks always use the Platform Version. This alone would not help here, as you can't switch on which toolkit is meant - mozilla-central is the same as Goanna in that regard. Luckily for us, in Mozilla products the Platform version always tracks the browser version, and has done so since the Phoenix days while Goanna/UXP presents its own version since Goanna 4.1 (skipping backwards from Gecko 52.6). So while a check for "Platform 5.1" would go through for Firefox 5.1, the odds of someone running that and thinking this here addon will fix much are pretty low.

The end result should be that any UXP app can install this addon and maybe or maybe not works.

  • Extend install.rdf and update.xml with [email protected], minVersion=4.8.2 (the PM 29.4.0 release)
  • Warn about running on untested apps in options screen
    • Optional: go to that warning on first install but not on updates
  • Simplify/DRY update.xml
  • Put this policy in Readme

VirusTotal doesn't show the hash of an examined file

New problem on VirusTotal. A file can be uploaded, the service seems to check the hash, but this checking is never coming to an end. No hash of the file is shown. Tested in New Moon 28.10.6a1, latest build from 2022-07-06, and palefill 1.16, under Windows XP Professional SP3, fully updated including all POSReady updates.

Kind regards, AstroSkipper panne-ordi-2.gif

unusual csp on github?

Serpent52 (2022-07-15)
Couldn’t parse invalid host .actions.githubusercontent.com
Couldn’t parse invalid host .githubusercontent.com

(by the way, is it possible to exclude third parties?, e.g. unpkg on github)

RegExp named capturing groups

They have started using this feature.
e.g. https://github.com/orgs/opensearch-project/projects/30

Related scripts:
https://github.githubassets.com/assets/vendors-node_modules_memex-frontend-latest_dist_client_app_bundle_js-e03fc02fea42.js
https://github.githubassets.com/assets/chunk-app_assets_modules_github_insights_insights-query_ts-0b114b80f914.js

Only blank pages here. I think we need polyfill until Moonchild add this feature, and I finished it.

1. The polyfill (click)
/*
  =============================================================================
  RegExp Named Capturing Groups polyfill
  =============================================================================

  Only work with RegExp(...), polyfill with literal notation is impossible.

    working:                            // /Foo(?<bar>bar)/i
      RegExp("Foo(?<bar>bar)", "i")
      RegExp(RegExp("Foo(?<bar>bar)"), "i")

    not working:                        // SyntaxError: invalid regexp group
      /Foo(?<bar>bar)/i
      RegExp(/Foo(?<bar>bar)/, "i")

  =============================================================================
  The MIT License (MIT)
  =============================================================================

  Copyright (c) 2017- Commenthol
  https://github.com/commenthol/named-regexp-groups
  Copyright (c) 2017- lifaon74
  https://github.com/lifaon74/regexp-polyfill
  Copyright (c) 2022- SeaHOH
  https://github.com/SeaHOH

  Permission is hereby granted, free of charge, to any person obtaining a copy of
  this software and associated documentation files (the "Software"), to deal in
  the Software without restriction, including without limitation the rights to
  use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  of the Software, and to permit persons to whom the Software is furnished to do
  so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
*/
(function () {
  try { new RegExp("(?<foo>foo)"); return } catch(e) { }
  const
  S_NAME = "([a-zA-Z_$][a-zA-Z_$0-9]{0,50})",
  R_NAME_REPLACE = new RegExp("\\$<" + S_NAME + ">", "g"),
  R_NAMED_BACKREF = new RegExp("^[?:]&" + S_NAME),
  R_GROUP = new RegExp("^[?:]<" + S_NAME + ">([^]*)"),
  R_GROUPS = /(\\?[()])/g,
  R_EMPTY_GROUPS = /([^\\]|^)\(\)/g,
  A_FLAGS = Object.values("dgimsuy"),
  dotAllBroken = (() => {
    try { new RegExp("", "s") } catch(e) { return true }
    return false;
  })();
  function generate (str) {
    const
    groups = {},
    named = {},
    arr = String(str).split(R_GROUPS),
    store = {
      count: 0,     // counter for unnamed matching group
      groups: [""], // store for named pattern
      names: []     // store for names of capture groups
    };
    let index = 0, source = arr.map((part, i) => {
      let name, block, isGroup = false;
      switch (part) {
        case "(":
          store.groups.push("");
          store.names.push("");
          break
        case ")":
          block = store.groups.pop();
          name = store.names.pop();
          /* istanbul ignore else */
          if (name) {
            named[name] = block.substr(1);
          }
          break
        default:
          // is it a real group, not a cluster (?:...), or assertion (?=...), (?!...)
          isGroup = arr[i - 1] === "(" && !/^\?[:!=]/.test(part);
          if (isGroup) {
            index ++;
            // named capture group check
            name = R_GROUP.exec(part);
            if (name && name[1]) {
              if (!groups[name[1]]) {
                store.names[store.names.length - 1] = name[1];
                groups[name[1]] = index;
              } else {
                store.count ++;
              }
              part = name[2] || "";
              if (arr[i + 1] === ")" && !name[2]) {
                part = "[^]+";
              }
            } else {
              // is not a cluster, assertion or named capture group
              store.count ++;
            }
            // named backreference check
            name = R_NAMED_BACKREF.exec(part);
            if (name && name[1]) {
              part = named[name[1]] || "";
            }
          }
          break
      }
      store.groups = store.groups.map((group) => {
        return (group + part);
      });
      return part;
    }).join("")
      .replace(R_EMPTY_GROUPS, "$1"); // remove any empty groups
    return { source, groups, named };
  }
  NativeRegExp = RegExp;
  NamedRegExp = class NamedRegExp extends NativeRegExp {
    constructor(pattern, flags) {
      if (pattern instanceof NamedRegExp) {
        pattern = pattern.source;
        flags = flags || pattern.flags;
      }
      flags = flags || "";
      const
      cflags = flags.replace("s", ""),
      dotall = cflags !== flags;
      if (!(dotall && dotAllBroken) && pattern instanceof NativeRegExp)
        return new NativeRegExp(pattern, flags);
      let { source, groups } = generate(pattern);
      const named = Object.keys(groups).length > 0;
      if (dotall && dotAllBroken) {
        // Fix flag "s" in RegExp(...).constructor
        source = source.replace(/([^\\]|^)\./g, "$1[\\s\\S]");
      } else if (!named)
        return new NativeRegExp(pattern, flags);
      super(source, cflags);
      this._source = pattern;
      this._dotall = dotall;
      if (named) this._groups = groups;
      this._flags = A_FLAGS.map((flag) => {
                      return flags.includes(flag) ? flag : "";
                    }).join("");
    }
    get source() {
      return this._source;
    }
    get dotAll() {
      return this._dotall;
    }
    get flags() {
      return this._flags;
    }
    _updateGroups(res) {
      if (res && this._groups) {
        res.groups = {};
        Object.entries(this._groups).forEach(([name, index]) => {
          res.groups[name] = res[index];
        })
        return res.groups;
      }
    }
    exec(str) {
      const res = super.exec(str);
      this._updateGroups(res);
      return res;
    }
    [Symbol.replace](str, replacement) {
      const
      groups = this._groups,
      repl = groups ? (typeof replacement === "function") ?
          ((...args) => {
            args.push(this._updateGroups(args));
            return replacement(...args);
          }) :
          String(replacement).replace(R_NAME_REPLACE, (_, name) => {
            const index = groups[name];
            return [undefined, null].includes(index) ? "" : "$" + index;
          }) :
          replacement;
      return super[Symbol.replace](str, repl);
    }
  }
  RegExp = function RegExp(pattern, flags) {
    return new NamedRegExp(pattern, flags);
  }
  RegExp.prototype = NativeRegExp.prototype;
}());
2. The babel polyfill (click)
function namedGroupsFill(match, splitS, pattern, flags, splitE) {
  return `${splitS}RegExp("${pattern.replace(/[\\"]/g, "\\$&")}","${flags}")${splitE}`
}

const namedGroupsSub = [/([=(])\/((?:[^/]|\\\/)*?\(\?<(?:[^/]|\\\/)+)\/([dgimsuy]*)([,;)])/g, namedGroupsFill];

/*
/vendors-node_modules_memex-frontend-latest_dist_client_app_bundle_js-*.js
/chunk-app_assets_modules_github_insights_insights-query_ts-*.js
NAMED_CAPTURING_GROUPS_DONE = NAMED_CAPTURING_GROUPS.replace(...namedGroupsSub);
*/

Consider hosting the xpi package in a site that doesn't require WebComponents

Originally reported in Pale Moon forum topic 28849

Currently it's not possible to install the extension with a fresh profile of Pale Moon; seems like GitHub has broken the loading of list of assets in the releases page. See screenshot below.

Screenshot_2022-09-21_13-17-35

This leads to a chicken-and-egg problem. The solution to that problem is to install Palefill, but it's impossible to install Palefill when GitHub is broken for the user.

Possible solutions include letting the Pale Moon add-ons site host the xpi, mirroring the git repo and releases to repo.palemoon.org, or if you really don't want to use Pale Moon infrastructure, host the repo in Codeberg.

leo.org

Another potential candidate that can (mostly, hopefully) be easily fixed by this rule:

*.leo.org
std-ShadowDOM

There's a discussion thread about it opened on Pale Moon forum.

Ghost window memory leak on Pale Moon 31.3.0.1

This issue seems easiest to reproduce using GitHub. With Palefill installed and enabled, GitHub's navigation is performed mostly via JavaScript (clicking on UI buttons like "Issues" or "Pull requests" or navigating directories in the source tree of a repository provides a blue loading bar at the top of the page and navigation occurs without seemingly ever triggering a new page load in the classic sense).

This works fine, but if you create a fresh profile in Pale Moon 31.3.0.1 with only Palefill installed and load up, for example, this repository, and start clicking on buttons for a while to trigger as many of these soft navigations as possible (Try clicking on the issues tab, then an issue, then back to the issues tab, then to the code tab, and navigate the code for a short while, for example), and then close all of your GitHub tabs completely and go to about:memory and click all of the manual GC buttons (at least two times each for good measure -- GC, CC and minimize memory usage) and then create a memory report by clicking the Measure button, you'll see that every GitHub page you navigated to has now become a ghost window, consuming a chunk of memory forever.

According to various Mozilla Bugzilla posts (https://bugzilla.mozilla.org/show_bug.cgi?id=1143912 for example) these ghost windows are usually caused by misbehaving add-ons maintaining references to unattached windows long after they've been closed. As this issue occurs with only Palefill installed, and only on a site that Palefill operates on, it's possible something is wrong with the way Palefill handles the page and probably deserves some analysis, although it could be a bug in Pale Moon too.

The ghost windows persist if you continue using the browser for other sites long after closing the GitHub tabs. In fact, if you re-use the same tab you used for GitHub to navigate to another site (e.g startpage.com), sometimes all of the pages navigated to from within that tab keep becoming ghost windows, so you can quickly accumulate dozens of ghost windows for every single website you've ever visited in that tab since using GitHub. This can fairly easily result in gigabytes of memory usage.

Issue occurs with Palefill 1.21 and 1.22, I haven't tested any versions below that.

Microsoft Docs and Apple Developer

Hello, I just want to bring these two sites to attention:

They both use Custom Elements. No other apparent specialties with Apple's site, but Microsoft's site is only recently easily fixable with the extension since one or two of the newly supported operators in Pale Moon are used numerous times in their code, so would be more difficult to fix for browsers that don't support optional-chaining and nullish-coalescing operators. I attempted changing usage of those operators a while back, but got lost and lost patience.

Additionally, it has a script which determines whether to show browser unsupported warning and unhides the relevant element on the page, check the debugger and look for the JS file with "deprecation" in the name. It seems to check for some features that aren't used yet, though theoretically some things could get triggered for logged in users. May be blocked with content blocking extension like uBlock Origin.

I suppose "std-customElements" rule can still be included for PM users and other browsers at this level of JavaScript support since it brings back functional index on certain pages such as this one.

Header elements in the top-left corner on VirusTotal

The header elements in the top-left corner are a bit broken on the website VirusTotal.com. Some elements are overlaid and difficult to reach or read, like for example, Sign-in or Sign-out. Tested in New Moon 28.10.6a1, latest build from 2022-07-15 and Serpent v52.9.0 (2022-07-15), both 32-bit with palefill 1.17 installed. OS is Windows XP Professional.

Kindest regards, AstroSkipper panne-ordi-2.gif

GitHub "404" pages not being processed by palefill

Browser version: Serpent 52.9.0 (2022-05-27)(32-bit) - includes support for "?."+"??"
Extension version: Latest GitHub HEAD (v1.13-2-20220617-gdd0e0b5)

STR

  1. While being logged-in to your GitHub account, say you arrive on a "404" page, e.g.:

https://github.com/MoonchildProductions/moebius

  1. You soon become aware that on such a page, the palefill extension does NOT work its magic 😞 ...
    E.g., try to access your GH account's avatar button, on the top-right, to sign out/change an account setting, etc.
    Expected result: The familiar dropdown should open
    Actual result: The dropdown warns: "Sorry, something went wrong."

404gh2

Actually, this is a duplicate of an upstream issue I filed 3 1/2 months ago,
JustOff/github-wc-polyfill#55
that was successfully resolved by the then maintainer (SeaHOH) via
JustOff/github-wc-polyfill@801d240
(above commit also addressed an issue not related to the "404" one... 😉 )
It would appear that "fix" has not made it yet to palefill...
A backport will be much appreciated! 😄

drive.google.com scroll bar

on google drive, i have a working scrollbar in the folder window at left, but not in the files window (in list and tile view). maybe that is fixable?

and:
i only just found this, via r/Palemoon, and i'm already SO happy about fixed reddit, leo, and not the least the github assets dropdowns. thank you very very much.

can't add customElements to pixiv

I tried to add new entry in const _definitions:

    {
        selector: ["s.pximg.net/www/js/build/vendors*.js$script"],
        fix: ["$script","std-customElements"]
    },

but it seems that I can't get rid of missing customElements error:

13:01:16.488 PF:  applied fixes to  "https://s.pximg.net/www/js/build/vendors~spa.80859c2e9f4c0ee3303e.js" :  Array [ "$script", "std-customElements" ] 1 util.js:72
13:01:17.106 TypeError: window.customElements is undefined 1 vendors~spa.80859c2e9f4c0ee3303e.js:411:25
	[1778] https://s.pximg.net/www/js/build/vendors~spa.80859c2e9f4c0ee3303e.js:411:25
	r https://s.pximg.net/www/js/build/runtime.e71bdc73f3e32597d30f.js:8:8
	<anonymous> https://s.pximg.net/www/js/build/spa.20de562f99c5c0ff86a6.js:10040:21
	r https://s.pximg.net/www/js/build/runtime.e71bdc73f3e32597d30f.js:8:8
	<anonymous> https://s.pximg.net/www/js/build/spa.20de562f99c5c0ff86a6.js:9796:754
	r https://s.pximg.net/www/js/build/runtime.e71bdc73f3e32597d30f.js:8:8
	a https://s.pximg.net/www/js/build/runtime.e71bdc73f3e32597d30f.js:5:40
	c https://s.pximg.net/www/js/build/runtime.e71bdc73f3e32597d30f.js:4:30
	<anonymous> https://s.pximg.net/www/js/build/spa.20de562f99c5c0ff86a6.js:1:2

Github: optional chaining (again)

Github uses more optional chaining now:

19:19:11.200 SyntaxError: expected expression, got '?'[Learn More]  
8933-d8b0634d2391.js:49:2049
19:19:11.393 SyntaxError: expected expression, got '.'[Learn More]  
2403-3e07b8533bbd.js:1:7833
19:19:11.397 SyntaxError: expected expression, got '?'[Learn More]  
7253-67d624cbaf0c.js:1:10803

This currently breaks (at least) the editor preview tab.

godbolt.org

would be nice if you can add a hack for godbolt.com

the palemoon web compat forum has a post about how to fix it with a greasemonkey script

Consider listing your extension on the Pale Moon Add-ons Site

Hi,

I'm FranklinDM from the Pale Moon Add-ons Team. Would you be interested in listing your extension on the Pale Moon Add-ons Site? We have two (2) available options for you to choose from:

  1. Hosting your add-on

The service will provide full hosting of your add-on, a dedicated page, and automatic update services.

For this option, you'll need to create an account on Phoebus and submit your extension for review.

  1. Indexing your add-on

This is known informally as an External. Indexing is available to both extensions and themes will list your extension to the category of your choosing and will link to where users can obtain your extension.

This solution is a great choice for maintaining your independence and choice of infrastructure and distribution. You may, for example, want to host your extension on your own website or source code repository's downloads section.

I've reviewed your extension and everything looks good to me in terms of code, except for the name. It implies that it is an official extension made by the developers of Pale Moon (e.g., Pale Moon Commander and Pale Moon Locale Switcher). You might want to move it to the end instead, like "Web Technologies Polyfill Add-on for Pale Moon", or even "Palefill" is fine. Either way, I'll leave that for you to decide.

For more information, you may refer to the following page: http://developer.palemoon.org/addons/site/

If you have any further questions, feel free to let me know. Thank you!

Update to PM 31.0

  • have optional Firefox GUID. Should be no change from our side as native PM/SM addon?
  • queueMicrotask is implemented, remove polyfill
  • optchaining implemented, remove scriptfixes (only ?., nullish coalescing ?? is implemented in upstream UXP, should be in next release)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.