Jump to content

ArcticFoxie/NotHereToPlayGames -- 360Chrome v13.5.1030 Redux


Recommended Posts

Is it possible to integrate missing commands, such as key.split, via a self-created extension?
I know that it works with Tampermonkey, but I would like to include it without additional extensions.

If this is possible, what would have to be included in manifest.json and in, let's call it, function.js?

Link to comment
Share on other sites


Maybe something like:

manifest.json

{
  "manifest_version": 2,
  "name": "Polyfillz",
  "version": "1",
  "description": "Monkey patch old Chrome to add new JavaScript functionalities.",
  "content_scripts": [
    {
      "matches": [ "<all_urls>" ],
      "js": [ "content.js" ],
      "run_at": "document_start",
      "all_frames": true
    }
  ],
  "web_accessible_resources": [ "polyfills.js" ]
}

content.js

'use strict';

const script = document.createElement('script');
script.setAttribute('src', chrome.runtime.getURL('polyfills.js'));
(document.head || document.documentElement).appendChild(script);
script.remove();

polyfills.js

'use strict';

if (!Array.prototype.at) {
  Array.prototype.at = function(index) {
    if (index >= 0) {
      return this[index];
    } else {
      return this[this.length + index];
    }
  };
}
Edited by UCyborg
Link to comment
Share on other sites

4 hours ago, Anbima said:

Unfortunately it does not work.
Any other ideas?


That's because that is only one half, one third, one fourth of the problem.

Only after you resolve array.at does structuredclone error show up.

Then after you resolve that, you're likely to encounter even more errors.

You do not need an online viewer to view .pdf's - download it then drag and drop into 360Chrome, bypass that "viewer"  --  https://storage.enganchesaragon.com/public-websites/ecommerce/Inst/C0801E.pdf

image.thumb.png.a461d052dc6bebe39ca44c5664c7c673.png

Link to comment
Share on other sites

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

Edited by rereser
Link to comment
Share on other sites

19 hours ago, NotHereToPlayGames said:

You do not need an online viewer to view .pdf's - download it then drag and drop into 360Chrome, bypass that "viewer"  --  https://storage.enganchesaragon.com/public-websites/ecommerce/Inst/C0801E.pdf

 

That's how I've been doing it so far.
But I thought it might be easy to get around this.
Unfortunately, that's probably not the case.

Link to comment
Share on other sites

On 2/22/2024 at 1:07 PM, Anbima said:

I know that it works with Tampermonkey, but I would like to include it without additional extensions.

 

26 minutes ago, Anbima said:

Unfortunately, that's probably not the case.

 

You're not wanting to use Tampermonkey and polyfilling via Tampermonkey.  Kind of not "our fault" when we give a method that WORKS but you don't want to use that method.

image.thumb.png.9f5f152695d3a61e1d3ae6981f778505.png

Link to comment
Share on other sites

18 minutes ago, Anbima said:
19 hours ago, NotHereToPlayGames said:

You do not need an online viewer to view .pdf's - download it then drag and drop into 360Chrome, bypass that "viewer"  --  https://storage.enganchesaragon.com/public-websites/ecommerce/Inst/C0801E.pdf

That's how I've been doing it so far.
But I thought it might be easy to get around this.

One other approach I use myself is to let the browser handle itself the online PDF files (without a prior download to disk and then drag-n-drop ;) ) and display them via its native PDF viewer; however, in the case discussed, 

https://storage.enganchesaragon.com/public-websites/ecommerce/Inst/C0801E.pdf

the file has an "attachment" content-disposition and loading that URI will generate a "Save File" download prompt; that's why I have also installed: 

https://chromewebstore.google.com/detail/undisposition-racle-fork/bbppejejjfancffmhncgkhjdaikdgagc

and I enable it as needed - you want the older v0.0.4, which is still at MV2, for 360EE...

Below is KafanMiniBrowser loading the referenced PDF URI in its default viewer, via "undisposition" extension ;) : 

jy1Vx1E.png

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