Petschko / RPG-Maker-MV-Decrypter

You can decrypt RPG-Maker-MV Resource Files with this project ~ If you don't wanna download it, you can use the Script on my HP:
https://petschko.org/tools/mv_decrypter/
MIT License
638 stars 108 forks source link

Can't view Files in Edge #7

Closed Petschko closed 2 years ago

Petschko commented 7 years ago

Can't view the Files in Edge-Browser...

fz0000 commented 5 years ago

Someone has requested the documentation of this error: Requesting SEC7134 documentation

It seems that running from local file may bring security risks. So some browsers will block it. Is there any solution to run from http instead of blob?

fz0000 commented 5 years ago

And... May be the same reason as IE? #5

Petschko commented 5 years ago

It seems that running from local file may bring security risks. So some browsers will block it. Is there any solution to run from http instead of blob?

If you run this Script local, there is theoretically no reason to use HTTP, also you would need a local Web-server to run this Script local via HTTP.

Feel free to fork this project and exchange BLOB to HTTP-Downloads. The reason why I didn't added HTTP Downloads to this Project, was because I wanted that Script be able to run local without any Webserver. (Easy to use)^^

And... May be the same reason as IE? #5

Hm that can may be. It also seems I have to use a different method to create BLOBs in IE, but I'm unsure if I include that, since IE is not supported anymore

About Edge, I need to test that in a VM, since I don't have Win10 to test Edge. But I will surely look into that, BLOBs should work in Edge, since its more commonly used the last years

fz0000 commented 5 years ago

Some suggestion is using msSaveOrOpenBlob on Microsoft browsers. So I tried to update the code at the end of RPGFile.js but when I click Decrypt button the decrypted image is opened directly. image

It seems that the code works. But I'm not familiar with js at all and don't know how to fix it. Hope it can help.

/**
 * Creates the BLOB-URL for this File
 */
RPGFile.prototype.createBlobUrl = function() {
    this.blob = new Blob([this.content]);
    if (window.navigator && window.navigator.msSaveOrOpenBlob) { 
        window.navigator.msSaveOrOpenBlob(this.blob, 'img.png'); 
    } else { 
        this.fileUrl = window.URL.createObjectURL(this.blob);
    }
    //this.fileUrl = window.URL.createObjectURL(this.blob);
};
Petschko commented 5 years ago

I think msSaveOrOpenBlob is just for opening/saving, but it's a step into the right direction!

Petschko commented 2 years ago

Fixed https://github.com/Petschko/RPG-Maker-MV-Decrypter/commit/bace698455814bfcd9a02595ba1738bf216f64b7 (Also fixed the issue for Edge, since its chromium based)