Added the ability to copy async base roll in forum format for quick c…#19
Added the ability to copy async base roll in forum format for quick c…#19kalebhermes wants to merge 1 commit intomouse0270:masterfrom
Conversation
|
I actually don't understand the purpose of this... If you type out 1d6 + 3 on the forums the Async Dice roller would pick it up and highlight it. Am I misunderstanding the purpose of this pull request? EDIT: I just realized that if you dont use the ascii times character and an X my dice roller wont pick up the XdY x Z... I should update the script to include the "x" |
|
I've just started playing in a Play-by-Post game, where the forum can roll dice for you. For example, if the DM asks for a perception roll, you'd type |
|
Let me think about this. This pull request seems very specific and might be outside of what I want the extension scope to be. Would you be able to send me the forum site you are using, I would be curious to check it out. I am not saying I won't include this, I am just not sure if it really fits my personal goal of this extension so I would like to think about it. Also, I would like to improve the code, I am not really a fan of functions inside of functions. lol |
|
The forum is the one built into D&DBeyond. I'll drop a comment in your thread for the extension to see what I'm talking about. I agree that cleaning it up is probably a good idea. I snagged this code pretty much whole cloth from StackOverflow anyway. If it doesn't fit with your vision, that's totally understandable! I can pull this code out and drop it into a stand along extension! |
|
Just pushed a new patch that stripped all of the extra fallback code. navigator.clipboard is supported by all modern browsers, so if a given browser doesn't support it, we just don't display the button, removing the need for all fallback code. |
|
much nicer code. |
…opy pasting.