Shop Mobile More Submit  Join Login
deviant Messages Anywhere by electricjonny deviant Messages Anywhere by electricjonny

Update 7/11/2015


I've updated this to include group stacks.  dA recently made group stacks its own thing in a different category from regular deviations, so I've accounted for that here.  When a group stack only has one deviation in it, you won't see the border like at the top of this screencap.  But if a group stack does have more than one deviation in it, you'll get the fancy border I made.  Now this border may not look so great with semi-transparent thumbs or emoticons, but I decided that since most art will be rectangle and solid, I went with this (the border is just made up with border-image:;, which I think is better than dA's way of adding a lot of <i></i> tags and styling it that way.)

I've also updated the logo so it matches with dA's new logo and fiddeled with how it shows up on new messages.  Hopefully it works better now.

You need Firefox and Greasemonkey for this to work.  It works in Chrome (or should) but Chrome is stupid and requires that scripts be submitted to their store.  Not doing that :roll:  Simply download this file devMessAny.user and then drag the devMessAny.user.js file into Firefox.

Let me know how it works :)

Another update


Updated to account for commission messages, which appear as NC - Name Changes.  But you'll get the right info in the preview and the settings will now say Name Changes & Commissions.

Update:


So take a read of this and you'll know of the changes :)

Hey :)

This is a script similar to the few extensions out there that notifies you of messages you get here.  But this is just a script.  Now this script works on all sites, and on the "about:blank" page of Firefox.  Because of how Greasemonkey works, it does not work on all about:* pages, but that is just how things work.  Also, because of the cross site scripting I am doing here, this only works on Firefox with Greasemonkey, or Chrome with Tampermonkey.

This (I hope) is pretty self explanatory, but the only real thing to keep in mind is that to see your messages, hover a 27x30px are at the bottom left of your page.  That will enable the box showing your messages to show up.  You can then also click on messages to get a preview of what they are.  It shows a max of 10 messages (due to not working very well showing more).  You can also click the options button, at the far right, to only receive updates on certain types of messages.  You can also set it to only work on the deviantart.com domain, or all domains.  And you can set how often to check for messages, along with setting a noise alert when you get new messages.

These settings are all saved by the Greasemonkey/Tampermonkey GM_setValue, so any setting you make will stay the same.  I wish I could have made this using standard JS, and not the GM_ prefixed functions, but because this works on any site, and needing to "look at a certain webpage" from dA, I had to use some custom functions.

You will also be alerted, via sound (if you enable that) and the bar popping up when you receive new messages.


Anywho, let me know what you think :)  And by the way, if you see anything surrounded by a %, let me know.  I have tested many kinds of messages, but there could be a few I didn't catch, and that will make the previews not as clear as they should appear in your message centre.

To install:



Simply go to here 99.82.246.199/code/devMessAny.… And yes, because of the way this script works, it will not work in the standard Chrome browser.  You must use the Tampermonkey script.  And to install this into Tampermonkey, you have to view the code source and paste that into the "Add a new script" option, from within that extension.  Just control+A on the script page, copy it, then paste it in.  I don't normally use Chrome, so I have not tested much, but it seems to work.

Also take note: Yes, I could have made group messages work, but I tried that, and it was rather muddy.  So no, this will not alert you to group messages, just the main ones in your inbox.  Also, you can click the dA logo at the far left to open your messages (in a new tab).

Also take note: While I've tried to keep the links and styling of the preview the same across sites, there may be some sites that override the styles, particularly on links colors and such.
Add a Comment:
 

The Artist has requested Critique on this Artwork

Please sign up or login to post a critique.

:iconcatkinsvedka:
CatkinSvedka Featured By Owner Jan 24, 2015  Hobbyist General Artist
The script claims that I am not logged in when I am, and even by following the provided link and logging in again does not work; It just asks me to log in again. Could this please be fixed? I use GM on Firefox/Windows7.
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jan 24, 2015  Hobbyist Photographer
:o

