BetterDiscordStuff icon indicating copy to clipboard operation
BetterDiscordStuff copied to clipboard

Link-Profile-Picture construction error

Open Masono03 opened this issue 1 year ago • 5 comments

Says: Missing start or stop function.

Canary 140672 (156c86e) BetterDiscord 1.6.0 Host 1.0.48 Windows 10 64-Bit (10.0.19044)

Masono03 avatar Aug 09 '22 02:08 Masono03

same problem after 1.6 update

Keler69 avatar Aug 09 '22 05:08 Keler69

yeah im getting this too after the 1.6 update

shamshitty avatar Aug 09 '22 07:08 shamshitty

same

Chrysanthemum536 avatar Aug 09 '22 16:08 Chrysanthemum536

adding an empty stop function at the end of the linkProfilePicture class seems to "fix" it.

something simple like this:

stop () {}

Probably not the ideal solution and I haven't tested this for very long but could be a temporary workaround

EDIT: turns out this solution was already suggested in #185

MGThePro avatar Aug 10 '22 09:08 MGThePro

I think the best solution is to copy this.stop from line 15 into the added stop(){}, looking like:

  stop () {
	document.removeEventListener.bind(document, "click", LinkProfilePicture, true);
  }

This way the plugin can gracefully unload instead of doing nothing when asked to stop.

What a load of gibberish, I see why you made claims about my suggested Pull request being broken when it already worked for people.

You seem to have blindly copied and pasted code from the original plugin and when it didn't work, you blamed it on my code ? which literally adds an empty function

Your current suggested answer is the issue

document.removeEventListener.bind(document, "click", LinkProfilePicture, true);

Maybe you didn't see the bind() call which returns a function but doesn't invoke it

Also, The stop function is overridden inside the start function. when the plugin stops is actually does clean up.

The suggested fix to only add en empty stop function to satisfy BD checks, the functionally is added later.

ghost avatar Aug 12 '22 13:08 ghost

fixed in v1.2.4 (above PR)

Inve1951 avatar Aug 24 '22 00:08 Inve1951