📜 ⬆️ ⬇️

Solving the problem with creating a new script

Its essence is as follows: If Cyrillic is used in the Windows username, then when creating a new script (from the Greasemonkey menu), its file does not open in the editor due to the wrong path.
Having rummaged in source codes of Greasemonkey, the solution was found.

  1. Go to the folder with the add-ons Firefox. I have this C: \ Users \ Cyril \ AppData \ Roaming \ Mozilla \ Firefox \ Profiles \ rwlkyo8j.default \ extensions
  2. Find the folder with Greasemonkey. It will be called something like this: {e4a8a97b-f2ed-450b-b12d-ee082ba24781} :) If you have a lot of folders with this name, then it makes sense to use the search for the keyword greasemonkey and identify the folder we need.
  3. Next, go to the content directory and open the utils.js file. Find the function launchApplicationWithDoc and add the code:

var converter = Components.classes[ '@mozilla.org/intl/scriptableunicodeconverter' ]
.createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
converter.charset = "windows-1251" ;
args = [converter.ConvertFromUnicode(args)];


* This source code was highlighted with Source Code Highlighter .

Before line:

var process = Components.classes[ "@mozilla.org/process/util;1" ]
.createInstance(Components.interfaces.nsIProcess);

* This source code was highlighted with Source Code Highlighter .

I hope that someone will be useful. Thanks for attention.

')

Source: https://habr.com/ru/post/73908/


All Articles