From de2854278d010e082a4caa59207b0cae5cc44b9e Mon Sep 17 00:00:00 2001 From: "salem.m.s2030@gmail.com" Date: Sat, 24 Feb 2024 11:59:39 +0300 Subject: [PATCH 1/2] refactor: update import statements and export default class EvalGjs --- eval-gjs@ramottamado.dev/extension.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/eval-gjs@ramottamado.dev/extension.js b/eval-gjs@ramottamado.dev/extension.js index 78e31e1..9b485f5 100644 --- a/eval-gjs@ramottamado.dev/extension.js +++ b/eval-gjs@ramottamado.dev/extension.js @@ -1,3 +1,8 @@ +import Gio from 'gi://Gio'; +import Meta from 'gi://Meta'; +import GLib from 'gi://GLib'; +import * as Main from 'resource:///org/gnome/shell/ui/main.js'; + /* extension.js * * This program is free software: you can redistribute it and/or modify @@ -16,14 +21,6 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -/* exported init */ - -'use strict'; - -const { Gio, GLib, Meta } = imports.gi; - -const Main = imports.ui.main; - const EvalGjsIface = '' + ' ' + @@ -35,7 +32,7 @@ const EvalGjsIface = ' ' + ''; -class EvalGjs { +export default class EvalGjs { constructor() { this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(EvalGjsIface, this); } @@ -85,7 +82,3 @@ class EvalGjs { if (this._dbusImpl) this._dbusImpl.unexport(); } } - -function init() { - return new EvalGjs(); -} From 31110d6dd0de970927677d04cf398654a2008ab5 Mon Sep 17 00:00:00 2001 From: "salem.m.s2030@gmail.com" Date: Sat, 24 Feb 2024 12:02:39 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=A7=20fix:=20update=20shell=20vers?= =?UTF-8?q?ion=20to=2045?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eval-gjs@ramottamado.dev/metadata.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/eval-gjs@ramottamado.dev/metadata.json b/eval-gjs@ramottamado.dev/metadata.json index 9b854ff..41e78c5 100644 --- a/eval-gjs@ramottamado.dev/metadata.json +++ b/eval-gjs@ramottamado.dev/metadata.json @@ -3,10 +3,7 @@ "description": "Evaluate GJS script through DBus", "uuid": "eval-gjs@ramottamado.dev", "shell-version": [ - "41", - "42", - "43", - "44" + "45" ], "url": "https://github.com/ramottamado/eval-gjs" } \ No newline at end of file