{"id":93,"date":"2012-03-19T00:43:50","date_gmt":"2012-03-19T00:43:50","guid":{"rendered":"http:\/\/garysieling.com\/blog\/?p=93"},"modified":"2012-03-19T00:43:50","modified_gmt":"2012-03-19T00:43:50","slug":"sample-greasemonkey-script-in-chrome-to-process-local-files","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/sample-greasemonkey-script-in-chrome-to-process-local-files\/","title":{"rendered":"Sample Greasemonkey Script in Chrome to process local files"},"content":{"rendered":"<p>The following script will fire an alert box for local files:<\/p>\n<pre>\/\/ ==UserScript==\n\/\/ @name Matcher\n\/\/ @descriptions Match Local Files\n\/\/ @version 1\n\/\/ @match file:\/\/*\n\/\/ ==\/UserScript==\n\nalert(1);\n<\/pre>\n<p>Save as &#8220;match.user.js&#8221;. 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.<\/p>\n<p>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.<\/p>\n<p><a href=\"http:\/\/172.104.26.128\/wp-content\/uploads\/2012\/03\/extensions.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-95\" title=\"chrome extensions\" src=\"http:\/\/garysieling.com\/blog\/wp-content\/uploads\/2012\/03\/extensions-300x108.png\" alt=\"\" width=\"300\" height=\"108\" srcset=\"https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2012\/03\/extensions-300x108.png 300w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2012\/03\/extensions-768x277.png 768w, https:\/\/www.garysieling.com\/blog\/wp-content\/uploads\/2012\/03\/extensions.png 916w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n(Click to enlarge)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following script will fire an alert box for local files: \/\/ ==UserScript== \/\/ @name Matcher \/\/ @descriptions Match Local Files \/\/ @version 1 \/\/ @match file:\/\/* \/\/ ==\/UserScript== alert(1); Save as &#8220;match.user.js&#8221;. Drop into a Chrome tab and you will be prompted to install. These are done per user profile. Each time you re-install &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/sample-greasemonkey-script-in-chrome-to-process-local-files\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Sample Greasemonkey Script in Chrome to process local files&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[110,212,230,260,286,360],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/93"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}