TamperMonkey Script

Started by Ssieth, June 09, 2015, 05:27:11 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Ssieth

Hi there,

I hope this is the write place to post and apologies if it isn't.  I'm one of those fussy people who never has the feature that they want on a site.  Fortunately, for me at least, I'm also a programmer.  So - I have a tendency to write scripts to tack on the features I desire and then, if I can kludge them into a not-too-buggy state, I make them available for anyone else who also desires the same features.

The scripts work using a firefox plugin called Grease Monkey (http://www.greasespot.net/) or a chrome plugin called Tamper Monkey (https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo).

Then you just pop my script in there and it adds in the extra features. 

The script can be found at:  https://openuserjs.org/scripts/Ssieth/Elliquiy_Improver

Feel free to let me know if it's useful, useless, confusing, broken etc :)   If you want other features let me know too :)

So far those features are:

Hide Pictures
This hides avatars and images in posts.  Why?  I wanted the script to be able to hide them at work so I could use Elliquiy without fear of anyone glancing over and getting too interested in what I was doing.

Quick Topics
Bookmarks by another name... this is a drop-down menu that has links to specific topics.  You can set/remove topics with a new button on the topic button bar.

To be honest I created this before I was aware of the bookmarks feature but I like it better as I like my navigation to be all up there in that menu bar.

Snippets
The ability to store frequently used bits of bbcode/text to be pasted into posts/PMs.  I created this to make it easier to post with a standard character header.  The interface is still a bit clunky... to remove a Snippet you have to click "Add Snippet" and then type in the snippet name with no body text.
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Blythe

Very useful! I like all three features. :-) (I could hug you for the quick-topics alone; I suspect I'll use that all the time!)

I see that snippets can be added into the body of a message--would it be possible to be able to add them to a subject line of a PM or post? I was unable to do that when fiddling about with this. ^^

Ssieth

Quote from: Blythe on June 09, 2015, 06:30:18 PM
Very useful! I like all three features. :-) (I could hug you for the quick-topics alone; I suspect I'll use that all the time!)

I see that snippets can be added into the body of a message--would it be possible to be able to add them to a subject line of a PM or post? I was unable to do that when fiddling about with this. ^^

Hmmm... there's nothing that would prevent adding them to the subject line.  It's just working out the UI for how a user selects one or the other.  I'll give it some thought :)
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Blythe

Thank you very much! Both for looking into the subject line thing and for making the nifty tools in the first place!  :-)

Ssieth

OK - I've moved to version 1.0.0 (you'll probably have to manually install it again as I don't think the host I use supports auto-uptdates).

This version overhauls the snippets behaviour a bit.  Still not simple way to delete them but.... the way that they paste into forms has been changed to follow the focus of your cursor so:


  • You can now paste to either message box or subject (in post or PM) depending on where your cursor was last :)
  • You can now paste anywhere in the message box.  If there's no selected text then the snippet is place where the cursor is.  If there is selected text then it is replaced by the snippet

Hope that helps :)
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Denivar

This is really cool, love the snippets especially. :)
"If you go to see the woman, do not forget the whip." -- Friedrich Nietzsche

Ons and Offs -- Roleplay Ideas -- Apologies, Absences, Excuses, that sort of thing

Blythe

The snippets now work in the Subject line, although they seem to auto-add to the "To" line as well in PMs, oddly, whatever the snippet is added to the Subject line. ^^;

Black Howling

I haven't tested all the features, but so far I'm really liking the quick topics. I've got my most viewed group pages listed there, and it really makes switching to them a lot easier.

Ssieth

Quote from: Blythe on June 11, 2015, 10:03:49 PM
The snippets now work in the Subject line, although they seem to auto-add to the "To" line as well in PMs, oddly, whatever the snippet is added to the Subject line. ^^;

OK - I've put up v1.0.2 (you need to update it manually by reinstalling I think).  That should correct the issue.

Thanks for reporting the bug... I'd probably have missed it and ended up sending out to someone I didn't intend to knowing my luck ;p

Oh - I've also taken a first stab at trying to allow snippets in the To and BCC fields (hopefully only when you intend to).  They are a bit more complex as script already runs there and you may need to tweak whatever is pasted in to get the site's own script to recognize that they need to be processed.  Please let me know how it goes if you use that feature :)
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Ssieth

v1.1.0 is now up for download with a new feature:

Unread Replies Count
New in v1.1.0 - this shows the count of unread replies to your post alongside the link to unread replies in the top right of the screen.  So you don't have to click it to know if you have any :D
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Ssieth

And another update.. it's been one of those productive scripting days:

v1.1.3

Unread Replies Menu
A list of unread replies.. in a menu.  See the title was meaningful.
Unread replies counts and menus are also updated periodically (every 3 minutes currently but you can adjust it in the script).  UI settings coming in the next release.
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Ssieth

