Sample Greasemonkey Script in Chrome to process local files

The following script will fire an alert box for local files:

// ==UserScript==
// @name Matcher
// @descriptions Match Local Files
// @version 1
// @match file://*
// ==/UserScript==


Save as “match.user.js”. Drop into a Chrome tab and you will be prompted to install. These are done per user profile. Each time you re-install the script, you need to remove the script from the extensions tab and repeat this process.

In order for this to work correctly, you need to open the Extensions settings in Chrome. You need to allow access to file urls, and incognito mode, if necessary.

(Click to enlarge)

Leave a Reply

Your email address will not be published. Required fields are marked *