Reputation: 103
I know that editing Javascript code in Chrome Developer Tools is possible - but I have not found a similar option in Firefox. Is there any way to edit the Javascript on a page in Firefox?
Upvotes: 9
Views: 23645
Reputation: 1205
As of Firefox version 128, you can actually add a local script override.
For this, open the Dev Tools (F12), go to the Debugger tab, Sources subpane, right click the required file and select Add script override. After saving the file locally you will be able to modify it with an editor.
To apply the changes reload the page with Ctrl+Shift+R.
Unfortunately, the override setting does not persist across Firefox restarts.
Upvotes: 4
Reputation: 23798
You can only modify your variables, inject more code, change DOM etc at runtime using console.
Firefox, by version 45, doesn't offer a way for the developers to modify the source files in the debugger and persist changes to the disk like Chrome does.
Upvotes: 15