No. You cannot βdeleteβ it. Running the contents of a script can have side effects, such as declaring variables and functions on a window object, connecting to a background page, or listening to DOM events. If your script content has no side effects, it is identical to the fact that it is not entered at all.
If you want to re-enter it, just call executeScript using the code or source parameter. It may just be simple to define your scripts as functions, then call the .toString () functions for the functions and insert them as raw strings with the "code" argument in executeScript. Arguments of these functions can be inserted as JSON strings, which is even more convenient.
source share