Information on Greasemonkey scripts

6 min read

Deviation Actions

philho's avatar
By
Published:
4.3K Views
I have made a template for comments/explanations on my Greasemonkey (GM) scripts to be pasted in each deviation of this kind, but I thought it would be easier to put this in a permanent journal entry and to link there, instead of pasting the whole information.
Thus experimented users can skip this entirely, new users of the technology will find extended information, everybody can concentrate on the information specific to the shown script, and updates of such information is easily done in a central, unique location.


What is Greasemonkey?


It is an extension for the Firefox (FF) browser allowing to change the Web pages you are browsing, to improve your user experience.

In clear, that's a plug-in able to detect the pages you want to change (eg. pages on deviantART) and to run a JavaScript (JS) program (script) of your choice, which can alter the page, eg. by adding, removing, moving or changing elements, doing actions on user input, and so on.
You don't need to know JS programming to use them: just choose a script and install it, and you are good to go!

Note that GM scripts are known to run on Opera too, and I think there is a plug-in for Internet Explorer allowing that too. I also saw something called IE7Pro handling scripts like GM, but I guess scripts must be adjusted for it (more or less, depending on differences in Dom/CSS, calls of specific API, etc.).

For more information, I invite you to visit the related Web site.


How to install the GM scripts I provide?

  • Make sure you have FF installed with the GM extension!
  • Right-click on the Download link, choose the menu item to save the file to your disk (left click will display the code...)
  • Rename the saved file so it has an extension of .user.js - it is important for GM to recognize the script. The name can be changed too, I use deviantART-JumpToPage.user.js for example.
  • For some of my scripts, you might want to edit some options. Open the script in a text editor (Notepad if you have nothing else!) and search the lines starting with //$$ symbol. They contain instructions for setting changes. You can also edit the file after having installed it, and re-install it as below. Or use the Edit button in the GM script management dialog (see below).
  • Drag'n'drop the renamed script in the FF window. GM will ask if it must install it. Accept. You are done!
  • EDIT I finally opened a UserScripts.org account, so you can now just follow the link to the related page in my comments, and left-click on the Install this script button to install it. It might be a simpler procedure (but no editing before install...) and in some reported cases, the only one.


How to manage the installed GM scripts?


See the small monkey face icon in the status bar of FF: a left-click allows to deactivate it (you can reload the page to see it unaltered) and to re-activate it. A right-click allows you to manage the scripts you have installed. You can even edit the live scripts (eg. to change a hard-coded setting) if you activate the editor behind the Edit button: in the address bar, type about:config and Enter. Type grease in the Filter field, you will see a property called greasemonkey.editor. Double-click the line, and you will be able to paste the path to your favorite text editor there.

Note that GM doesn't use the original drag'n'dropped scripts, but a copy located in the profile directory. The Edit button opens these copies.


How to find GM scripts for deviantART?


Of course, you can find some of mine in my gallery:
  • Friends List improvements -- Eases moving a deviant to a category, sort columns, check/uncheck all items in a column.
  • Watching you? -- Shows an icon next to the deviant name if the deviant you visit is among your watchers.
  • Jump to page -- Adds a navigation item to skip pages in paged lists (comments, deviants, etc.)
  • Deviation statistics Displays on the deviation page some percentages: faves per view, faves per comment, comments per view. Also displays word count on literature deviations.
  • deviantART improvements (already using it, coming soon) -- Renames the tab, adds a combo box to jump to various parts of your account.
  • Miscat reporting helper This one, I won't release it, in fear of abuses. But I am willing to provide it to any serious miscat hunter: it adds a direct link from a category browse page to a report violation page, and a button to check the file type of a deviation. It improves the report page, showing the file types (to track type miscats in Flash or animation galleries), selecting the type of violation in the combo, putting focus in the description and even pre-filling it (to be completed/corrected!) and even showing the deviations of this deviant in a given category.


And there are lot of good scripts (and extensions) listed by the Mozilla club!


© 2008 - 2024 philho
Comments36
Join the community to add your comment. Already a deviant? Log In
gothic-anomie's avatar
When I right click on Download (trying to download watching you) I don't get an option to save file to disk. I've asked others, and they have the same problem. I have greasemonkey installed and enabled on Firefox. Is there another way to get it to work?