So I'm a hobbiest Python coder trying to make scripts to automate repetitive tasks and other things on my computer. There is a web browser I use where I found a hacky way to change the default tab width by editting a "bundle.js" file (general details here) This is some sort of Java file that interfaces with HTML. When I open it in a code editor, it's one line, that's ridiculously long.
I try to open it like a regular file in Python but it doesn't work. I'm assuming it's because of its length. I tried using the csv library to arbitrarily break it up using semicolons as a delimiter, but that didn't work for me.
Any suggestions would help. I'd provide a copy of the bundle.js file as an example, but since it is effectively controlling settings of my browser and is really long, I'm not confident there isn't minor trivial personal information stored in it. Here is what the first bit looks like:
(()=>{var e,t,n,i={36964:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var i=n(28515),s=n(50748),o=n(98611),a=n(97698),r=n(46382),l=n(53576),d=n(33638),c=n(5267),h=n(93818),p=n(89846),u=n(93043),g=n(5204),m=n(17776),v=n(5863),f=n(77312);const y=new class{drafts={};setActiveMailComposer(e){d.Z.dispatch({actionType:"MAIL_SET_ACTIVE_COMPOSER",mailComposer:e}),
All I want to do is pars the code using regex for a specific known point and then change a number from 180 to 112 and overwrite the original file. If I can get it to open properly, I think I can do everything else. Every time the browser updates, this modification is reverted, hence why I want a script I can run to enforce the change automatically. I'm sorry if this is an abstract question; I tried to search for a general solution, but however I phrased the question, it kept telling me how to read a file line by line, which doesn't apply to a single line file.