I'm afraid I'm not sure why it would do that, unless you have some odd extensions or settings.
Reply
:iconcatkinsvedka:
CatkinSvedka Featured By Owner Jan 24, 2015  Hobbyist General Artist
Well, I have tried to run it without any other GM scripts enabled, it worked for a moment on google.com, but after I switched to DA (where the script asks for me to log in), it won't work on other sites. When I check on other sites it doesn't show or react at all.
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jan 24, 2015  Hobbyist Photographer
There's an option to have it work on all sites or just dA.  Try going to the Greasemonkey icon, click the User Script Commands menu, and click the dev Messages Anywhere Options.  That will pull up the options and you can check to make it work everywhere.
Reply
:iconcatkinsvedka:
CatkinSvedka Featured By Owner Jan 25, 2015  Hobbyist General Artist
The option to have it work on all sites is enabled by default, that is not the issue here, sorry. As you can see here - sta.sh/0cqrzjbypwo - it claims I am not logged in when I am.
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jan 27, 2015  Hobbyist Photographer
Huh :o  Well I'm dumbfounded.  Can't imagine why it would do that.
Reply
:iconcatkinsvedka:
CatkinSvedka Featured By Owner Jan 27, 2015  Hobbyist General Artist
Alright, not much to do about it then, it would be nice if it had worked, but alas. :(
Reply
:iconelectricjonny:
electricjonny Featured By Owner Feb 27, 2015  Hobbyist Photographer
Oh I think I know why it won't say you're logged in.  By change do you disable third party cookies?  I also block third party cookies, and just remembered that you have to add an exception in for deviantart.com to let you have this script work, for some reason.  This is a themed options page, but here's where you can add in the exceptions: Screen Shot 2015-02-27 at 23.45.59 by electricjonny
Reply
(1 Reply)
:icondays-be-strange:
days-be-strange Featured By Owner Aug 20, 2014
Works great. :) (Smile) 
Reply
:iconelectricjonny:
electricjonny Featured By Owner Aug 21, 2014  Hobbyist Photographer
Glad it works for you :)  It won't always look right on every website, but in general it should.
Reply
:icondays-be-strange:
days-be-strange Featured By Owner Aug 21, 2014
oh okay 

But I have to say it's really handy.
Reply
:iconelectricjonny:
electricjonny Featured By Owner Aug 21, 2014  Hobbyist Photographer
Thanks :nod:
Reply
:iconrotane:
rotane Featured By Owner Jun 25, 2014  Professional
Hey man. Don't know of you know – or care – but here's a heads up nonetheless: On NinjaKit/Safari/OSX your script works flawlessly, with the exception of one thing: it doesn't play sounds. 
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 25, 2014  Hobbyist Photographer
Oh actually, it might be the audio file type I'm using.  I'm using .ogg which may not work in all browsers.  I'll see if I can update that to work better.
Reply
:iconrotane:
rotane Featured By Owner Jun 25, 2014  Professional
Oh! Yeah, that might be it. :)
.m4a will definitely work in safari. 
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 25, 2014  Hobbyist Photographer
Ok the fix was actually easier than I thought.  Although I didn't actually test it with NinjaKit and Safari, but an html file with the same audio tag/data src seemed to work, and it still works the same in Firefox, so I'm hoping that it will fall back to the right m4a file since it's coded that way now.  Give it a try: electricjonny.com/code/devMess…

I tried NinjaKit, but after getting a rather unhelpful .safriextz file and having no idea what to do with it, I gave up :B
Reply
:iconrotane:
rotane Featured By Owner Jun 25, 2014  Professional
You're the man, man! That seems to have done it. I've tested it on the settings pane, and the sound playes after a significant delay (well, 2–3 seconds), but it does play. :thumbsup:

Hmm, .safriextzon is basically was .xpi is for Firefox. The Windows version of Safari must be seriously lacking :P
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 25, 2014  Hobbyist Photographer
Yeah I noticed a bit of lag, but lag is better than nothing =P

And yeah, the couple sites I googled for led me to the .safriextz file.  Seems that's a native-ish extension format for Safari?  Maybe only on the Mac.  I did a quick (too quick, but meh) google on how to install them, and after reading some mac.about.com article about double clicking on the file and recognizing the warning about "blablabla only install from people you trust", it seemed to me that I was missing something, and just gave up.

But oh well, if it works then it works :lol:
Reply
:iconrotane:
rotane Featured By Owner Jun 25, 2014  Professional
Yeah, why bother with Apple apps on Windows. They run sooo very sub-par compared to the Mac, it's just not worth it.

