Jason
Jason

Reputation: 10852

Does the User Scripts directory still work with Chrome 13.0?

I am using Mac OS X with Google Chrome 13.0.782.107. I'm trying to set up User Scripts as per these instructions.

I have created a directory: ~/Library/Application Support/Google/Chrome/Default/User Scripts/

I created a file in that directory: hello.user.js

(function() {
// ==UserScript==                                                               
// @name          Hello, World                                                  
// @namespace     http://localhost.localdomain                                  
// @version       0.0.0                                                         
//                                                                              
// @include   http://*/*                                                        
// ==/UserScript==                                                              

  alert('Hello, World!');

})();

I created the following AppleScript to start Chrome

do shell script "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --enable-user-scripts"

However, the script is ignored. If I drag and drop the file into Chrome and install it as an extension, it works fine. Is this feature no longer supported?

Upvotes: 4

Views: 1843

Answers (1)

Jason
Jason

Reputation: 10852

From Brock Adams' comment, this question is a duplicate of Manually adding a Userscript to Google Chrome and is well answered there.

The flag --enable-user-scripts does not seem to be supported in recent versions of Chrome. This seems to be confirmed by this List of Chromium Command Line Switches.

Confusingly there is a (vestigial?) switch --user-scripts-dir.

Upvotes: 4

Related Questions