Jump to content

rereser

Member
  • Posts

    272
  • Joined

  • Days Won

    1
  • Donations

    0.00 USD 

Posts posted by rereser

  1. here is a modified Array.at() polyfill to install in your userscript manager.
    -----------------------------------------------------------------------------
    // ==UserScript==
    // @name Inject Array.at() Polyfill (92)
    // @version 0.0.1
    // @match *://*/*
    // @run-at document-start
    // @grant none
    // ==/UserScript==

    function at(n) {
        // ToInteger() abstract op
        n = Math.trunc(n) || 0;
        // Allow negative indexing from the end
        if (n < 0) n += this.length;
        // OOB access is guaranteed to return undefined
        if (n < 0 || n >= this.length) return undefined;
        // Otherwise, this is just normal property access
        return this[n];
    }

    const TypedArray = Reflect.getPrototypeOf(Int8Array);
    for (const C of [Array, String, TypedArray]) {
        Object.defineProperty(C.prototype, "at",
                              { value: at,
                                writable: true,
                                enumerable: false,
                                configurable: true });
    }
    ---------------------------------------------------------------------------------
    the first one was posted before: https://msfn.org/board/topic/184624-arcticfoxienotheretoplaygames-360chrome-v1352036-rebuild-1/page/13/#comment-1245468
    it passed the test at: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at

    this modified version works with the mozilla test and the pdf site. (give it a few seconds to load)
    you will need more polyfills like structuredclone, and probably others, installed as NHTPG pointed out.

    source: https://stackoverflow.com/questions/68464114/why-am-i-getting-at-is-not-a-function

    other source: https://github.com/tc39/proposal-relative-indexing-method?tab=readme-ov-file#polyfill

  2. UCyborg, thank you very much!
    did not know about the limitations with the previous one but this new structuredclone polyfill works.
    no more need for the exclude tags i posted.
    test here: https://www.measurethat.net/Benchmarks/Show/18967/0/structuredclone-test
    still trying to figure out how you put this together from the github source but my knowledge is limited.
    thanks again!

  3. found some issues with this polyfill.
    -----------------------------------------------------------
    // ==UserScript==
    // @name Inject structuredClone() Polyfill (98)
    // @version 0.0.1
    // @match *://*/*
    // @run-at document-start
    // @grant none
    // ==/UserScript==

    if (typeof self.structuredClone !== "function") {
      self.structuredClone = function (value) {
        if (Array.isArray(value)) {
          const count = value.length;
          let arr = new Array(count);
          for (let i = 0; i < count; i++) {
            arr = self.structuredClone(value);
          }
          return arr;
        } else if (typeof value === "object") {
            let obj = {};
            for (const prop in value) {
              obj[prop] = self.structuredClone(value[prop]);
            }
            return obj;
        } else {
            return value;
        }
      }
    }

    ----------------------------------------------------------------
    had to add this to get some sites to work.

    // @exclude https://*.whatsapp.com/*
    // @exclude https://*.instagram.com/*
    // @exclude https://*.facebook.com/*
    ------------------------------------------------------------------

    without the exclude tags the below sites load blank.

    faq.whatsapp.com
    instagram.com
    facebook.com/watch

    not that i use those sites but something in this polyfill is affecting the above pages.
    who knows what other sites have issues with it.
    can the polyfill be improved other then adding the exclude tags?

  4. don't understand the "nullish coalescing operators" thing but sorry for the typo.
    equally.ai scripts is the problem on trendmicro.
    it only comes up if tigcdn.com is trusted.
    https://better.fyi/trackers/tiqcdn.com/
    so this can be blocked without causing issues with websites?
    never would have found the issue with tigcdn untrusted...

  5. tested several older versions in 360chrome against the elciudadano.com site with the "findlast" polyfill enabled.
    singlefile 1.22.30 is the last one not producing the error "e-findlast function not found".
    don't forget to export settings when downgrading.
    could not find a download on crx4chrome so uploaded my archived version.
    https://www.mediafire.com/file/ya68z7m65fsghec/MPIODIJHOKGODHHOFBCJDECPFFJIPKLE_1_22_30_0.crx/file

  6. can this css be converted for use in violentmonkey?
    ----------------------------------------------------------------------------------
    @-moz-document url-prefix(https://www.imdb.com/) {
      div[data-testid="video-aspect-ratio"] { 
        height: 360px !important;
      }
    }
    ------------------------------------------------------------------------------------
    it restores video display in imdb.

  7. google is rolling out the new chrome extensions webstore site.
    "chrome.google.com/webstore" redirects to "chromewebstore.google.com"
    with an extension like "cookie keeper 0.2.4" you could delete the new "chromewebstore" cookie to get the old site back.
    download : https://www.crx4chrome.com/crx/47259/  ("Download Crx File from Crx4Chrome" is the only link working)
    but lately that does not work anymore for most extensions installed.
    the old site is still up and can be reached through this page : https://webextension.org/listing/access-control.html (no need to install)

    this script will let you download extensions if you click the "add buttom" but you will have to install the crx files manually.
    --------------------------------------------------------------

    // ==UserScript==
    // @name         Chrome New Webstore make available for all web browsers which support it
    // @namespace   https://greasyfork.org/en/users/85671-jcunews
    // @version      1.0.1
    // @license      AGPL v3
    // @author       jcunews
    // @description  Make extensions in the new version of Google Chrome Webstore be available for all web browsers which support it
    // @match       https://chromewebstore.google.com/*
    // @grant        none
    // ==/UserScript==

    (t => {
      function chk(a, b, c) {
        if ((a = location.pathname.match(/^\/detail\/([^\/]+)\/(.*)/)) && (b = document.querySelector('section>div>div[data-is-touch-wrapper]>button:not([data-forall])'))) {
          b.dataset.forall = 1;
          b.disabled = false;
          b.addEventListener("click", () => c.click());
          b.appendChild(c = document.createElement("A"));
          c.style.display = "none";
          c.href = `https://clients2.google.com/service/update2/crx?response=redirect&prodversion=100.0&acceptformat=crx2,crx3&x=id%3D${a[2]}%26uc`
        }
      }
      (new MutationObserver(() => {
        clearTimeout(t);
        t = setTimeout(chk, 200)
      })).observe(document.body, {childList: true, subtree: true});
      chk()
    })()


    -------------------------------------------------------------------------
    script source : https://greasyfork.org/en/scripts/479807-chrome-new-webstore-make-available-for-all-web-browsers-which-support-it

  8. thanks for the quick reply.
    a newer 2036 build would combine all the tweaks that have been made over time to the chrome.dll.
    like the translate context menu and others , don't remember.
    but i will take and test anything you post.
    instructions for removing the "restore default" button would also suffice for me.

    note : signing off for now.
    have used acronis full system backup about 10 times today after messing with files and settings.
    need to take a break.

  9. after a few days researching my font issue with 2044 , no results.
    i use arial black 8 regular that shows as "bolder" with cleartype font smoothing system wide.
    checked the xp files , regedit , settings and everything else i could think of.
    it seems 2044 picks up some font styles as well as size , bold and italic.
    what it does not seem to do is work with cleartype.
    this is on all my 4 xp sp3 different pc's including a mediacenter 2005 sp3.
    checked it on a win 7 sp1 x64 laptop , arail black works there but the menu settings are almost unreadable.
    the xp sp3 laptop that i forgot about displays arial black 8 regular as a thicker font but not on the new tab button.
    should have known this version was not for me as the chinese source does the same.
    remains a mystery to me what is the cause of this.

    as for the "trojan warning" reported earlier ...
    you can replicate this by using the chrome.exe from 2036 in 2044.
    encountered this when dealing with the above.

  10. had a go at my xp font issue with v2044.
    replaced modified files like shell32.dll and the original ariblk.TTF.
    created a new user account with admin rights.
    changed standard fonts to arial black in all display settings.
    reset the ms shell dlg and ms shell dlg 2 settings in regedit.
    v2044 will still not display the fonts as i set it to do.
    2036 regedit : HKEY_CURRENT_USER\Software\360chrome\default\ui_persist_value\FontFamily = Arial Black
    2044 regedit : HKEY_CURRENT_USER\Software\360chrome\default\ui_persist_value\FontFamily = ??
    this ?? also appears on the un-tweaked laptop in regedit where arial black bold seems to be mostly working.

    sometimes these  宋 体  characters are in regedit instead of ??.
    am not used to any errors in my xp install so this is a bit frustrating.
    will let it rest for now because i am out of ideas.
    time to restore a recent full system backup with version 13.5.2036.

  11. have tested the font issue on an old unmodified xp laptop.
    forgot about that one.
    v13.5.2044 and 2036 respond there on changing message box settings.
    2036 goes all bold font when setting to arial black ( regular or bold has no change )
    2044 responds to arial black regular , bold and italic except for the new tab.

    on my system 2044 does not respond to any message box change , whatever font chosen.
    so there is nothing for you to solve.
    it is something on my system that will be impossible to find though i will try.
    if i can't find it i will stay on 2036.

×
×
  • Create New...