Skip to content

.omnijs - .json #33360

Open
Open
@bulava92

Description

@bulava92

Description

I have files with the extension .omnijs

In gitea they are displayed as plaintext, how can I make the display in json or javascript format? I tried different options, but it doesn't work

Here is an example of a file:

/*{
    "author": "Mark Kats",
    "targets": ["omnigraffle"],
    "type": "action",
    "identifier": "com.example.sl",
    "version": "1.0",
    "description": "text",
    "label": "SL(4)",
    "mediumLabel": "text",
    "longLabel": "text",
    "paletteLabel": "text"
}*/

(() => {
    const preferences = new Preferences("sl");
    var action = new PlugIn.Action(async function(selection, sender) { 
        var canvas = document.windows[0].selection.canvas;

        const currentZoom = document.windows[0].zoom * 100; 
        
        if (selection.graphics.length === 1) {
            const zoomFactor = 3; 
            const selectedObject = selection.graphics[0]; 
            
            const objectCenterX = selectedObject.geometry.center.x;
            const objectCenterY = selectedObject.geometry.center.y;
            
            var w = document.windows[0];
            w.setViewForCanvas(canvas, zoomFactor, new Point(objectCenterX, objectCenterY));
            w.centerVisiblePoint = new Point(objectCenterX, objectCenterY); 
            return;
        }

Gitea Version

1.23.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/workaroundit is or has a workaroundtype/upstreamThis is an issue in one of Gitea's dependencies and should be reported there

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions