Forum Settings
Forums

Can't drag&drop text into BBCode edit windows

New
Oct 20, 2023 3:02 PM
#1

Offline
Apr 2023
4715
Forum (and club) topic and reply used to allow drag and drop of text into BBCode edit windows. As of a day or two ago, this behavior was changed to only allow image formats: JPG, GIF, or PNG. Blog and profile BBCode windows still allow text drag and drop.

Text drag and drop was quite handy, especially for externally generated or repetitive snippets of BBCode and I'm sorry to see it go. If the change was inadvertent, I hope it can be reversed.
Oct 20, 2023 5:00 PM
#2

Offline
Dec 2019
3416
Oh interesting, I didn't know that, but this is what I found out

Modal.alert('Sorry, this file is not a valid file format (must be JPG, GIF, or PNG).');
Modal.alert('Your picture is too big, please make it smaller than or equal to 2MB.'); //2*1024*1024= Total of 2097152 MB


On my end the following line is bugging for some reason (after I disabled all scripts and extensions I have on my browser)
if (files.success[0].size > 2*1024*1024) {


The bug might be somewhere around here
Uncaught TypeError: Cannot read properties of undefined (reading 'size')
    at Object.handleFiles (editor.js:44:30)
    at HTMLDivElement.r (jquery.sceditor.dragdroptext.js:41:22)
    at HTMLDivElement.dispatch (jquery.js:5429:27)
    at g.handle (jquery.js:5233:28)     


I guess it is not that a lot of image formats are not accepted, but that MAL has a new bug making it not possible to drag and drop images

*Edit
I guess I found the issue, MAL only allows images from other pages to be drag/dropped on the editor, doing that using images on the current page wont work, most likely because MAL tries to convert/upload drag/pasted images to the https://cdn.myanimelist.net/s/common/bbcode/ URL, so images on the current page already use https://cdn.myanimelist.net/s/common/bbcode/ thus making editor.js break or not accept images already stored on https://cdn.myanimelist.net/s/common/bbcode/ to be dragged and dropped on the editor again
hacker09Oct 20, 2023 5:08 PM
Oct 20, 2023 9:24 PM
#3

Online
Feb 2010
11486
So you are referring to highlighting BBcode and then holding cursor, dragging it to the text box? I didnt even think of doing that but no it doesn't seem to work.




WTF IMAGE DROPPING LIKE DISCORD WORKS?! Testing...


@SnoopyInOrbit

What I do is I put "Copy" and other important shortcuts on a mouse with extra keys on the side:
https://www.amazon.com/gp/product/B00FNKMVUO

This way it's simply highlight and one click to take the BBcode anywhere. Useful for many other things. This mouse also has multiple modes, so you can have a "browser mouse" setting and press a button to switch to a "FPS mouse" or "Photoshop mouse" setting and so forth. It can also record inputs of keys, so you can make crazy macros.

Shishio-kunOct 21, 2023 12:16 AM
Oct 21, 2023 12:02 AM
#4

Offline
Apr 2023
4715
Reply to Shishio-kun
So you are referring to highlighting BBcode and then holding cursor, dragging it to the text box? I didnt even think of doing that but no it doesn't seem to work.




WTF IMAGE DROPPING LIKE DISCORD WORKS?! Testing...


@SnoopyInOrbit

What I do is I put "Copy" and other important shortcuts on a mouse with extra keys on the side:
https://www.amazon.com/gp/product/B00FNKMVUO

This way it's simply highlight and one click to take the BBcode anywhere. Useful for many other things. This mouse also has multiple modes, so you can have a "browser mouse" setting and press a button to switch to a "FPS mouse" or "Photoshop mouse" setting and so forth. It can also record inputs of keys, so you can make crazy macros.

Shishio-kun said:
What I do is I put "Copy" and other important shortcuts on a mouse with extra keys on the side


Quite the fancy mouse you have there.

I keep a bunch of common BBCode snippets as text clippings on my desktop and used to drag&drop them. Now I have to keep them open, select, copy and paste. Three actions instead of one! Oh the pain!

I wonder if MAL prefers we use images from their original source or drag&drop them so they end up on a MAL server. So far, I've just been referencing them where they originate. Maybe rendering pages from local resources is more efficient than getting images from wherever they live on the internet. On the other hand, maybe there aren't enough external references to make a difference. On the other other hand, link rot is not a problem if you copy them to MAL. In any case, it sure beats uploading images to a hosting service.
Oct 21, 2023 12:19 AM
#5

Online
Feb 2010
11486
Reply to SnoopyInOrbit
Shishio-kun said:
What I do is I put "Copy" and other important shortcuts on a mouse with extra keys on the side


Quite the fancy mouse you have there.

I keep a bunch of common BBCode snippets as text clippings on my desktop and used to drag&drop them. Now I have to keep them open, select, copy and paste. Three actions instead of one! Oh the pain!

I wonder if MAL prefers we use images from their original source or drag&drop them so they end up on a MAL server. So far, I've just been referencing them where they originate. Maybe rendering pages from local resources is more efficient than getting images from wherever they live on the internet. On the other hand, maybe there aren't enough external references to make a difference. On the other other hand, link rot is not a problem if you copy them to MAL. In any case, it sure beats uploading images to a hosting service.
SnoopyInOrbit said:
Quite the fancy mouse you have there.


Essential in MMOs! We used to call them "MMO mouses" actually lol. Also useful in games like Overwatch with very few actual gameplay commands but tons of fun commands you want instant access to like voice lines.

Putting Rshift and such on the mouse keys as well is a 200IQ move

Oct 21, 2023 1:26 AM
#6

Offline
Apr 2023
4715
Reply to Shishio-kun
SnoopyInOrbit said:
Quite the fancy mouse you have there.


Essential in MMOs! We used to call them "MMO mouses" actually lol. Also useful in games like Overwatch with very few actual gameplay commands but tons of fun commands you want instant access to like voice lines.

Putting Rshift and such on the mouse keys as well is a 200IQ move



As a not-a-gamer, I'm impressed your thumb has the dexterity to press those number buttons.
Oct 21, 2023 2:07 AM
#7

Online
Feb 2010
11486
Reply to SnoopyInOrbit


As a not-a-gamer, I'm impressed your thumb has the dexterity to press those number buttons.
@SnoopyInOrbit Thanks 🙏
May 24, 6:02 PM
#8

Offline
Dec 2019
3416
@SnoopyInOrbit
@Shishio-kun

Funny thing,

You helped me find the upload endpoint for MAL, and now I likely will add this to my "Paste Images" script, since it only uses Imgur for now, I could add support to upload images directly to MAL.

The really funny thing is that I bet MAL coded the upload feature to check for the file type before allowing it to be uploaded, which limits users to often seeing the error message "Sorry, this file is not a valid file format (must be JPG, GIF, or PNG).", but with my script using the MAL upload endpoint I can bypass this check, and I now know that the MAL server actually supports "all" image types.

For example, if I drag and drop a .webp image https://r2.starryai.com/results/1018912445/40b1d275-bedf-4d6e-8451-1b7874865d0b.webp I get that message, but if I copy the image and paste it here, my script uploads it directly to MAL...
[img]https://cdn.myanimelist.net/s/common/bbcode/211a304c-9f39-4cec-b768-fdb444100635?s=86d44b8f6dc7bf8191e3bb3a603dbc73[/img]

MAL converts all images on their server to .png

I may release it soon, so you can bypass and enjoy it as well!

*
Their server also has other kinds of limitations as we mentioned before
please make it smaller than ( 2048 x 2048 )
Your picture is too big (2,738Kb), please make it smaller than (2,048Kb) (I just learned about this one)

Apparently, they use "Code: 4" when an error happens, so I suppose it has at least 4 limitations, but so far I only found 3 (size, dimensions, type).
hacker09May 24, 6:16 PM

More topics from this board

» Recommended character image dimensions differ in Guidelines post and adding in the pictures

_cjessop19_ - 1 hour ago

0 by _cjessop19_ »»
1 hour ago

» How to tweak my list? ( 1 2 )

Gender_Equalizer - Aug 29

55 by ShaggyZE »»
2 hours ago

» Ad blockers prevents 2FA page from loading when logging into account

_cjessop19_ - 4 hours ago

0 by _cjessop19_ »»
4 hours ago

Sticky: » Inactive Username Request Thread ( 1 2 3 4 5 ... Last Page )

Kineta - Sep 21, 2015

3575 by pastelagony »»
7 hours ago

» Importing Issue?

Necron-Xiron - Apr 1

3 by DragonLordx5 »»
7 hours ago
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login