1

I use Webcomic Reader very heavily, and have for a few years now. Before Greasemonkey added user includes, I built up a fair collection of custom @include rules in my local copy.

This was a little annoying to copy into the new version of the file every time I wanted to update, but I managed. Now, though, I'm thinking that's really kind of fragile and I should try to migrate to the user include feature, but I have not the slightest desire to manually copy and paste 307 lines* one by one into Greasemonkey's option input boxes.

Any suggestions for automating this process?

*Per Notepad++'s selection count; it might be off by one I suppose.

4
  • All of those must either be stored in a config file or the registry. If you can find the file/registry key you might be able to copy and paste the whole list in at once.
    – cybernard
    Dec 9 '14 at 3:24
  • @cybernard: GM uses SQLite for its userscript stuff. I've fiddled around very slightly with that but it's frankly a bit intimidating to have to feel around with DDL-SQL on a strange CLI. E: However, that is a good point, and it might be just as good as the alternative. Something to think about. Dec 9 '14 at 3:41
  • GM only uses SQLite for GM_setValue data. General config is XML. Tampermonkey is all SQLite. Dec 9 '14 at 5:38
  • @BrockAdams, I am corrected. I'll give your suggestion a try in a bit. Dec 9 '14 at 5:39
1

Greasemonkey stores script control stuff in its config.xml file. You can edit this file to affect the changes you want.

  1. Go to your Firefox Profile folder.
  2. From there enter the gm_scripts folder.
  3. Shut down Firefox (helps guard against accidentally trashing your profile, or the GM install).
  4. With a suitable editor (Notepad++, TextPad, Emacs, etc.), edit the config.xml file.
  5. Find the <Script...> ... </Script> section for your userscript.
  6. For just the <Include> ... </Include> lines that you want to convert, replace Include with UserInclude (2 instances per line).
  7. Save the changes and restart Firefox.
  8. Done!
0

I do have one idea for this, but it's ugly as sin, almost: SendKeys, probably from a PowerShell script, fed with the @includes so far. Will expand on this if no other answer given.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.