Lock On/Off (protect items from deletion)

Mhh.. your idea is light weight, yes. o)

The LockOn/Off is meant to work from everywhere, not just in DO. Most people also use cmd, powershell, scripts, explorer, app-x, app-z and weird other things to handle files and folders. Your idea of totally reconfiguring all the DO buttons, menus (and commands?) to prevent deletion of specific items does not seem to be a good idea! o)

That said, I actually did a similar thing. Whenever I delete/move a folder in DO which is less then x subfolders away from the root-folder, I get an extra confirmation step because the higher the folder, the more data in it. BUT: DO is not the same after you screwed with all menus, buttons, hotkeys, clipboard commands etc.. I cannot recommend, don't do it! It's for science only! o)

Yes I understand, I would describe it as 'extremely Lightweight'. It's not something to share as a button for others but in my case with restricted workflows it will be a simple solution. It's simply to prevent accidental deleting with my own hotkeys in Opus.
Thanks!

Assuming, that you have separate backups of your very important files (to be really safe), you could also try this code from lxp. It will give you one extra warning, before deleting stuff. You can configure it to be applied on specific folders.

// https://resource.dopus.com/t/i-need-some-help-with-my-delete-button-code/35295

function OnClick(clickData) {
    var cmd = clickData.func.command;
    var tab = clickData.func.sourcetab;
    var dlg = clickData.func.Dlg();
    cmd.deselect = false;

    var dangerousFolders = /D:|E:\\Example|F:|G:\\etc

    var isDangerous = dangerousFolders.test(String(tab.path));

    if (isDangerous) {
        cmd.RunCommand('Play FILE="/windows\\Media\\Windows Notify System Generic.wav" QUIET');
        var deleteMessage = 'Files to be deleted:\n';
        var k = cmd.files.count;
        if (k > 100) {
            deleteMessage += '\n... very very many: ' + k + ' files.\n\nWatch out!';
        } else {
            for (var e = new Enumerator(cmd.files); !e.atEnd(); e.moveNext()) {
                deleteMessage += '\n' + e.item();
            }
        }
        if (dlg.Request(deleteMessage) == 1) {
            cmd.RunCommand('Delete REMOVECOLLECTION=auto');
        }
    } else {
        cmd.RunCommand('Delete REMOVECOLLECTION=auto SHIFT RECYCLE');
    }
}