diff --git a/README.md b/README.md index db97f1a..fbb8b14 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ This extension enables arbitrary code execution via `Eval()` dbus method. This m The extension at https://extensions.gnome.org/extension/5952/eval-gjs/ was not uploaded nor maintained by me. **Please refrain from installing this extension at all.** +# Legacy Version (GNOME 41-44) + +For the legacy version, check out the `legacy` branch first before installing. + # Eval GJS GNOME Shell Extension As of GNOME 41, the dbus method `Eval()` is now restricted with `MetaContext:unsafe-mode` property (see this [commit](https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970/diffs?commit_id=f42df5995e08a89495e2f59a9ed89b5c03369bf8)). This extension provides unrestricted `Eval()` dbus method for running arbitrary code in the compositor. diff --git a/eval-gjs@ramottamado.dev/extension.js b/eval-gjs@ramottamado.dev/extension.js index 9b485f5..8ec6c22 100644 --- a/eval-gjs@ramottamado.dev/extension.js +++ b/eval-gjs@ramottamado.dev/extension.js @@ -1,8 +1,3 @@ -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 @@ -21,6 +16,11 @@ import * as Main from 'resource:///org/gnome/shell/ui/main.js'; * SPDX-License-Identifier: GPL-2.0-or-later */ +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'; + const EvalGjsIface = '' + ' ' +