Greetings,
Thanks,
Joy Diamond
P.S.: This is only meant for local development, not for release (it is supposed to load my plugin's as I modify them while I develop them), so using file:/// in the regular expression is fine.
Also I searched the internet and didn't find anything better than the above. The above was from
How might I get the script filename from within that script?
What is the right way to get the path name to my plugin?
I am doing it as follows:
... It works ...
I am doing it as follows:
Code:
// Copyright (c) 2017 Joy Diamond. MIT License.
alert(new RegExp(/ at file:\/\/\/(.*):\d+:\d+$/).exec(new Error().stack)[1]);
/*: @plugindesc Opal: Optimium Plugin Automatic Loader */
... But I am pretty unhappy with the ugliness of:
- new RegExp(/ at file:\/\/\/(.*):\d+:\d+$/).exec(new Error().stack)[1]
Thanks,
Joy Diamond
P.S.: This is only meant for local development, not for release (it is supposed to load my plugin's as I modify them while I develop them), so using file:/// in the regular expression is fine.
Also I searched the internet and didn't find anything better than the above. The above was from
How might I get the script filename from within that script?