TamperMonkey Script

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

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Nowherewoman

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.
No man has fear- until fear comes for him.

more me here now!  (O/Os, ideas and junk): https://elliquiy.com/forums/index.php?topic=215830.0

and mea culpas  (A/As): https://elliquiy.com/forums/index.php?topic=221151.0

persephone325

Quote from: Nowherewoman 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.

Ahh. Alrighty. Thank you.
This doesn't have to end in a fight, Buck.
It always ends in a fight.
You pulled me from the river. Why?
I don't know.
"Don't dwell on those who hold you down. Instead, cherish those who helped you up."

Al Terego

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
                    

clonkertink

Quote from: Al Terego 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

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:

Quotethis is the quote:

gets quoted as:

QuoteHere is a quote:


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



Al Terego

*Squints at Clonk's "God" tag*

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

clonkertink

I could, but where's the fun in that? ;)



Al Terego

Issue: Notes on users whose name contains a space do not display.
                    

Ssieth

#757
Quote from: Al Terego on February 23, 2021, 08:30:57 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?
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (8th April 2024)
One-on-one ideas (8th April 2024)
Possible Absences (2nd May 2024)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Ssieth

Quote from: Mister Morgue on November 29, 2020, 10:39:06 AM
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?
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (8th April 2024)
One-on-one ideas (8th April 2024)
Possible Absences (2nd May 2024)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Al Terego

Quote from: Ssieth on February 27, 2021, 08:53:00 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.
                    

Ssieth

Quote from: Al Terego on February 27, 2021, 10:41:37 PM
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...
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (8th April 2024)
One-on-one ideas (8th April 2024)
Possible Absences (2nd May 2024)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Mister Morgue

Quote from: Ssieth on February 27, 2021, 09:08:13 PM
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 >_>

Al Terego

Quote from: Ssieth on February 28, 2021, 04:17:20 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?


Quote from: Ssieth on February 28, 2021, 04:17:20 AM
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
                    

Ssieth

Quote from: Al Terego on February 28, 2021, 11:53:27 AM
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....

Quote from: Al Terego on February 28, 2021, 11:53:27 AM
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.
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (8th April 2024)
One-on-one ideas (8th April 2024)
Possible Absences (2nd May 2024)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Ssieth

Quote from: Mister Morgue on February 28, 2021, 06:25:07 AM
the option for alphabetical or manual sorting would be nice >_>

Added to the to-do list :)
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (8th April 2024)
One-on-one ideas (8th April 2024)
Possible Absences (2nd May 2024)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Al Terego

#765
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"/>
[float=left]...[/float]<div class="floatleft">...</div>
[float=right]...[/float]<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>
                    

Ssieth

This is going to require me to put my RegEx hat on...  :P
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (8th April 2024)
One-on-one ideas (8th April 2024)
Possible Absences (2nd May 2024)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Vekseid

Quote from: Ssieth on February 28, 2021, 04:17:20 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.

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

Al Terego

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
                    

Ssieth

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.
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (8th April 2024)
One-on-one ideas (8th April 2024)
Possible Absences (2nd May 2024)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Ssieth

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)
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (8th April 2024)
One-on-one ideas (8th April 2024)
Possible Absences (2nd May 2024)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Ssieth

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.
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (8th April 2024)
One-on-one ideas (8th April 2024)
Possible Absences (2nd May 2024)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Al Terego

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
                    

Ssieth

Quote from: Al Terego 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

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 :)
Posting Status: Hoping for 1-3 per week / game
My ONs and OFFs Page (8th April 2024)
One-on-one ideas (8th April 2024)
Possible Absences (2nd May 2024)

My Tampermonkey Script for Elliquiy

PM me here or find me as ssieth on discord.

Al Terego

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.