And another update - v1.2.0.

There's now an option in the settings to switch off the replies auto-update or change the timing of it.

The links in the replies menu now go to the last post rather than the first.
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Ssieth

New version...

v1.3.0...

There's now a button at the top of each topic that lets you choose to ignore unread replies for that topic.  If you click the button it is immediately replaced by a button that lets you cancel the ignore and also hides the topic from the Relies menu and the count of unread replies.
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Ssieth

I meant to post this yesterday and forgot....

New version up (1.4.x) which adds automated updates to the PM count link at the top of the screen.  You can set the interval (in minutes) in the settings.  Setting it to 0 disables the feature.

I know that there's a feature built in that can pop up a message to show you new PMs but I was finding that a bit intrusive if I was in mid-flow with a post so created this as a less intrusive option.

Please be aware that this, and the auto-update for replies both create an extra hit on the site (grabbing only the HTML rather than all the images etc) so please don't go setting the intervals any lower than you need them to be.  No point creating extra load on E's servers.  That just slows everything down for everyone and potentially increases the hosting bills.
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Nymphadora

This is awesome! I'm loving the Quick Topics so far and will play with SNippets after work!

Thanks for this!
A&As UPDATED Oct 26/23

Rate:Weekly give or take
Status: Enjoying myself
Availability:
Unavailable for new plottings, sorry.
O&Os Please review
♪As flawed as you may think you are, you're perfect to me!♪

Ssieth

#15
Thanks for the feedback Nymphadora, it's always great to hear when someone is usefully using your code :)

I'm also working on some features to selectively hide/show bits of the header and footer for those of us on much shorter screens (my laptop is dreadful in this respect).  I need to work out what combinations of elements work and test it to make sure that I don't allow errors to creep in by hiding sections that other bits depend on.  I also want to make sure it's not possible to hide the donations bit unless you're already a dame/knight or admin type personage.

More to come on that soon.  If I can work out how to readily detect status and make it possible for folks who've already contributed to hide the donation bit then I'll check with the admins, first, before allowing that.  I don't want to annoy anyone with the script :)
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Ssieth

OK - I managed to fix the issues I had with the header/footer customization.  I also managed to find a way to salve my conscience regarding removing some of the items.  In particular:

You can remove loads of bits and bobs but... the news box and the donate section can only be removed by folks who've donated (Dames, Knights etc) and admins (Gods, Goddesses etc).  Even if you can and do remove the donate block, doing so will add a donate menu to the main menu which has links in there to patreon, the paypal page etc :)

So - v1.5.0 is up there.

Oh - I've also added sections to the settings :)
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Blythe

Absolutely loving the extra functionality, Ssieth.  And it's very awesome you've taken the time out to do all this! <3

(Snippets are still appearing in the "To" line in PMs when I want to use a snippet in a PM Subject line, alas! ;_; )


Nymphadora

I have just noticed, since I was busy most of the day till now, that when I click one of my Quick Topics, it goes to the first post in the thread and displays all in the thread. Easy enough to click Go Up but still not ideal.

It is awesome having just all of my Group RP threads in one place :D

I found the way to change that at line 380 (or 381) I took out 'all' and changed 'last' to 'first' 

For me this is the preference as it then displays the newest post and the newest page. Others, yourself included, may prefer the other way.

Mostly, I'm just amazed I could figure it out on my own! ;)
A&As UPDATED Oct 26/23

Rate:Weekly give or take
Status: Enjoying myself
Availability:
Unavailable for new plottings, sorry.
O&Os Please review
♪As flawed as you may think you are, you're perfect to me!♪

Ssieth

Many thanks, guys for helping me locate the bugs :)  I'm really enjoying getting my teeth into a GM script project again and, compared to some other sites I've written scripts for, Elliquiy is nice and easy to work with :)

There's a new version out (v1.6.0) that address some bugs you've found and adds some new features:

Quote from: Blythe on June 18, 2015, 09:13:33 PM
Absolutely loving the extra functionality, Ssieth.  And it's very awesome you've taken the time out to do all this! <3

(Snippets are still appearing in the "To" line in PMs when I want to use a snippet in a PM Subject line, alas! ;_; )

Er.. yeah.. my bad for messing up my version control and reverting a couple of functions back to what they were a few versions back... should now be fixed :)

Quote from: Nymphadora on June 18, 2015, 09:58:38 PM
I have just noticed, since I was busy most of the day till now, that when I click one of my Quick Topics, it goes to the first post in the thread and displays all in the thread. Easy enough to click Go Up but still not ideal.

It is awesome having just all of my Group RP threads in one place :D

I found the way to change that at line 380 (or 381) I took out 'all' and changed 'last' to 'first' 

For me this is the preference as it then displays the newest post and the newest page. Others, yourself included, may prefer the other way.

