I am exactly doing what Brock Adams mentioned here but I am not being able to see alert at all. I have put all my files in same folder where user script exist but some how it is broken and I can't trace it either.
I am on Firefox version 21
That linked answer was from 2011, and Greasemonkey has changed a lot since then. (Note, I just now updated that answer to reflect the changes.)
Basically, you need to use @grant
directives now. If you looked on Firefox's error console (CtrlShiftJ), you might have seen error messages like:
GM_addStyle is not defined
Here is a bare-bones addition of jQuery-UI to demonstrate the process:
// ==UserScript==
// @name _YOUR_SCRIPT_NAME
// @include http://YOUR_SERVER.COM/YOUR_PATH/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js
// @resource jqUI_CSS http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css
// @grant GM_addStyle
// @grant GM_getResourceText
// ==/UserScript==
var jqUI_CssSrc = GM_getResourceText ("jqUI_CSS");
GM_addStyle (jqUI_CssSrc);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With