//@sourceURL=filename.js

在 console 中输入代码的最后一行加上 //@ sourceURL=filename.js, 会在 Scripts 面板中有个叫 filename.js 的文件, 然后他就和外部 js 文件一样了

function hello() {
  alert('say hi');
}
//@ sourceURL=hello.js
原文地址:https://www.cnblogs.com/human/p/3315897.html