Prevent Macbook Pro from charging

Hi, i recently came across this interesting post where one member says that by covering the middle pin on the MagSafe 2 chargers it will disable charging but still powering the macbook.
This is great because i can preserve my macbook battery life and still use my mac normally.

my question is, is it safe?
Yes, i found out about it a few days ago! i have tried using it and it worked! Not sure if its safe for my mac tho.
anyone can confirm this is safe and has used it for years? hahaha

Original thread: https://forums.imore.com/threads/prevent-macbook-pro-from-charging.372025/