deviant ART

[x]

Watching you? v1.3 by =philho:iconphilho:


©2007-2008 =philho
Details
Submitted: November 6, 2007
File Size: 21.1 KB
Image Size: 16.9 KB
Resolution: 700×181
Comments: 168
Favourites & Collections: 73 [who?]

Views
Total: 2,996
Today: 2

Downloads
Total: 734
Today: 3

Embed


Thumb

Artist's Comments

Quick facts:

:pointr: What is it? A Greasemonkey (GM) script for Firefox (FF) to show if a deviant you visit is one of your watchers.

:pointr: History
1.3.5 -- 2008/06/26 -- Fixed for dA v.5! (watcher list)
v.1.3.4 - 2008/06/02 -- Minor fixes, and works for dA v.6! (and v.5 of course).
v.1.3 - 2008/02/14 -- Added button in Message Center to add new watchers. Also renamed the file & script.
v.1.2 - 2007/11/12 - Handling several accounts.
v.1.1 - 2007/11/09 - Automatic scan of the list of watchers.
v.1.0 - 2007/11/06 - Creation.

Warning! This script was previously named "deviantART - Is this deviant watching you?".
I renamed it for various reasons, but since GM is using the name as key in the config, you have to uninstall the previous version, deleting also the associated preferences.
You will have then to re-install it and redo a full scan. Sorry for the inconvenience.

:pointr: How to use

See my Information on Greasemonkey scripts journal entry for all needed information!

For fast, easier installation, you can go to the corresponding UserScripts.org page.

More infos:

In the suggestion forum, I saw the Who watches you request, and it wasn't the first time... Apparently, lot of deviants want to know if a deviant watches them when they visit his/her pages.
I had the idea to write a Greasemonkey script to do this.

So, what do my script does? The screenshot says it all: If the deviant you visit (in his/her profile page, gallery or deviation) is watching you, the script adds on the right of the deviant name in the title bar a watch icon, so you can check this at a glance.
Also adds in the profile page a line above the Watch this deviant/Watching this deviant one.

In fact, if you edit the script (using Notepad for example, or a better editor if you have one!), you can deactivate the icon or the message, as you wish. See the comments at the start of the code to see how (lines below) those starting with //$$ Read these comments for instructions. It is better to do this before loading the script in FF, if you don't know how to edit it after...

If you have no watchers, well this script will do nothing...
If you have some watchers, when you go to your main page, you will see in the Recent Watchers box, on the right of the title, a new Update watcher list button.
If you have 20 watchers or less, just click on this button, and you are done: go visit some of your watchers, and see the magic works!
If you have more than 20 watchers, you have a Complete List link: click on it, a window listing the first 200 watchers (or less if, like me, you are an ordinary deviant...) appears, as usual.
Hit the End key and you go at the bottom of the page. Here, you have a checkbox and a button added by the script, below the navigation box.
For the first time, just hit the Update watcher list button. If you have 200 watchers or less, you are already done, close the window. Above this number, the script will load the next page in the window.
Just let it work through all the pages of watchers you have. At the end, like in other cases, a message box will display the total number of watchers found, confirming the end of the process.

Note: if you have a large number of watchers, like 20,000 to 50,000, the capture of the deviants can take a long time... You can even minimize this window and see the page numbers going in the title...
But sometime deviantART doesn't like these repeated requests and returns an error page. Or you closed the window, tired of waiting. Etc.
For these cases, there is a recovery/resume mechanism: go to the Complete List (first page), and click the Update watcher list button: the watcher capture will resume were it was. I was able to capture the 32,138 watchers of a deviant after many restarts...

