As of Drupal 8 all JS needs to follow our JavaScript coding standards. For this we use ESLint to check most of our standards.

Here is the summary of running ESLint on this module JS:
9 problems (9 errors, 0 warnings)

Comments

Neelanjana Das created an issue. See original summary.

neelanjana das’s picture

StatusFileSize
new1.8 KB
neelanjana das’s picture

Status: Active » Needs review

  • Neelanjana Das authored 9fadffa on 8.x-1.x
    Issue #2682427 by Neelanjana Das: Share Buttons by AddToAny ESLint...
micropat’s picture

Status: Needs review » Fixed

Thanks Neelanjana!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

gapple’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1.31 KB

Adding var a2a; within the closure breaks functionality, because now it is a local undefined variable instead of the global that is created by https://static.addtoany.com/menu/page.js.

In order to pass ESlint without errors, a2a should be specified as a global variable in a comment.

Additionally, I'm not sure why addtoany.js uses domready: behaviours already require domready.

micropat’s picture

Assigned: neelanjana das » micropat

  • gapple authored b894bca on 8.x-1.x
    Issue #2682427 by Neelanjana Das, gapple: Fix Ajax and optimize...
micropat’s picture

Status: Needs review » Fixed

Great catch, gapple. Ajax works again.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.