Enabling user-scripts in Google Chrome

2

I am following Mohamed Mansour's directions from this reference to enable user scripts in Google Chrome. But I can't seem to get them working, and I am sure I am missing something obvious.

Specifically:

  • I updated the Chrome shortcut with the --enable-user-scripts option.
  • I created the a test script (below) in C:\Users\zoredache\AppData\Local\Google\Chrome\User Data\Default\User Scripts called test.user.js.
  • I killed all existing Chrome processes and restarted.

test.user.js

// ==UserScript==
// @name  Test Script
// @include  *
// ==/UserScript=
alert("Hello World!");

I am running Chrome 5.0.375.127 on the 64 bit version Windows 7 Professional.

I believe I have completely followed the directions, but the alert() is never displayed when I try to visit pages.

So what do I have to do to enable user scripts in Chrome? What step am I missing?

Zoredache

Posted 2010-08-30T20:39:33.460

Reputation: 18 453

User script directory support was removed in 2011. See Does the User Scripts directory still work with Chrome 13.0?: http://stackoverflow.com/questions/6968469/does-the-user-scripts-directory-still-work-with-chrome-13-0#comment8333680_6979021.

– XP1 – 2015-12-27T11:43:04.073

"test.users.js."...try dropping the s from users – Moab – 2010-08-30T20:44:03.073

@Moab, Unfortunately, that was just a typo when I posted the question. The name of the script is/was test.user.js. – Zoredache – 2010-08-30T20:53:45.063

Answers

2

Chrome 5 shouldn't need a command-line switch to use userscripts anymore and the instructions you're following are nearly 18 months old. All you have to do is drop the user.js file into your Chrome instance and follow the prompts. Chrome has had this functionality since January.

digitxp

Posted 2010-08-30T20:39:33.460

Reputation: 13 502

I know that is out of date, but my searching on Google wasn't revealing anything newer. Do you have an up-to-date reference that you could add to your answer for completeness? – Zoredache – 2010-08-30T22:50:20.040

1

If you want to find recent stuff on Google, just click Show Search Tools in the sidebar of a Google Search and choose Past Year or another choice. Check out this Lifehacker article.

– digitxp – 2010-08-31T01:47:18.993