But yeah, the script now works, so, well done, and thanks!
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 25, 2014  Hobbyist Photographer
Glad I could fix it up for ya :)
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 25, 2014  Hobbyist Photographer
Ah, good to know :nod:
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 25, 2014  Hobbyist Photographer
I assume NinjaKit is the Greasemonkey for Safari?  Well all I'm doing with the sound is inserting it into the page with a <audio> tag, autoplay, then removing it.  So if Safari doesn't support that (rather universal) tag, then I'm not sure if I can fix it :o  But thanks for the heads up nonetheless.
Reply
:iconrotane:
rotane Featured By Owner Jun 25, 2014  Professional
Yes, this is exactly what it is. 

Hm, interesting. There should be support for <audio> and stuff (remember, Apple is a big supporter of HTML5 in favour of Flash), but maybe it's the autoplay that's tripping it off. (I also have a plugin installed, called ClickToPlugin, that would block even HTML5 media, but i've disabled it for testing purposes just now, and it wasn't it.) Well, it's no biggie, since the rest of the script works just fine. 
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 25, 2014  Hobbyist Photographer
For a quick test you can copy any of the name_SOUND variables inside of the script (think it's around line 60-64), the text inside the ' and paste it into a Safari tab.  It plays natively in Firefox, but I'm guessing it won't work in Safari.   But I can just look up what formats Safari supports and see if I can work it in.
Reply
:iconrotane:
rotane Featured By Owner Jun 25, 2014  Professional
Yep, doesn't work. Safari tries to download it, but doesn't know what it is. But it might have problems with a URI such as data:video/ogg;base64… to begin with. 
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 25, 2014  Hobbyist Photographer
Hmm well I just tried installing Safari on a spare computer (I try to keep as many Apple products off my shiny Windows computer as I can ;)) and tried a base64 encoding of a .m4a file, and it didn't seem to do anything.  I typed in the whole data blob and hit enter, yet nothing.  Even tried .mp4 and nothing.  Didn't even try to save it.  I'm tempted to just say "use a good browser… :B", but I imagine there's at least a handful of Safari users out there.

(/me misses the days when the only scripting/css he worried about was Firefox…)

You can try that data file here if you want electricjonny.com/audio/m4a.tx… or even the direct sound here electricjonny.com/audio/bading… Loading that last m4a file into Safari played it, but with some old Quicktime plugin I must still have on that computer.  If Safari supports native audio and video, but requires another program (Quicktime), then it seems a bit hypocritical.  Although I bet Quicktime just comes standard on Mac computers.  Not sure what I can do since I've never installed Safari and I never got to know its quirks :slow:
Reply
:iconrotane:
rotane Featured By Owner Jun 25, 2014  Professional
Well, the m4a (your second link) plays fine inside Safari. I see a player centered on the page that looks a bit like the QuickTime player, but it's just Safari's built-in controls. (Similar to what you get in Firefox when you play a media file in a tab.) It also autoplays the file. That's how it is on the Mac at least. The base64 string of text pasted into the URL-bar, however, resulted in a "Safari can't open the page" error message. 
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 25, 2014  Hobbyist Photographer
Hmm, looks like I'll have to look at how Safari handles data URI's over at stackoverflow.com
Reply
(1 Reply)
:icondediggefedde:
Dediggefedde Featured By Owner Mar 17, 2014
reminds me of my script devsidebar / devtoolbar2 ^^
But I like how you implemented the replies into a view-field! it looks a bit messy now and then, but that's a handy feature!

unrelated to that, have you tried violent monkey for opera? It suprisingly worked for most of my scripts there. Even Safari seems to have a little more support for userscripts with Ninjakit now^^
Reply
:iconelectricjonny:
electricjonny Featured By Owner Mar 17, 2014  Hobbyist Photographer
Ah yeah, I remember seeing that one a while ago (probably why mine looks/works similarly =).  Sorta cool how it groups it by category and then shows specific messages on hover.

