You are either not logged in or not registered with our community. Click here to register.
 
February 05, 2023, 11:19:40 am

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Click here if you are having problems.
Default Wide Screen Beige Lilac Rainbow Black & Blue October Platinum Send us your theme!

Wiki Blogs Dicebot

Author Topic: TamperMonkey Script  (Read 160573 times)

0 Members and 1 Guest are viewing this topic.

Online Nowherewoman

  • They buffet against opposing waves, to gain the bloody shore, not to recede from it.
  • Dame
  • Carnite
  • *
  • Join Date: Aug 2014
  • Location: Having a conversation with a brain on fire.
  • Gender: Female
  • Go elf yourself.
  • View My Rolls
  • Referrals: 4
Re: TamperMonkey Script
« Reply #750 on: December 17, 2020, 11:41:25 am »
Can't speak directly to this, but I know Ssieth updated the script about...5? weeks ago, and that may have purged the data cache.

She'd obviously know better than I would, though.

Offline persephone325

  • E's Resident Bucky Barnes/Winter Soldier Addict | Lady White Wolf | Bucky Bait/Buckygirl | Howling's Dagger | Queen of the Underworld | A sentient pile of kittens | Always blame Bucky | Myers Fangirl | Always stand up for you
  • Dame
  • Addict
  • Join Date: Jul 2012
  • Location: Following the White Wolf...
  • Gender: Female
  • Ready to comply...
  • View My Rolls
  • Referrals: 1
Re: TamperMonkey Script
« Reply #751 on: December 17, 2020, 04:26:58 pm »
Can't speak directly to this, but I know Ssieth updated the script about...5? weeks ago, and that may have purged the data cache.

She'd obviously know better than I would, though.

Ahh. Alrighty. Thank you.

Offline Al Terego

  • Transformation aficionado & part-time autogynephile
  • Knight
  • Addict
  • *
  • Join Date: Sep 2014
  • Gender: Male
  • I come in peace
  • View My Rolls
  • Referrals: 5
Re: TamperMonkey Script
« Reply #752 on: January 13, 2021, 07:17:18 pm »
I have a feature request.

Sometimes I want to quote from a post in a PM or in another thread, but the original thread is either locked or otherwise not open to replies (such as an O/O thread).

Currently I:
1. Write a [quote] tag, manually adding the URL of the post and converting the date to a timestamp.
2. Copy the HTML source of the post and convert it to bbcode, then paste the result into the [quote].

Would be nice to have it done automatically in the script.

Thank you,
-- Al

Offline clonkertink

  • [Noob-Friendly][Systems Machine][Dapper Automaton][Pied Piper of Perverts][Duly Elected Boob Minister][Junker]
  • Lord
  • Addict
  • *
  • Join Date: Oct 2016
  • Gender: Male
  • Beware, I was cursed by a wicked dice witch.
  • View My Rolls
  • Referrals: 25
Re: TamperMonkey Script
« Reply #753 on: January 14, 2021, 11:58:58 am »
I have a feature request.

Sometimes I want to quote from a post in a PM or in another thread, but the original thread is either locked or otherwise not open to replies (such as an O/O thread).

Currently I:
1. Write a [quote] tag, manually adding the URL of the post and converting the date to a timestamp.
2. Copy the HTML source of the post and convert it to bbcode, then paste the result into the [quote].

Would be nice to have it done automatically in the script.

Thank you,
-- Al

Oooh, as a maybe weird followup - would it be possible to make a "full quote" option? I often have to quote posts or PMs that have embedded quotations inside them.

The standard quote button loses those embedded quotes. For example:

Quote
Here is a quote:

Quote
this is the quote:

gets quoted as:

Quote
Here is a quote:


which can be quite frustrating when I want the entire message.

Offline Al Terego

  • Transformation aficionado & part-time autogynephile
  • Knight
  • Addict
  • *
  • Join Date: Sep 2014
  • Gender: Male
  • I come in peace
  • View My Rolls
  • Referrals: 5
Re: TamperMonkey Script
« Reply #754 on: January 14, 2021, 02:05:43 pm »
*Squints at Clonk's "God" tag*

Can't you just say "LET THERE BE QUOTE!" or something to that effect?

Offline clonkertink

  • [Noob-Friendly][Systems Machine][Dapper Automaton][Pied Piper of Perverts][Duly Elected Boob Minister][Junker]
  • Lord
  • Addict
  • *
  • Join Date: Oct 2016
  • Gender: Male
  • Beware, I was cursed by a wicked dice witch.
  • View My Rolls
  • Referrals: 25
