MZ Plugin Parameters: Any way to accept a Renamed File?

Fossil_Pre currently scans active plugins using
Code:
Fossil.pluginNameList =  $plugins.map(a => a.status && a.name );
Unfortunately I don't really see any way around identifying which plugins are active other than filename, since there isn't a real universal way of labeling, and I have to create the list before any supported plugin executes code. If someone has a better solution I'd love to hear it, relying on filename is a bit brittle.
In another thread someone pointed out that the Internet Explorer does not support document.currentScript (although I'm not sure how many people would still consider using that one to play Maker games).

I'd probably still consider using that code in places that are quick to find and substitute when necessary though.
Very interesting to know - so what will happen if someone tried using my plugin (code to get and use script name below), and ran the game in the latest IE? It would crash outright in the first line? It would not set the parameter correctly, causing the code to crash in the second line when it tries to access a property "max_lev" of Undefined?

Code:
wave_slates.script_name = document.currentScript.src.split('/').slice(-1)[0].slice(0,-3).replace(/\%20/g," ");
wave_slates.max_level = Number(PluginManager.parameters(wave_slates.script_name)["max_lev"]);

I assume I could do a try/catch (or an Undefined check) on the Script Name line in order to set it back to the default name as a fallback, meaning it would only cause problems when run in something like IE and the plugin is renamed.

But do you feel that Caethyril's post above offers a better solution that doesn't have this drawback or any other potential major problems?
I wouldn't worry about support for IE, the default codebase doesn't support IE since IE doesn't support web assembly (effekseer) or ES6 (class syntax, arrow functions, etc).
I wouldn't worry about support for IE, the default codebase doesn't support IE since IE doesn't support web assembly (effekseer) or ES6 (class syntax, arrow functions, etc).
Wow, didn't realize IE was that crappy these days!! Thanks for that tip; makes me feel a lot better about the way I'm handling the possibility of people renaming the plugins. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/plugin-parameters-any-way-to-accept-a-renamed-file.130137/