Mostly, I'm just amazed I could figure it out on my own! ;)

Ah - this was as a result of the option you've got ticked in your profile to view most recent post first (I didn't even know it existed until I went hunting).  I've now put an option in the UI that allows you to choose which behaviour you want:

  General Features/Quick topics goes to last post?

If it's checked (and it is by default) then the quick topics work as they did before, heading to the post at the bottom of the list of all posts.  If it's not checked then it just loads the first page of topics and sits on the top one.  For what you want, Nymphadora  (and I want now I've found that profile setting and checked it) - you want it unchecked.

New Features
Not much this time... I've added the version number for the script and a link to the current version of the script under the Script Settings menu.  I've also made a lot of movement of code inside the script to group things in more sensible blocks.  That should make my life a bit easier now the script is getting bigger :)
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Nymphadora

Quote from: Ssieth on June 19, 2015, 04:31:57 AM
Many thanks, guys for helping me locate the bugs :)  I'm really enjoying getting my teeth into a GM script project again and, compared to some other sites I've written scripts for, Elliquiy is nice and easy to work with :)

There's a new version out (v1.6.0) that address some bugs you've found and adds some new features:

Er.. yeah.. my bad for messing up my version control and reverting a couple of functions back to what they were a few versions back... should now be fixed :)

Ah - this was as a result of the option you've got ticked in your profile to view most recent post first (I didn't even know it existed until I went hunting).  I've now put an option in the UI that allows you to choose which behaviour you want:

  General Features/Quick topics goes to last post?

If it's checked (and it is by default) then the quick topics work as they did before, heading to the post at the bottom of the list of all posts.  If it's not checked then it just loads the first page of topics and sits on the top one.  For what you want, Nymphadora  (and I want now I've found that profile setting and checked it) - you want it unchecked.

New Features
Not much this time... I've added the version number for the script and a link to the current version of the script under the Script Settings menu.  I've also made a lot of movement of code inside the script to group things in more sensible blocks.  That should make my life a bit easier now the script is getting bigger :)

Love the update! This is totally awesome!
A&As UPDATED Oct 26/23

Rate:Weekly give or take
Status: Enjoying myself
Availability:
Unavailable for new plottings, sorry.
O&Os Please review
♪As flawed as you may think you are, you're perfect to me!♪

Ssieth

Quote from: Nymphadora on June 19, 2015, 12:04:25 PM
Love the update! This is totally awesome!

*tips hat*

Glad to be of service :)

I'm not sure what's up next for the script unless more bugs are found. If anyone has anything in mind that they would like to see then please do let me know :)
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Nymphadora

Quote from: Ssieth on June 19, 2015, 01:58:50 PM
*tips hat*

Glad to be of service :)

I'm not sure what's up next for the script unless more bugs are found. If anyone has anything in mind that they would like to see then please do let me know :)


Is it possible to have unread numbers in the Quick Topics?
That would be cool. No biggie if not.
A&As UPDATED Oct 26/23

Rate:Weekly give or take
Status: Enjoying myself
Availability:
Unavailable for new plottings, sorry.
O&Os Please review
♪As flawed as you may think you are, you're perfect to me!♪

Ssieth

Quote from: Nymphadora on June 22, 2015, 11:38:48 AM

Is it possible to have unread numbers in the Quick Topics?
That would be cool. No biggie if not.

That's a good question and the answer is a yes but/no but sort of thing.  It would be possible but it would put a fair amount of strain on the site (which I would rather avoid) as it would required loading each topic page and having the code examine it for new posts.

If the actual count of new items was not so important but rather you were happy with just a "there is new replies here" type indicator (maybe in the form of an asterix or similar?) then it would be a much less load-intensive operation as it could use the same data that's used for the replies count/menu which is gleaned from a single page.

Would that be of use?
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (13th November 2023)
One-on-one ideas (5th July 2023)
Possible Absences (13th November 2023)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Nymphadora

Quote from: Ssieth on June 22, 2015, 11:43:26 AM
That's a good question and the answer is a yes but/no but sort of thing.  It would be possible but it would put a fair amount of strain on the site (which I would rather avoid) as it would required loading each topic page and having the code examine it for new posts.

If the actual count of new items was not so important but rather you were happy with just a "there is new replies here" type indicator (maybe in the form of an asterix or similar?) then it would be a much less load-intensive operation as it could use the same data that's used for the replies count/menu which is gleaned from a single page.

Would that be of use?

I definitely wouldn't want to put extra strain on the site for sure! Yes, just having some kind of indicator would be awesome! Again, no biggie if not.

Thanks so much!
A&As UPDATED Oct 26/23

Rate:Weekly give or take
Status: Enjoying myself
Availability:
Unavailable for new plottings, sorry.
O&Os Please review
♪As flawed as you may think you are, you're perfect to me!♪