Can I DevTools?
Sources
Edit
  1. In Sources > Click the "+" button to Create Resource > "Console Snippet...". Input the name of the snippet and enter the script.
  2. Click the Play button next to the snippet name to execute the code in Console.