LinkedIn share button
I had an issue with the share button proposed by linkedIn (https://developer.linkedin.com/plugins/share).
In order to add this button to a page, here is the code to place on the page:
The first script tag will include their library, with a configuration directly passed in the body of the tag.
The second script tag is a placeholder which will be replaced by the share button.
With scriptmerger activated, the first script tag will get merged with other js resources, and the second script tag will get merged with "inDocument" script tags.
We need to exclude both script tags from being merged :
- the first because it contains some configuration in its body
- the second because it is a placeholder that need to stay at is place
But, scriptmerger does not allow to exclude "inDocument" tags...
Here is the hack that I used:
Like that, the second script tag is not considered "inDocument" by scriptmerger, and "data-ignored" works.
It will be a nice feature if we can use also data-ignore="1" for "inDocument" script tags.
#2 Updated by Fabian Galinski about 3 years ago
- Status changed from Accepted to Closed
Moved to Gitlab: https://gitlab.sgalinski.de/typo3/scriptmerger/issues/6