How to get script or script's author name?


I am doing an extension for mBlock that allows the mBlockers’ scripts to discuss together on the same lounge (online talking), but the probleme is that if A connect to the “Hello” lounge, then “B” can also join the same room using another script.

So I would be able to access the author name, or maybe the script name, to make the lounges specific to the author or script (to make one lounge (e.g. GlobalLounge) per author or script).

The location.pathname and location.href variables are actually modified, and are not the same between to pages from a same script.

Thanks for your help!


With the advice of @Best_codes (thanks to you) I would get the attention of @makeblock.lindingxin. Thanks for your answers!


I’m not exactly sure how I would help you, but you could mention @makeblock.lindingxin and other team members to get their attention!

Thanks for your time,


Who are they? I am 17 years old and am really not often here


They are the makeblock official team members. Because they are normally busy, it can sometimes take months :slightly_frowning_face: for them to respond. You could find the solution to your problem on w3schools, but I’m not sure.

Thanks for your time,


I cannot find my answers on w3schools. It depends of how the mBlock platform has been build.

Thanks for the answer, I mention the team! :slight_smile:


You’re welcome! I’m sorry I couldn’t help you, but maybe the team will! :slight_smile:


No worries! You helped me telling the name of a team, it is a lot.


I think it will be a while before they respond…


It seems to be


Maybe these sites could help (use the search on them):


The location.pathname property is modified by the mBlock platform. I just want to get the author or the password name.

Try writing return document.location.pathname into a string block’s script and make the preview two times, you’ll see that the both contents are different.

Maybe they are different for href and not different from others scripts for pathname, I don’t remember.

I have tried saving the script into the extension premier to make sure that the script is same and it doesn’t change that the properties are always different.

But thanks a lot for your help


I agree with @Best_codes - I highly recommend W3Schools online tutorials and references.

They are VERY useful.


Yes I know, but my question depends in the mBlock platform. Try writing console.dir(self) in an mBlock script and in the broswer’s inspector console, you’ll see that mBlock’s platform is blocking some basic browser’s tools for security reasons.


True. I wonder if there are ways to work around that?


It is think to be sufficient, so I am sure that there is a way to get script or author name without working around. If there is a block called “user name”, I guess that some datas like that are not known by me, so maybe is there informations about the running script?