Also is there any way we can add javascript into file like is the Obsidian.css, and just call it?
You’ll find an answer to that in this thread, but unfortunately it doesn’t work on Android or iOS. The dataview script where you are importing your common code will blow up on mobile.