What about new deviants?
If you have less than 20 new watchers, just click on the Update watcher list button in your profile page. The script will get the new names in this page and update your list.
If you are very popular or away for a long time, with more than 20 new watchers, click the Complete List link and in the Friends page, click the Update watcher list button. The page will be scanned. If the last deviant wasn't in the list, it is likely there are more, so the script will continue on the next page, until it finds a page full of known deviants.
If, for some reason, you prefer to regenerate fully the list (eg. to handle deviants no longer watching you), check the Rescan all check box and the script will clear the list and fill it again from scratch.
Note: the script doesn't handle automatically deviants no longer watching you: you have to rescan the
list to get rid of them.

Where does this list of watchers go?
I store it using the function GM_setValue. Greasemonkey puts these values in the user settings.
You can view these settings by typing about:config (and Enter) in the address bar of Firefox.
You can locate the settings of my scripts by typing phi.lho in the filter area: you will see GM creates the keys greasemonkey.scriptvals.http://Phi.Lho.free.fr//deviantART - Watching you?.xxx
You can even edit it... Or erase their content.
These settings are stored in C:\Documents and Settings\<Windows user name>\Application Data\Mozilla\Firefox\Profiles\<some profile code>.default\prefs.js.
Path to user data (C:\Documents and Settings) might have been changed.
Note that this file seems to be written only when Firefox is stopped.

Devious Comments

love 0 0 joy 1 1 wow 0 0 mad 0 0 sad 0 0 fear 0 0 neutral 0 0

=BoffinbraiN:iconBoffinbraiN: Nov 6, 2007, 1:25:51 PM
Good proof of concept. :thumbsup: I'll look straight into improving this so that you need not enter anything manually.
=philho:iconphilho: Nov 6, 2007, 5:25:16 PM
I know already how I will do to gather the list of watchers, I will implement it soon. I just had to refine some ideas to minimize the manipulations.

--
82% of statistics in signatures are made up. :rip: (This is a recursive signature...)
Spreading them is un-original and sheepish. If you agree, copy this in your... wait, no! :D
No to signature clichés! You are on an art site, be creative!
=philho:iconphilho: Nov 10, 2007, 1:59:41 PM
Done: the script can scan the list of watchers!
Wasn't easy... But I believe I have addressed most cases for maximum ease of use.

--
82% of statistics in signatures are made up. :rip: (This is a recursive signature...)
Spreading them is un-original and sheepish. If you agree, copy this in your... wait, no! :D
No to signature clichés! You are on an art site, be creative!
=philho:iconphilho: Nov 10, 2007, 2:00:14 PM
Thanks! You might be interested by my update, able to scan the list of watchers!

--
82% of statistics in signatures are made up. :rip: (This is a recursive signature...)
Spreading them is un-original and sheepish. If you agree, copy this in your... wait, no! :D
No to signature clichés! You are on an art site, be creative!
=rotane:iconrotane: Nov 11, 2007, 4:52:36 AM
Wonderful! :thumbsup:

--
Paint deviantART green! - a skin for Firefox
>:]
=philho:iconphilho: Nov 11, 2007, 5:37:00 AM
I have put some of your ideas there, so thanks to you!
This is the most complex GM script I wrote to day, there are some hours of testing and debugging but it was fun to do!

--
82% of statistics in signatures are made up. :rip: (This is a recursive signature...)
Spreading them is un-original and sheepish. If you agree, copy this in your... wait, no! :D
No to signature clichés! You are on an art site, be creative!
=rotane:iconrotane: Nov 11, 2007, 6:27:23 AM
Yes, I've had a look at the script! Quite complex indeed, but you did a commendable job with all the comments :)

--
Paint deviantART green! - a skin for Firefox
>:]
=philho:iconphilho: Nov 11, 2007, 7:17:58 AM
Could use a bit more, perhaps...
I am programming long enough to know a program must be readable, at least for maintenance purpose, for somebody else... or yourself in some months! =)

--
82% of statistics in signatures are made up. :rip: (This is a recursive signature...)
Spreading them is un-original and sheepish. If you agree, copy this in your... wait, no! :D
No to signature clichés! You are on an art site, be creative!