ძიება მხარდაჭერაში

ნუ გაებმებით თაღლითების მახეში მხარდაჭერის საიტზე. აქ არასდროს მოგთხოვენ სატელეფონო ნომერზე დარეკვას, შეტყობინების გამოგზავნას ან პირადი მონაცემების გაზიარებას. გთხოვთ, გვაცნობოთ რამე საეჭვოს შემჩნევისას „დარღვევაზე მოხსენების“ მეშვეობით.

ვრცლად

Ctrl Shift Enter - Dot Net, Dot Org

  • 14 პასუხი
  • 0 მომხმარებელი წააწყდა მსგავს სიძნელეს
  • 8 ნახვა
  • ბოლოს გამოეხმაურა RJB

You know how you can type a URL and then Ctr+Enter and FF autopopulates the .com? Well years ago "Shift+Enter" autopopulated ".net" and "Ctrl+Shift+Enter" autopopulated ".org".

I really liked that feature. I know a lot of people don't, or don't see its point; that's not important.

About three years ago, I added UserChrome.js and enable-UserChrome.js , which acomplished the two autopuopulating tasks quite nicely.

Until about four weeks ago. I don't know if an FF update stopped reading those two .js files, or if there's a conflict somewhere else, or what. I don't know where to begin - other than posting here for help.

Thanks in advance!

  • UserChrome.js is in the subdirectory: C:\Users\[ME]\AppData\Roaming\Mozilla\Firefox\Profiles\gaydtewj.default-release-1
  • enable-UserChrome.js is in C:\Program Files\Internet Shenanigans\Mozilla Firefox\defaults\pref (firefox.exe is in C:\Program Files\Internet Shenanigans\Mozilla Firefox )
You know how you can type a URL and then ''Ctr+Enter'' and FF autopopulates the .com? Well years ago "Shift+Enter" autopopulated ".net" and "Ctrl+Shift+Enter" autopopulated ".org". I really liked that feature. I know a lot of people don't, or don't see its point; that's not important. About three years ago, I added [https://www.dropbox.com/scl/fi/hpebd3vyxducpgtdbr4l8/UserChrome.js?rlkey=01rlecmh7qz6h3us7pbbbpeqo&dl=0 UserChrome.js] and [https://www.dropbox.com/scl/fi/6o238pbl2xbep2xjncp6d/enable-UserChrome.js?rlkey=pgzllcob7o2k1458rh0ehkz1l&dl=0 enable-UserChrome.js] , which acomplished the two autopuopulating tasks quite nicely. Until about four weeks ago. I don't know if an FF update stopped reading those two .js files, or if there's a conflict somewhere else, or what. I don't know where to begin - other than posting here for help. Thanks in advance! * UserChrome.js is in the subdirectory: C:\Users\[ME]\AppData\Roaming\Mozilla\Firefox\Profiles\gaydtewj.default-release-1 * enable-UserChrome.js is in C:\Program Files\Internet Shenanigans\Mozilla Firefox\defaults\pref (firefox.exe is in C:\Program Files\Internet Shenanigans\Mozilla Firefox )

ჩასწორების თარიღი: , ავტორი: RJB

ყველა პასუხი (14)

Anything relevant in the Browser Console (Ctrl+Shift+J)?

This could be about trying to load Services.jsm via an autoconfig.cfg file.

Components.utils.import("resource://gre/modules/Services.jsm");

Services.jsm is no longer supported and Services is now a global variable. You need to replace this line:

var Services = globalThis.Services;

I don't know what's relevant, but there are a whole lot of things with red exclamation points!

Also: I'm not sure I understand your answer.

I'm looking in the userChrome.js file and I see

try {

 let { classes: Cc, interfaces: Ci, manager: Cm } = Components;
 const { XPCOMUtils } = Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
 XPCOMUtils.defineLazyModuleGetters(this, { Services: "resource://gre/modules/Services.jsm" });
 function UserChromeJS() { Services.obs.addObserver(this, 'chrome-document-global-created', false); }


I don't see:

Components.utils.import("resource://gre/modules/Services.jsm");

Also:

You need to replace this line: var Services = globalThis.Services;

Is that the NEW line that gets inserted somewhere? Or am I supposed to find that line and remove it?

Sorry to be so daft - I appreciate the help!

All modules will be changed to ESM modules (.sys.mjs) and this means that the old modules with the .jsm file extension no longer will exist. For Services you need another workaround as this module got changed to a global variable.

If there are no other references to XPCOMUtils in the file then you can remove the this line.

const { XPCOMUtils } = Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');

You need to remove this line that imports the Services.jsm module.

XPCOMUtils.defineLazyModuleGetters(this, { Services: "resource://gre/modules/Services.jsm" });

Replace it with this line:

var Services = globalThis.Services;

You can also contact the creator of this script to see whether they have an update.

Thanks. I had contacted that person - it was through reddit, so while it's surprising I got great help three years ago, it's not surprising follow up has been a little lax. (Hence the four weeks before posting here).

OK, I believe I followed your instructions, but it has not made a difference.

I opened UserChrome.js in Notepad++ and commented out the two lines you specified, and added that line you suggested.

Here is a link to a copy of the full UserChrome.js file.

I suspect there's something more I need to do! Or at least, do what I already did but correctly.

Thanks,

What is the content of enable-UserChrome.js as it is likely that this file also needs top be patched ?

  • Firefox-Install-Directory/defaults/pref/enable-UserChrome.js

OK, I found enable-UserChrome.js via a Google search and this is a standard file to enable an autoconfig file.

Do you still have this enable-UserChrome.js file in the /defaults/pref folder in the Firefox installation folder ?

/// create in Firefox-Install-Directory/defaults/pref/enable-UserChrome.js
/// to enable advanced javascript access from Firefox-Install-Directory/UserChrome.js
pref("general.config.filename", "UserChrome.js");
pref("general.config.obscure_value", 0);
pref("general.config.sandbox_enabled", false);

There's a link in my OP. That file is in that folder. It's the same but different...

/// create in Firefox-Install-Directory/defaults/pref/enable-UserChrome.js /// to enable advanced javascript access from Firefox-Install-Directory/UserChrome.js pref("general.config.filename", "UserChrome.js"); pref("general.config.obscure_value", 0); pref("general.config.sandbox_enabled", false);

eta; Adding the carriage return didn't make a difference.

ჩასწორების თარიღი: , ავტორი: RJB

RJB said

You know how you can type a URL and then Ctr+Enter and FF autopopulates the .com?

Try to switch browser.fixup.alternate.enabled to true in about:config.

Try to switch browser.fixup.alternate.enabled to true in about:config.

Doesn't seem to make a difference.

Typing an address and then Ctrl+Shift+Enter brings up the Google page for that address; the address the Shift+Enter brings up its Google page in a new window.

I'm trying to accomplish the .org and .net autofill, NOT the .com autofill. (Which happens just fine).

You aren't specifying the https:// protocol (i.e. try without specifying the protocol) ?

Right. The way the old (pre version 50ish, maybe) worked, and the way this script (for lack of a better word) worked:

type in address bar:

google Ctrl+Enter

returns: https://www.google.com

xpn Ctrl+Shift+Enter

returns: https://www.xpn.org

sourceforge Shift+Enter
(no Ctrl key)

returns: https://www.sourceforge.net

So this is just a dead end?