And no, haven't tried violent monkey yet.  Although that's good to know, since scripting in Opera seems sorta hard.  Does Safari work, like with cross site scripting and special GM_ functions?
Reply
:icondediggefedde:
Dediggefedde Featured By Owner Mar 17, 2014
Well, Ninjakit is opensource on GitHub, so I guess it uses this as GM-function-emulators:
github.com/os0x/NinjaKit/blob/…
But as it uses a simple XMLHttpRequest(); in a javascript-file, I guess it doesn't allow cross-site scripting. I don't know much about extension-development in Safari, but I guess the js-files get injected into the websites...
GM_setValue is also apparently emulated via localstorage, so it shouldn't be available for multiple domains...
When I remember correctly, Tampermonkey used a sql-database on drive, independant from the site you currently visit, to store Values...
But I guess you know more about that stuff than I do^^

For Opera, I tested violent-monkey with my scripts and it seem to work for all of them so far...

About your script-idea:
When I get a lot of new deviations, the deviation-preview looks pretty chaotic.
And then suddenly the bar vanishes. This might be a feature, as it only appears on new messages, but if I have two types of messages and want them previewed, or one takes too long, then the bar and preview just vanish. Maybe an option or a short-key to make the bar appear again?^^
Reply
:iconelectricjonny:
electricjonny Featured By Owner Mar 18, 2014  Hobbyist Photographer
I've modified this slightly and now it won't go away after 8 seconds on new messages if you're hovering over the bar or you have a preview open.  Before it would go away real quick if you had hovered during the popup with a red background.
Reply
:iconelectricjonny:
electricjonny Featured By Owner Mar 17, 2014  Hobbyist Photographer
Yeah Firefox/Greasemonkey does the same for GM_setValue - stores the settings in an SQLite file.  It used to be stored in the about:config prefs.js file, but I think people were storing too much data in them.  Makes manually editing settings harder, but there's a SQLite Manager extension that makes it easier.

I would have wanted to just use standard js, but again, because of the cross site scripting, I would have had to make this an extension and I don't know much about that.  But the monkeys of browsers seem to work fine =P

As for the bar vanishing, I think that's a bug somewhere in my coding.  Might not be checking .hover() when it rechecks.  But if you set your check time to something longer (I use 120 seconds) things don't usually mess up.

I also noticed that you apply yours to about:blank too =P  Although I couldn't seem to get mine working on about:newtab.  According to some Greasemonkey wiki docs, it seems that about:blank is the only about:* page things works on, seemingly to keep scripts from interfering with the internal workings on those pages.
Reply
:icondediggefedde:
Dediggefedde Featured By Owner Mar 17, 2014
Well, about about:blank...
The first version of this script was made Apr 2010... I'm quite sure, about:newtab came later... also before the update-version-number-madness... so back than about:blank was usually used for new tabs and it made sense to allow it. ^^ (you even commented back there! And I just proposed to you to use a shortkey to display it again, too. ^^)
Well, now it still makes sense, but even I got used to the newtab window, even if I never used a tab displayed there...
But due to privacy-security GM only limited the access in about-pages to only about:blank.
It was even based of a standalone-tool from Aug 2008 to behave similar in the windows-taskbar... I guess it stopped working some years ago... much more people use userscripts than executive tools, even if all of them have windows. ^^

Well, I didn't change the recheck-time... I guessed the script would assume on the next reading-try that all messages it had on the last one were read... That way, even if you checked your comments, but not your deviations, if would stay hidden after wasting 120s on reading the comments-preview^^
Reply
:iconelectricjonny:
electricjonny Featured By Owner Mar 17, 2014  Hobbyist Photographer
I had thought about hiding already checked messages, but honestly, it just seemed like too much work.  I mean there's already 40 or so settings it sets, and it didn't seem too  important :slow:
Reply
:icondediggefedde:
Dediggefedde Featured By Owner Mar 17, 2014
Eh? I thought it was already doing that^^ otherwise I don't know why it is vanishing so fast^^
It only appears for me if I get a new message. Otherwise it stays hidden. and after 120s it goes into hiding again...
Reply
:iconelectricjonny:
electricjonny Featured By Owner Mar 17, 2014  Hobbyist Photographer
Maybe I'm confused what you mean then.

