miru-app icon indicating copy to clipboard operation
miru-app copied to clipboard

[WIP] Extension API version 2 update

Open MiaoMint opened this issue 1 year ago • 11 comments
trafficstars

Add @tags metadata for filtering extensions

image

The option to filter by tag will be added to the extension repository page

Removing class only requires writing specific methods

image

Simply write it to the top level of the code, without wrapping the class

Miru-specific operations are performed only with Miru objects

image

For example, Miru.registerSetting

Add Miru.rawRequest method

Get Response header and will not automatically add baseUrl

Add Miru.storage related methods for persistent data storage

Add methods to read and write cookies

Show messages from extensions

MiaoMint avatar Jan 08 '24 14:01 MiaoMint

Compatible with older extensions without changes, to use version 2 features you need to set the metadata @apiVersion to 2.

image

MiaoMint avatar Jan 08 '24 14:01 MiaoMint

Compatible with older extensions without changes, to use version 2 features you need to set the metadata @apiVersion to 2.

image

In case I add @apiVersion 2 and doesn't make any other changes will it break the extension? Also tag is compulsory or optional?

OshekharO avatar Jan 08 '24 15:01 OshekharO

In case I add @apiVersion 2 and doesn't make any other changes will it break the extension?

from the outlook of this looks like it'll break the extension.

Also tag is compulsory or optional?

also the tag looks only for filter similar to '@icon', '@license', etc.

bachig26 avatar Jan 08 '24 16:01 bachig26

@OshekharO

Adding @apiVersion 2 to the previous extensions will break them, but don't worry, the previously written extensions do not need to be modified and can still function properly.

@tags is not a required field

MiaoMint avatar Jan 08 '24 16:01 MiaoMint

How about adding cors bypass?

// ==MiruExtension== // @cors true // ==/MiruExtension==

It's very helpful because in today age almost all site have cors restriction.

OshekharO avatar Jan 24 '24 03:01 OshekharO

an extension is broken but currently I don't have time to fix it so I just added 0

 * Status int as the following:
 * 0: Down ( false )
 * 1: Ok (true) by default 

In

// ==MiruExtension== // @status 1 ( it can be true, false also ) // ==/MiruExtension==

Adding 0 should hide the extension from application warehouse and when I change 0 to 1 in in extension it should show the extension.

OshekharO avatar Jan 24 '24 03:01 OshekharO

How about adding cors bypass?

// ==MiruExtension== // @cors true // ==/MiruExtension==

It's very helpful because in today age almost all site have cors restriction.

This is not a browser that does not have cors

MiaoMint avatar Jan 24 '24 03:01 MiaoMint

How about adding cors bypass? // ==MiruExtension== // @cors true // ==/MiruExtension== It's very helpful because in today age almost all site have cors restriction.

This is not a browser that does not have cors

Even cloudstream have cors bypass function. You can check comick extension I had to use cors proxy to make it usable due to cors error most probably.

OshekharO avatar Jan 24 '24 05:01 OshekharO

How about adding cors bypass? // ==MiruExtension== // @cors true // ==/MiruExtension== It's very helpful because in today age almost all site have cors restriction.

This is not a browser that does not have cors

Even cloudstream have cors bypass function. You can check comick extension I had to use cors proxy to make it usable due to cors error most probably.

cors errors only appear in web browsers, you should be experiencing other problems

MiaoMint avatar Jan 24 '24 05:01 MiaoMint

How about adding cors bypass? // ==MiruExtension== // @cors true // ==/MiruExtension== It's very helpful because in today age almost all site have cors restriction.

This is not a browser that does not have cors

Even cloudstream have cors bypass function. You can check comick extension I had to use cors proxy to make it usable due to cors error most probably.

cors errors only appear in web browsers, you should be experiencing other problems

Well I will try checking once again

OshekharO avatar Jan 24 '24 07:01 OshekharO

@MiaoMint #157

shashankx86 avatar Mar 31 '24 23:03 shashankx86