Re: TamperMonkey Script
« Reply #755 on: January 14, 2021, 09:36:04 pm »
I could, but where's the fun in that? ;)

Offline Al Terego

  • Transformation aficionado & part-time autogynephile
  • Knight
  • Addict
  • *
  • Join Date: Sep 2014
  • Gender: Male
  • I come in peace
  • View My Rolls
  • Referrals: 5
Re: TamperMonkey Script
« Reply #756 on: February 23, 2021, 08:30:57 pm »
Issue: Notes on users whose name contains a space do not display.

Offline SsiethTopic starter

Re: TamperMonkey Script
« Reply #757 on: February 27, 2021, 08:53:00 pm »
Issue: Notes on users whose name contains a space do not display.

Should be fixed and pushed out as v1.43.4 :)

(If your copy hasn't updated already then click the link for my script in my siggy)

Data disappearing on cabbit.org.uk
Hmmm...we had a catastrophic failure on there a while back that lost a whole load of data... it might be that yours was amongst it persephone325 :(  Sorry... I lost a load there, too and it was a real pain.

Quote functionalilty
Added to to-do list.  I'm thunking some thunks and my current thunks are that this could work reusing some of the snippets code... basically allowing you click a button/link placed somewhere in a reply/pm that quotes up the whole thing and places it in store to be inserted when you've got to the pm/topic that you're going to use it.  There it would be in the editor alongside Snippets as "Quotes" or something like that with a drop down of all of the ones you'd stored.

How does that sound?
« Last Edit: February 27, 2021, 08:55:20 pm by Ssieth »

Offline SsiethTopic starter

Re: TamperMonkey Script
« Reply #758 on: February 27, 2021, 09:08:13 pm »
My BM tags all appear alphabetically, though I'm not sure if you can change the order.

All of the ones you add yourself (rather than the system-generated ones) should be sorted alphabetically in the list.  There's no option to change this currently but I could look at one if folks want it?

Offline Al Terego

  • Transformation aficionado & part-time autogynephile
  • Knight
  • Addict
  • *
  • Join Date: Sep 2014
  • Gender: Male
  • I come in peace
  • View My Rolls
  • Referrals: 5
Re: TamperMonkey Script
« Reply #759 on: February 27, 2021, 10:41:37 pm »
Quote functionalilty
Added to to-do list.  I'm thunking some thunks and my current thunks are that this could work reusing some of the snippets code... basically allowing you click a button/link placed somewhere in a reply/pm that quotes up the whole thing and places it in store to be inserted when you've got to the pm/topic that you're going to use it.  There it would be in the editor alongside Snippets as "Quotes" or something like that with a drop down of all of the ones you'd stored.

How does that sound?

Sounds good, although I am not sure why would one need multiple persistent quotes.  Saving just one, or just copying it to the clipboard should be sufficient for all cases I can think of, though maybe I am missing something.

Offline SsiethTopic starter

Re: TamperMonkey Script
« Reply #760 on: February 28, 2021, 04:17:20 am »
Sounds good, although I am not sure why would one need multiple persistent quotes.  Saving just one, or just copying it to the clipboard should be sufficient for all cases I can think of, though maybe I am missing something.

Copying to the clipboard is really rather hard... there's some workarounds to allow it but most of them require plugins/extensions like flash.  I think one slot is probably a good idea and then have it overwritten when copying a new quote.

Although...I've run into an issue I need to think about.... my code only has access to the end product of the page not the building blocks before the bbcode is interpretted so I'd need to translate back to bbcode.... hmmm...

Offline Mister Morgue

  • .☆☆ ʜᴏᴘᴇʟᴇss ʀᴏᴍᴀɴᴛɪᴄ ☆☆. .☆☆ ɢᴇɴᴛʟᴇᴍᴀɴ ᴅᴇᴍᴏɴ ☆☆. ..☆☆ ·..· ᴅᴇɢᴇɴᴇʀᴀᴛᴇ ·..· ☆☆.. .☆☆ sᴘᴏᴏᴋʏ ᴇɴᴛʜᴜsɪᴀsᴛ ☆☆.
  • Champion
  • Enchanter
  • *
  • Join Date: Aug 2017
  • Location: The Graveyard
  • Gender: Male
  • ʏᴏᴜ'ᴠᴇ ʜᴀᴜɴᴛᴇᴅ ᴍᴇ ɪɴ ᴄᴏʟᴏᴜʀs ɪ'ᴠᴇ ɴᴇᴠᴇʀ sᴇᴇɴ
  • View My Rolls
  • Referrals: 4
Re: TamperMonkey Script
« Reply #761 on: February 28, 2021, 06:25:07 am »
All of the ones you add yourself (rather than the system-generated ones) should be sorted alphabetically in the list.  There's no option to change this currently but I could look at one if folks want it?

the option for alphabetical or manual sorting would be nice >_>

Offline Al Terego

  • Transformation aficionado & part-time autogynephile
  • Knight
  • Addict
  • *
  • Join Date: Sep 2014
  • Gender: Male
  • I come in peace
  • View My Rolls
  • Referrals: 5
Re: TamperMonkey Script
« Reply #762 on: February 28, 2021, 11:53:27 am »
Copying to the clipboard is really rather hard... there's some workarounds to allow it but most of them require plugins/extensions like flash.  I think one slot is probably a good idea and then have it overwritten when copying a new quote.

Does GM_setClipboard not work?


Although...I've run into an issue I need to think about.... my code only has access to the end product of the page not the building blocks before the bbcode is interpretted so I'd need to translate back to bbcode.... hmmm...

There is JS code in the page that I mentioned that does just that.  It is not aware of the E-specific BBCode exstensions, but maybe it can be used as a starting point?

Thank you!
-- Al

Offline SsiethTopic starter

Re: TamperMonkey Script
« Reply #763 on: February 28, 2021, 01:03:40 pm »
Does GM_setClipboard not work?

Potentially, yes.  It's a bit on-and-off with how well it performs with TamperMonkey and browser combinations (especially FireFox, which is the browser I used as standard).   It will work for half a dozen versions and then get broken only to be fixed a few weeks later and so on... a bit of a rollercoaster but I could have it as an optional switch... either copy to clipboard or to internal script storage depending on user settings....

There is JS code in the page that I mentioned that does just that.  It is not aware of the E-specific BBCode exstensions, but maybe it can be used as a starting point?

Thank you!
-- Al

Ah yes, I've looked at that now.  It would need a fair amount of work to get it to fully understand eli's bbcode but it could probably be done.  It's not a bad starting point, though.

Offline SsiethTopic starter

Re: TamperMonkey Script
« Reply #764 on: February 28, 2021, 01:04:04 pm »
the option for alphabetical or manual sorting would be nice >_>

Added to the to-do list :)

Offline Al Terego

  • Transformation aficionado & part-time autogynephile
  • Knight
  • Addict
  • *
  • Join Date: Sep 2014
  • Gender: Male
  • I come in peace
  • View My Rolls
  • Referrals: 5
Re: TamperMonkey Script
« Reply #765 on: February 28, 2021, 02:09:27 pm »
Some messing around with the custom tags:

BBCodeHTML
[o]...[/o]<span style="text-decoration: overline;">...</span>
[anch=x]...[/anch]<a name="user_x">...</a>
[link=x]...[/link]<a href="#user_x">...</a>
[justify]...[/justify]<div style="text-align: justify;">...</div>
[img width=x height=y padding=z alt=w]...[/justify]<img src="..." alt="w" width="x" height="y" style="padding: zpx;" class="bbc_img resized"/>
[floatleft]...[/floatleft]<div class="floatleft">...</div>
[floatright]...[/floatright]<div class="floatright">...</div>
[clearleft]<br class="clear_left"/>
[clearright]<br class="clear_right"/>
[clearboth]<br class="clear"/>
[spoiler=x]...[/spoiler]


<div class="spoiler_container">
   <div onclick="hideSecond (this);" role="button" class="spoiler_header">x</div>
   <div class="spoiler_body">...</div>
</div>
[highlight=x]...[/highlight]<span style="background-color: x;" class="bbc_color">...</span>
[acronym=x]...[/acronym]<acronym title="x">...</acronym>
[flip]...[/flip]<div class="flip">...</div>
[reverse]...[/reverse]<div class="reverse">...</div>
[rotate]...[/rotate]<div class="rotate_90">...</div>
[rotate=x]...[/rotate]<span class="rotate" style="-moz-transform: rotate(xdeg); -webkit-transform: rotate(xdeg); -o-transform: rotate(xdeg); -ms-transform: rotate(xdeg); transform: rotate(xdeg);">...</span>
« Last Edit: February 28, 2021, 02:28:43 pm by Al Terego »

Offline SsiethTopic starter

Re: TamperMonkey Script
« Reply #766 on: February 28, 2021, 02:51:21 pm »
This is going to require me to put my RegEx hat on...  :P

Offline Vekseid

  • Those who expect service must first serve.
  • God
  • Addict
  • *
  • Join Date: Apr 2005
  • Location: Washington
  • Gender: Male
  • The way to a woman's heart is through her tears.
  • View My Rolls
  • Referrals: 20
Re: TamperMonkey Script
« Reply #767 on: February 28, 2021, 06:27:34 pm »
Copying to the clipboard is really rather hard... there's some workarounds to allow it but most of them require plugins/extensions like flash.  I think one slot is probably a good idea and then have it overwritten when copying a new quote.

This is an immense security concern so it is generally not possible in most situations.

Offline Al Terego

  • Transformation aficionado & part-time autogynephile
  • Knight
  • Addict
  • *
  • Join Date: Sep 2014
  • Gender: Male
  • I come in peace
  • View My Rolls
  • Referrals: 5
Re: TamperMonkey Script
« Reply #768 on: February 28, 2021, 09:50:27 pm »
Another request:

One of the helpful shortcuts when writing a post is the ability to select some text and then hit a key combination like CTRL-B to surround it with [b] and [/b] tags (also works for underline and italics).

Would it be possible to add similar functionality to the "snippets" feature by using predefined placeholders that would be replaced by selected text, clipboard contents, etc. on invocation?

Thank you,
-- Al

Offline SsiethTopic starter

Re: TamperMonkey Script
« Reply #769 on: March 01, 2021, 07:01:10 am »
V1.44.0

Added a first stab at the snippets replacement stuff.  It works as follows.....

In your snippets dropdown in the editor you should now see a number next to each snippet.  If you put that number in the editor in a format of [3] you can, at any point, press CTRL+S to have the system try and substitute the relevant snippet.

Offline SsiethTopic starter

Re: TamperMonkey Script
« Reply #770 on: March 03, 2021, 05:28:38 am »
V1.44.2

Some topic filtering improvements.  Nothing major:

  • You can switch off the request style topic filters and thus have a reduced list of filter types
  • The editor for topic filters should now correctly identify the type of the filter already in place (if there is one)

Offline SsiethTopic starter

Re: TamperMonkey Script
« Reply #771 on: March 03, 2021, 05:44:54 am »
Oh - just for those wondering what Topic Filters are all about:

(from an old section of the version doc)

Topic Filters
Another of Nowherewoman's ideas.  This should allow you to either mark, highlight or hide topics that you, for some reason, know that you're not interested in.  In particular it is useful for marking ideas topics as not of you for whatever reason.

My own usage of it is for the roleplay request threads.  It allows me to mark topics as not-for-me and to have a bit of categorization regarding why.  That way I don't need to reread a topic in there that I've already decided isn't for me.

Offline Al Terego

  • Transformation aficionado & part-time autogynephile
  • Knight
  • Addict
  • *
  • Join Date: Sep 2014
  • Gender: Male
  • I come in peace
  • View My Rolls
  • Referrals: 5
Re: TamperMonkey Script
« Reply #772 on: March 04, 2021, 11:31:25 am »
Request:
Allow reorganizing snippets (and possibly other lists, but I mostly use snippets)

Suggestion:
When displaying the script update notification, link to either the last or the "new" post in this thread, instead of the first one.  E.g.:
https://elliquiy.com/forums/index.php?topic=230790.99999#lastPost
https://elliquiy.com/forums/index.php?topic=230790.new#new

Offline SsiethTopic starter

Re: TamperMonkey Script
« Reply #773 on: March 04, 2021, 11:38:35 am »
Request:
Allow reorganizing snippets (and possibly other lists, but I mostly use snippets)

Suggestion:
When displaying the script update notification, link to either the last or the "new" post in this thread, instead of the first one.  E.g.:
https://elliquiy.com/forums/index.php?topic=230790.99999#lastPost
https://elliquiy.com/forums/index.php?topic=230790.new#new

OK - just pushed 1.44.3 which goes to new#new.  I tried #lastPost but it goes to the first post with the way I order stuff so it'll likely do that for at least some other folks too.

I've put list-ordering on the to-do list and will look for a good UI to do it :)

Offline Al Terego

  • Transformation aficionado & part-time autogynephile
  • Knight
  • Addict
  • *
  • Join Date: Sep 2014
  • Gender: Male
  • I come in peace
  • View My Rolls
  • Referrals: 5
Re: TamperMonkey Script
« Reply #774 on: March 04, 2021, 11:55:01 am »
Please note the ".99999" part in the #lastPost url, it's the secret sauce that makes it work.
But I agree that #new is better.

Thank you.

I tried reordering the snippets manually by editing the script's storage in TM and saving it.  Unfortunately it didn't take.  I have no idea why it reverted.

Bug:
The "Max pages (0=no max)?" setting cannot be set to 0.