It checks for messages and then stores the number of each message in the settings.  Then on the next check, if you get another message it pops up to let you know.  What I don't do, however, is hide the messages in the preview if you had already checked the preview there.
Reply
:icondaghrgenzeen:
Daghrgenzeen Featured By Owner Mar 15, 2014  Hobbyist General Artist
Awesome. :la: Using this. Works good for me. ^^
Reply
:iconelectricjonny:
electricjonny Featured By Owner Mar 15, 2014  Hobbyist Photographer
I am gad :)
Reply
:iconrotane:
rotane Featured By Owner Mar 15, 2014  Professional
Oh, and 3. Let users customize the shortcut letter. R for replies and such are fine, but UN for notes is a bit clumsy. I might even prefer to spell it out, so it says "1 Note" instead of "1UN". (I know, i could mod your .js file myself, but having this in the settings would be über-cool.) ;)
Reply
:iconelectricjonny:
electricjonny Featured By Owner Mar 15, 2014  Hobbyist Photographer
Heh, again, I am sorry, but for the simple sake of simplicity, I went with this.  So no I don't think I can let people "rename" the abbreviations.  It would be cool, but I just don't see a great need or call to do that.
Reply
:iconrotane:
rotane Featured By Owner Mar 15, 2014  Professional
Fair enough :)
Reply
:iconrotane:
rotane Featured By Owner Mar 15, 2014  Professional
Nifty! :thumbsup:

And i do have a few little suggestions/wishes:

1. Make it optional to always show, rather than show only on :hover (and perhaps let people set their own desired corner).

2. I would love to go even further with customization: I'd love to hear a sound when i get a feedback message, but not so much for anything else. But i'd still like the message count/popup for, say, deviations. Is there any way, without being overly complicated, to add this?

Anyway, it's awesome, thanks!
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 6, 2014  Hobbyist Photographer
I've been revising this script, and now I've added a volume control in the settings (in case you want a really low sound or something) and fixed a few issues with hovering and viewing things while it updates again (it had been completely going away when it updates), but that's fixed.  Also added 300px wide thumbs for deviations with their artists comments.  Although that makes for a rather long scroll to see them all.  But so far I'm liking it sta.sh/02371guzdwa9

I had also played with rotating the dA icon, based on the update time.  So if you update every 60 seconds, it would rotate 360 degrees in 60 seconds.  Basically just so you can look at it and know that when the logo is upright, it updated.  But then I thought that was really sorta pointless.  And there's a few minor issues, like film thumbs on non-dA sites; you get a wide thumb with all the frames that would have been there if you had hovered.  And some sites still can mess with the styling, so I need to sort out my styles.


Anyway, I think I'll add options to let you pin it to pages, either fixed at the bottom or the bottom of the page.  And custom corners (or even anywhere, although that gets messier).  I'll look into options to play sounds only on specific message types, but that might take a while.
Reply
:iconrotane:
rotane Featured By Owner Jun 9, 2014  Professional
Nice updates! And yeah, a rotating icons (however slowly) would be kinda distracting :lol:
Reply
:iconelectricjonny:
electricjonny Featured By Owner Jun 9, 2014  Hobbyist Photographer
Hehe yeah, it was a sorta neat idea, but over just sorta pointless and distracting.
Reply
:iconelectricjonny:
electricjonny Featured By Owner Mar 15, 2014  Hobbyist Photographer
So a custom sound/noise on specific messages?  That could be possible, although hard to do :/  And making it always visible? (you first comment)?  Well,  I did not want it very "in your face", always shown.  I am a  fan of scripts that are not "here I am, right in your face", but rather hidden, until you need them.  If that makes sense?
Reply
:iconrotane:
rotane Featured By Owner Mar 15, 2014  Professional
Well, not really so much a custom sound per type, but rather 2 settings per type: one that makes it visible on the bar, one that makes a sound play when a new item arrives.

And of course, this default very much makes sense! But again, it could be an option for people to set, if they actually preferred the "always in your face" approach.
Reply
:iconelectricjonny:
electricjonny Featured By Owner Mar 15, 2014  Hobbyist Photographer
Hmm, it could be possible.  But the coding/UI to reach that point seems hard, to me.
Reply
:iconrotane:
rotane Featured By Owner Mar 15, 2014  Professional
It's no biggie. I love the way it currently works already: the unobtrusive sound and the popup when something arrives – that's excellent!
Reply
Add a Comment:
 
×
Download PNG 1324 × 1740




Details

Submitted on
March 14, 2014
Image Size
545 KB
Resolution
1324×1740
Submitted with
Sta.sh
Link
Thumb
Embed

Stats

Views
1,349
Favourites
12 (who?)
Comments
65
Downloads
3
×