There is a problem, scripts in windows-1251 doesn't work at all, if it convert to utf-8 it work permamently after reload page.
Please fix this, or give me advice how i can fix this.
Function to write files safely, with proper encoding.
Refs: #1236, #1301, #1315.
Use the new GM_writeToFile() utility method.
Fixes: #1236, #1301, #1315.